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
SoftwareSerial on ESP32
- martinayotte
- Posts: 141
- Joined: Fri Nov 13, 2015 4:27 pm
Re: SoftwareSerial on ESP32
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.
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.
Re: SoftwareSerial on ESP32
Thank you for the suggestions. Yes, found a third party library called EspSoftwareSerial and it works fine. And thanks for the alternative solution.
-
- Posts: 1
- Joined: Fri Jan 26, 2018 12:00 am
Re: SoftwareSerial on ESP32
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?
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?
-
- Posts: 1
- Joined: Fri Jan 26, 2018 12:29 pm
-
- Posts: 2
- Joined: Fri Oct 26, 2018 10:06 am
Re: SoftwareSerial on ESP32
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
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
-
- Posts: 1
- Joined: Wed Jan 18, 2023 4:13 am
Re: SoftwareSerial on ESP32
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: Basalt and 42 guests