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

cross mob
DeCo_1926091
Level 4
Level 4
First like received

How can I include an alphanumeric string in the advertising data of a peripheral device so that the central device can know which peripheral is advertising? 

Thanks for any help you can offer. 

Dennis

0 Likes
1 Solution

Hello Dennis,

Yes you can set the local name in the firmware as well. You should use the API - 'CyBle_GapSetLocalName' to set the device local name. Make sure to call this API before the advertisement start APIs in order to make the device advertise with the new address.

-Sayani.

View solution in original post

0 Likes
4 Replies
SayaniS_66
Moderator
Moderator
Moderator
10 likes received First like received

Hello,

In PSoC Creator, if you open the BLE configuration window and go to the GAP settings, there is a provision to set the parameters in the advertisement packet. Here you can choose to display the local name (either complete or shortened) while the peripheral is advertising.

Under the GAP Settings - General option, you can set the device name as an alphanumeric string which will be the name displayed while the peripheral is advertising.

-Sayani.

0 Likes

Hi Sayani,

Thanks for your response.  That will work fine. Now I realize I have an additional question.  Is it possible to change the local name under program control?

Dennis

0 Likes

Hello Dennis,

Yes you can set the local name in the firmware as well. You should use the API - 'CyBle_GapSetLocalName' to set the device local name. Make sure to call this API before the advertisement start APIs in order to make the device advertise with the new address.

-Sayani.

0 Likes

Hi Sayani,

Great info. Thanks for your help.

Dennis

0 Likes