From f6b116ef650374c2295daf66fd951ba7b44bb919 Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Fri, 19 Dec 2025 19:29:37 -0600 Subject: [PATCH 1/5] Add reboot_ota_mode to AdminMessage for OTA firmware updates --- meshtastic/admin.proto | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/meshtastic/admin.proto b/meshtastic/admin.proto index 6a06407..eecb929 100644 --- a/meshtastic/admin.proto +++ b/meshtastic/admin.proto @@ -435,6 +435,11 @@ message AdminMessage { */ KeyVerificationAdmin key_verification = 67; + /* + * Tell the node to reboot into OTA mode for firmware update via BLE or WiFi (ESP32 only for now) + */ + OTAMode reboot_ota_mode = 68; + /* * Tell the node to factory reset config everything; all device state and configuration will be returned to factory defaults and BLE bonds will be cleared. */ @@ -475,6 +480,26 @@ message AdminMessage { } } +/* + * Firmware update mode for OTA updates + */ +enum OTAMode { + /* + * Do not reboot into OTA mode + */ + NO_REBOOT_OTA = 0; + + /* + * Reboot into OTA mode for BLE firmware update + */ + OTA_BLE = 1; + + /* + * Reboot into OTA mode for WiFi firmware update + */ + OTA_WIFI = 2; +} + /* * Parameters for setting up Meshtastic for ameteur radio usage */ From 8078b27a19659ace7a5458f83677f49b1ec33ca3 Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Fri, 19 Dec 2025 19:35:46 -0600 Subject: [PATCH 2/5] Deprecate --- meshtastic/admin.proto | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/meshtastic/admin.proto b/meshtastic/admin.proto index eecb929..7a4e0c0 100644 --- a/meshtastic/admin.proto +++ b/meshtastic/admin.proto @@ -448,8 +448,9 @@ message AdminMessage { /* * Tell the node to reboot into the OTA Firmware in this many seconds (or <0 to cancel reboot) * Only Implemented for ESP32 Devices. This needs to be issued to send a new main firmware via bluetooth. + * Deprecated in favor of reboot_ota_mode in 2.7.17 */ - int32 reboot_ota_seconds = 95; + int32 reboot_ota_seconds = 95 [deprecated = true]; /* * This message is only supported for the simulator Portduino build. From 48ad8831204ec30e80705197a40b39f017b5f016 Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Fri, 19 Dec 2025 20:11:20 -0600 Subject: [PATCH 3/5] Add buf ignores --- meshtastic/admin.proto | 1 + meshtastic/atak.proto | 1 + meshtastic/channel.proto | 1 + meshtastic/deviceonly.proto | 1 + 4 files changed, 4 insertions(+) diff --git a/meshtastic/admin.proto b/meshtastic/admin.proto index 7a4e0c0..396f6e0 100644 --- a/meshtastic/admin.proto +++ b/meshtastic/admin.proto @@ -2,6 +2,7 @@ syntax = "proto3"; package meshtastic; +/* trunk-ignore(buf-lint/COMPILE) */ import "meshtastic/channel.proto"; import "meshtastic/config.proto"; import "meshtastic/connection_status.proto"; diff --git a/meshtastic/atak.proto b/meshtastic/atak.proto index 093fb59..790c69b 100644 --- a/meshtastic/atak.proto +++ b/meshtastic/atak.proto @@ -1,5 +1,6 @@ syntax = "proto3"; +/* trunk-ignore(buf-lint/PACKAGE_DIRECTORY_MATCH) */ package meshtastic; option csharp_namespace = "Meshtastic.Protobufs"; diff --git a/meshtastic/channel.proto b/meshtastic/channel.proto index 494bc40..f49895a 100644 --- a/meshtastic/channel.proto +++ b/meshtastic/channel.proto @@ -1,5 +1,6 @@ syntax = "proto3"; +/* trunk-ignore(buf-lint/PACKAGE_DIRECTORY_MATCH) */ package meshtastic; option csharp_namespace = "Meshtastic.Protobufs"; diff --git a/meshtastic/deviceonly.proto b/meshtastic/deviceonly.proto index e8c7703..3a86719 100644 --- a/meshtastic/deviceonly.proto +++ b/meshtastic/deviceonly.proto @@ -2,6 +2,7 @@ syntax = "proto3"; package meshtastic; +/* trunk-ignore(buf-lint/COMPILE) */ import "meshtastic/channel.proto"; import "meshtastic/config.proto"; import "meshtastic/localonly.proto"; From 0ef2bdf6a321d95d4d4b7b955a308a2c2012e9d7 Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Sat, 20 Dec 2025 06:41:32 -0600 Subject: [PATCH 4/5] Hopefully fix buf build --- buf.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/buf.yaml b/buf.yaml index fcf596e..9b1b26c 100644 --- a/buf.yaml +++ b/buf.yaml @@ -1,8 +1,9 @@ version: v2 modules: - - path: meshtastic + - path: . name: buf.build/meshtastic/protobufs excludes: + - .trunk/ - meshtastic/device_only/ lint: use: From f28d17eba12b4f11f09762f34b959825f3e7ed38 Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Sat, 20 Dec 2025 07:14:45 -0600 Subject: [PATCH 5/5] Buf fixes --- buf.yaml | 3 +++ meshtastic/mesh.proto | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/buf.yaml b/buf.yaml index 9b1b26c..2a93588 100644 --- a/buf.yaml +++ b/buf.yaml @@ -10,6 +10,9 @@ modules: - MINIMAL except: - PACKAGE_NO_IMPORT_CYCLE + ignore_only: + PACKAGE_DEFINED: + - nanopb.proto disallow_comment_ignores: true breaking: use: diff --git a/meshtastic/mesh.proto b/meshtastic/mesh.proto index fa24fa3..767eb47 100644 --- a/meshtastic/mesh.proto +++ b/meshtastic/mesh.proto @@ -839,7 +839,7 @@ enum HardwareModel { * Elecrow ThinkNode M6 */ THINKNODE_M6 = 120; - + /* * ------------------------------------------------------------------------------------------------------------------------------------------ * Reserved ID For developing private Ports. These will show up in live traffic sparsely, so we can use a high number. Keep it within 8 bits.