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
User
28 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 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!

Anjana Muralidharan's picture
Cypress Employee
62 posts

Hello,

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

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

Thanks,
Anjana

Log in to post new comments.