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

Setting Bluetooth Device Name in Zephyr

Using Zephyr, I'm looking to configure the BLE name of my devices to use the serial number they are provisioned with.  

To this end there is the API "bt_set_name" that seems like it should do it, but I have not yet found anyway to get it to actually change the name.  The Device always advertises with whatever CONFIG_BT_DEVICE_NAME is set to.

Has anyone successfully done this with Zephyr?

Thank you so much for your help!

Parents Reply Children
  • I did try this and it didn't help on its own.

    What DID help is realizing that the "Advertising Data" struct that gets passed to "bt_le_adv_start" is where the name is actually being configured.  I just modified the value and length in that struct before starting the advertisement and it all worked.


    I think there is a way to use "bt_set_name" but I still haven't gotten that way to work.  Too many flags.

Related