From c39b564ca6498d23a3002b6eaade67a69194b459 Mon Sep 17 00:00:00 2001 From: Jake-B Date: Thu, 25 Dec 2025 11:59:14 -0500 Subject: [PATCH 1/3] Added `AdminMessage.ota_hash` to verify OTA data --- meshtastic/admin.options | 1 + meshtastic/admin.proto | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/meshtastic/admin.options b/meshtastic/admin.options index 4a28ff2..d20a1a2 100644 --- a/meshtastic/admin.options +++ b/meshtastic/admin.options @@ -1,6 +1,7 @@ *AdminMessage.payload_variant anonymous_oneof:true *AdminMessage.session_passkey max_size:8 +*AdminMessage.ota_hash max_size:32 *AdminMessage.InputEvent.event_code int_size:8 *AdminMessage.InputEvent.kb_char int_size:8 diff --git a/meshtastic/admin.proto b/meshtastic/admin.proto index 396f6e0..5520446 100644 --- a/meshtastic/admin.proto +++ b/meshtastic/admin.proto @@ -479,6 +479,12 @@ message AdminMessage { * When true, favorites are preserved through reset. */ bool nodedb_reset = 100; + + /* + * A 32 byte hash of the OTA firmware. + * Used to verify the integrity of the firmware before applying an update. + */ + bytes ota_hash = 102; } } From 4b9f104a18ea43b1b2091ee2b48899fe43ad8a0b Mon Sep 17 00:00:00 2001 From: Jake-B Date: Sat, 27 Dec 2025 08:16:28 -0500 Subject: [PATCH 2/3] AdminMessage fixes for OTA --- meshtastic/admin.options | 3 ++- meshtastic/admin.proto | 28 ++++++++++++++++++++-------- 2 files changed, 22 insertions(+), 9 deletions(-) diff --git a/meshtastic/admin.options b/meshtastic/admin.options index d20a1a2..6574db5 100644 --- a/meshtastic/admin.options +++ b/meshtastic/admin.options @@ -1,7 +1,8 @@ *AdminMessage.payload_variant anonymous_oneof:true *AdminMessage.session_passkey max_size:8 -*AdminMessage.ota_hash max_size:32 + +*AdminMessage.OTAEvent.ota_hash max_size:32 *AdminMessage.InputEvent.event_code int_size:8 *AdminMessage.InputEvent.kb_char int_size:8 diff --git a/meshtastic/admin.proto b/meshtastic/admin.proto index 5520446..22cc537 100644 --- a/meshtastic/admin.proto +++ b/meshtastic/admin.proto @@ -188,6 +188,23 @@ message AdminMessage { uint32 touch_y = 4; } + /* + * User is requesting an over the air update. + * Node will reboot into the OTA loader + */ + message OTAEvent { + /* + * Tell the node to reboot into OTA mode for firmware update via BLE or WiFi (ESP32 only for now) + */ + OTAMode reboot_ota_mode = 1; + + /* + * A 32 byte hash of the OTA firmware. + * Used to verify the integrity of the firmware before applying an update. + */ + bytes ota_hash = 2; + } + /* * TODO: REPLACE */ @@ -436,11 +453,6 @@ 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. */ @@ -481,11 +493,11 @@ message AdminMessage { bool nodedb_reset = 100; /* - * A 32 byte hash of the OTA firmware. - * Used to verify the integrity of the firmware before applying an update. + * Tell the node to reset into the OTA Loader */ - bytes ota_hash = 102; + OTAEvent ota_request = 102; } + } /* From 64ccad6007bced889d37fa718c3894ed32cca0a3 Mon Sep 17 00:00:00 2001 From: James Rich <2199651+jamesarich@users.noreply.github.com> Date: Tue, 30 Dec 2025 10:54:27 -0600 Subject: [PATCH 3/3] Fix formatting to appease buf --- meshtastic/admin.proto | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/meshtastic/admin.proto b/meshtastic/admin.proto index 22cc537..820ef31 100644 --- a/meshtastic/admin.proto +++ b/meshtastic/admin.proto @@ -193,7 +193,7 @@ message AdminMessage { * Node will reboot into the OTA loader */ message OTAEvent { - /* + /* * Tell the node to reboot into OTA mode for firmware update via BLE or WiFi (ESP32 only for now) */ OTAMode reboot_ota_mode = 1; @@ -202,7 +202,7 @@ message AdminMessage { * A 32 byte hash of the OTA firmware. * Used to verify the integrity of the firmware before applying an update. */ - bytes ota_hash = 2; + bytes ota_hash = 2; } /* @@ -497,7 +497,6 @@ message AdminMessage { */ OTAEvent ota_request = 102; } - } /*