This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

nRF Connect iOS DFU fails for unbonded buttonless DFU service.

I had initially added ble_dfu buttonless DFU support (unbonded) to my app per instructions here: infocenter.nordicsemi.com/.../service_dfu.html

Long story short, based on that documentation, I added ble_dfu_buttonless_init() to my app but didn't add ble_dfu_buttonless_async_svci_init() which isn't mentioned. The result was that everything worked fine doing a DFU using Android nRF Connect, which does not rename the device. Attempting to do a DFU from recent iOS nRF Connect app (which renames before rebooting) would cause a hard fault and the device would restart, but not into bootloader mode, and the app would time out.

So I think:

  1. The ble_dfu_buttonless_async_svci_init() should at least be added to the documentation, but why doesn't ble_dfu_buttonless_init() call it? Confusing that there are two init functions.
  2. set_adv_name() in ble_dfu_unbonded.c should check if nrf_dfu_set_adv_name_is_initialized() before calling it.
  3. nRF Connect app should have an option to disable renames. As it is, I can fix this in the device, but can't update the device with the fix from an iPhone. Hopefully there won't be an Android update soon that renames the device.
  • Hi, Android dfu lib will not have this feature, as it was intended mainly for iOS. iOS doesn't expose device address through api so without this feature there is a chance it would connect to a different device in a middle of dfu process when the device changes address by +1. This feature is to ensure that it will find the correct one. On Android, where device address is given, there is no need for this.

    I highly recommend implementing it when you are using SDK 14+. There are no plans to make it optional. But I agree it could be more documented.

Related