Announcements
Community Announcement : Welcome to the NEW Cypress Developer Community.
cancel
Showing results for 
Search instead for 
Did you mean: 

PSoC 4

japac_1817436
New Contributor

Would there be a BLE event that gets generated right before an advertisement packet is transmitted?

   

I have some data that I would like to broadcast in the advertising packet. I know how to dynamically update the advertising packet with manufacturer-specific data. However, change in data is quite fast when compared to the advertising interval and I would like to reduce the delay of the data as much as possible. The best way to achieve this would be to update the advertising packet just before the packet is transmitted and hence my question on whether there is a BLE event that can be used for this purpose.

   

Currently, I am updating the advertising packet in a timer interrupt that is executed sufficiently fast for my needs. While it works, this seems very inefficient and I may need the extra timer later.

   

Thank you.

0 Likes
1 Solution
Anonymous
Not applicable

Hi,

   

The adv date can be dynamically modified before each advertisement interval. You have to wait for the BLE SS State of CYBLE_BLESS_STATE_EVENT_CLOSE for changing the Adv packets. You will know that CYBLE_BLESS_STATE_EVENT_CLOSE has been received not by any inetrrupt callback, but you need to constantly poll for the SS State by calling the CyBle_GetBleSsState API.

   

We have an example project for this. You can download it along with the documentation from this location.

   

http://www.cypress.com/blog/100-projects-100-days/project-009-dynamic-broadcaster-changing-advertisi...

   

Regards,

   

-Madhu Sudhan

View solution in original post

0 Likes
2 Replies
Anonymous
Not applicable

I've been digging for an event of this sort for awhile. It would be handy to know when packets are transmitted.

0 Likes
Anonymous
Not applicable

Hi,

   

The adv date can be dynamically modified before each advertisement interval. You have to wait for the BLE SS State of CYBLE_BLESS_STATE_EVENT_CLOSE for changing the Adv packets. You will know that CYBLE_BLESS_STATE_EVENT_CLOSE has been received not by any inetrrupt callback, but you need to constantly poll for the SS State by calling the CyBle_GetBleSsState API.

   

We have an example project for this. You can download it along with the documentation from this location.

   

http://www.cypress.com/blog/100-projects-100-days/project-009-dynamic-broadcaster-changing-advertisi...

   

Regards,

   

-Madhu Sudhan

View solution in original post

0 Likes