CYBLE_EVT_GAP_DEVICE_CONNECTED vs. CYBLE_EVT_GATT_CONNECT_IND

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

cross mob
Anonymous
Not applicable

What is the difference between CYBLE_EVT_GAP_DEVICE_CONNECTED and CYBLE_EVT_GATT_CONNECT_IND (and their disconnect's)?

   

 

   

For me it seems natural to use the GAP event to see if an connection is created (or not) since the Generic Access Profile is about connections. But I've seen that some of the example projects from Cypress uses the GATT variant.

0 Likes
1 Solution
Anonymous
Not applicable

CYBLE_EVT_GAP_DEVICE_CONNECTED: This event is received when device is connected over GAP layer.

   

CYBLE_EVT_GATT_CONNECT_IND: This event is received when device is connected over GATT level 

   

Actually, once successful connection happens after calling CyBle_GapcConnectDevice, both these events will be generated in the following order:

   

CYBLE_EVT_GATT_CONNECT_IND
CYBLE_EVT_GAP_DEVICE_CONNECTED

View solution in original post

0 Likes
2 Replies
Anonymous
Not applicable

CYBLE_EVT_GAP_DEVICE_CONNECTED: This event is received when device is connected over GAP layer.

   

CYBLE_EVT_GATT_CONNECT_IND: This event is received when device is connected over GATT level 

   

Actually, once successful connection happens after calling CyBle_GapcConnectDevice, both these events will be generated in the following order:

   

CYBLE_EVT_GATT_CONNECT_IND
CYBLE_EVT_GAP_DEVICE_CONNECTED

0 Likes
Anonymous
Not applicable

Hi! Is that order correct? As far as I understand, GAP is just a fancy acronym/name for how a peripheral device should connect to others (i.e. central). The device's GAP is just the device's behavior for connections,  so calling it "layer" is misleading. (I may have misunderstood what GAP is).

   

 

   

Since GAP is about connections, shouldn't the event CYBLE_EVT_GAP_DEVICE_CONNECTED come first then?

   

 

   

Or can a device be connected to GATT without being (for example) authenticated, and therefore not be fully connected as required by the device's GAP? (Please refer to this other post: http://www.cypress.com/forum/psoc-4-ble/pairingbondingauthentification-procedure)

0 Likes