pairing fail with ncs 2.8.0

hello Nordic 

we are working with nrf52832 and nrf 52840 .. migrated to ncs2.7.0 lately and now migrating to ncs 2.8.0 (at the moment building without sysbuild)

we did not change anything in the pairing mechanism but suddenly it seems to stop working

i first get the 'bt_conn_cb'  callback of " .security_changed" which inside it i get that  'bt_conn_get_security(const struct bt_conn *conn)  returns with value = 2 which indicates pairing 

but right after that i get another  'bt_conn_auth_info_cb' callback of " .pairing_failed" followed by the first callback .. indicating a fail 

i get this print (from ncs) " bt_smp: pairing failed (peer reason 0x3) "

any idea what has changed ?

and what does peer reason 3 means ?

hope to read you soon

best regards

Ziv

  • Hi Einar

    well debugging is a bit tricky i have another thread open on that and some one suggested allowing local ip ports but from hat i see this is not the issue, i will elaborate on the relevant thread if i manage to solve the issue...

    back to our issue .. i actually got the BT_SECURITY_ERR_UNSPECIFIED by checking with a tool on my laptop that is running the same app as my node devices, and i actually see different results for each device i am attempting to pair with.

    with the tool running on my laptop i get 

    i don't even get the first pairing completed callback, i get right on start

    bt_smp: pairing failed (peer reason 0xc) , followed by pairing_failed callback with error  BT_SECURITY_ERR_AUTH_FAIL

    with one type of node (ble 4.2) 

    i get the callback for pairing completed followed by the ".security_changed" callback with status 

    BT_SECURITY_L2. which looks like it actually working, though i did not see the first ".security_changed" callback which i usually see.

    and another node with (ble 5.0) and i think the ble device is actually nrf52840

    i get 'pairing_completed' call back followed by the initial error i posted (seems the extra config did not solve the issue ) -> bt_smp: pairing failed (peer reason 0x3) , followed by the ".security_changed" callback giving error  BT_SECURITY_ERR_AUTH_REQUIREMENT. 

    just to be clear i do not try to connect with all of them at the same time, with each device i did several pairing attempts without the noise of other devices and those were the results  

    regarding the debug the one time it did run i did not get to the break point on the BT_SECURITY_ERR_UNSPECIFIED, which is reasonable since we got different types of errors

    any ideas ? 

    do i see different results cause of different ble stacks ? or there is something else

    No, there has not been significant changes on this part. But this is a common issue that we often see when testing

    i will point again that before migrating to v2.7.0 and 2.8.0 we did not have an issue with pairing to each one of those node types. 

    hope to read you soon 

    best regards

    Ziv 

  • Hi Ziv,

    I understand that this issue appeared after migrating to v2.8.0, but I am not ablet o see any changes that obviously explan this. It is interesting that you get different failures with didfferent error codes. Does it depend on the peer device, or does it also vary with the same peer device? Or is there another pattern here?  Are you able to share logs and sniffer traces for some of the specific error codes, so that we can understand more about what happened?

  • or does it also vary with the same peer device

    each peer device give the same type of error all the time.. the difference is between different peer devices

  • I see. Would it be possible to make sniffer traces of each case so that we can see what happens on air? It could also be interesting to compare those with traces from 2.7 so that we can see what has changed (if any). Hopefully this can point to where to look next.

Related