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

MYNEWT-821 newtmgr - Try harder to recover from disconnect during image upload #15

Closed
wants to merge 1 commit into from

Conversation

ccollins476ad
Copy link
Contributor

(https://issues.apache.org/jira/browse/MYNEWT-821)

An image upgrade consists of two phases:

  1. Erase slot
  2. Upload image

On nRF boards, both phases cause the processor to stall while flash is being accessed. Such stalls can cause any established BLE connections to terminate due to "supervision timeout."

Currently, the newtmgr tool automatically recovers from a disconnect during the first phase (erase). However, it does not recover from such a disconnect during the upload phase.

Newtmgr should be improved to use the same reconnect logic during the second phase that it already uses during the first phase.

An image upgrade consists of two phases:
1. Erase slot
2. Upload image

On nRF boards, both phases cause the processor to stall while flash is
being accessed. Such stalls can cause any established BLE connections to
terminate due to "supervision timeout."

Currently, the newtmgr tool automatically recovers from a disconnect
during the first phase (erase). However, it does not recover from such a
disconnect during the upload phase.

Newtmgr should be improved to use the same reconnect logic during the
second phase that it already uses during the first phase.
@ccollins476ad
Copy link
Contributor Author

Note: newtmgr needs to be revendored if / when this PR gets merged.

Copy link
Contributor

@mkiiskila mkiiskila left a comment

Choose a reason for hiding this comment

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

I would add a counter for # of disconnects, and fail if hits a limit. Otherwise seems ok.

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.

None yet

2 participants