FastLED 3.9.15
Loading...
Searching...
No Matches
AutoResearchNet.h
Go to the documentation of this file.
1// examples/AutoResearch/AutoResearchNet.h
2//
3// Network autoresearch for ESP32: WiFi Soft AP + HTTP server/client testing.
4// Used by `bash autoresearch --net-server` and `bash autoresearch --net-client`.
5//
6// The ESP32 creates a WiFi Soft AP with known credentials.
7// The host Python script connects to the AP and tests HTTP endpoints.
8
9#pragma once
10
11#include "fl/stl/stdint.h"
12
13// WiFi AP configuration constants
14#define AUTORESEARCH_NET_SSID "FastLED-AutoResearch"
15#define AUTORESEARCH_NET_PASSWORD "fastled123"
16#define AUTORESEARCH_NET_AP_IP "192.168.4.1"
17#define AUTORESEARCH_NET_SERVER_PORT 80
18#define AUTORESEARCH_NET_CLIENT_PORT 8080
19#define AUTORESEARCH_NET_MAX_CONNECTIONS 4
20
21// Forward declarations
22namespace fl {
23class json;
24}
25
34
38
42
47fl::json runNetClientTest(const char* host_ip, uint16_t port);
48
53
57
fl::json runNetLoopback()
Run self-contained loopback test: start HTTP server, client GETs localhost.
fl::json startNetClient()
Start WiFi Soft AP only (for net-client mode).
AutoResearchNetState & getNetState()
Get current network autoresearch state.
#define AUTORESEARCH_NET_CLIENT_PORT
fl::json runNetClientTest(const char *host_ip, uint16_t port)
Run HTTP client tests against a host server.
#define AUTORESEARCH_NET_SERVER_PORT
fl::json startNetServer()
Start WiFi Soft AP and HTTP server with test endpoints.
fl::json stopNet()
Stop WiFi AP and HTTP server/client, release all resources.
State for network autoresearch.
Base definition for an LED controller.
Definition crgb.hpp:179