I want to put a flag in my peripheral's advertisement data

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

cross mob
PaDo_1228851
Level 3
Level 3
25 replies posted 10 replies posted 10 questions asked

I am advertising my peripheral's name and one of it's services in the advertising and scan response packets.   I would also like to include a one bit updateable flag in my advertising packet whose value is based on the value of a characteristic (an A/D conversion).  One idea I have is just to append a "+" or a "-" on the end of the local name (the peripheral.name string).  Then update the device local name in the advertising packet dynamically.  What would the code look like for this option?

   

Another idea I have is to include the peripheral's service data advertisement field in the advertisement data.  But I'm not sure if service data's data field is setable programmatically or if the service data advertising field can be updated dynamically.  Can this be done?  How?

   

Thanks!

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

Hello,

   

You can change the adv data dynamically. Please refer the below example project:

   

https://github.com/cypresssemiconductorco/PSoC-4-BLE/tree/master/100_Projects_in_100_Days/Day009_Dyn...

   

Thanks,
Anjana

View solution in original post

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

Hello,

   

You can change the adv data dynamically. Please refer the below example project:

   

https://github.com/cypresssemiconductorco/PSoC-4-BLE/tree/master/100_Projects_in_100_Days/Day009_Dyn...

   

Thanks,
Anjana

0 Likes