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 <justin@wearableavionics.com>
This commit is contained in:
bors[bot] 2022-11-21 22:08:46 +00:00 committed by GitHub
commit bbfb786139
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -87,7 +87,7 @@ where
config.rf.spreading_factor.into(), config.rf.spreading_factor.into(),
config.rf.bandwidth.into(), config.rf.bandwidth.into(),
config.rf.coding_rate.into(), config.rf.coding_rate.into(),
4, 8,
false, false,
true, true,
false, false,
@ -119,14 +119,14 @@ where
config.spreading_factor.into(), config.spreading_factor.into(),
config.bandwidth.into(), config.bandwidth.into(),
config.coding_rate.into(), config.coding_rate.into(),
4, 8,
4, 4,
false, false,
0u8, 0u8,
true, true,
false, false,
0, 0,
false, true,
true, true,
) )
.await?; .await?;