mcci-catena / arduino-lmic

LoraWAN-MAC-in-C library, adapted to run under the Arduino environment
https://forum.mcci.io/c/device-software/arduino-lmic/
MIT License
645 stars 211 forks source link

Regulatory delays are overridden by transmit randomization #927

Open terrillmoore opened 1 year ago

terrillmoore commented 1 year ago

While researching #926, we found an additional problem.

The LMIC will frequently request that the start time of the next uplink message be randomized.

In engineUpdate_inner, the time to start the transmission, txbeg, is first calculated based on regulatory issues -- the regional rules may require that the duty cycle be limited. However, if there's a randomization requests, the start time is overwritten with the randomized start time, based on the current time. Nothing prevents the start time from being less than the regulatory requirement.