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

cross mob
KaPa_2418181
Level 2
Level 2

I am using the PSoC4 BLE and sending a notification to the peer when my device shuts down, with a reason code so that the peer knows why my device was turned off (e.g. user action, inactivity timeout, battery low and so on). Obviously on shutdown after CyBle_GattsNotification() I  need to loop on CyBle_ProcessEvents(), but I also want to avoid looping too long unnecessarily.

So is there a way to know if / when my notification was put on air? This is an indication so I don't care if the peer doesn't / cannot process it, so there is no need to e.g. use indication and wait for the peer to confirm. All I want to know is if my message was sent, irrespective if the peer got it or not.

Thx,

Karoly

0 Likes
1 Solution

Hello kp_2418181 ,

    

  ->    As you mentioned  " CyBle_GattsNotification() I  need to loop on CyBle_ProcessEvents(), but I also want to avoid looping too long unnecessarily." 

Ans: The first response answers this query. Once the application confirms that the data has been pushed into the stack, you can just come out of the loop. After that everything is under the control of stack and the application will never come to know that the data has been sent over the air or has been received by the peer device etc..

-Gyan

View solution in original post

0 Likes
5 Replies