How to measure packet delay or latency?

From LoRaWAN perspective it all ‘just data’ - and the system doesnt care. It doesnt matter whether the e.g. 10 byte payload you choose to send over the air is ‘raw’ data or the ‘result of some calculation’ you have done before sending…all 10 byte payloads are the same to LoRaWAN and the time taken to send (and therefore any transmission related ‘latency’ is the same and can be predicted, based on e.g SF used for the Tx per the link I provided earlier!

1 Like

image
okay i got it nowww thanks!!

1 Like

i see. thanks for your help!!

Consider a spherical Swallow, what is its average air speed unladen?

The whole investigation seems quite out of proportion to the system it’s measuring. Recording temperature at one point in a field and getting the data to your dashboard in a few milli-seconds whilst the plants near that sensor are taking hours for cell mitosis seems disproportionate.

And if you have many sensors in a field and are hoping to take a snapshot all at the same time, there are ways of developing the code to do that but then not clash on transmission, but the manufacturing variability & the repeatability of the sensor is likely to make this rather academic.

You may want Time-on-air?

1 Like

Maybe you could include your device time in your payload, and then compare it with the time it was received on the NS?

If your device supports LoRaWAN 1.0.3 you could use DeviceTimeReq for synchronization.

1 Like

how to include device time in the payload?

I’m not sure what you mean? Just add it to your payload, it will take up 4 bytes - so you could have it as the first 4 bytes of every single payload you are sending.

Does the average agricultural LoRaWAN sensor have an accurate time source ?

Even if there is an accurate time source, there is no reason to look at the latency given the problem description. If raw data and processed data has the same length LoRaWAN transmission time will be the same. If the length differs there are calculators to calculate the difference in time, still no need to add timestamps.
And the time it takes to process the data at the edge can be found by using the serial console of the device with appropriate firmware. I would evaluate the difference in power consumption as well to check if there is a significant difference in battery lifetime to be expected, given the use case you don’t want to go round changing batteries every couple of months…

1 Like