Ensure notification is send in BLE event

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

cross mob
Anonymous
Not applicable

Hello everyone,

   

I´m having a problem with notifications: the BLE event is every 30 ms, it is reading data and sending only once per event(I tried to read before, after and in the middle of two events) but my applications is time sensitive and it happens some times that the notification is not send in the next connection event and queue the notification for the second event.So, the Central device is receiving two notifications per event (it is not happening more than 20% of the time) 

   

My question is, if there is a way to discard notifications that are not send in the nearest event and not queue it? or how a can ensure that the notification can be send in the next event?

   

Regards,

   

Edgar

0 Likes
2 Replies
himam_31
Employee
Employee
50 likes received 25 likes received 10 likes received

Hello

   

Are you using the CyBleProcessEvents( )  just after the send notification API? This will push the notification to the stack right away.

   

Thanks,

   

Hima

0 Likes
Anonymous
Not applicable

Hi Hima,

   

Thanks for your fast answered.

   

the CyBleProcessEvents( ) was call at the begining of the loop that means after waking up the device from deeepsleep. Also, I tried calling before entering the deeepsleep function with the same results that I mentioned before.

   

So, I tried your advice, call just after the api, and it improved the notification per event to 96% but still having some double notifications in some events... I think I can work with that.

   

just wondering, there no api to discard notifications? or to read the Processed notification status?

   

Thanks.

0 Likes