From a5f370591714de74b630106e2104fd2b77cfb475 Mon Sep 17 00:00:00 2001 From: Linar Yusupov Date: Mon, 23 Sep 2024 09:54:38 +0300 Subject: [PATCH] [FANET] update of LoRa plans for IN, IL, KR and NZ world regions --- .../firmware/source/SoftRF/src/driver/GNSS.cpp | 4 ++-- .../source/SoftRF/src/driver/radio/almic.cpp | 3 +++ .../source/SoftRF/src/driver/radio/radiolib.cpp | 4 ++++ software/firmware/source/libraries/OGN/freqplan.h | 14 ++++++++++---- .../libraries/arduino-basicmac/src/protocol.h | 1 + .../source/libraries/arduino-lmic/src/protocol.h | 1 + 6 files changed, 21 insertions(+), 6 deletions(-) diff --git a/software/firmware/source/SoftRF/src/driver/GNSS.cpp b/software/firmware/source/SoftRF/src/driver/GNSS.cpp index 90f5ea8ca..6eee93c7e 100644 --- a/software/firmware/source/SoftRF/src/driver/GNSS.cpp +++ b/software/firmware/source/SoftRF/src/driver/GNSS.cpp @@ -86,7 +86,7 @@ const char *GNSS_name[] = { * Goke: GGA - 185+, RMC - 265+ * Neo6: GGA - 138 , RMC - 67 * MT33: GGA - 48 , RMC - 175 - * UC65: GGA - 43 , RMC - 37 + * UC65: GGA - 35 , RMC - 29 * AG33: GGA - TBD , RMC - TBD */ @@ -1146,7 +1146,7 @@ const gnss_chip_ops_t uc65_ops = { uc65_setup, uc65_loop, uc65_fini, - 43 /* GGA */, 37 /* RMC */ + 35 /* GGA */, 29 /* RMC */ }; #endif /* EXCLUDE_GNSS_UC65 */ diff --git a/software/firmware/source/SoftRF/src/driver/radio/almic.cpp b/software/firmware/source/SoftRF/src/driver/radio/almic.cpp index 7cc06b795..1585d794c 100644 --- a/software/firmware/source/SoftRF/src/driver/radio/almic.cpp +++ b/software/firmware/source/SoftRF/src/driver/radio/almic.cpp @@ -380,7 +380,10 @@ static void sx12xx_setvars() if (RF_FreqPlan.Bandwidth == RF_RX_BANDWIDTH_SS_250KHZ) { LMIC.rps = setBw(LMIC.rps, BW500); + } else if (RF_FreqPlan.Bandwidth == RF_RX_BANDWIDTH_SS_75KHZ) { + LMIC.rps = setBw(LMIC.rps, BW125); } + #if defined(ENABLE_PROL) } else if (LMIC.protocol && LMIC.protocol->type == RF_PROTOCOL_APRS) { LMIC.rps = setCr(LMIC.rps, CR_4_5); diff --git a/software/firmware/source/SoftRF/src/driver/radio/radiolib.cpp b/software/firmware/source/SoftRF/src/driver/radio/radiolib.cpp index 8fba73ba5..122176dd0 100644 --- a/software/firmware/source/SoftRF/src/driver/radio/radiolib.cpp +++ b/software/firmware/source/SoftRF/src/driver/radio/radiolib.cpp @@ -416,6 +416,9 @@ static void lr11xx_setup() case RF_RX_BANDWIDTH_SS_250KHZ: bw = 500.0; /* BW_500 */ break; + case RF_RX_BANDWIDTH_SS_75KHZ: + bw = 125.0; /* BW_125 */ + break; case RF_RX_BANDWIDTH_SS_125KHZ: default: bw = 250.0; /* BW_250 */ @@ -490,6 +493,7 @@ static void lr11xx_setup() case RF_RX_BANDWIDTH_SS_50KHZ: bw = 117.3; break; + case RF_RX_BANDWIDTH_SS_75KHZ: case RF_RX_BANDWIDTH_SS_100KHZ: bw = 234.3; break; diff --git a/software/firmware/source/libraries/OGN/freqplan.h b/software/firmware/source/libraries/OGN/freqplan.h index f662dd514..3e6e50ffa 100644 --- a/software/firmware/source/libraries/OGN/freqplan.h +++ b/software/firmware/source/libraries/OGN/freqplan.h @@ -56,15 +56,21 @@ class FreqPlan { case RF_BAND_US: case RF_BAND_AU: - case RF_BAND_NZ: /* ? */ case RF_BAND_CN: /* ? */ - case RF_BAND_IL: /* TBD */ - case RF_BAND_KR: /* TBD */ { BaseFreq=920800000; Bandwidth = RF_RX_BANDWIDTH_SS_250KHZ; } // BW500 break; + case RF_BAND_IN: + { BaseFreq=866200000; Bandwidth = RF_RX_BANDWIDTH_SS_125KHZ; } // BW250 + break; + case RF_BAND_IL: + { BaseFreq=918500000; Bandwidth = RF_RX_BANDWIDTH_SS_75KHZ; } // BW125 + break; + case RF_BAND_KR: + { BaseFreq=923200000; Bandwidth = RF_RX_BANDWIDTH_SS_75KHZ; } // BW125 + break; case RF_BAND_EU: case RF_BAND_RU: - case RF_BAND_IN: + case RF_BAND_NZ: /* ? */ default: { BaseFreq=868200000; Bandwidth = RF_RX_BANDWIDTH_SS_125KHZ; } // BW250 break; diff --git a/software/firmware/source/libraries/arduino-basicmac/src/protocol.h b/software/firmware/source/libraries/arduino-basicmac/src/protocol.h index a57cf0bbe..d614834b2 100644 --- a/software/firmware/source/libraries/arduino-basicmac/src/protocol.h +++ b/software/firmware/source/libraries/arduino-basicmac/src/protocol.h @@ -94,6 +94,7 @@ enum enum { RF_RX_BANDWIDTH_SS_50KHZ, + RF_RX_BANDWIDTH_SS_75KHZ, RF_RX_BANDWIDTH_SS_100KHZ, RF_RX_BANDWIDTH_SS_125KHZ, RF_RX_BANDWIDTH_SS_166KHZ, diff --git a/software/firmware/source/libraries/arduino-lmic/src/protocol.h b/software/firmware/source/libraries/arduino-lmic/src/protocol.h index a57cf0bbe..d614834b2 100644 --- a/software/firmware/source/libraries/arduino-lmic/src/protocol.h +++ b/software/firmware/source/libraries/arduino-lmic/src/protocol.h @@ -94,6 +94,7 @@ enum enum { RF_RX_BANDWIDTH_SS_50KHZ, + RF_RX_BANDWIDTH_SS_75KHZ, RF_RX_BANDWIDTH_SS_100KHZ, RF_RX_BANDWIDTH_SS_125KHZ, RF_RX_BANDWIDTH_SS_166KHZ,