Questions about Nordic Distance Measurement library sample

The hardware I use is nrf52840Dongle, using nrf_dm sample for development.
There are a few problems:


1. I have 8 devices, all within communication range, 4 as base stations and 3 as tags. The base station is the reflector, which is achieved by commenting this code:

//if (peer_supported_test(info->addr)) {

I want to let the tag be the initiator only。What do I need to change?


2. I found that the tag sometimes only tests with certain base stations, and I want to test the tag with each base station, so that the measurement data of the tag is relatively average. Is there any better implementation method?


3. Test the two boards separately, and find that the measurement data can be output once per second when the distance is close. When the distance becomes longer, the output data will become slower. What parameters do you need to change?


Looking forward to your reply.

Regards

Parents
  • Hi

    1. To make a device just work as a scanner or advertiser you need to change the bt_sync_init() function to only use advertising or scanning so that the device won't do both of them. 

    2. I'm not sure I understand what you mean here, but the reason an advertises might only connect to one base station is likely because it decides to pair and sync up to the first device it connects to, and if that device always is in range that is what it will connect to. You can change the way the connections are handled to disconnect and "forget" that device so that it will connect to another one next time (most likely). You can also turn off the initial central it connected to so that the tag will connect to a new one 

    3. Good. High precision will only be necessary if you have the computing to spare and need the extra accuracy.

    4. One timeslot will be the time allocated for the radio to do a certain task, so the part between the red arrows in your drawing I believe.

    5. Can you be more specific on what you mean about the frequency of ranging decreasing? From what to what exactly?

    Best regards,

    Simon

  • Hi,

    I have solved the problem of imbalanced output data. But now I run into another problem, I find that the number of outputs becomes less as time goes on, what might be the cause of this?

    I found similar questions in this ticker, but couldn't find the answer.

    devzone.nordicsemi.com/.../nrfconnect-sdk-nrf_dm-example-with-dedicated-roles-with-several-reflectors-and-one-initiator-degrades-with-time

    The fifth question means that when the device is just powered on, the initiator's ranging frequency is 2 per second. After 30 minutes, the frequency of the initiator's output log will slow down, and on average only one ranging data is output every 5s.

    The graph below shows the measured ranging output frequency after 30 minutes 

  • Hi

    I've not been able to find anything on a ranging increasing in time, and I think this is just the random delay from BLE advertisements trigging. The count of time you have set up seems to be rather random.

    Best regards,

    Simon

  • An output interval of 8s is too long for me.

    My current configuration is

    CONFIG_DM_HIGH_PRECISION_CALC=n
    CONFIG_DM_MIN_TIME_BETWEEN_TIMESLOTS_US=8000
Reply Children
Related