cyw20719 BT MAC address as a device local name

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
PeEr_3832806
Level 1
Level 1

Hello,

we want to include part of the bluetooth mac address in the device's local name.

Currently the local device name is passed to the stack in the wiced_bt_stack_init() function.  At that point, wiced_bt_dev_read_local_addr() does not yet return the mac address correctly, making the name update in that phase impossible?

Some versions of the Wiced API has had a function called wiced_bt_dev_set_local_name().  Is there an equivalent for 20719?  Or any other ideas how to accomplish the 'mac as a device local name' goal?

Br, Pekka

0 Likes
1 Solution
AnjanaM_61
Moderator
Moderator
Moderator
5 comments on KBA First comment on KBA 5 questions asked

Hi Pekka,

Currently we do no have an API for setting local name.

However you can update the wiced_bt_cfg_settings_t structure parameter device_name in the main.c file after Bt stack init.

Eg:

in bt config file,

wiced_bt_cfg_settings_t db_cfg_settings =

{

    .device_name                         = (uint8_t *)WICED_DEVICE_NAME,                             // Local device name (NULL terminated)

    .device_class                        = { 0x00, 0x00, 0x00 },                                     // Local device class

    .security_requirement_mask

:

in main.c file, after the BT stack init , change the device name structure parameter

db_cfg_settings.device_name

Could you please try that?

Thanks,
Anjana

View solution in original post

3 Replies