- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
We are using SPP profile and I am not sure how and where can I add the BT_LOCAL_NAME + WICED_DEVICE_ADDRESS.
I looked at the other post about MAC Address as a device local name but WICED_DEVICE_NAME returns unresolved.
Also would it work with BT_DEVICE_ADDRESS=random option when programming??
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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);
#ifdef CYW20706A2
wiced_bt_dev_set_local_name(gatt_db_device_name);
#endif
hci_control_send_command_status_evt(HCI_CONTROL_EVENT_COMMAND_STATUS, HCI_CONTROL_STATUS_SUCCESS);
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi there,
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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