1 Reply Latest reply on Aug 3, 2017 10:06 AM by e.pratt_1639216

    What is difference Connected Events

    alper.koybasi_1600091

      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 ?
      •    
         


       

        • 1. Re: What is difference Connected Events
          e.pratt_1639216

          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.