fix: bound Companion help writes and refresh runtime fixtures
This commit is contained in:
1 parent
b125806833
commit
2fbc075aaa
16 files changed
+754
-112
No files matched your search
@@ -10320,7 +10320,8 @@ void MyMesh::handleTerminalCommand(char* command, bool reader_prompt,
|
||||
terminalOutput().printf(" -> Companion %s (protocol %u, build %s)\r\n",
|
||||
FIRMWARE_VERSION, (unsigned)FIRMWARE_VER_CODE, FIRMWARE_BUILD_DATE);
|
||||
} else if (strcmp(command, "help") == 0) {
|
||||
terminalOutput().print(
|
||||
auto& output = terminalOutput();
|
||||
output.print(
|
||||
"Commands:\r\n"
|
||||
" stats-core / stats-radio / stats-radio-diag / stats-packets\r\n"
|
||||
" get prv.key (if export enabled)\r\n"
|
||||
@@ -10330,48 +10331,59 @@ void MyMesh::handleTerminalCommand(char* command, bool reader_prompt,
|
||||
#else
|
||||
" get password (no admin password)\r\n"
|
||||
#endif
|
||||
);
|
||||
output.print(
|
||||
" erase (settings and identity)\r\n"
|
||||
" board\r\n"
|
||||
" version\r\n"
|
||||
" get storage.layout\r\n");
|
||||
#if MESH_ENABLE_TX_BEACONS
|
||||
terminalOutput().print(" get beacon [slot] / set beacon <slot> <meshcore|meshtext> ...\r\n"
|
||||
output.print(
|
||||
" get beacon [slot] / set beacon <slot> <meshcore|meshtext> ...\r\n"
|
||||
" delete beacon <slot|all> / set beacon.interval <12|24|36|48> (default 24h)\r\n");
|
||||
#endif
|
||||
#if MESH_ENABLE_MESHTEXT_CHAT
|
||||
terminalOutput().print(" get mt.status / get mt.region / get mt.slot / get mt.hops\r\n"
|
||||
output.print(
|
||||
" get mt.status / get mt.region / get mt.slot / get mt.hops\r\n"
|
||||
" get mt.node / get mt.shortname\r\n"
|
||||
" get mt.rebroadcast / set mt.rebroadcast <on|off> (saved; default off)\r\n"
|
||||
" Relay decoded channel text only; adds 5 packet airtimes before TX\r\n"
|
||||
" Relay decoded channel text only; adds 5 packet airtimes before TX\r\n");
|
||||
output.print(
|
||||
" set mt.region <auto|us|eu868|eu433|anz>\r\n"
|
||||
" set mt.slot <0|1-based frequency slot>\r\n"
|
||||
" set mt.hops <0..7> (saved; default 7)\r\n"
|
||||
" set mt.node <!8hex|default> (saved; use a unique ID)\r\n"
|
||||
" set mt.node <!8hex|default> (saved; use a unique ID)\r\n");
|
||||
output.print(
|
||||
" set mt.shortname <1..4 UTF-8 characters|default> (saved; NodeInfo uses 4 bytes)\r\n"
|
||||
" send mt.nodeinfo <channel slot> (GPS-free; also automatic after first chat)\r\n"
|
||||
" set mt.preset <longfast|shortturbo|...> (saved manual radio2)\r\n"
|
||||
" set mt.preset <longfast|shortturbo|...> (saved manual radio2)\r\n");
|
||||
output.print(
|
||||
" set mt.channel <slot> <mt-name> <32/64 hex digits|AQ==>\r\n"
|
||||
" get mt.channel <slot> / delete mt.channel <slot>\r\n"
|
||||
" Join #mt-longfast or #mt-shortturbo in the app for automatic radio2\r\n");
|
||||
#endif
|
||||
#if defined(NRF52_PLATFORM) && defined(EXTRAFS) && !defined(QSPIFLASH)
|
||||
terminalOutput().print(" get flash.health\r\n");
|
||||
output.print(" get flash.health\r\n");
|
||||
#endif
|
||||
#if COMPANION_FEATURE_READER
|
||||
terminalOutput().print(" get reader <chapter>[:<verse>[-<last>]] [page] (World English Bible, offline)\r\n");
|
||||
output.print(" get reader <chapter>[:<verse>[-<last>]] [page] (World English Bible, offline)\r\n");
|
||||
#endif
|
||||
terminalOutput().print(" get/set tx.media auto|radio|radio2|both|off (binary media)\r\n"
|
||||
output.print(
|
||||
" get/set tx.media auto|radio|radio2|both|off (binary media)\r\n"
|
||||
" get/set tx.ssh auto|radio|radio2|both|off (tagged tunnel data)\r\n");
|
||||
#if MESH_ENABLE_ETHERNET_TUNNEL
|
||||
terminalOutput().print(" get ethernet / get ethernet.radio\r\n"
|
||||
output.print(
|
||||
" get ethernet / get ethernet.radio\r\n"
|
||||
" set ethernet.radio <MHz>,<kHz>,<SF>,<CR>[,<preamble>]\r\n"
|
||||
" set ethernet on|off (saved; trusted-LAN KISS TCP 5003, radio2 only)\r\n");
|
||||
#endif
|
||||
#if defined(OTA_RAK15002_SD_STORE) && defined(ETHERNET_USE_RAK13800)
|
||||
terminalOutput().print(" get eth / set eth on|off (physical RAK13800; default off, this boot)\r\n"
|
||||
output.print(
|
||||
" get eth / set eth on|off (physical RAK13800; default off, this boot)\r\n"
|
||||
" get sdcard [free] / ota cache [on|off] (RAK15002; mutually exclusive with Ethernet)\r\n");
|
||||
#endif
|
||||
terminalOutput().print(" get pwrmgt.bootreason\r\n"
|
||||
output.print(
|
||||
" get pwrmgt.bootreason\r\n"
|
||||
#if COMPANION_FEATURE_MEMORY_DIAGNOSTICS
|
||||
" memory\r\n"
|
||||
#endif
|
||||
@@ -10382,32 +10394,40 @@ void MyMesh::handleTerminalCommand(char* command, bool reader_prompt,
|
||||
#if defined(PIN_VIBRATION) || defined(HAS_DRV2605)
|
||||
" get/set vibration on|off\r\n"
|
||||
#endif
|
||||
#if COMPANION_FEATURE_NOTIFICATIONS
|
||||
);
|
||||
#if COMPANION_FEATURE_NOTIFICATIONS
|
||||
output.print(
|
||||
" get notify / get notify.rules / get notify.gpio.pins\r\n"
|
||||
" set notify.{sound|vibration|led|screen|gpio} on|off\r\n"
|
||||
" set notify.<output> <all|contact:key|room:key|channel:slot> <pattern>\r\n"
|
||||
" set notify.<output> <all|contact:key|room:key|channel:slot> <pattern>\r\n");
|
||||
output.print(
|
||||
" set notify.remote <contact:key|room:key> on|off (!notify, max 15s, no GPIO)\r\n"
|
||||
" notify.test <target> / notify.stop / notify.delete <target>\r\n"
|
||||
#endif
|
||||
" notify.test <target> / notify.stop / notify.delete <target>\r\n");
|
||||
#endif
|
||||
output.print(
|
||||
" get/set display.inbox <history|pending|unread>\r\n"
|
||||
" get/set display.touch <on|off> (this boot)\r\n"
|
||||
" get public.key\r\n"
|
||||
" set {name|lat|lon|freq|tx|af} {value}\r\n"
|
||||
" get wifi|espnow|2.4ghz\r\n"
|
||||
" set wifi|espnow on|off [force] (force only with off)\r\n"
|
||||
" set wifi|espnow on|off [force] (force only with off)\r\n");
|
||||
output.print(
|
||||
" set 2.4ghz on [all|force]|off [force] (this boot)\r\n"
|
||||
" get/set bluetooth.name <name|default>\r\n"
|
||||
" get/set bluetooth.name <name|default>\r\n");
|
||||
#if defined(BLE_PIN_CODE)
|
||||
output.print(
|
||||
" get bluetooth (alias: get ble)\r\n"
|
||||
" set bluetooth <on|off> [force] (saved; force only with off)\r\n"
|
||||
" get bluetooth.mac\r\n"
|
||||
" set bluetooth.mac <address|random|random-every-boot|random-after-connect|default>\r\n"
|
||||
" get/set bluetooth.stealth on|off\r\n"
|
||||
" get/set bluetooth.stealth on|off\r\n");
|
||||
#endif
|
||||
output.print(
|
||||
#if MESH_ENABLE_LOST_REPLY
|
||||
" get/set lost.reply <off|no|yes>\r\n"
|
||||
#endif
|
||||
" set pin <0-999999>\r\n" " powersaving [on|off]\r\n"
|
||||
" set pin <0-999999>\r\n"
|
||||
" powersaving [on|off]\r\n"
|
||||
#if MESH_USB_LOGGING_AVAILABLE
|
||||
" get/set usb.logging <on|off|stream> [reboot]\r\n"
|
||||
" get/set usb.debug <on|off>\r\n"
|
||||
@@ -10419,54 +10439,56 @@ void MyMesh::handleTerminalCommand(char* command, bool reader_prompt,
|
||||
);
|
||||
#if defined(ESP32) && defined(WIFI_SSID)
|
||||
#if defined(COMPANION_RADIO_FULL)
|
||||
terminalOutput().print(" start ota [ap] (WiFi firmware update on port 8080)\r\n");
|
||||
terminalOutput().print(" stop ota\r\n");
|
||||
output.print(" start ota [ap] (WiFi firmware update on port 8080)\r\n");
|
||||
output.print(" stop ota\r\n");
|
||||
#endif
|
||||
#if defined(COMPANION_EXCLUSIVE_WIFI_BLE)
|
||||
terminalOutput().print(" get companion.transport\r\n");
|
||||
terminalOutput().print(" set companion.transport <wifi|ble>\r\n");
|
||||
output.print(" get companion.transport\r\n");
|
||||
output.print(" set companion.transport <wifi|ble>\r\n");
|
||||
#endif
|
||||
terminalOutput().print(" get wifi.powersave\r\n");
|
||||
terminalOutput().print(" set wifi.powersave <none|min|max>\r\n");
|
||||
terminalOutput().print(" get wifi.protocol\r\n");
|
||||
terminalOutput().print(" get wifi.status (connection, saved/boot/live settings)\r\n");
|
||||
terminalOutput().print(" set wifi.protocol <bg|bgn> (saved; reboot required)\r\n");
|
||||
output.print(" get wifi.powersave\r\n");
|
||||
output.print(" set wifi.powersave <none|min|max>\r\n");
|
||||
output.print(" get wifi.protocol\r\n");
|
||||
output.print(" get wifi.status (connection, saved/boot/live settings)\r\n");
|
||||
output.print(" set wifi.protocol <bg|bgn> (saved; reboot required)\r\n");
|
||||
#if !defined(COMPANION_EXCLUSIVE_WIFI_BLE)
|
||||
terminalOutput().print(" get wifi.mode\r\n");
|
||||
terminalOutput().print(" set wifi.mode <normal|wifi-only> (saved; reboot required)\r\n");
|
||||
output.print(" get wifi.mode\r\n");
|
||||
output.print(" set wifi.mode <normal|wifi-only> (saved; reboot required)\r\n");
|
||||
#endif
|
||||
#ifdef WITH_WEBCONFIG
|
||||
terminalOutput().print(" get wifi.{ssid|pwd}\r\n");
|
||||
terminalOutput().print(" set wifi.ssid <network name>\r\n");
|
||||
terminalOutput().print(" set wifi.pwd <password>\r\n");
|
||||
terminalOutput().print(" get webui\r\n");
|
||||
terminalOutput().print(" set webui <on|off>\r\n");
|
||||
terminalOutput().print(" start webconfig [ap]\r\n");
|
||||
terminalOutput().print(" stop webconfig\r\n");
|
||||
output.print(" get wifi.{ssid|pwd}\r\n");
|
||||
output.print(" set wifi.ssid <network name>\r\n");
|
||||
output.print(" set wifi.pwd <password>\r\n");
|
||||
output.print(" get webui\r\n");
|
||||
output.print(" set webui <on|off>\r\n");
|
||||
output.print(" start webconfig [ap]\r\n");
|
||||
output.print(" stop webconfig\r\n");
|
||||
#endif
|
||||
#endif
|
||||
#if defined(MESH_PRIMARY_ESPNOW) && MESH_PRIMARY_ESPNOW
|
||||
terminalOutput().print(" get espnow.channel\r\n");
|
||||
terminalOutput().print(" set espnow.channel <1-13>\r\n");
|
||||
output.print(" get espnow.channel\r\n");
|
||||
output.print(" set espnow.channel <1-13>\r\n");
|
||||
#endif
|
||||
// Concise help and grouped Print calls preserve small-board flash space.
|
||||
terminalOutput().print(
|
||||
// Keep native USB producer writes within 256 bytes without changing help text.
|
||||
output.print(
|
||||
" get radio.rxps.config\r\n"
|
||||
" get/set radio.rxps <off|on|level 1-10 [preamble 16|32]|rx_us sleep_us>\r\n"
|
||||
" get/set radio.cad <on|off>\r\n"
|
||||
" set radio.cad timings <scan_ms|auto> <retry_ms|auto> <max_ms|auto>\r\n"
|
||||
" get/set radio.rxgain <on|off>\r\n"
|
||||
" get/set radio.rxgain <on|off>\r\n");
|
||||
output.print(
|
||||
" get/set radio.fem.rxgain <on|off>\r\n"
|
||||
" get/set radio.fem.txgain <on|off>\r\n"
|
||||
" get/set flood.retry.count <0-15>\r\n"
|
||||
" get/set flood.retry.path <0-63|off>\r\n"
|
||||
" get/set flood.retry.group.path <0-63|off>\r\n"
|
||||
" get/set flood.retry.advert <on|off>\r\n"
|
||||
" card\r\n"
|
||||
" card\r\n");
|
||||
output.print(
|
||||
" import <meshcore://card>\r\n"
|
||||
" clock\r\n"
|
||||
" time <epoch-seconds>\r\n");
|
||||
terminalOutput().print(
|
||||
output.print(
|
||||
" list [n]\r\n"
|
||||
" show [adverts|channels|emergency] [on|off]\r\n"
|
||||
" to [name|prefix]\r\n"
|
||||
@@ -10474,7 +10496,7 @@ void MyMesh::handleTerminalCommand(char* command, bool reader_prompt,
|
||||
" send <text>\r\n"
|
||||
" login <admin-password>\r\n"
|
||||
" cmd <remote-command>\r\n");
|
||||
terminalOutput().print(
|
||||
output.print(
|
||||
" trace [name|prefix]\r\n"
|
||||
" trace path <1|2|4> <prefixes...>\r\n"
|
||||
" advert\r\n"
|
||||
@@ -10483,26 +10505,28 @@ void MyMesh::handleTerminalCommand(char* command, bool reader_prompt,
|
||||
" channels\r\n"
|
||||
" channel <name-or-slot> <text>\r\n");
|
||||
#if defined(NRF52_PLATFORM) && defined(EXTRAFS) && !defined(QSPIFLASH)
|
||||
terminalOutput().print(" repair extrafs (erases/rebuilds internal ExtraFS)\r\n");
|
||||
terminalOutput().print(" scan extrafs erase (USB only; reboot for destructive page test)\r\n");
|
||||
output.print(" repair extrafs (erases/rebuilds internal ExtraFS)\r\n");
|
||||
output.print(" scan extrafs erase (USB only; reboot for destructive page test)\r\n");
|
||||
#endif
|
||||
#if COMPANION_FEATURE_TEMP_RADIO || COMPANION_FEATURE_OTA_CLI
|
||||
#if COMPANION_FEATURE_TEMP_RADIO
|
||||
terminalOutput().print(" tempradio [freq,bw,sf,cr,minutes]\r\n");
|
||||
terminalOutput().print(" normalradio\r\n");
|
||||
output.print(" tempradio [freq,bw,sf,cr,minutes]\r\n");
|
||||
output.print(" normalradio\r\n");
|
||||
#endif
|
||||
#if COMPANION_FEATURE_OTA_CLI
|
||||
terminalOutput().print(" ota {status|ls|announce|folder|config|...}\r\n");
|
||||
output.print(" ota {status|ls|announce|folder|config|...}\r\n");
|
||||
#endif
|
||||
#endif
|
||||
terminalOutput().print(" reboot\r\n" " ver\r\n");
|
||||
output.print(
|
||||
" reboot\r\n"
|
||||
" ver\r\n");
|
||||
#if defined(NRF52_PLATFORM)
|
||||
terminalOutput().println(" uf2reset");
|
||||
output.println(" uf2reset");
|
||||
#endif
|
||||
if (_terminal_mode) {
|
||||
terminalOutput().print(" +++MESHCORE-TERM-STOP\r\n");
|
||||
output.print(" +++MESHCORE-TERM-STOP\r\n");
|
||||
} else {
|
||||
terminalOutput().print(" disconnect (network terminal)\r\n");
|
||||
output.print(" disconnect (network terminal)\r\n");
|
||||
}
|
||||
} else if (handleCommand(command, 0, local_reply)) {
|
||||
// Fill the same safe shared-command surface for getters (`get name`,
|
||||
|
||||
Reference in new issue
Block a user