You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are attempting to use arduinoWebSockets in a serial-to-browser bridge. Basically a simple over-the-air serial terminal and control console. Everything serial works well until we use Websockets to send. When we use sendTXT(...) the hardware serial port misses incoming characters randomly due to some kind of interrupt suppression or some other interference.
Do you know what could be causing this? Do you know of a work around? Is this type of thing even possible?
TIA
The text was updated successfully, but these errors were encountered:
yes its possible, with out seeing the code I can only guess the problem.
but most likely you try to send byte by byte over the web-socked, this generate overhead.
you need to buffer the Incoming data and send it in "blocks",
the TCP layer is not designed to handle many small requests, windows for example sends a TCP ack only when a bigger amount of data is received or after 200ms what is a big pain when you send small or on byte at the time.
The ESP blocks until it gets the ACK.
the lost you see is most likely the RX buffer which is overflowing, during the wait for the ACK.
some code with intelligent buffering can be found her: #61 (comment)
We are attempting to use arduinoWebSockets in a serial-to-browser bridge. Basically a simple over-the-air serial terminal and control console. Everything serial works well until we use Websockets to send. When we use sendTXT(...) the hardware serial port misses incoming characters randomly due to some kind of interrupt suppression or some other interference.
Do you know what could be causing this? Do you know of a work around? Is this type of thing even possible?
TIA
The text was updated successfully, but these errors were encountered: