7 years, 1 month ago.

BLE HID works only when first paired

I have compiled the HID example from here (https://developer.mbed.org/users/jbru/code/BLE_HID_KeyboardStreamDemo/) into an nRF51822 board (BLE Nano), but it only works when the device is first paired. If i turn the bluetooth off and on again i get ble_error = 6(BLE_ERROR_INVALID_STATE) from ble.gattServer().write even though the device reconnects. Thank you.

1 Answer

7 years ago.

HI :

I has same issue . t try to added RTT printf function to get more information , then i found the issue is Security , when 2's connection with PC (win10) , the security will return "SEC_STATUS_PAIRING_NOT_SUPP" . so i power on/off NRF51_DK again then try to connection with PC , The issue still has ,

i thank maybe is link key don't clean or don't pass to PC when connection .