Merge pull request #823 from meshtastic/reboot-ota-mode

Add reboot_ota_mode to AdminMessage for OTA firmware updates
This commit is contained in:
Ben Meadors 2025-12-20 07:53:37 -06:00 committed by GitHub
commit c474fd3f49
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 37 additions and 3 deletions

View file

@ -1,14 +1,18 @@
version: v2
modules:
- path: meshtastic
- path: .
name: buf.build/meshtastic/protobufs
excludes:
- .trunk/
- meshtastic/device_only/
lint:
use:
- MINIMAL
except:
- PACKAGE_NO_IMPORT_CYCLE
ignore_only:
PACKAGE_DEFINED:
- nanopb.proto
disallow_comment_ignores: true
breaking:
use:

View file

@ -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";
@ -435,6 +436,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.
*/
@ -443,8 +449,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.
@ -475,6 +482,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
*/

View file

@ -1,5 +1,6 @@
syntax = "proto3";
/* trunk-ignore(buf-lint/PACKAGE_DIRECTORY_MATCH) */
package meshtastic;
option csharp_namespace = "Meshtastic.Protobufs";

View file

@ -1,5 +1,6 @@
syntax = "proto3";
/* trunk-ignore(buf-lint/PACKAGE_DIRECTORY_MATCH) */
package meshtastic;
option csharp_namespace = "Meshtastic.Protobufs";

View file

@ -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";

View file

@ -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.