1 of 2 people found this helpful
You can configure the BT_LOCAL_NAME in the wiced_bt_cfg.c file.
For the BT_DEVICE_ADDRESS, please refer to the following blog:Configuring the Bluetooth device address in CYW20706
You can also use the module programmer to set the BD_ADDRESS during the programming: WICED Module Programmer User Guide – KBA225060
In the API documentation there is only wiced_bt_set_local_bdaddr in the wiced_bt_dev.h
but if I want to get the Local Device Address being in use and then I would like to assign this to the Local Device Name during run time.
is there an object or a function call for this I could use?
Please refer to apps/snip/ble/gatt_db demo. In the hci_control.c, there is a function to set the device name as follows:
void hci_control_handle_set_local_name(uint8_t* p_data, uint32_t data_len)
if (data_len >= MAX_DEV_NAME_LEN)
data_len = MAX_DEV_NAME_LEN - 1;
memcpy(gatt_db_device_name, p_data, data_len);
gatt_db_device_name[data_len] = 0;
WICED_BT_TRACE("%s: dev_name = %s\n", __func__, gatt_db_device_name);
I can get the device name and change it that's not the problem. But I want to know the device address during runtime if I am using BT_DEVICE_ADDRESS=random option during programming, shouldn't there be wiced_bt_get_local_bdaddr() function call?
1 of 1 people found this helpful
Yes, you can use the API void wiced_bt_dev_read_local_addr (wiced_bt_device_address_t bd_addr); to get the local device address. The API is defined in wiced_bt_dev.h