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 Reply
  • Hi, we got really confused in regard to that eliminated response. It seemed like a valid response, but it got deleted, as well as our reply there. Perhaps was a false positive? It didnt look like spam to us.

    So, to be clear on what you are saying: the error that was fixed in the SDK v3.0.0 is related to the assert on Distance Measurement? Or related to this ticket regarding Secure Connection L4 with Distance Measurement?

    Our build errors on v3.0.0 seem to be related to the definition of our custom board. As the sysbuild and HWMv2 documentation are rather difficult to follow, it might be a problem on our side, but we have not yet given it much thought, as the SDK version selected for tests has been v2.8.0.

Children
  • Just for reference, here is the content (minus the hidden link) from the deleted reply in case it was in fact helpful:

    "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+)."

    I can not find a mention in our documentation with any issues with LESC + Distance Measurement Toolkit though, which is why I just removed it.

    As for your previous ticket (the assert error when Coded PHY is used for BLE NUS). It was not a fix, but a "known issue" that was added in the 3.0.0 documentation. Sorry about the confusion.

    Please also check out the migration guide from multi-image builds to sysbuild if you're moving to sysbuild from the old build setup: https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/releases_and_maturity/migration/migration_sysbuild.html 

    Best regards,

    Simon

Related