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

Protocol issue with WAIT_FOR_USER_CONFIRM #12

Closed
friedger opened this issue Oct 24, 2022 · 2 comments · Fixed by #13
Closed

Protocol issue with WAIT_FOR_USER_CONFIRM #12

friedger opened this issue Oct 24, 2022 · 2 comments · Fixed by #13
Assignees

Comments

@friedger
Copy link
Contributor

The current protocol is based on request-response flow:

  1. Client sends data and Ryder returns a response, that can be SEND_INPUT, or OK, or WAIT_FOR_USER_CONFIRM
  2. This can happen a few times
  3. After the last response the connection is closed
  4. If the response takes too long the connection times out and the flow ends with an error

The last points (4.) usually happens when the user has to confirm, because timeout should be < 1s.

@friedger friedger changed the title Transport protocol issue with WAIT_FOR_USER_CONFIRM Protocol issue with WAIT_FOR_USER_CONFIRM Oct 24, 2022
@MarvinJanssen
Copy link
Member

The operation should be straightforward, the bridge acts as "pipe" and passes along any bytes it receives.

So client -> bridge -> Ryder and Ryder -> bridge -> client.

The bridge is idle until it receives a WebSocket connection, then it opens the serial port to the Ryder and keeps it open until the WebSocket connection closes. It does not need to deal with the protocol.

If the Ryder disconnects while in use (serial port connection closes unexpectedly) then the bridge should send a special error code to the WebSocket connection so that the app can recover.

@pengowen123 pengowen123 self-assigned this Nov 2, 2022
@pengowen123 pengowen123 mentioned this issue Nov 2, 2022
4 tasks
@MarvinJanssen
Copy link
Member

Addressed in #13

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

Successfully merging a pull request may close this issue.

3 participants