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

using NCS1.5.0 sample peripheral_uart and nrf5340dk ,how to rename ble device name

 in sample ,prj.conf had configure ble device name using below define :

CONFIG_BT_DEVICE_NAME="Nordic_UART_Service" ,

in hci_core.c function bt_enable() use set_bt_name(CONFIG_BT_DEVICE_NAME) ,configure ble adversting name ,but changed  this place can not chang ble device name .

not only this palce use CONFIG_BT_DEVICE_NAME, etc:get_bt_name();

 I want to rename bt device name  in main.c function according component mounted in nrf5340 board, if component a in board ,i use component a as  ble device name ,if component b in board ,i use component b as ble device name .

 how can i modify code let all files and functions know this new ble device name like prj.conf 's configuration?(CONFIG_BT_DEVICE_NAME="Nordic_UART_Service")

Related