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

PASSKEY

 I’ve downloaded     nRF5_SDK_11.0.0_89a8197 and starting with examples from \examples\ble_peripheral\???\pca10040\s132\arm5_no_packs\

 I would like the other device to request a passkey (constant) at pairing (the passkey on my side is constant - no display needed)

After   gap_params_init();I’ve added the following code:

 

{

 static ble_opt_t optS;

   static uint8_t passw[]="123456";           

 optS.gap_opt.passkey.p_passkey=passw;

   err_code =sd_ble_opt_set(BLE_GAP_OPT_PASSKEY, &optS);

}

 

err_code returned :  0  

 

Still the module will pair and communicate without requesting a passkey.

I've tried to find an answer in Q&A . in some answers there was a reference to fields : io_caps,mitm. cant make out what does it mean. 

(these fields belong to structs relevant to services, not pairing)

 

Thanks for any help

   Yona

Parents
  • Hi again

    from some of the discussions - it seems that some updates needed in struct /union ble_evt_t. (mitm,lesc ...)

    this struct "pops up" in function on_ble_evt  called at these  events in a service:

    BLE_GAP_EVT_CONNECTED,

    BLE_GAP_EVT_CONN_PARAM_UPDATE,

    BLE_GATTS_EVT_WRITE,

    BLE_GAP_EVT_DISCONNECTED,

    still - never called for BLE_GAP_EVT_SEC_PARAMS_REQUEST

    moreover - there is a remark at the following line : // Pairing not supported

    does someone know  whats to be done ??

    Yona

Reply
  • Hi again

    from some of the discussions - it seems that some updates needed in struct /union ble_evt_t. (mitm,lesc ...)

    this struct "pops up" in function on_ble_evt  called at these  events in a service:

    BLE_GAP_EVT_CONNECTED,

    BLE_GAP_EVT_CONN_PARAM_UPDATE,

    BLE_GATTS_EVT_WRITE,

    BLE_GAP_EVT_DISCONNECTED,

    still - never called for BLE_GAP_EVT_SEC_PARAMS_REQUEST

    moreover - there is a remark at the following line : // Pairing not supported

    does someone know  whats to be done ??

    Yona

Children
No Data
Related