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

OOB pairing central

Hi! I am trying to implement oob pairing, but I don't know how to do it. I' ve got 2 nrf devices. Central and peripheral. Central receives oob data, which it stores in structure. What I've done now is presented below.

Central side:

  1. Getting some information like peripheral address, peripheral tk value.
  2. Connecting with device (in BLE_GAP_EVT_ADV_REPORT I check ble address and if it matches I call sd_ble_gap_connect).
  3. Discovering peer services: (in DM_EVT_CONNECTION useble_db_discovery_start).
  4. Initiating bonding procedure. In service handler as reply of event: BLE_MY_SERVICE_C_EVT_DISCOVERY_COMPLETE I usedm_security_setup_req.

On the peripheral side:

  1. Creating advdata with my uuids, like in example: experimental_ble_app_hrs_pairing_nfc.
  2. Using conn_params_init() with the difference: cp_init.start_on_notify_cccd_handle = BLE_GATT_HANDLE_INVALID;
  3. Calling ble_advertising_start(BLE_ADV_MODE_FAST);. (I replace ble_advdata.h and ble_advdata.c to new one from nrf52 sdk).
  4. In the case BLE_GAP_EVT_AUTH_KEY_REQUEST: using err_code = sd_ble_gap_auth_key_reply(p_ble_evt->evt.gap_evt.conn_handle, BLE_GAP_AUTH_KEY_TYPE_OOB, m_oob_auth_key.tk);

And that's all. It does not work. Where I made a mistake?

Parents Reply Children
No Data
Related