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

PSoC™ 4

DeCo_1926091
Level 4
First like received
Level 4

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
SayaniS_66
Moderator
Moderator 10 likes received First like received
Moderator

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 10 likes received First like received
Moderator

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
DeCo_1926091
Level 4
First like received
Level 4

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
SayaniS_66
Moderator
Moderator 10 likes received First like received
Moderator

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
DeCo_1926091
Level 4
First like received
Level 4

Hi Sayani,

Great info. Thanks for your help.

Dennis

0 Likes