To advertise a *configurable* device name the previous guidance seemed to be:
prj.conf
CONFIG_BT_DEVICE_NAME_DYNAMIC=y
// Advertisement Data static const struct bt_data ad[] = { BT_DATA_BYTES(BT_DATA_FLAGS, (BT_LE_AD_GENERAL | BT_LE_AD_NO_BREDR)), BT_DATA_BYTES(BT_DATA_UUID128_ALL, BT_UUID_MY_SERVICE_VAL), }; err = bt_enable(NULL); err = bt_set_name("My New Name"); err = bt_le_adv_start(BT_LE_ADV_CONN_NAME, ad, ARRAY_SIZE(ad), NULL, 0);