How to make distance ranging continuous in nrf_dm sample application.

Hello team,

I am currently working on the distance measurement functionality using the development kit (nRF5340 and SDK: v2.9.0). At present, the distance measurement runs for a specific duration and then stops. To initiate a new measurement, I need to manually press the reset button on the development kit (which internally calls dm_request_add(&req)).

I would like to know how to enable continuous distance measurement or schedule it to automatically restart after a certain interval (for example, every 2 seconds). I have attempted to use the CONFIG_DM_TIMESLOT_RESCHEDULE=y Kconfig option to achieve continuous ranging, but unfortunately, it did not work as expected.

Could you please advise on how to implement continuous distance measurement or suggest an alternative approach to automate the scheduling of measurements?

Parents
  • Hi Madan,

    Sorry for the delay.. . The Distance Measurement (DM) module does not automatically reschedule measurements unless both peers independently decide to range each other, and the CONFIG_DM_TIMESLOT_RESCHEDULE option only retries a measurement if the previous one was successful, but does not create a periodic schedule by itself.. To achieve continuous or periodic measurements (e.g., every 2 seconds), you should use a timer (such as Zephyr’s k_timer or k_work_delayable) to call dm_request_add() at your desired interval. 

    Regards,

    Swathy

Reply
  • Hi Madan,

    Sorry for the delay.. . The Distance Measurement (DM) module does not automatically reschedule measurements unless both peers independently decide to range each other, and the CONFIG_DM_TIMESLOT_RESCHEDULE option only retries a measurement if the previous one was successful, but does not create a periodic schedule by itself.. To achieve continuous or periodic measurements (e.g., every 2 seconds), you should use a timer (such as Zephyr’s k_timer or k_work_delayable) to call dm_request_add() at your desired interval. 

    Regards,

    Swathy

Children
No Data
Related