Skip to content

Commit c474fd3

Browse files
authored
Merge pull request #823 from meshtastic/reboot-ota-mode
Add reboot_ota_mode to AdminMessage for OTA firmware updates
2 parents 62ef17b + f28d17e commit c474fd3

File tree

6 files changed

+37
-3
lines changed

6 files changed

+37
-3
lines changed

buf.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,18 @@
11
version: v2
22
modules:
3-
- path: meshtastic
3+
- path: .
44
name: buf.build/meshtastic/protobufs
55
excludes:
6+
- .trunk/
67
- meshtastic/device_only/
78
lint:
89
use:
910
- MINIMAL
1011
except:
1112
- PACKAGE_NO_IMPORT_CYCLE
13+
ignore_only:
14+
PACKAGE_DEFINED:
15+
- nanopb.proto
1216
disallow_comment_ignores: true
1317
breaking:
1418
use:

meshtastic/admin.proto

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ syntax = "proto3";
22

33
package meshtastic;
44

5+
/* trunk-ignore(buf-lint/COMPILE) */
56
import "meshtastic/channel.proto";
67
import "meshtastic/config.proto";
78
import "meshtastic/connection_status.proto";
@@ -435,6 +436,11 @@ message AdminMessage {
435436
*/
436437
KeyVerificationAdmin key_verification = 67;
437438

439+
/*
440+
* Tell the node to reboot into OTA mode for firmware update via BLE or WiFi (ESP32 only for now)
441+
*/
442+
OTAMode reboot_ota_mode = 68;
443+
438444
/*
439445
* 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.
440446
*/
@@ -443,8 +449,9 @@ message AdminMessage {
443449
/*
444450
* Tell the node to reboot into the OTA Firmware in this many seconds (or <0 to cancel reboot)
445451
* Only Implemented for ESP32 Devices. This needs to be issued to send a new main firmware via bluetooth.
452+
* Deprecated in favor of reboot_ota_mode in 2.7.17
446453
*/
447-
int32 reboot_ota_seconds = 95;
454+
int32 reboot_ota_seconds = 95 [deprecated = true];
448455

449456
/*
450457
* This message is only supported for the simulator Portduino build.
@@ -475,6 +482,26 @@ message AdminMessage {
475482
}
476483
}
477484

485+
/*
486+
* Firmware update mode for OTA updates
487+
*/
488+
enum OTAMode {
489+
/*
490+
* Do not reboot into OTA mode
491+
*/
492+
NO_REBOOT_OTA = 0;
493+
494+
/*
495+
* Reboot into OTA mode for BLE firmware update
496+
*/
497+
OTA_BLE = 1;
498+
499+
/*
500+
* Reboot into OTA mode for WiFi firmware update
501+
*/
502+
OTA_WIFI = 2;
503+
}
504+
478505
/*
479506
* Parameters for setting up Meshtastic for ameteur radio usage
480507
*/

meshtastic/atak.proto

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
syntax = "proto3";
22

3+
/* trunk-ignore(buf-lint/PACKAGE_DIRECTORY_MATCH) */
34
package meshtastic;
45

56
option csharp_namespace = "Meshtastic.Protobufs";

meshtastic/channel.proto

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
syntax = "proto3";
22

3+
/* trunk-ignore(buf-lint/PACKAGE_DIRECTORY_MATCH) */
34
package meshtastic;
45

56
option csharp_namespace = "Meshtastic.Protobufs";

meshtastic/deviceonly.proto

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ syntax = "proto3";
22

33
package meshtastic;
44

5+
/* trunk-ignore(buf-lint/COMPILE) */
56
import "meshtastic/channel.proto";
67
import "meshtastic/config.proto";
78
import "meshtastic/localonly.proto";

meshtastic/mesh.proto

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -839,7 +839,7 @@ enum HardwareModel {
839839
* Elecrow ThinkNode M6
840840
*/
841841
THINKNODE_M6 = 120;
842-
842+
843843
/*
844844
* ------------------------------------------------------------------------------------------------------------------------------------------
845845
* 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.

0 commit comments

Comments
 (0)