This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Latency measurement/log

Hi, all. I would like some serious help. I have three nRF52840 boards and have been running all the examples from the blinky to light switch/dimming. I am, however, stuck as to how i can send (arbitrary/advert) packets between these and get a log of the latency. I want the one board to send a packet to the another board. The receiver must acknowledge that it has received by sending its own packet back. I need to know the time it takes for this exchange to occur. I will be connecting the boards as a mesh. Thanks.

Parents
  • Hi Rorisang, 

    You would need to use acknowledged messages for your purpose. 

    In our light switch example we use that message when sending "reliable publish" message, please check generic_onoff_client_set() function. 

    When there is a status message response to the reliable publish message, the function status_handle() in generic_onoff_client.c will be called. 

    You can calculate the latency by starting a timer when you send the reliable message and stop it when you receive the status call back. 

Reply
  • Hi Rorisang, 

    You would need to use acknowledged messages for your purpose. 

    In our light switch example we use that message when sending "reliable publish" message, please check generic_onoff_client_set() function. 

    When there is a status message response to the reliable publish message, the function status_handle() in generic_onoff_client.c will be called. 

    You can calculate the latency by starting a timer when you send the reliable message and stop it when you receive the status call back. 

Children
No Data
Related