diff --git a/docs/cli_command_availability.md b/docs/cli_command_availability.md index eeab02b99..f581c6740 100644 --- a/docs/cli_command_availability.md +++ b/docs/cli_command_availability.md @@ -173,7 +173,7 @@ should use command `0x42`. See [Companion radio binary protocol](companion_proto | Radio | [`get tx`; `set tx `](cli_commands.md#view-or-change-this-nodes-transmit-power) | Board TX-power limits apply; busy changes apply automatically | Yes | Yes | Yes | | Radio | [`tempradio ...`; `normalradio`](cli_commands.md#change-the-radio-parameters-for-a-set-duration) | Full parser | Yes | Yes | Yes | | Radio | [`get/set/del radioat`; `get/set/del tempradioat`](cli_commands.md#schedule-radio-parameter-changes) | Full parser | Yes | Yes | Yes | -| Radio | [`get preset [n]`; `add preset`; `load preset`; `del preset`](cli_commands.md#save-and-switch-named-radio-presets) | Admin only remotely; remote `load preset` reverts after 10 min unless an admin logs in again; omitted on STM32, ESP-NOW-only and RAK4631 Repeater (`RAK_4631_repeater`, Full sensors) builds (`MESH_ENABLE_RADIO_PRESETS`) | Yes | Yes | Yes | +| Radio | [`get preset [n]`; `add preset`; `load preset`; `del preset`](cli_commands.md#save-and-switch-named-radio-presets) | Admin only remotely; remote `load preset` reverts after 10 min unless an admin logs in again; omitted on STM32 and ESP-NOW-only builds (`MESH_ENABLE_RADIO_PRESETS`) | Yes | Yes | Yes | | Radio | [`get freq`; `set freq `](cli_commands.md#view-or-change-this-nodes-frequency) | Local or authorized LoRa CLI | Yes | Yes | Yes | | Radio | [`get/set radio.rxgain`](cli_commands.md#view-or-change-this-nodes-rx-boosted-gain-mode-sx12xx-and-lr1110-v1141) | Supported radio | Feature | Feature | Feature | | Radio | [`get/set radio.fem.rxgain`](cli_commands.md#view-or-change-the-lora-fem-receive-path-gain-state-on-supported-boards) | Controllable LoRa FEM | Feature | Feature | Feature | diff --git a/docs/cli_commands.md b/docs/cli_commands.md index 64c1b9bd5..b63cf961d 100644 --- a/docs/cli_commands.md +++ b/docs/cli_commands.md @@ -2209,12 +2209,18 @@ boot. **Build switch:** `MESH_ENABLE_RADIO_PRESETS`. Flash-constrained STM32WL builds (such as `wio-e5-mini_repeater`) and ESP-NOW-only builds (`MESH_PRIMARY_ESPNOW` without a LoRa primary radio) omit radio presets by default; there the preset -commands return the ordinary unknown-command reply. Two nRF52 images also set -`MESH_ENABLE_RADIO_PRESETS=0` because they have no room left under their size -gates: `RAK_4631_companion_radio_full` (flash) and the RAK4631 Repeater built -from `RAK_4631_repeater`, including its Full sensors + LoRa OTA image (runtime -RAM). Other builds include them; set `-D MESH_ENABLE_RADIO_PRESETS=0` or `=1` -to override. +commands return the ordinary unknown-command reply. `RAK_4631_companion_radio_full` +also sets `MESH_ENABLE_RADIO_PRESETS=0` because it has no flash left under its +size gate. Other builds include them; set `-D MESH_ENABLE_RADIO_PRESETS=0` or +`=1` to override. + +**Storage switch:** `MESH_RADIO_PRESETS_RESIDENT`. By default (`1`) the preset +table stays in RAM. With `0` each preset command reads `/presets` into a +temporary table, saves any change and drops it; only the revert timer of a +pending remote `load preset` stays in RAM (at most 40 bytes). Commands, replies +and the revert behavior are the same. The RAK4631 Repeater built from +`RAK_4631_repeater` (both its sensor + LoRa OTA images) uses `0` because its +runtime-RAM headroom is too small for the resident table. --- diff --git a/variants/rak4631/platformio.ini b/variants/rak4631/platformio.ini index 4c0d36e6a..dee67069d 100644 --- a/variants/rak4631/platformio.ini +++ b/variants/rak4631/platformio.ini @@ -70,9 +70,10 @@ build_flags = -D WITH_RS232_BRIDGE_ALT_TX=PIN_SERIAL1_TX -D RS232_BRIDGE_MERGED=1 -D WITH_RS232_BRIDGE_GPS_CONFLICT_UART=1 - ; Its Full sensors + LoRa OTA image has only 68 bytes of runtime-RAM headroom; - ; the resident preset table (~220 B) does not fit, so presets stay out. - -D MESH_ENABLE_RADIO_PRESETS=0 + ; Its Full sensors + LoRa OTA image has only 68 bytes of runtime-RAM headroom, + ; too little for the resident preset table (~220 B): presets load /presets per + ; command and keep only the revert timer in RAM (<= 40 B). + -D MESH_RADIO_PRESETS_RESIDENT=0 ; -D OTA_DEBUG=1 ; bring-up: trace OTA fetch (REQ / block / page-flush) over Serial ; -D MESH_PACKET_LOGGING=1 ; -D MESH_DEBUG=1