cancel
Showing results for 
Search instead for 
Did you mean: 

PSoC 4 MCU

New Contributor II

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
Reply
1 Solution
Moderator
Moderator

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
Reply
1 Reply
Moderator
Moderator

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
Reply