Distribute master OTA images to slaves over ESP-NOW.
After UART OTA the master reads the staged partition in 4 KiB blocks (200 B ESP-NOW chunks), waits for per-slave block ACKs, and fixes the final partial block. Slaves reuse ota_uart; send pacing and logging improve reliability. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -15,4 +15,20 @@ esp_err_t esp_now_comm_send_accel_deadzone(const uint8_t mac[CLIENT_MAC_LEN],
|
||||
esp_err_t esp_now_comm_send_unicast_test(const uint8_t mac[CLIENT_MAC_LEN],
|
||||
uint32_t seq);
|
||||
|
||||
/** Master → slave OTA (unicast). */
|
||||
esp_err_t esp_now_comm_send_ota_start(const uint8_t mac[CLIENT_MAC_LEN],
|
||||
uint32_t total_size);
|
||||
esp_err_t esp_now_comm_send_ota_payload(const uint8_t mac[CLIENT_MAC_LEN],
|
||||
uint32_t seq, const uint8_t *data,
|
||||
size_t len);
|
||||
esp_err_t esp_now_comm_send_ota_end(const uint8_t mac[CLIENT_MAC_LEN]);
|
||||
|
||||
/** Slave → master OTA status. */
|
||||
esp_err_t esp_now_comm_send_ota_status(const uint8_t master_mac[CLIENT_MAC_LEN],
|
||||
uint32_t status, uint32_t bytes_written,
|
||||
uint32_t error);
|
||||
|
||||
/** Slave: MAC of joined master (false if not joined). */
|
||||
bool esp_now_comm_get_master_mac(uint8_t mac_out[CLIENT_MAC_LEN]);
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user