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

is it possible to change the device name handle value manually?

Hi,

I know that the default handle value of device name is 3, but in my application i am not getting the default device name handle, is it possible to change the device name handle manually? I have created one custom service with lot of characteristics, but i did not change anything in the generic access service, Now what handle value i should get for device name? How to use keil debugg session to display the ble_evt structure values? I tried call stack window but it is always showing the location only.

Regards, Balaji

  • There shouldn't be any way to affect the device name handle, it should be constant for a certain softdevice version, and as far as I know, all softdevice version up until now have had the name at handle 3.

    To set the name, you should however use the sd_ble_gap_device_name_set() method instead of doing it directly with the handle, as that will be portable to all future softdevice version as well. The handle may however be useful when receiving a write to this characteristic.

    Also, if you're advertising while changing the name, you have to make sure to set up the advertising data again, essentially calling ble_advdata_set() again, after having changed the name, since this can't be done automatically.

    If you still have trouble, I'd be glad if you could upload your project, so that I can have a look. Feel free to create a support case for it if you need it to be handed in confidentiality.

    As for looking on ble_evt_t, there shouldn't be any problems with this, but remember to not compile with -O3 if you want to be able to debug the code in a line-by-line fashion.

  • hi Ole, I tried to call ble_advdata_set() after calling sd_ble_gap_device_name_set(), but iam getting INVALID_PARAM_ERROR(error no. 7) on ble_advdata_set(), kindly help me solving this

Related