This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

state check of nrf51822

hii i use nrf51822 dev kit, and want to know the status of that is that right now advertising, pairing, connect etc. so is their any function that i use to check the status of kit or any other way to doing so. and how i check the enter passkey are valid or not. Thank you

Parents
  • Hi Hiren,

    Unfortunately, you would need to keep track of the state on your own in the application code. The BLE application is event driven, so you should monitor the events to know which state the device is.

    When you receive wrong passkey from peer device you will get BLE_GAP_EVT_AUTH_STATUS event with p_ble_evt->evt.gap_evt.params.auth_status= BLE_GAP_SEC_STATUS_CONFIRM_VALUE

Reply
  • Hi Hiren,

    Unfortunately, you would need to keep track of the state on your own in the application code. The BLE application is event driven, so you should monitor the events to know which state the device is.

    When you receive wrong passkey from peer device you will get BLE_GAP_EVT_AUTH_STATUS event with p_ble_evt->evt.gap_evt.params.auth_status= BLE_GAP_SEC_STATUS_CONFIRM_VALUE

Children
Related