-
Notifications
You must be signed in to change notification settings - Fork 564
unstable websocket connection when use the software serial #105
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
Comments
you overload the TCP layer of the ESP (too many sendText calls, possible for every byte you get from serial). example with advanced buffer handling: |
can you be more specific Markus , how come reading serial overload websocket layer ?it is due to softserial library or hardware serial? when I increase softserial buffer from 256 to 1024 it became more stable , but still have problem when I read big data from serial , you said I must encapsulate serial reading from TCP layer? what would your solution when need read softserial data and pass it to websocket link |
I recheck your last solution about Serial to WS bridge, you make time constraint and websocket header reservation for given buffer length, am I right? |
the reading itself in your code is not the problem, but if you call for every byte yes, the buffer will be send when full or when for 50ms no new data is coming in. Debugging:
|
thanks Markus |
Hi @Links2004 Markus , I have no problem with websocket unless try read the software serial data and pass it over the websocket link . its kinda some buffer full and overflow, because after couple of try the connection is sever
following is the loop function
The text was updated successfully, but these errors were encountered: