How to know the start and end of a connection event?

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

cross mob
Anonymous
Not applicable

Hi,

   

For my application I need to know the start and end of a connection event. I'm not able to find any such radio event in BLE_Stack.h.

   

However I saw an API CyBle_GetBleSsState" which can return "CYBLE_BLESS_STATE_EVENT_CLOSE". But I need these events without needing to call an API to get the current radio status.

   

Thanks & Regards,

   

Sharan

0 Likes
1 Solution
Anonymous
Not applicable

sharan.avati_1560381: You should check the BLE_StackEventHandler 'event' parameter.  CYBLE_EVT_GATT_CONNECT_IND and CYBLE_EVT_GATT_DISCONNECT_IND for connection and disconnection events respectively.  The BLE_StackEventHandler is registered after you call the CyBle_Start function.

   

Check out this code-example for a reference:
https://github.com/cypresssemiconductorco/PSoC-4-BLE/tree/master/100_Projects_in_100_Days/Day027_BLE...

   

I found this helpful resource on a users github account as well:
https://github.com/danielpi/PSoC-4-BLE-Experiments/blob/master/BLE%20Event%20Descriptions.md

View solution in original post

0 Likes
6 Replies
HeLi_263931
Level 8
Level 8
100 solutions authored 50 solutions authored 25 solutions authored

I think there will be an event when the GATT stack is connected, which would signal the end of the underlying BLE event.

0 Likes
Anonymous
Not applicable

Hi hli,

   

I didn't understand you. What you mean by "I think there will be an event when the GATT stack is connected"?

   

Thanks,

   

Sharan

0 Likes
Anonymous
Not applicable

sharan.avati_1560381: You should check the BLE_StackEventHandler 'event' parameter.  CYBLE_EVT_GATT_CONNECT_IND and CYBLE_EVT_GATT_DISCONNECT_IND for connection and disconnection events respectively.  The BLE_StackEventHandler is registered after you call the CyBle_Start function.

   

Check out this code-example for a reference:
https://github.com/cypresssemiconductorco/PSoC-4-BLE/tree/master/100_Projects_in_100_Days/Day027_BLE...

   

I found this helpful resource on a users github account as well:
https://github.com/danielpi/PSoC-4-BLE-Experiments/blob/master/BLE%20Event%20Descriptions.md

0 Likes
Anonymous
Not applicable

Hi,

   

I'm not talking about GATT connection and disconnection events.

   

My question is about the LL start/end of the connection events between the two connection intervals after the connection is established.

   

I appreciate if Cypress folks comment on this.

   

Thanks & Regards,

   

Sharan

0 Likes
Balasubramanyam
Employee
Employee
First like received

Hi Sharan,

   

There is no such events supported to application level as of now. 

Anonymous
Not applicable

Hi,

   

Thanks for your response. Are there any plans to add it in the future release?

   

Currently we have used timer to workaround this. Most of the competitors already support this event.

   

Thanks & Regards,

   

Sharan

0 Likes