mirror of
https://github.com/embassy-rs/embassy.git
synced 2024-11-23 07:12:29 +00:00
Merge #1179
1179: LoRa/SX1276: adjust Rx window offset and duration r=lulf a=samueltardieu After a transmission, two receive windows Rx1 and Rx2 are opened for one second each, one right after the other, after a fixed delay (for example 5s). The Rx window offset is added to the starting date of each window and the Rx window duration represents the maximum delay we will wait for an incoming message before declaring that a timeout occurred. A value of -500ms for the offset and 800ms for the duration means that instead of having Rx1 = [5000, 6000[ and Rx2 = [6000, 7000[ we get Rx1 = [4500, 5300[ and Rx2 = [5500, 6300[. We only cover 30% of the expected windows. The maximum time a SX127x can take before the Rx side is ready is TS_HOP + TS_RE = 50µs + 2.33ms. Using 3ms for the offset and 1003ms for the duration will give much better time windows: Rx1 = [4997, 5997[ and Rx2 = [5997, 7000]. Note that the lorawan-device crate caps Rx1 end date to Rx2 start date. This change allows a previously failing Murata CMWX1ZZABZ-091 module (STM32L + SX1276) to connect to the TTN LoRa network. Co-authored-by: Samuel Tardieu <sam@rfc1149.net>
This commit is contained in:
commit
95cff35a91
@ -70,10 +70,10 @@ where
|
||||
RFS: RadioSwitch + 'static,
|
||||
{
|
||||
fn get_rx_window_offset_ms(&self) -> i32 {
|
||||
-500
|
||||
-3
|
||||
}
|
||||
fn get_rx_window_duration_ms(&self) -> u32 {
|
||||
800
|
||||
1003
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user