-
Notifications
You must be signed in to change notification settings - Fork 41
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
Add possibility to run CONFIRM step after DFU when device becomes present again (advertising after reboot) #127
Comments
Sorry, I don't get it. In Test & Confirm mode the library will:
What would you like to change here? What is your desired path? |
|
The device usually reboots immediately after RESET is sent. Then, if the bootloader is in Swap mode, it will move images from secondary to primary partition which will take time. For nRF52840 it's around 15+ seconds, depending on the image size. The swap time should be measured for given device and set before updating, so that "try to connect" does not timeout. After swap is complete the new image is booted. I understand that by "rebooted" you mean this whole process. To measure when a device is ready to reconnect the library would have to scan for it. This would add a lot of complications on Android side. There are Location permissions that have to be granted on some Android versions, Location service enabled, Nearby permission, etc. And this is only for Test & Confirm mode. Also, NCS 2.5 added "Direct XIP" bootloader mode. This requires changing the McuBoot to one which would support it, but this means no swap at all and reboot is immediate. |
I see your point on the complexity of implementing this. We use ncs 2.5 now, but have devices in the field that started with ncs 2.2, and some with ncs 2.4. |
@philips77 Just thinking out loud off the top of my head - just bare with me: What if we try to connect + send the "confirm" command preemptively every few seconds and see if it has any effect - if it doesn't then wait a few more seconds and retry connect+sending "confirm" until it actually succeeds. This way we won't have to wait for the full-swap time duration just to try sending "confirm" once at the very end and the code-changes will essentially enrich a mechanism which is already in place - no need for fancy stuff with permissions etc. Might be missing something - Let me know what you think. |
That could work, yes, but I have 2 questions.
|
I can answer this (since I am a collegue to @ksidirop-laerdal):
|
OK, thanks for explanation. I'll discuss with my colleagues. |
Normally the swap time setting defines when the CONFIRM step is performed. If the device starts advertising again before that timeout, then allow the CONFIRM step to be executed.
(if decided to implement, the IOS version should be updated too)
The text was updated successfully, but these errors were encountered: