Skip to content

Commit

Permalink
Merge #1064
Browse files Browse the repository at this point in the history
1064: Fix LoRaWAN PHY settings for SX126x driver r=Dirbaio a=jbeaurivage

While working on #1023 / #1041, I noticed that the `lorawan_device::PhyTxRx` implementation does not conform to the LoRaWAN standard, and therefore devices using this driver could never communicate with a gateway. This PR backports the changes I've made to fix the offending parameters, and I can confirm that the driver now works with LoRaWAN networks.

* Set preamble length to 8 symbols
* Set polarity to inverted for received messages

Co-authored-by: Justin Beaurivage <[email protected]>
  • Loading branch information
bors[bot] and jbeaurivage authored Nov 21, 2022
2 parents 2528f45 + 81dc532 commit bbfb786
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions embassy-lora/src/sx126x/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ where
config.rf.spreading_factor.into(),
config.rf.bandwidth.into(),
config.rf.coding_rate.into(),
4,
8,
false,
true,
false,
Expand Down Expand Up @@ -119,14 +119,14 @@ where
config.spreading_factor.into(),
config.bandwidth.into(),
config.coding_rate.into(),
4,
8,
4,
false,
0u8,
true,
false,
0,
false,
true,
true,
)
.await?;
Expand Down

0 comments on commit bbfb786

Please sign in to comment.