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
646 stars 212 forks source link

Using less strict timing, RX_CONTINOUS #860

Closed mrx23dot closed 2 years ago

mrx23dot commented 2 years ago

Just an idea, since LORA requires so strict microsec precise timing (starting RX_SINGLE during the half of preamble), we could simply use continuous OPMODE_RX with a wider RX window, say

  1. define THRESH 100ms // reduce if you can afford

  2. start RX: at RX1_DELAY - THRESH
  3. stop RX: at RX1_DELAY + THRESH
  4. read out last message (new overrides old)
  5. check if it was addressed for us (MIC matches)

So it doesn't really matter if user makes +10ms calculation, we won't miss the deadline. Downside it could cost more power (rxing longer), but threshold can be reduces even to current level.

Another more complicated option would be using internal Timer1 of sx12xx.

mrx23dot commented 2 years ago

https://github.com/mcci-catena/arduino-lmic/discussions/861