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

[nRF Connect SDK] How to change BT name

Target nRF52832(nrf52dk_nrf52832)
SDK NCS v1.9.1
Base source
1. C:\Users\user\ncs\v1.9.1\nrf\samples\bluetooth\peripheral_hids_keyboard
2. C:\Users\user\ncs\v1.9.1\nrf\samples\bluetooth\peripheral_hids_keyboard
My project require two mode(HID and NUS).


I received bt name via UART before call bt_enable(NULL);
but name information already defined at compile time.
static const struct bt_data sd[] = {
BT_DATA(BT_DATA_NAME_COMPLETE, DEVICE_NAME, DEVICE_NAME_LEN),
};

I found good option and API but it did not work.
CONFIG_BT_DEVICE_NAME_DYNAMIC
bt_set_name("new name")

When do I call bt_set_name() ?
Can you please guide for me?

Related