You are here

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

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

Summary: 1 Reply, Latest post by Anjana Muralidharan on 27 Oct 2016 11:37 PM PDT
Verified Answers: 1
Last post
Log in to post new comments.
Pat Dolan's picture
33 posts

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 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?


Anjana Muralidharan's picture
Cypress Employee
131 posts


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


Log in to post new comments.