-
Notifications
You must be signed in to change notification settings - Fork 274
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SoftwareSerial is unstable in 2.4.0 #63
Comments
I'm running into the same problem driving a nextion display using softwareserial. In 2.4.0-rc2 it worked, in the release it fails. |
I see similar with SoftwareSerial and a GPS module at 9600 baud. Really unstable, missing lots of bytes and regular crashes. Same setup and sketch is rock solid going back to 2.3.0. Exception (0): ctx: sys
ets Jan 8 2013,rst cause:2, boot mode:(3,6) load 0x4010f000, len 1384, room 16 Paste your stack trace here Exception 0: Illegal instruction |
@Anton-V-K I would recommend using available() before readBytes @torntrousers there are several report on crashes when using 9600. I will add some new functionality to try and avoid this. |
Great. Let me know if I can do more to help debug or test. |
It's a problem with the m_highSpeed logic to enable/disable interrupts. If I force m_highSpeed to true, it all works. |
Yes, I will add a new method which can be used to control weather interrupt are enabled or not during Tx but there still seems to be quite worse stability in 2.4 than in 2.3 due to something else as well. This constant fight for getting execution time which SoftwareSerial has with the rest of the system seems to be hard to really solve. |
Please try latest commit |
I had the same problem. Your commit, two days ago solved the Problem for me. I use SofwareSerial for communication with a Modbus Slave. Thanks a lot! |
Yes this latest code is working well for me with no more crashes. Thanks for the quick fix. |
I've update ESP8266 core to 2.4.1, and unfortunately the problem is still there. |
I can confirm this fix works after placing the files from the master branch in my esp8266 library path. No more corrupted data! Thanx! |
I am having a similar issue running a GPD with a ESP8266 it will crash every 8th time it reads with this error: ctx: sys
ets Jan 8 2013,rst cause:2, boot mode:(3,6) load 0x4010f000, len 1384, room 16 Decoding 29 results |
I switched over to use the hardware serial port. Software is now stable as a rock. Also 115200 baud didn't work, maybe because of uc speed which can't catch up timing. For debugging I use the software to debug over telnet which also works great. |
I'm experiencing absolutely the same issue as the topic starter has using ESP8266 core 2.4.1. |
confirm. 2.3.0. works OK, |
Same problem, 2.3.0 works but 2.4.2 unusable with SoftwareSerial. Is anyone working on it? |
also using 2.4.2 and even the master form the git, the problem still exist. Please, somebody that can, to do something. We loose the software serial... ( or at least it is very unreliable ) . |
It seems that no one wants or have the ability to fix this issue. |
@strange-v the big problem to that decision is that the ESP32 Arduino core is not mature at all... I read problems here and there... |
and) it just need to go to the linux boards.... ))))) |
I use the hardware tx and rx instead, no problems anymore |
@jeroenst I think that is not related to the problem. Here we are talking for software serial, hardware serial is different and not the solution. Further more, how can you deal if you need two full UARTS ( TX & RX )from ESP8266? |
Has someone tried to reproduce in 2.5.0-beta2? |
I faced with a similar problem on D1 mini (ESP-12E) with PZEM-004T and SoftSerial in 2.5.0-beta2. Right now I'm testing 2.5.0-beta3 |
Unfortunately 2.5.0-beta3 has the same issue :( |
And why this issue is closed? According to the recent comments , the problem isn't fixed, so it's worth renaming the title to something like |
Version 4.0.0 brings a major overhaul of the receive code. Your complaint is against the Arduino core for ESP8266 version 2.4.0, well over a year old, with a similarly old version of EspSoftwareSerial! |
Hi, I don't also know why this issue is closed. 2.5.2 also not working. |
hello! i have the same problem. i try to receive serial data with esp8266 every second from a victron blue solar mppt controller. as far as i use the software serial alone, with no wifi, and just display the values on the serial monitor, it works fine. when i try to send the values with blynk or with http, the problems begin: i receive a lots of zeros (data loss), and random crashes. the problem is valid (tested) on core 2.4.2 and also 2.5.x so, dok-net, please provide a working solution or workaround for this. why did you close this topic, if the problem is not solved? thanks! |
@twanek There is almost nothing provided in this issue that would allow anybody to reproduce, fix, and test anything at all - that alone is enough to close and keep closed.
Obviously the author missed the comment and signature of the used function:
There is no reason to believe otherwise than that there just wasn't any data received yet. I would like to ask you to keep in mind that this is a free and open-source software project developed and maintained by volunteers in their spare time, without any support from the manufacturer of the ESP8266 etc. SOCs whatsoever. In general, concurrent sending and receiving serial data, and then on top of that engaging the WiFi stack, is going to be afflicted by bit errors, depending on the load. At 9600bps, the error rates seem acceptable in my tests, but they are non-zero, I am sorry. To get the best results, and also attract the most of my interest, I would like to ask you to do the following:
|
I've installed ESP8266 core 2.4.0 for Arduino 1.8.5 (Windows 7 SP1 64-bit) and immediately encountered problems when comminucating with one of my sensors (MH-Z19) which is utilized through
SoftwareSerial
library: readings return 0 (zeros) in some uncertain conditions (probably when WiFi-connection is active).I had to downgrade ESP8266 core to 2.3.0 to restore stable work with the sensor.
MCU: LoLin (NodeMCU, esp8266, ESP12-E)
The reading code is more-less standard (I haven't changed it for months) - here are few fragments:
With
SoftwareSerial
from 2.4.0 the sensor in some situations just returns all zeros:I guess, the problem may be caused by other parts of ESP8266 core, but it reveals itself through
SoftwareSerial
class.And it may be related to WiFi-part, since there were similar issues like esp8266/Arduino#2937, esp8266/Arduino#4315
The text was updated successfully, but these errors were encountered: