From 930b023d1041fad23cbba60dabf22b19c1e1645e Mon Sep 17 00:00:00 2001 From: Shiv Kokroo Date: Fri, 15 Jul 2022 15:29:25 +0200 Subject: [PATCH 1/5] Allow up to 500mW transmission power for EU868 region The European Union regulations clearly state that the power limit for this frequency range is 500 mW, or 27 dBm. goTenna Mesh uses the same frequency range and power limit too. It also states that we can use interference avoidance and spectrum access techniques to avoid a duty cycle. It might be worthwhile in the future to implement frequency hopping to avoid duty cycling. (Please refer to page 69 in the following document) https://ec.europa.eu/growth/tools-databases/tris/index.cfm/ro/search/?trisaction=search.detail&year=2021&num=528&dLang=EN --- src/mesh/RadioInterface.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/mesh/RadioInterface.cpp b/src/mesh/RadioInterface.cpp index 267f2b50f..b064cf614 100644 --- a/src/mesh/RadioInterface.cpp +++ b/src/mesh/RadioInterface.cpp @@ -35,8 +35,16 @@ const RegionInfo regions[] = { https://www.legislation.gov.uk/uksi/1999/930/schedule/6/part/III/made/data.xht?view=snippet&wrap=true audio_permitted = false per regulation + + Special Note: + The link above describes LoRaWAN's band plan, stating a power limit of 16 dBm. This is their own suggested specification, + we do not need to follow it. The European Union regulations clearly state that the power limit for this frequency range is 500 mW, or 27 dBm. + It also states that we can use interference avoidance and spectrum access techniques to avoid a duty cycle. + It might be worthwhile in the future to implement frequency hopping to avoid duty cycling. + (Please refer to page 69 in the following document) + https://ec.europa.eu/growth/tools-databases/tris/index.cfm/ro/search/?trisaction=search.detail&year=2021&num=528&dLang=EN */ - RDEF(EU868, 869.4f, 869.65f, 10, 0, 16, false, false), + RDEF(EU868, 869.4f, 869.65f, 10, 0, 27, false, false), /* https://lora-alliance.org/wp-content/uploads/2020/11/lorawan_regional_parameters_v1.0.3reva_0.pdf From 67a7056025122b0ab1fd834d0f1d8d781e1dbb55 Mon Sep 17 00:00:00 2001 From: Shiv Kokroo Date: Fri, 15 Jul 2022 16:37:01 +0200 Subject: [PATCH 2/5] Change page number to section for reference document --- src/mesh/RadioInterface.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesh/RadioInterface.cpp b/src/mesh/RadioInterface.cpp index b064cf614..c8969d0fd 100644 --- a/src/mesh/RadioInterface.cpp +++ b/src/mesh/RadioInterface.cpp @@ -41,7 +41,7 @@ const RegionInfo regions[] = { we do not need to follow it. The European Union regulations clearly state that the power limit for this frequency range is 500 mW, or 27 dBm. It also states that we can use interference avoidance and spectrum access techniques to avoid a duty cycle. It might be worthwhile in the future to implement frequency hopping to avoid duty cycling. - (Please refer to page 69 in the following document) + (Please refer to section 4.21 in the following document) https://ec.europa.eu/growth/tools-databases/tris/index.cfm/ro/search/?trisaction=search.detail&year=2021&num=528&dLang=EN */ RDEF(EU868, 869.4f, 869.65f, 10, 0, 27, false, false), From d179f02519665f611d108a23539855f6a28c4ad8 Mon Sep 17 00:00:00 2001 From: Shiv Kokroo Date: Fri, 15 Jul 2022 16:37:53 +0200 Subject: [PATCH 3/5] Removed comment about frequency hopping Removed comment about frequency hopping due to lack of universal hardware support --- src/mesh/RadioInterface.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/mesh/RadioInterface.cpp b/src/mesh/RadioInterface.cpp index c8969d0fd..109a5f522 100644 --- a/src/mesh/RadioInterface.cpp +++ b/src/mesh/RadioInterface.cpp @@ -40,7 +40,6 @@ const RegionInfo regions[] = { The link above describes LoRaWAN's band plan, stating a power limit of 16 dBm. This is their own suggested specification, we do not need to follow it. The European Union regulations clearly state that the power limit for this frequency range is 500 mW, or 27 dBm. It also states that we can use interference avoidance and spectrum access techniques to avoid a duty cycle. - It might be worthwhile in the future to implement frequency hopping to avoid duty cycling. (Please refer to section 4.21 in the following document) https://ec.europa.eu/growth/tools-databases/tris/index.cfm/ro/search/?trisaction=search.detail&year=2021&num=528&dLang=EN */ From ea7da3178bbf105308612c987c56ea28e3c38886 Mon Sep 17 00:00:00 2001 From: Jm Date: Sat, 16 Jul 2022 07:57:35 -0700 Subject: [PATCH 4/5] Fixed comment --- src/modules/PositionModule.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/PositionModule.cpp b/src/modules/PositionModule.cpp index 7a874fcf4..899d309b3 100644 --- a/src/modules/PositionModule.cpp +++ b/src/modules/PositionModule.cpp @@ -177,8 +177,8 @@ int32_t PositionModule::runOnce() // Yes, this has a bunch of magic numbers. Sorry. uint32_t timeTravel = ((1500 / myNodeInfo.bitrate) >= timeTravelMinimum) ? (1500 / myNodeInfo.bitrate) : timeTravelMinimum; - // If the distance traveled since the last update is greater than 100 meters - // and it's been at least 60 seconds since the last update + // If the distance traveled since the last update is greater than distanceTravelMinimum meters + // and it's been at least timeTravelMinimum seconds since the last update if ((abs(distance) >= distanceTravelThreshold) && (now - lastGpsSend) >= (timeTravel * 1000)) { bool requestReplies = currentGeneration != radioGeneration; currentGeneration = radioGeneration; From cf4c814b59f5e42b1bc65aeb19e876e69ee8c522 Mon Sep 17 00:00:00 2001 From: Jm Date: Sat, 16 Jul 2022 08:08:10 -0700 Subject: [PATCH 5/5] Allow range test module to loop back messages --- src/modules/esp32/RangeTestModule.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/modules/esp32/RangeTestModule.h b/src/modules/esp32/RangeTestModule.h index 76735d376..db49a586e 100644 --- a/src/modules/esp32/RangeTestModule.h +++ b/src/modules/esp32/RangeTestModule.h @@ -28,7 +28,10 @@ class RangeTestModuleRadio : public SinglePortModule uint32_t lastRxID = 0; public: - RangeTestModuleRadio() : SinglePortModule("RangeTestModuleRadio", PortNum_TEXT_MESSAGE_APP) {} + RangeTestModuleRadio() : SinglePortModule("RangeTestModuleRadio", PortNum_TEXT_MESSAGE_APP) + { + loopbackOk = true; // Allow locally generated messages to loop back to the client + } /** * Send our payload into the mesh @@ -50,7 +53,8 @@ class RangeTestModuleRadio : public SinglePortModule /** Called to handle a particular incoming message - @return ProcessMessage::STOP if you've guaranteed you've handled this message and no other handlers should be considered for it + @return ProcessMessage::STOP if you've guaranteed you've handled this message and no other handlers should be considered for + it */ virtual ProcessMessage handleReceived(const MeshPacket &mp) override; };