From ac9c81f6d136438f3e8a9fe96b46929770b588ef Mon Sep 17 00:00:00 2001 From: Jonathan Bennett Date: Mon, 24 Jul 2023 09:37:56 -0500 Subject: [PATCH 1/5] Check Position Request for Primary Channel (#2638) Prevents leaking location data to secondary channels. Co-authored-by: Ben Meadors --- src/modules/PositionModule.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/modules/PositionModule.cpp b/src/modules/PositionModule.cpp index 35457a23e..10289b837 100644 --- a/src/modules/PositionModule.cpp +++ b/src/modules/PositionModule.cpp @@ -52,11 +52,22 @@ bool PositionModule::handleReceivedProtobuf(const meshtastic_MeshPacket &mp, mes nodeDB.updatePosition(getFrom(&mp), p); + // Only respond to location requests on the channel where we broadcast location. + if (channels.getByIndex(mp.channel).role == meshtastic_Channel_Role_PRIMARY) { + ignoreRequest = false; + } else { + ignoreRequest = true; + } + return false; // Let others look at this message also if they want } meshtastic_MeshPacket *PositionModule::allocReply() { + if (ignoreRequest) { + return NULL; + } + meshtastic_NodeInfoLite *node = service.refreshLocalMeshNode(); // should guarantee there is now a position assert(node->has_position); From 3fbe2d771c9eb71f7157cac0cb21cdb09f9fb7a6 Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Mon, 24 Jul 2023 09:47:16 -0500 Subject: [PATCH 2/5] Hopefully this cancels previous CI runs for a branch (#2642) --- .github/workflows/main_matrix.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/main_matrix.yml b/.github/workflows/main_matrix.yml index 573728ff0..454ffb71a 100644 --- a/.github/workflows/main_matrix.yml +++ b/.github/workflows/main_matrix.yml @@ -1,4 +1,7 @@ name: CI +concurrency: + group: ${{ github.ref }} + cancel-in-progress: ${{ github.ref != 'refs/heads/master' }} on: # # Triggers the workflow on push but only for the master branch push: From 96c6a20e038c15f1f7befce37a2951832678866c Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Mon, 24 Jul 2023 12:33:01 -0500 Subject: [PATCH 3/5] Ensure that MQTT is enabled and log initialization (#2643) --- src/mqtt/MQTT.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/mqtt/MQTT.cpp b/src/mqtt/MQTT.cpp index 50198efca..bbdb65c87 100644 --- a/src/mqtt/MQTT.cpp +++ b/src/mqtt/MQTT.cpp @@ -164,6 +164,8 @@ MQTT::MQTT() : concurrency::OSThread("mqtt"), mqttQueue(MAX_MQTT_QUEUE) #endif { if (moduleConfig.mqtt.enabled) { + LOG_DEBUG("Initializing MQTT\n"); + assert(!mqtt); mqtt = this; @@ -181,6 +183,14 @@ MQTT::MQTT() : concurrency::OSThread("mqtt"), mqttQueue(MAX_MQTT_QUEUE) if (!moduleConfig.mqtt.proxy_to_client_enabled) pubSub.setCallback(mqttCallback); #endif + + if (moduleConfig.mqtt.proxy_to_client_enabled) { + LOG_INFO("MQTT configured to use client proxy...\n"); + enabled = true; + runASAP = true; + reconnectCount = 0; + publishStatus(); + } // preflightSleepObserver.observe(&preflightSleep); } else { disable(); From 81edf363d72ab5522a058242684ba622b570f0f5 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 25 Jul 2023 05:46:11 -0500 Subject: [PATCH 4/5] [create-pull-request] automated change (#2645) Co-authored-by: thebentern --- protobufs | 2 +- src/mesh/generated/meshtastic/portnums.pb.h | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/protobufs b/protobufs index f17298c2b..57bd75ea8 160000 --- a/protobufs +++ b/protobufs @@ -1 +1 @@ -Subproject commit f17298c2b093ac0d2536642b508f6cf84771b172 +Subproject commit 57bd75ea8b3c4fe551dcaf1dcd402646878176a8 diff --git a/src/mesh/generated/meshtastic/portnums.pb.h b/src/mesh/generated/meshtastic/portnums.pb.h index e4aaeeb96..089d7b59f 100644 --- a/src/mesh/generated/meshtastic/portnums.pb.h +++ b/src/mesh/generated/meshtastic/portnums.pb.h @@ -54,8 +54,6 @@ typedef enum _meshtastic_PortNum { /* Audio Payloads. Encapsulated codec2 packets. On 2.4 GHZ Bandwidths only for now */ meshtastic_PortNum_AUDIO_APP = 9, - /* Payloads for clients with a network connection proxying MQTT pub/sub to the device */ - meshtastic_PortNum_MQTT_CLIENT_PROXY_APP = 10, /* Provides a 'ping' service that replies to any packet it receives. Also serves as a small example module. */ meshtastic_PortNum_REPLY_APP = 32, From bdcf17a3f77bc575819d06bf4322b8e421bee9cb Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Tue, 25 Jul 2023 16:13:32 -0500 Subject: [PATCH 5/5] Add T-Deck to S3 ota logical branch (#2644) * Add T-Deck to S3 ota logical branch * Revert "Add T-Deck to S3 ota logical branch" This reverts commit d0aef9dc26d6caadadf5769d8a3535f322ad5eed. * Add targets * Get the bat file too --- bin/device-install.bat | 2 +- bin/device-install.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/device-install.bat b/bin/device-install.bat index 4d14193e5..c7d8a10cf 100755 --- a/bin/device-install.bat +++ b/bin/device-install.bat @@ -32,7 +32,7 @@ IF EXIST %FILENAME% IF x%FILENAME:update=%==x%FILENAME% ( %PYTHON% -m esptool --baud 115200 write_flash 0x00 %FILENAME% @REM Account for S3 board's different OTA partition - IF x%FILENAME:s3=%==x%FILENAME% IF x%FILENAME:v3=%==x%FILENAME% ( + IF x%FILENAME:s3=%==x%FILENAME% IF x%FILENAME:v3=%==x%FILENAME% IF x%FILENAME:t-deck=%==x%FILENAME% IF x%FILENAME:wireless-paper=%==x%FILENAME% IF x%FILENAME:wireless-tracker=%==x%FILENAME% ( %PYTHON% -m esptool --baud 115200 write_flash 0x260000 bleota.bin ) else ( %PYTHON% -m esptool --baud 115200 write_flash 0x260000 bleota-s3.bin diff --git a/bin/device-install.sh b/bin/device-install.sh index cd5d6ad59..35d99286d 100755 --- a/bin/device-install.sh +++ b/bin/device-install.sh @@ -50,7 +50,7 @@ if [ -f "${FILENAME}" ] && [ ! -z "${FILENAME##*"update"*}" ]; then "$PYTHON" -m esptool erase_flash "$PYTHON" -m esptool write_flash 0x00 ${FILENAME} # Account for S3 board's different OTA partition - if [ ! -z "${FILENAME##*"s3"*}" ] && [ ! -z "${FILENAME##*"-v3"*}" ]; then + if [ ! -z "${FILENAME##*"s3"*}" ] && [ ! -z "${FILENAME##*"-v3"*}" ] && [ ! -z "${FILENAME##*"t-deck"*}" ] && [ ! -z "${FILENAME##*"wireless-paper"*}" ] && [ ! -z "${FILENAME##*"wireless-tracker"*}" ]; then "$PYTHON" -m esptool write_flash 0x260000 bleota.bin else "$PYTHON" -m esptool write_flash 0x260000 bleota-s3.bin