Questions about NDT(Nordic Distance Measuring Toolbox)

Hello!

I'm evaluating NDT and trying to inderstand its capabilities. While the library looks fascinating, I faced some speedbumpers on the evaluation phase.
I want to use this NDT technology in the future project, and I will be grateful if somebody will help me to address the issues I got...
Here are the questions/issues:

1 - If we have more than 2 boards, the ranging works fine for a while (1-5-10 minutes) - in that time we got distances between a "locator" and random "raflector", and "reflectlor" seems to be random - so it is fine, we got the distances to all of the reflectors. But after a while the "locator" boards seems to "lock" on some particular "reflector" board (most often on the nearest one). After this "locking", we got only distances to one reflector board. If we move the locator close to other reflector, if will "relock" after a while to the currently physically closest one, and will measure the distance only to that one. So if we have, for example, 3 "reflectors" and one "locator" - we will only have a distance to one "reflector".

Resetting the "locator" board solves this for a while, but then the situaltion repeats. It seems like there is some implicit synchronization between scan cycle of "locator"'s Softdevice and "reflector"'s Softdevice advertisements.

I think it is somewhere in Softdevices because I tried two things:
- Add a random delay in "disconnected" callback of the "reflector". In my opinion, with this it will not immediately start advertising after a distance measurrement cycle, but with a random delay - and other "reflectors" can drop their advertisements faster than this one - so we should get some diversity in scan results of the "locator" side;

- Add a timestamps for MACs passed the filter on the "locator" side, and if this MAC  was scanned less than N ms ago - just pass it (I created a "dummy" data callback - so the "locator" board will read the scan data Softdevice returned, but will not enqueue DM request)
But both of this workarounds are not working - after a while, the "locator" board still "locks" on the some "reflector".

2 - I like to have one "locator" board and some "reflectors" - so I need to define the roles of the boards. Is there some config option for defining a board role (initiator/reflector)?
3 - I tried to disable the scanning procedure on the 'reflector" boards (I even tried to completely get rid of "scan_start") - but on the "locator" I still can see that the "reflectors" are scanning "locator"'s advertisements. It seems like Softdevice sends scan request packet automatically in answer to the advertisements of the  "reflector" - is there a way to avoid this and send scan requests only manually when needed?

Thanks in advance!

  • Hi Amanda.
    Sure, here are some details for reproducing this.
    NCS v2.6.1,
    Firstly I discovered this on "vanilla" code, i.e. without my changes.
    The ranges were transferred to PC via UART. The radio was used solely by nRF DM.
    There were 3 nRF52840 (one as a "locator" board connected to the PC, and two as reflectors) + one nRF5340 devkit as an additional reflector.

    Just upload firmware to all the boards, start logging into the file, and wait for a while. After some time, you should notice that you have the same MAC in UART output again and again. If you will reset the "locator" board, you will get different MACs for a while, and then "locking" will happen again.

    About experiments with CONFIG_DM_TIMESLOT_QUEUE_COUNT_SAME_PEER - sorry, I can't do that at the moment. We decided to stop efforts on evaluating nRF DM due to its unreliability.

    Thank you for your assistance.

  • Hi, 

    The sample is optimized for one-to-one measurements. If you are doing multiple units, we recommend you build some kind of scheduling solution into the application layer.

    -Amanda H.

Related