Due to the covid-19 virus, my school project changed a lot. The new project is the following: "Study the latency between sending and receiving data from a device generating random CanBus data (e.g. Android phone) and a PC (with the Nordic nRF52840 development board) receiving the data"
This should be send over bluetooth 5 or BLE
Now, I'm planning to use a raspberry PI for generating and sending the data. But what is the best way to measure the latency?
I was thinking of using the nRF to send a request for candata to the PI and save the timestamp when sending the request. The PI will answer with candata and when I receive the candata on the nordicchip, I save another timestamp. Then I divide the timestamp by 2, so I ave the latency of sending data. Is this a good way to measure the latency? Or is there a better way to do this?
Thanks in advance for your help!