8 Replies Latest reply on Mar 23, 2018 12:24 PM by epr_1639216

    Authentication with static passkey

      I am new to Cypress PRoC/PSoC solutions for BLE. I am trying to establish an authenticated connection between a peripheral and a central device using a pre-known static passkey. Here is what I have so far:




      Peripheral side:


      - configured as GATT server, GAP peripheral


      - successfully starts BLE stack


      - successfully starts advertising with 5 sec interval


      - allows central device to connect


      - waits for central device to start authentication process


      - on receiving CYBLE_EVT_GAP_AUTH_REQ, calls CyBle_GappAuthReqReply() with No Bonding, key size 16, security 0x02


      - on receiving CYBLE_EVT_GAP_PASSKEY_ENTRY_REQUEST, calls CyBle_GapAuthPassKeyReply() with static passkey






      Central side:


      - configured as GATT client, GAP central


      - successfully starts BLE stack


      - successfully starts scanning with fast scan mode


      - successfully discovers target peer device


      - successfully connects to target device using CyBle_GapcConnectDevice() with return 0x00


      - on receiving CYBLE_EVT_GAP_DEVICE_CONNECTED, calls CyBle_GapAuthReq() with No Bonding, key size 16, security 0x02




      After calling CyBle_GapAuthReq() the central device gets CYBLE_EVT_GAP_PASSKEY_DISPLAY_REQUEST the very first time, and then stays there without generating any other events from the BLE stack. And the passkey displayed is not the static passkey I'm trying to use.




      Can someone shine light on the faults in the process above, for both the central and peripheral devices?