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

How to change the bootloader's advertising name to a custom name?

I have try to midify:

// <s> NRF_DFU_BLE_ADV_NAME - Default advertising name.
#ifndef NRF_DFU_BLE_ADV_NAME
#define NRF_DFU_BLE_ADV_NAME "User Name"
#endif

but it does not work,wait for your answer,thank you so much!

Parents Reply Children
  • Hi,

    I would like to start with explaining why you see a number in the advertising name. iOS does not provide APIs to operate on specific BLE addresses, so in case of buttonless DFU where you would signal to the nRF that it should enter DFU mode and bonding is not used, the only way to be sure to connect to the same device is to filter on something else. For that reason, the nRF buttonless DFU service has a method to set a specific advertising name so that the phone can filter on that. (You can see the implementation in <SDK>\components\ble\ble_services\ble_dfu\ble_dfu_unbonded.c if you are interested).

    If this is not something you need, then you can skip this, but you should be aware that it is there for a reason, as just explained. Most products will need this though. You could keep this as is, but use something other than Dfu as a prefix, by simply changing the implementation on the mobile phone side, as that is where the name is decided.

    A last point is that I would argue that this is not a relevant problem for most products. This name (Dfu with a suffixed number) is only used in buttonless DFU mode, and in that case it will be used to connect to the same phone again immediately after, and if that does not happen, only up to when there is a timeout in the bootloader (typically this could be a few minutes).

Related