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

Setting a PASSKEY

Hello! I am trying to develop on the nRF51822 eval board as called PCA10001. The programming interface I use is uVision4 on win7.

I would set a static PASSKEY for the pairing process in the reference code "ble_app_hrs". I add "sd_ble_gap_authenticate(p_ble_evt->evt.gap_evt.conn_handle,&m_sec_params)" at the top of "ble_evt_dispatch(ble_evt_t * p_ble_evt)". The PASSKEY has been set as "111111" in (p_ble_evt->evt.gap_evt.params.passkey_display.passkey[i]= '1').

As the result, in running "Heart Rate Monitor" in "nRF Utility APP", the screen pops up a pairing request. When I select "Pairing",

  • the iPhone get paired to the PCA10001 without asking any PASSKEY, and
  • the heart rate will never appear again, even I reload the original "ble_app_hrs" code.

Question 1, Did I erase anything so that original "ble_app_hrs" code can not work? Question 2, what is the proper way to add the PASSKEY for the pairing? Question 3, I assume "intern_ble_stack_events_execute(.......)" will be directed to "ble_evt_dispatch(....)" when the BLE stack event received. Is it applicable in this case?

Thanks for help. ELCA

Related