Hi Nordic guys,
I'm trying to create a pin pairing between an NRF52 DK and iPhone.
I've created this function to do that:
void generate_key(void){ ret_code_t err_code; ble_opt_t passkey; uint8_t new_passkey[] = "123456"; NRF_LOG_INFO("Setting new passkey: %s", nrf_log_push(new_passkey)); passkey.gap_opt.passkey.p_passkey = new_passkey; err_code = sd_ble_opt_set(BLE_GAP_OPT_PASSKEY, &passkey); APP_ERROR_CHECK(err_code); }
I've added that function in the ble_peripherical template code, in the void gap_params_init(void) function.
Any idea why the NRF doesn't ask me about the pairing key?
Best regards,
Jorge.