-
Notifications
You must be signed in to change notification settings - Fork 9
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
Websocket handle webui websocket not websocket client is that normal ? #6
Comments
The grblHAL websocket server daemon can only have one client connection active that claims serial communication. Other client connections can be established but these have to use a subprotocol that does not claim serial comms. Subprotocols can be text or binary - the server daemon forwards the payload to the code that handles them. |
Currently in esp3d using arduino and esp3d-tft using idf - yes If your implementation use only one server daemon I would like to suggest that websocket setting does not start/stop the webui-v3 subprotocol but only the arduino one Just as suggestion to avoid webui to disconnect if websocket is stopped using settings |
Telnet over Websocket? Or do you mean the arduino websocket subprotocol provides several independent serial type communications channels/streams, one for each connection? Or do each connection share a single stream?
Subprotocols are not started/stopped, only the websocket daemon is. Subprotocols are "activated" when a client connects, it is a part of the initial handshake.
In grblHAL these are two different daemons and not interdependent. BTW changing the network configuration requires a reset of the controller, grblHAL does not support on-the-fly changes. What I could do is to add sanity checks on port number settings and return an error if there are clashes? |
Sorry I see my writing was confusing. my meaning was websocket client can connect like telnet client can connect. Yes in ESP3D, webui-v3 subprotocol websocket and arduino subprotocol websocket are independent
My suggestion is websocket setting should not stop websocket daemon using webui-v3 subprotocol if it is disabled, but only the usage of websocket using arduino subprotocol if any . So only disable websocket daemon if http and websocket setting are set to disabled This is just a suggestion from user point of view |
The webui-v3 subprotocol is not handled by the websocked daemon, the webui server code does that (except handling the serial stream).
This is not logical for me... The http and websocket daemons are not hardwired to the WebUI, websockets can be enabled without http beeing enabled and vice-versa. If http is disabled then it makes sense for the WebUi server to not respond to/handle the webui-v3 subprotocol - it does now. What I could do is to trap $73 changes and refuse to disable websockets unless http is also disabled, this if the WebUI server is active. Complicated... |
Yes current WebUI use both http and websocket - that is current design
That could be a workarround |
Workaround committed - blocks disabling websocket daemon from the WebUI, can still be disabled from other senders. I have also added disable of the webui-v3 websocket subprotocol if the http daemon is not running. |
Thank you ^_^ |
On ESP3D the webUi use http and websocket on port (http +1) - this websocket use binary mode to stream data ( in read only) and use text mode for several informations exchange
for a standalone websockect client ESP3D use another websocker server and port, this websocket server use text mode for GCODE transfer and reserve binary mode for coming file transfert feature
It seems the grblHAL websocket setting :

actually cut the webUI websocket - is that normal ? does it means the websocket client is same between webUi and any other client ?
and so only binary mode is available to send commands ?
Just to clarify - not actually a bug but changing websocket setting make the webui to disconnect because it cannot get any stream so it may be troublesome for end user
The text was updated successfully, but these errors were encountered: