From 4b9f104a18ea43b1b2091ee2b48899fe43ad8a0b Mon Sep 17 00:00:00 2001 From: Jake-B Date: Sat, 27 Dec 2025 08:16:28 -0500 Subject: [PATCH] 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; } + } /*