Skip to content
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

last println not rebeing recieved.. #4

Closed
kmb36td opened this issue Dec 8, 2022 · 4 comments
Closed

last println not rebeing recieved.. #4

kmb36td opened this issue Dec 8, 2022 · 4 comments

Comments

@kmb36td
Copy link

kmb36td commented Dec 8, 2022

WebSerial.println(" ");
    WebSerial.println("List of Available Commands:");
    WebSerial.println("");
    WebSerial.println("help \"print help\"");
    WebSerial.println("geteeprom \"Print EEPROM settings.\"");
    WebSerial.println("setcur<space><decimal 20.0-100.0> \"Set motor current setting.\"");
    WebSerial.println("setaccel<space><decimal 0.04-1.0> \"Set accel setting.\"");
    WebSerial.println("setangle<space><decimal 0.0-360.0> \"Set turn Angle setting.\"");
    WebSerial.println("streamdata<space><\"true\" or \"false\"> \"Print streamdata.\"");

abaove code prints.. but the last printline not being recieved "streamdata" not printed..

 
List of Available Commands:

help "print help"
geteeprom "Print EEPROM settings."
setcur<space><decimal 20.0-100.0> "Set motor current setting."
setaccel<space><decimal 0.04-1.0> "Set accel setting."
setangle<space><decimal 0.0-360.0> "Set turn Angle setting."
@asjdf
Copy link
Owner

asjdf commented Dec 8, 2022

Thanks for your report.

I found that the problem you encountered may not be caused by this library, but by ESPAsyncWebServer (I think this is a feature of the library, although there are some things that can be improved). As you can see in https://github.com/me-no-dev/ESPAsyncWebServer/blob/f71e3d427b5be9791a8a2c93cf8079792c3a9a26/src/AsyncWebSocket.cpp#L550 , they limit the length of queue, and they define the max length of queue to 8 for ESP8266, you can check in https://github.com/me-no-dev/ESPAsyncWebServer/blob/f71e3d427b5be9791a8a2c93cf8079792c3a9a26/src/AsyncWebSocket.h#L30.

So if you want to send many messages through websocket rapidly, I recommand you make a temp storage. Or you can edit the ESPAsyncWebServer to solve this problem. By the way, I create a PR try to let user config the WS_MAX_QUEUED_MESSAGES (esphome/ESPAsyncWebServer#10), hope it can be proved.XD

@asjdf
Copy link
Owner

asjdf commented Dec 17, 2022

If your problem is solved, you can close this issue.
Or do you still have questions?

@Bromiun
Copy link

Bromiun commented Jan 19, 2023

I am having the same problem, and it makes WebserLite quite unusable. The output appearing on the browser is good for the first few lines, then it gets totally garbled. I have the same problem with Webser non-lite, which points to the issue that you raised -- it being a problem with async websocket.

I will check your recommendation above, and if it does not fix the problem, I will be back.

Also, how do I make the window larger both horizontally and vertically. How can I do:
"you should install NodeJS and pnpm first." ? I am using Arduino IDE on Windows. I also have access to VSCode.

Thanks!

@asjdf
Copy link
Owner

asjdf commented Jan 22, 2023

Also, how do I make the window larger both horizontally and vertically. How can I do: "you should install NodeJS and pnpm first." ? I am using Arduino IDE on Windows. I also have access to VSCode.

You can find that I put finalize.mjs under the frontend folder. This is a small tool I made for automated code generation. It is written in js, so you need a package manager ( I recommend pnpm) and an environment that can run js.
If you don't know much about front-end knowledge or want to simplify the installation process, you can try to use scoop to help you install NodeJS and pnpm (scoop is a software manager under windows).

If you have any questions please feel free to ask and if this library helps you please give it a star, thank you😀.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants