Expand description
WiFi sub-function of the shared radio.
Layered, fully-async surface built on esp-radio:
-
wififeature —Wifi: owns theWifiControllerand exposes on-demand scanning (Wifi::scan). No IP stack, noembassy-net. -
wifi-stafeature —Wifi::into_sta: consumes the handle and returns a DHCP/staticembassy_net::Stack, aWifiControlcommand handle, and aWifiRunneryou spawn viawifi_task. The runner owns the single controller and manages association (auto-connect + reconnect), so scanning while associated is routed throughWifiControl::scan— there is never more than one owner of the controller. -
wifi-apfeature — [Wifi::into_ap]: brings the radio up as a soft-AP and returns an [ApRadio] that reports stations joining and leaving. It stops at the WiFi link on purpose — handing out addresses needs a DHCP server, whichembassy-netdoes not provide.
§Mode roadmap
Station and access point are wired. ESP-NOW / sniffer / CSI are separate
esp-radio features that layer on the same way. AP+STA at once
(Config::AccessPointStation) is the one combination still missing, and it
needs the wifi_task actor to own both halves rather than just the
station.
§Variant differences (Fire27 / ESP32 vs CoreS3 / ESP32-S3)
The esp-radio WiFi API is identical on both chips; the differences are RAM:
- The RX/TX buffer counts in [
controller_config] are trimmed on Fire27 (ESP32) where internal SRAM is tighter, and left at the esp-radio defaults on CoreS3 (ESP32-S3). - Fire27 cannot DMA out of PSRAM — the application must keep the
embassy_net::StackResourcesand socket buffers in internal RAM. CoreS3 has headroom and may place large app buffers in PSRAM (seecrate::mem). - With BLE coexistence (
coex), budget the extra controller heap (~96 KB reclaimed on ESP32, less on S3).
Structs§
- Access
Point Info - Information about a detected Wi-Fi access point.
- Connected
Info - Information about a station connected to the access point.
- Disconnected
Info - Information about a station disconnected from the access point.
- Password
- A password.
- StaCredentials
- Station credentials for
Wifi::into_sta. - Wifi
- Low-level WiFi handle: owns the controller.
- Wifi
Control - Cloneable-free command handle for the running station.
- Wifi
Runner - The owned controller + network runner. Hand to
wifi_task.
Enums§
- Authentication
Method - Supported Wi-Fi authentication methods.
- Authentication
Method Config - Authentication Configuration for a Wi-Fi network.
- Event
Info - Either the ConnectedInfo or DisconnectedInfo.
- IpSetup
- How the station obtains its IPv4 configuration.
- Wifi
Error - Errors from the WiFi sub-system.
Functions§
- wifi_
task - Drive the network stack and manage station association.
Type Aliases§
- Scan
List - Scan results, capped at 16 access points.