10 Replies Latest reply on Jul 24, 2017 10:48 AM by javiersenas_1605611

    How to detect authentified Central in range?

    javiersenas_1605611

      Hello colleagues,

         

      I set the GAP Role of my BLE device as Peripheral and Bonding Yes.  When I connect for first time my PRoC to the Smartphone (Central) through CySmart App I can see all these events:

         

      CYBLE_EVT_STACK_ON
      CYBLE_EVT_GAPP_ADVERTISEMENT_START_STOP
      CYBLE_EVT_GATT_CONNECT_IND

         

      CYBLE_EVT_GAP_DEVICE_CONNECTED

         

      CYBLE_EVT_GAP_AUTH_REQ

         

      CYBLE_EVT_GAP_ENCRYPT_CHANGE

         

      KEYINFO_EXCHANGE_COMPLETED. Here I can read the Long term Key: 10006aceca77f24d8755b800a0507258

         

      AUTHENTICATION_COMPLETED

         

      When I connect it for second time, the Authentification messages dissapear. What I would like is to know how I can know if one already-authentified Central is in range of my PRoC. I was thinking of reading SCAN_REQ Message and then compare its Long Term Key but I don't find such Event. How can I do this?

         

      Thanks in advance for the great support!

         

      Peter