nCS DFU suddenly doesn't work well on my Pixel 6 phone.

DFU has been failing recently. Yes, it was working fine until a while ago.

Specifically, the screen that was displayed while waiting for the device to reboot after DFU disappears immediately. That screen is the one on which Validating is displayed.

Originally, DFU would be completed by waiting for a reboot on this screen and reconnecting again. Otherwise, a rollback will occur and the DFU will fail. The nRF Connect App times out because the screen disappears without waiting for the device to reboot, resulting in a firmware rollback.

For reference, when I use AQUOS Phone, DFU succeeds. So I feel that it is not an SDK issue but a smartphone issue. But is that possible?

Parents
  • Hello Yoshihiro,

    For DFU using mcu manager I recommend using a different app called nRF Connect Device Manager. As it's developed and released together with the underlying library, it always uses the newest version of the mcu mgr library. nRF Connect app may be lagging behind as it has a different release schedule.

    Anyway, I don't think the issue lais in the app. 

    When using Test & Confirm mode, after uploading the firmware a Test command it sent followed by Reset command. At this point the MCUboot bootloader will swap the images, which may take around 20 or more seconds, depending on the device. The library has a setting for the "estimated swap time", as different devices require different amount of time. This can be adjusted in nRF Connect app in Settings / Mcu Manager options / Estimated swap time, or in nRF Connect Device Manager by clicking the "expand" arrow on the Image Upgrade pane. By defult it is set to 10 seconds, after which the phone will try to reestablish connection to the device to send Confirm command. Depending on your phone, the timeout for a connection can be 30 seconds or less. If for some reason the connection would timeout after 5, and your device needs 20 seconds to reboot, you'd see what you see. Try measuring the exact time your device needs to swap the images and begin advertising after an update and set the measured time in the settings.

    This could solve the issue with Test & Confirm mode, but not with Confirm only mode. Are you sure that the update fails and the fw is reverted? In Confirm only there should be no revert. If the new image is rejected, it can be due to invalid signature or other internal validation on the device. The video attached shows, that from the app's perspective the DFU was successful. Make sure you are using the same ZIP file and the same device on both phones under test.

    If the DFU fails, could you please share us the logs? You can see them in nRF Connect or, when using nRF Connect Device Manager app, in another app called nRF Logger (available on Play Store), which acts as log sink when installed.

Reply
  • Hello Yoshihiro,

    For DFU using mcu manager I recommend using a different app called nRF Connect Device Manager. As it's developed and released together with the underlying library, it always uses the newest version of the mcu mgr library. nRF Connect app may be lagging behind as it has a different release schedule.

    Anyway, I don't think the issue lais in the app. 

    When using Test & Confirm mode, after uploading the firmware a Test command it sent followed by Reset command. At this point the MCUboot bootloader will swap the images, which may take around 20 or more seconds, depending on the device. The library has a setting for the "estimated swap time", as different devices require different amount of time. This can be adjusted in nRF Connect app in Settings / Mcu Manager options / Estimated swap time, or in nRF Connect Device Manager by clicking the "expand" arrow on the Image Upgrade pane. By defult it is set to 10 seconds, after which the phone will try to reestablish connection to the device to send Confirm command. Depending on your phone, the timeout for a connection can be 30 seconds or less. If for some reason the connection would timeout after 5, and your device needs 20 seconds to reboot, you'd see what you see. Try measuring the exact time your device needs to swap the images and begin advertising after an update and set the measured time in the settings.

    This could solve the issue with Test & Confirm mode, but not with Confirm only mode. Are you sure that the update fails and the fw is reverted? In Confirm only there should be no revert. If the new image is rejected, it can be due to invalid signature or other internal validation on the device. The video attached shows, that from the app's perspective the DFU was successful. Make sure you are using the same ZIP file and the same device on both phones under test.

    If the DFU fails, could you please share us the logs? You can see them in nRF Connect or, when using nRF Connect Device Manager app, in another app called nRF Logger (available on Play Store), which acts as log sink when installed.

Children
Related