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

Security level mismatch between between nRF Connect and nRF52832 / LESC Bonding with numeric comparison

Hi, 

we are bonding an nRF52832 (SDK version 17.0.2, Softdevice S132 7.2.0, using the Peer Manager) and nRF Connect (Desktop, version 2.5.1) using numeric comparison method. Afterwards it looks like the information about the security level after bonding differs between PC and MCU:

At first, Security Mode 1 Level 4 is printed to the log, but after a re-connect it outputs Security Mode 1 Level 2:

On the MCU side Security Mode 1 Level 4 is announced on every re-connect with event BLE_GAP_EVT_CONN_SEC_UPDATE. 

 <info> PmEvt: PM_EVT_CONN_SEC_START
<info> BleEvt: BLE_GAP_EVT_SEC_INFO_REQUEST
<info> peer_manager_handler: Connection secured: role: Peripheral, conn_handle: 0, procedure: Encryption
<info> peer_manager_handler: Peer data updated in flash: peer_id: 0, data_id: Peer rank, action: Update, no change
<info> PmEvt: PM_EVT_PEER_DATA_UPDATE_SUCCEEDED
<info> auth=1, lesc=1, LTK=
<info> 78 FE 95 DC 42 FB F0 FA|x...B...
<info> B7 D9 B6 35 87 6C 93 2E|...5.l..
<info> PmEvt: PM_EVT_CONN_SEC_SUCCEEDED
<info> AddPeerId: peerId=0x0 pos=0 deviceHandle=1 inlist
<info> BleEvt: BLE_GAP_EVT_CONN_SEC_UPDATE sm=1, lv=4, keyLen=16
<info> ConnParamsEvt: Succeeded
<info> BleEvt: BLE_GAP_EVT_CONN_PARAM_UPDATE
<info> sup_timeout=0x12C slave_latency=0x1C
<info> min_conn_interval=0xC max_conn_interval=0xC

Now I am a little bit confused, in my understanding the information on both peers should be identical, correct? And how can I find out which information is correct?

Best regards

Florian 

Parents
  • Hi Florian, 

    It looked quite strange to me. Could you please try testing again using our example \examples\ble_central_and_peripheral\experimental\ble_app_multirole_lesc\

    The example use LESC and numeric comparison. 
    This is what I got when testing with the example, they are all mode 1 level 4 when re-connected: 

     

    If it only happened in your application, please send a minimum version of the application that can re-produce the issue. 

Reply
  • Hi Florian, 

    It looked quite strange to me. Could you please try testing again using our example \examples\ble_central_and_peripheral\experimental\ble_app_multirole_lesc\

    The example use LESC and numeric comparison. 
    This is what I got when testing with the example, they are all mode 1 level 4 when re-connected: 

     

    If it only happened in your application, please send a minimum version of the application that can re-produce the issue. 

Children
  • Hi Hung,

    I adapted the multirole LESC example to run on our HW (as I do not have a PCA10040 yet and our HW does not have buttons and leds) and the behavior was the same. During further investigation I had a look on the dongle I am using for the PC. It was an older PCA10031. After I replaced it with a PCA10059 dongle, the behavior is as expected (security mode 1 level 4 on each reconnect). 

    Thanks for your help, this issue is solved. 

Related