Distance Measurement under BLE Secure Connection

We have been fighting with the Distance Measurement Toolkit for a while (see other ticket  Assert error when Coded PHY is used for BLE NUS ).

As we needed to move forward, we started the implementation of LE Secure Connection (Numeric Comparisson). We have a working version of our firmware that establishes L4 Security level.

Our problem is now that after the establishment of L4, we cannot get Distance Measurement to work (we start the Advertising and Scanning, but the DataReady callback never gets called, and we see a lot of errors when the dm_request_add returns -EBUSY. In the above mentioned ticket, we are having an assert, but we are at least getting initial measurements. Now with LE SC we have not been able to get at least one measurement from the DM. So our main question would be:

Q1: Is there any theoretical incompatibility between the Distance Measurement Toolkit and BLE Secure Connection Authenticated+Encrypted?

For reference, we have the same problem in SDK v2.8.0, v2.9.0, v2.9.1. We saw that there is a recent v3.0.0, but project is not even compiling in that version, so we are for now focusing on v2.8+

Thanks in advance for any clarification that helps us focus our efforts efficiently.

Kind regards


Javier Reyes

Parents
  • There is currently a known incompatibility between the Distance Measurement (DM) Toolkit and LE Secure Connections (L4 security level) in the Nordic SDK (including v2.8.x–2.9.1). The DM feature is designed to operate with unencrypted or L2-level connections, and enabling L4 (Authenticated + Encrypted) may block the DM process, causing dm_request_add() to return -EBUSY and the DataReady callback to never trigger. Recommendation: Test with a lower security level (L2 or L3) to confirm DM works. Nordic may add support in a future SDK, so monitor changelogs (v3.0.0+).

    Geometry Dash

  • Hi, first of all, thank you for the confirmation that the DM would not work with LESC.

    I am still trying to understand how the connection manager understands the callbacks registered to the bt_conn_auth_cb structur. For now, we have only provided the following:

    • passkey_display
    • passkey_confirm
    • cancel

    If I try to request a security level other than L4 (for example L3 or L2) with my current callback setup, still the pairing process seem to report the L4 level after I confirm the passkey. Does that mean that the call to bt_conn_set_security(app_current_conn, BT_SECURITY_L2) will not actually trigger an L2 pairing process? Or how can I try to trigger a L2 or L3 only? What callbacks need to be present/absent? Is there any kind of guide that DIRECTLY indicates which callbacks determine which security level? The only information I have seen are tables in the DevAcademy, which only show the theory, but not a direct setup of the callbacks. The comments on the conn.h headers are also not clear about the relation between the callbacks and the security level...

    Thanks in advance for any guidance on the matter.

Reply
  • Hi, first of all, thank you for the confirmation that the DM would not work with LESC.

    I am still trying to understand how the connection manager understands the callbacks registered to the bt_conn_auth_cb structur. For now, we have only provided the following:

    • passkey_display
    • passkey_confirm
    • cancel

    If I try to request a security level other than L4 (for example L3 or L2) with my current callback setup, still the pairing process seem to report the L4 level after I confirm the passkey. Does that mean that the call to bt_conn_set_security(app_current_conn, BT_SECURITY_L2) will not actually trigger an L2 pairing process? Or how can I try to trigger a L2 or L3 only? What callbacks need to be present/absent? Is there any kind of guide that DIRECTLY indicates which callbacks determine which security level? The only information I have seen are tables in the DevAcademy, which only show the theory, but not a direct setup of the callbacks. The comments on the conn.h headers are also not clear about the relation between the callbacks and the security level...

    Thanks in advance for any guidance on the matter.

Children
No Data
Related