FastLED 3.10.8
Loading...
Searching...
No Matches
AutoResearchOta.h
Go to the documentation of this file.
1// examples/AutoResearch/AutoResearchOta.h
2//
3// OTA autoresearch for ESP32: WiFi Soft AP + OTA HTTP server testing.
4// Used by `bash autoresearch --ota`.
5//
6// The ESP32 creates a WiFi Soft AP with known credentials,
7// then starts an OTA HTTP server with Basic Auth.
8// The host Python script connects to the AP and tests HTTP endpoints.
9
10#pragma once
11
12#include "fl/stl/vector.h"
13
14// WiFi AP configuration constants for OTA autoresearch
15#define AUTORESEARCH_OTA_SSID "FastLED-OTA-Test"
16#define AUTORESEARCH_OTA_PASSWORD "otavalid8"
17#define AUTORESEARCH_OTA_AP_IP "192.168.4.1"
18#define AUTORESEARCH_OTA_OTA_PASSWORD "testota123"
19#define AUTORESEARCH_OTA_HOSTNAME "fastled-ota-test"
20#define AUTORESEARCH_OTA_PORT 80
21
22// Forward declarations
23namespace fl {
24class json;
25}
26
29 bool wifi_ap_active = false;
30 bool ota_active = false;
31};
32
37
41
44fl::json beginOtaArtifact(size_t expected_size, const char* sha256);
49
52
57
67void pollOtaArtifactUpdate(uint32_t watchdog_restore_ms);
68
fl::json queueOtaArtifactUpdate(const char *host, uint16_t port)
Queue an RP2350W HTTP update so the RPC response can be sent first.
fl::json writeOtaArtifact(fl::vector< fl::u8 > bytes)
fl::json otaArtifactStatus()
AutoResearchOtaState & getOtaState()
Get current OTA autoresearch state.
fl::json stopOta()
Stop OTA server and WiFi AP, release all resources.
fl::json finishOtaArtifact()
fl::json startOtaArtifactServer()
fl::json rpOtaUpdateStatus()
Outcome of the last pollOtaArtifactUpdate fetch, readable after the host reconnects.
fl::json startOta()
Start WiFi Soft AP and OTA HTTP server.
fl::json beginOtaArtifact(size_t expected_size, const char *sha256)
Stage one RP2350W firmware artifact on the ESP32-C6 fixture.
void pollOtaArtifactUpdate(uint32_t watchdog_restore_ms)
Execute a queued RP2350W update from the sketch loop.
State for OTA autoresearch.
Base definition for an LED controller.
Definition crgb.hpp:179
fl::u32 uint32_t
Definition stdint.h:218
fl::u16 uint16_t
Definition stdint.h:213