Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Dynamic name change in advertising

Dear all,

I'm trying to change the advertised device name during advertising depending on some variables.

I'm observing with nRF Connect and Lightblue, both running on iOS.

Good case: I write a characteristic to reboot to bootloader, which advertises a different name -> this works, in both apps the new device name is shown

Current case: I don't want to reboot, I just want to change the device name during advertising (not while being connected). So I do 

ble_advdata_set
sd_ble_gap_adv_start

But I have to connect and discover services before the app shows the updated name. I wonder why it works for DFU...




Parents
  • On iOS, as most other OS's, they track BLE devices based on mac ID.  iOS is slightly different in that they assign a system uuid to every device that shows up.  Apps then have to track their ble devices using the system uuid since iOS prohibits knowledge of the mac id to an app.

    To further complicate things on iOS there are two sets of bluetooth API's. Core Location handles anything related to iBeacon and Core Bluetooth handles everything else but won't show iBeacon.

    On DFU what helps out is that they mod the mac id slightly so it advertises as mac id +1.  At least it does in SDK11. A new mac id tricks the OS into thinking it is a new device.

Reply
  • On iOS, as most other OS's, they track BLE devices based on mac ID.  iOS is slightly different in that they assign a system uuid to every device that shows up.  Apps then have to track their ble devices using the system uuid since iOS prohibits knowledge of the mac id to an app.

    To further complicate things on iOS there are two sets of bluetooth API's. Core Location handles anything related to iBeacon and Core Bluetooth handles everything else but won't show iBeacon.

    On DFU what helps out is that they mod the mac id slightly so it advertises as mac id +1.  At least it does in SDK11. A new mac id tricks the OS into thinking it is a new device.

Children
No Data
Related