Skip to content

Conversation

john-michaelburke
Copy link
Collaborator

  • If a device is NotFound we allow the app to continue retrying until the connection dialog is opened.
  • Just before every reconnect we refresh the connection dialog.

The combination of these two changes allows for a USB device to reconnect after the pipe has broken. Another situation when NotFound will pop up is when the user tries to open a file that does not exist; however, we never attempt to reconnect to a file so this won't proc.

@john-michaelburke john-michaelburke changed the title Refresh conn dialog on reconnect, allow device not found[CPP-711] Refresh conn dialog on reconnect, allow device NotFound[CPP-711] Apr 5, 2022
@john-michaelburke
Copy link
Collaborator Author

john-michaelburke commented Apr 5, 2022

@john-michaelburke john-michaelburke requested review from a team and RaiBearG April 5, 2022 22:52
@RaiBearG
Copy link

RaiBearG commented Apr 6, 2022

@john-michaelburke
Tested out the build with trying to update piksi over rs232-usb adapter. This time, the console just disconnected after trying twice to keep the pipe open. And I couldn't re-open the pipe or see any FW update messages at all. We kind of walked backwards on this one as now, we don't see any FW update messages.
Hence, I am going to request changes on this merge :(

{"Host Timestamp":"Apr 06 2022 07:43:46","Log Level":"CONSOLE","Message":"Connection error: Could not validate connection, /dev/tty.usbserial-A9080IRF, check baudrate."}

@john-michaelburke
Copy link
Collaborator Author

@john-michaelburke Tested out the build with trying to update piksi over rs232-usb adapter. This time, the console just disconnected after trying twice to keep the pipe open. And I couldn't re-open the pipe or see any FW update messages at all. We kind of walked backwards on this one as now, we don't see any FW update messages. Hence, I am going to request changes on this merge :(

{"Host Timestamp":"Apr 06 2022 07:43:46","Log Level":"CONSOLE","Message":"Connection error: Could not validate connection, /dev/tty.usbserial-A9080IRF, check baudrate."}

@RaiBearG I bumped up the timeout a little bit and it looks much better. I am seeing the message you expect come in. Here is a new tag with the changes:
https://github.com/swift-nav/swift-toolbox/releases/tag/v4.0.4-reconnectable-usb

Copy link
Contributor

@joelynch joelynch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me

@john-michaelburke john-michaelburke merged commit 93a0b40 into main Apr 6, 2022
@john-michaelburke john-michaelburke deleted the john-michaelburke/cpp-711 branch April 6, 2022 23:18
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 this pull request may close these issues.

3 participants