simple_room_server: dfu, radio silence watchdog and get boot via NodeMaintenance

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
tthandClaude Opus 5.5 committed 2026-11-04 01:25:27 +01:00
1 parent 2ced8502a0
commit a8f0c3dca6
3 files changed
+17 -3

No files matched your search

+3 -3
View File
@@ -718,7 +718,7 @@ so the icon and the Grafana percentage tell one story.
---
#### Radio silence watchdog (repeater and sensor)
#### Radio silence watchdog (repeater, sensor, room server)
**Usage:**
- `get radio.silence`
- `set radio.silence <minutes>`
@@ -735,7 +735,7 @@ To keep a quiet site out of a reboot loop, each such reboot doubles the threshol
---
#### Reboot into the bootloader (repeater and sensor, nRF52, local console only)
#### Reboot into the bootloader (repeater, sensor, room server; nRF52, local console only)
**Usage:**
- `dfu [uf2|serial|ota]`
@@ -743,7 +743,7 @@ To keep a quiet site out of a reboot loop, each such reboot doubles the threshol
---
#### Why the board last reset (repeater and sensor)
#### Why the board last reset (repeater, sensor, room server)
**Usage:**
- `get boot`
+4
View File
@@ -950,6 +950,10 @@ void MyMesh::handleCommand(uint32_t sender_timestamp, char *command, char *reply
command += 3;
}
// CUSTOM (TeTeHacko): dfu (local only), radio silence watchdog, `get boot`.
extern bool maintHandleCommand(uint32_t sender_timestamp, const char* command, char* reply);
if (maintHandleCommand(sender_timestamp, command, reply)) return;
// handle ACL related commands
if (memcmp(command, "setperm ", 8) == 0) { // format: setperm {pubkey-hex} {permissions-int8}
char* hex = &command[8];
+10
View File
@@ -2,6 +2,7 @@
#include <Mesh.h>
#include "MyMesh.h"
#include <helpers/NodeMaintenance.h>
#ifdef ETHERNET_ENABLED
#define ETHERNET_CLI_BANNER "MeshCore Room Server CLI"
@@ -17,6 +18,12 @@ StdRNG fast_rng;
SimpleMeshTables tables;
MyMesh the_mesh(board, radio_driver, *new ArduinoMillis(), fast_rng, rtc_clock, tables);
// CUSTOM (TeTeHacko): dfu, radio silence watchdog, `get boot` -- see NodeMaintenance.h.
static NodeMaintenance maint(board, radio_driver);
bool maintHandleCommand(uint32_t sender_timestamp, const char* command, char* reply) {
return maint.handleCommand(sender_timestamp, command, reply);
}
void halt() {
while (1) ;
}
@@ -31,6 +38,7 @@ void setup() {
delay(1000);
board.begin();
maint.printBootDiag();
#ifdef HAS_EXTERNAL_WATCHDOG
external_watchdog.begin();
@@ -86,6 +94,7 @@ void setup() {
sensors.begin();
the_mesh.begin(fs);
maint.begin(fs, the_mesh.getNodePrefs(), &the_mesh);
#ifdef DISPLAY_CLASS
ui_task.begin(the_mesh.getNodePrefs(), FIRMWARE_BUILD_DATE, FIRMWARE_VERSION);
@@ -157,6 +166,7 @@ void loop() {
#endif
the_mesh.loop();
maint.loop();
sensors.loop();
#ifdef DISPLAY_CLASS
ui_task.loop();