ayushsharma82 / WebSerial

A remote terminal library for wireless microcontrollers to log, monitor or debug your firmware/product
https://webserial.pro
GNU Affero General Public License v3.0
461 stars 108 forks source link

Checking if there is room for more serial characters to avoid error too many messages qued #25

Closed StefanL38 closed 2 years ago

StefanL38 commented 3 years ago

Hi,

is there a way to check if the WebSerial.println or WebSerialPro.println still has room for buffering more characters?

best regards Stefan

ayushsharma82 commented 3 years ago

@StefanL38 This is directly linked to AsyncWebServer's WebSocket buffer. If you can increase it then it will increase the buffer of webserial as well.

pancanet commented 2 years ago

@StefanL38 you can try to change WS_MAX_QUEUED_MESSAGES value inside AsyncWebSocket.h, the default value from library is 8 for esp8266 and 32 for esp32 and max value is 256. also, dont push data with webserial.print or .println too often, the library need a time to remove the buffer. image

ayushsharma82 commented 2 years ago

Solution provided by @pancanet. Closing.