What is difference Connected Events

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

cross mob
user_1600091
Level 2
Level 2
First like received

Hi everyone,

   

CYBLE_EVT_GAP_DEVICE_CONNECTED  This event is generated at the GAP Peripheral end after connection is completed with peer Central device

   

CYBLE_EVT_GATT_CONNECT_IND             This event is generated at the GAP Peripheral end after connection is completed with peer Central device

   

I use both of them  Server-Client application. I analyze with debug. When the connection is established,  enters in two event.

   
        
  • What is difference CYBLE_EVT_GATT_CONNECT_IND and CYBLE_EVT_GAP_DEVICE_CONNECTED events?
  •     
  • What are the drawbacks of using both of them?
  •     
  • Which should I use ?
  •    
   


 

0 Likes
1 Solution
Anonymous
Not applicable

I believe they both fire on a successful connection.

   

The IND will fire first (iirc), with the CONNECTED firing second.

   

There shouldn't be a problem using both, but if all you want is a connection, then you can use just one 🙂

   

From what I've seen playing around with it, it could be that the IND fires when a connection process is started, whereas the CONNECTED fires when the connection is completed.

   

If you are checking for a device is fully connected, then I would use the CYBLE_EVT_GAP_DEVICE_CONNECTED. The only reason I would use the other event is if you have a specific reason for it.

View solution in original post

1 Reply
Anonymous
Not applicable

I believe they both fire on a successful connection.

   

The IND will fire first (iirc), with the CONNECTED firing second.

   

There shouldn't be a problem using both, but if all you want is a connection, then you can use just one 🙂

   

From what I've seen playing around with it, it could be that the IND fires when a connection process is started, whereas the CONNECTED fires when the connection is completed.

   

If you are checking for a device is fully connected, then I would use the CYBLE_EVT_GAP_DEVICE_CONNECTED. The only reason I would use the other event is if you have a specific reason for it.