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

Why does Nordic increase the BLE MAC address by one, in DFU bootloader

Hello,

I have seen, that the BLE MAC is increased by one, in dfu_transport_update_start() (dfu_transport_ble.c). Can someone give me a short explanation, why this is done? The comment says: "Increase the BLE address by one when advertising openly." Isn`t it save, to advertise the original MAC? In our final application we are advertising with to original MAC address.

Regards, BTprogrammer

  • This is a way of forcing the central to perform a new service discovery and/or impede it from attempting to use any previous pairings that is not available to the bootloader (no "peer data"). Incrementing the address causes the central to see it as a new device.

    One example of when you would want the device to "advertise openly": Device was paired with central when it was running in "application" mode, and bootloader dfu mode was entered by by using the bootloader button instead of buttonless entry with bond sharing/peer data. In this case the bootloader would not be able to send the required required service changed indication (Core spec. 4.1, vol 3, part G, section 2.5.2 ), and the central risk using the wrong attribute handles when it starts to write to the dfu control point on DFU start. Also, the pairing info will not be available to the bootloader when the button was used.

  • Thank you for your comments. This completely clarifys this question for me. Sorry, but I was just searching for the wrong tags/words. Because of this, I didnt found RKs link. BR

Related