embassy-rs / lora-phy

REPO ARCHIVED - moved to https://github.com/lora-rs/lora-rs -- LoRa implementation based on embedded-hal-async
Apache License 2.0
23 stars 15 forks source link

added preamble deadline for proper LoRaWAN RX1+RX2 reception #33

Closed ilya-epifanov closed 11 months ago

ilya-epifanov commented 11 months ago

Used by https://github.com/ivajloip/rust-lorawan/pull/142

lucasgranberg commented 11 months ago

We have to wait for ceekdee to come back after October 23 for review. I do not understand this code enough to make a decision.

https://github.com/embassy-rs/lora-phy/pull/29#issuecomment-1732575180

ilya-epifanov commented 11 months ago

Basically it allows you to run the IRQ loop just until the preamble (or header) is received. Allows LoRaWAN RX1/RX2 windows to be properly implemented. As per spec the receiver should continue receiving the reply using RX1 settings if it's got the preamble in time, even if the RX1 window is already closed. This allows, for example, joining with high SF, as the reply takes more than a second to receive, which is longer than the window duration.

lucasgranberg commented 11 months ago

thank you @ilya-epifanov!