1 Reply Latest reply on Jul 3, 2018 5:06 AM by GyanC_36

    How to block a device after many many failed connection attempts

      We are developing a BLE Peripheral Device with CYBLE-212020-01 module. We use the autentication pairing with encryption connection. If I try to connect the device and I don't insert the pairing password after a certan time (set by connection supervision timeout) the comunication is closed. If someone try to connect the device many times without having the password the device become always not available for other devices that want to connect it. There is a way to block a device if it try to connect many times without complete the connection?

        • 1. Re: How to block a device after many many failed connection attempts
          GyanC_36

          Hello,

           

                There are no ways to block a device even after multiple connections. However, the time period for which the device waits for the passkey to be entered can be reduced by implementing some application logic. For example , on connection you can store the MAC address of the peer device and compare it on the subsequent connections. If the same devices tries to connect again and again ( update  a variable for count) ,after some specific count number, you can send a disconnect command as soon as the same device tries to reconnect.

           

          Note: On connection CYBLE_EVT_GAP_DEVICE_CONNECT event triggers and you can call CyBle_GapDisconnect() API for immediate disconnection and hence you are not waiting for the passkey entry from the same peer device.

           

          Hope it helps.

           

          -Gyan