tools/driver_ota.py (make ota-drivers) pushes the driver's .py files through the controller, one file per POST /drivers/ota/file. Drivers skip files they already have, and the rest are committed together. - one target: acked unicast, two chunks in flight - several targets: each file is broadcast once, then each driver is asked for its missing chunks and repaired by unicast - rel: rel_send_seq, rel_wait and rel_send_wait, plus a callback for the drivers' 0x26 status replies - commands are retried, because status replies are not acked - broadcast chunks are paced 50 ms apart: faster broadcast left C3 drivers unable to receive until reset - bench results in docs/BENCH_TEST.md, endpoints in docs/API.md Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
18 lines
917 B
C
18 lines
917 B
C
#pragma once
|
|
|
|
#include "esp_err.h"
|
|
#include "esp_http_server.h"
|
|
|
|
// Update led-driver app files (.py) over ESP-NOW. Wire format is documented in
|
|
// led-driver/src/espnow_ota.py; tools/driver_ota.py drives a session:
|
|
//
|
|
// POST /drivers/ota/file?mac=<12hex>[,<12hex>...]|all&sess=<1..65535>&path=<p>&sha=<64hex>
|
|
// body: the raw file (0..64 KB). One driver gets the chunks by acked unicast; several get
|
|
// one broadcast, then each is asked for its missing chunks and repaired by unicast.
|
|
// Reply: {"<mac>":{"result":"same|written|error","code":"...","repaired":n}, ...}
|
|
// POST /drivers/ota/commit?mac=...&sess= drivers move their staged files into place and reset
|
|
// POST /drivers/ota/abort?mac=...&sess= drivers drop their staged files
|
|
//
|
|
// mac=all means every ESP-NOW device in the devices collection. One request runs at a time.
|
|
esp_err_t drv_ota_register(httpd_handle_t server);
|