diff --git a/docs/ota_easy.md b/docs/ota_easy.md index 9d715769..329d002b 100644 --- a/docs/ota_easy.md +++ b/docs/ota_easy.md @@ -47,6 +47,28 @@ Both paths require: LoRa OTA packets are generated, received, and relayed only while `tempradio` is active. If any required window closes, the transfer stops making progress and can resume during a later overlapping window. +### Choose the source radio + +Use an ESP32 **MeshCore companion** as the source node. It receives the update folder from the computer, +then advertises it over LoRa. Connect to that companion either by USB serial or by WiFi. For USB serial, the +companion firmware must include `OTA_FOLDER_SERIAL`; before starting the transfer, its USB CLI must accept: + +```text +ota folder on +``` + +If that command reports that `OTA_FOLDER_SERIAL` is not built in, use the WiFi method below. Do **not** use +a KISS modem: KISS firmware is a TNC/KISS frame interface and does not provide the MeshCore CLI or the +OTA-folder transport that `motatool serve` requires. + +For a companion connected by WiFi, use its dedicated OTA seeder connection instead: + +```bash +motatool serve --dir ./motas --tcp :5001 -v +``` + +Port `5001` is the OTA seeder port; it is separate from the companion application port (`5000`). + ## Install `motatool` Install Rust if necessary, then install the standalone packaging and serving tool: @@ -183,8 +205,9 @@ Close any serial terminal using the source node's USB port, find its device name motatool serve --dir ./motas --serial /dev/ttyACM0 -v ``` -Replace `/dev/ttyACM0` with the source node's serial device. `motatool` attaches the folder to the source, -which advertises the update over LoRa while its temporary-radio window is active. +Replace `/dev/ttyACM0` with the USB serial device of the source companion selected above. +`motatool` attaches the folder to the source, which advertises the update over LoRa while its temporary-radio +window is active. KISS modem serial ports cannot be used here. Leave this command running until the destination finishes downloading. diff --git a/docs/ota_protocol.md b/docs/ota_protocol.md index 3804da46..2cb431d4 100644 --- a/docs/ota_protocol.md +++ b/docs/ota_protocol.md @@ -104,6 +104,15 @@ EndF trailer (fixed 56 bytes): The "reconstructed image" referenced by the manifest is the full `BODY || EndF` (what gets flashed). +### ESP32 portable app-slot profile + +ESP32 companion firmware is installed over USB and is exempt from the portable-slot limit. Every other +ESP32 artifact, including room, sensor, and repeater roles, must fit the legacy slot from `0x10000` up to +`0x150000` (`0x140000`, 1,310,720 bytes), including the 56-byte `EndF` trailer. The build checks both that +limit and the target's actual app partition. For every ESP32 repeater, `build.sh` also exposes an explicit +`*_lora_ota_no_external_sensors` artifact: the ordinary repeater remains sensor-enabled, while that sibling +also disables optional external-sensor drivers for LoRa distribution. + > **Implementer note:** the bootloader (and any non-Arduino consumer) MUST locate the body extent by > scanning for `EndF`, never by trusting a stored size — see the bootloader contract in §12. @@ -538,6 +547,13 @@ MotaDesc wire (38 B): mid[4] target_id(4) fw_version(4) codec(1) flags(1) status: 0 = OK, non-zero = error (out of range / past EOF). ``` +**What to plug into `--serial`.** Use the USB serial console of an ESP32 MeshCore **companion** built with +`OTA_FOLDER_SERIAL`. The companion is the required source node and must have a working LoRa radio plus an +`ota folder on` command; that command confirms it can host and advertise the folder. A **KISS modem will not +work**: KISS firmware exposes a TNC/KISS frame interface, not the MeshCore CLI and `mota-seeder` +request/response transport. A companion connected over WiFi is the alternative source connection: use its +dedicated seeder port with `motatool serve --tcp :5001`. + Device CLI: `ota folder on` (attach + announce), `ota folder` (list), `ota folder off`. Build flag `OTA_FOLDER_SERIAL` (default stream = console `Serial`; override `OTA_FOLDER_SERIAL_STREAM` + define `OTA_FOLDER_SERIAL_BEGIN` for a dedicated UART). On an ESP32 WiFi companion the node also runs a second