This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

DFU and Bonding

I'm developing an application for a device which needs to support both DFU and some method of restricting connections to a single central (ie: bonding). This is a challenge because a central which has bonded to a peripheral assumes that the peripheral's services will never change but the Bootloader/DFU architecture supplied by Nordic requires a peripheral to become a new application with a very different set of services. Consequently, a central won't connect to a bonded peripheral that's restarted in in DFU mode and a frustrating time is had by all.

The recommended solution (last post here) and Ole's post here is to add the DFU service to an application. Is there any nRF51822 example for how to do this?

Parents
  • There are two solutions to this, that I'm aware of.

    One way is to let both the bootloader and the application to have access to the bond information and use it on reconnection. Then you have two choices:

    • You can trigger a service change indication to make iOS do a new service discovery.
    • Or you can integrate the attribute table (GATT Table layout) of the application and bootloader into both application and bootloader, so they are equal.

    The other way is to use one MAC address for application and a different MAC address for the bootloader. Because of two different addresses, iOS will see two different devices. This is a very simple solution, if you can live with doing a second connection when you need to do the DFU.

    I wished we had an example for the first choice, but we don't atm.

    Please vote on the QUESTION if you want us to make an example.

Reply
  • There are two solutions to this, that I'm aware of.

    One way is to let both the bootloader and the application to have access to the bond information and use it on reconnection. Then you have two choices:

    • You can trigger a service change indication to make iOS do a new service discovery.
    • Or you can integrate the attribute table (GATT Table layout) of the application and bootloader into both application and bootloader, so they are equal.

    The other way is to use one MAC address for application and a different MAC address for the bootloader. Because of two different addresses, iOS will see two different devices. This is a very simple solution, if you can live with doing a second connection when you need to do the DFU.

    I wished we had an example for the first choice, but we don't atm.

    Please vote on the QUESTION if you want us to make an example.

Children
Related