Robots are revolutionizing our lives in many ways. Join our webinar to learn about Infineon’s broad portfolio of robot building blocks.
Click here to register.

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

AIROC™ Bluetooth Forum Discussions

Level 2
Level 2
25 sign-ins 5 replies posted 5 questions asked

Hi Community,

I'm using PSoC 62 with LBEE5KL1DX (with CY4343W). The advertisement name comes from the Bluetooth Configurator's GAP settings. But because we will be having multiple devices with the same firmware, I'd like to change the advertisement name based on the MAC address or something unique dynamically during run-time. 

I can get the MAC id of the device using wiced_bt_dev_read_local_addr(). The advertisement name seems to be coming from wiced_bt_cfg_settings.device_name. When I call the wiced_bt_dev_read_local_addr() before I do the wiced_bt_stack_init(), the wiced_bt_dev_read_local_addr() function hangs; but when I call it after the stack init function, its OK, but it looks like it is too late to set the device name after the stack init is called.

Can someone suggest a proper way to change the advertisement name on startup instead of using the static name that comes from the gap settings page of the bluetooth configurator? 

Appreciate any advice/suggestions you can provide.

2 Replies
First comment on KBA 5 questions asked First question asked

Hello @srini_a ,

You can use the BLE APIs only after stack init. 

What you can do is , set the desired name before the start advertisement API .  




Thank you for the reply. Can you please specify exactly which variable or API should I change before the start advertisement API?? I changed both wiced_bt_cfg_settings.device_name and app_gap_device_name. I'm using CySmart app(iOS), In the BLE devices list, it still shows the name configured through the BLE Configurator, but, interestingly, when I connect to this device, I briefly see "Connecting <updated name>" and connects to it; I would like it to show the updated name in the list of BLE devices in the CYSmart app.  So, looks like there are still remnants of the original name that I can't seem to figure out a way to update it during run-time. Please advise.

This widget could not be displayed.