SoftwareSerial on ESP32

wahed-bd
Posts: 4
Joined: Sat Aug 19, 2017 9:15 pm

SoftwareSerial on ESP32

Postby wahed-bd » Sat Aug 19, 2017 9:56 pm

Hi, Greetings! I have been using the ESP 32 by Ai Thinker. To my opinion its a great little alternative of my Arduinos... I was trying to port some of my existing Arduino projects to this ESP 32. However, in some cases I need more than two and sometimes three Serial Coms. to interface with the GPS, GSM and HC-05(Couldn't figure out how to use the onboard BT :( ). But I could not find any way out. For now, I have only been able to use the single hardware serial. So my question is this-> Is there any SoftwareSerial library in ESP32 or any sort of similar library which can be used for Serial Coms on any preferred GPIOs on ESP32? If not then what are the alternatives?

Thanks in advanced

User avatar
martinayotte
Posts: 141
Joined: Fri Nov 13, 2015 4:27 pm

Re: SoftwareSerial on ESP32

Postby martinayotte » Sun Aug 20, 2017 2:59 pm

There is probably some SoftwareSerial already written somewhere ...
But it is always better to use Hardware Serial !
For the third Serial port, check this http://hackaday.com/2017/08/17/secret-s ... uinoesp32/
Also if your need some more additional serial ports, you could hook-up a SC16IS750 dual serial ports using either I2C or SPI.

wahed-bd
Posts: 4
Joined: Sat Aug 19, 2017 9:15 pm

Re: SoftwareSerial on ESP32

Postby wahed-bd » Sun Aug 20, 2017 3:22 pm

Thank you for the suggestions. Yes, found a third party library called EspSoftwareSerial and it works fine. And thanks for the alternative solution.

viniciusmay23
Posts: 1
Joined: Fri Jan 26, 2018 12:00 am

Re: SoftwareSerial on ESP32

Postby viniciusmay23 » Fri Jan 26, 2018 12:04 am

Hi, how are you?

About this library: "EspSoftwareSerial", could you send me? I'm using the Arduino IDE.

So, I need to connect 3 serial ports on my esp32.

Hw Serial 0 -> fw update and logs
Hw Serial 2 -> gps
Sw Serial -> gsm

I already know that Serial 1 is connected to flash memory.
So I need to emulate a serial port through GPIO's.
I tried using an Arduino "Serial Software" library, but unfortunately on a compilation error. Reading in some forums and making some changes in the library, I was able to compile the "Sketch"; but the communication of my GSM modem via SoftwareSerial did not work.

Note: By connecting the GSM modem separately to a USB / SERIAL converter the communication worked as expected. That is, the problem really is in SoftwareSerial emulation.

Could you help?

PavlovIgor
Posts: 1
Joined: Fri Jan 26, 2018 12:29 pm

Re: SoftwareSerial on ESP32

Postby PavlovIgor » Fri Jan 26, 2018 12:45 pm


NivruttiMahajan
Posts: 2
Joined: Fri Oct 26, 2018 10:06 am

Re: SoftwareSerial on ESP32

Postby NivruttiMahajan » Fri Oct 26, 2018 10:12 am

Hey
have u found the issue?
I am also trying to interface GSM with esp32 using softwareserial. But could not getting communicate with serial. By using hardwareserial its working fine. If u found the solution plz let me know.

Thanks & Regards
Nivrutti Mahajan

ahmaddidiks
Posts: 1
Joined: Wed Jan 18, 2023 4:13 am

Re: SoftwareSerial on ESP32

Postby ahmaddidiks » Wed Jan 18, 2023 4:17 am

You can use serial1 in ESP32, in other word you can use 3 HW Serial, see my gist here https://gist.github.com/ahmaddidiks/c7e ... 6fe12662c1

Who is online

Users browsing this forum: No registered users and 38 guests