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.
§Mode roadmap
Only station (STA) is wired today. The actor in wifi_task is the single
controller owner, so AP mode (wifi-ap) slots in as an into_ap constructor
plus a Config::AccessPoint; ESP-NOW / sniffer / CSI are separate esp-radio
features layered the same way.
§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.
- StaCredentials
- Station credentials for
Wifi::into_sta. - Wifi
- Low-level WiFi handle: owns the controller and its interfaces.
- 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.
- 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.