From 18ca5b44499f339457011e5900d08a8c0c9fb83c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20G=C3=B6ttgens?= Date: Sun, 20 Oct 2024 21:54:07 +0200 Subject: [PATCH 1/2] Wide_Lora uses 12 symbols to be compatible with SX1280 --- src/mesh/LR11x0Interface.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/mesh/LR11x0Interface.cpp b/src/mesh/LR11x0Interface.cpp index dd6d97317..d0c1a1fbc 100644 --- a/src/mesh/LR11x0Interface.cpp +++ b/src/mesh/LR11x0Interface.cpp @@ -67,8 +67,10 @@ template bool LR11x0Interface::init() power = LR1110_MAX_POWER; if ((power > LR1120_MAX_POWER) && - (config.lora.region == meshtastic_Config_LoRaConfig_RegionCode_LORA_24)) // clamp again if wide freq range + (config.lora.region == meshtastic_Config_LoRaConfig_RegionCode_LORA_24)) { // clamp again if wide freq range power = LR1120_MAX_POWER; + preambleLength = 12; // 12 is the default for operation above 2GHz + } limitPower(); From 09c8642aa64c776d925414a46ee7f7c49b4093ba Mon Sep 17 00:00:00 2001 From: GUVWAF <78759985+GUVWAF@users.noreply.github.com> Date: Mon, 21 Oct 2024 00:04:45 +0200 Subject: [PATCH 2/2] Fix rebroadcasting encrypted packets when `KNOWN_ONLY` or `LOCAL_ONLY` is used (#5109) --- src/modules/RoutingModule.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/modules/RoutingModule.cpp b/src/modules/RoutingModule.cpp index f0d007d9d..f11a9a542 100644 --- a/src/modules/RoutingModule.cpp +++ b/src/modules/RoutingModule.cpp @@ -10,9 +10,6 @@ RoutingModule *routingModule; bool RoutingModule::handleReceivedProtobuf(const meshtastic_MeshPacket &mp, meshtastic_Routing *r) { - printPacket("Routing sniffing", &mp); - router->sniffReceived(&mp, r); - bool maybePKI = mp.which_payload_variant == meshtastic_MeshPacket_encrypted_tag && mp.channel == 0 && !isBroadcast(mp.to); // Beginning of logic whether to drop the packet based on Rebroadcast mode if (mp.which_payload_variant == meshtastic_MeshPacket_encrypted_tag && @@ -25,6 +22,9 @@ bool RoutingModule::handleReceivedProtobuf(const meshtastic_MeshPacket &mp, mesh return false; } + printPacket("Routing sniffing", &mp); + router->sniffReceived(&mp, r); + // FIXME - move this to a non promsicious PhoneAPI module? // Note: we are careful not to send back packets that started with the phone back to the phone if ((isBroadcast(mp.to) || isToUs(&mp)) && (mp.from != 0)) {