diff --git a/meshtastic/admin.options b/meshtastic/admin.options index 4a28ff2..6574db5 100644 --- a/meshtastic/admin.options +++ b/meshtastic/admin.options @@ -2,6 +2,8 @@ *AdminMessage.session_passkey max_size:8 +*AdminMessage.OTAEvent.ota_hash max_size:32 + *AdminMessage.InputEvent.event_code int_size:8 *AdminMessage.InputEvent.kb_char int_size:8 *AdminMessage.InputEvent.touch_x int_size:16 diff --git a/meshtastic/admin.proto b/meshtastic/admin.proto index 396f6e0..820ef31 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. */ @@ -479,6 +491,11 @@ message AdminMessage { * When true, favorites are preserved through reset. */ bool nodedb_reset = 100; + + /* + * Tell the node to reset into the OTA Loader + */ + OTAEvent ota_request = 102; } }