JAndrassy / TelnetStream

Arduino Stream implementation over Telnet for OTA logging and debugging
GNU Affero General Public License v3.0
164 stars 17 forks source link

Exception error #10

Closed svdrummer closed 3 years ago

svdrummer commented 3 years ago

Hello, I have been using this library for months without an issue....however... i can simulate a crash on demand. ESP8266 wemos D1 mini. SoftAP (Soft access point only) serial data comes on on Software serial port and is sent out ot telnet stream. Any client that connects can see the telnetstream. This all works fine for months. To cause a crash, i connect to the wemos server let the stream start then disconnect from the server. On my windows laptop its just connect and disconnect. On disconnect, the system crashes. If i run the code with telnetstream commented out and replaced with a print statement, no crashes occur. I have tried TelnetStream2 and dont get the crashes, however, TelnetStream2 only supports one client at a time. Regards and thanks

JAndrassy commented 3 years ago

you disconnect from AP of esp? what is TelnetStream2?

svdrummer commented 3 years ago

I have an esp8266 in access point mode. I connect to that access point with a telnet client. Whilst connected via telnet, if i turn off or switch the wifi connection, the esp crashes. Telnetstream2 is on github. When using a text editor with compare function, it is similar by about 90% to this TelnetStream I am guessing, telnetstream is trying to send when the wifi link gone...i am new, so its inly a guess.

JAndrassy commented 3 years ago

ok. I eliminated the crash. try master version from GitHub.

the connection stays open until some very long TCP timeout I guess. If the computer connects back to SoftAP before the TCP timeout the telnet client continues receiving.

svdrummer commented 3 years ago

Firstly, thank you for your response. I simulated the the last issue and it has been resolved. At one point i had a connection but ni data streaming, however, i was connecting and disconnecting fast. I have placed TelnetStream into a local folder, ie src/telnetstream/src/telnetstream.h. As Arduino sometimes uses other libraries. Thanks you once again.