Skip to main content

Module sta

Module sta 

Source
Expand description

WiFi Station (network client) runtime and types

Structs§

Bssid
A BSSID (access-point MAC address).
NetworkResult
A known WiFi network.
Psk
A WPA pre-shared key, validated at construction.
RequestClient
Request client wraps the request events, awaiting oneshot channels when appropriate
ScanResult
The result from scanning for networks.
Status
Parsed output of wpa_cli status.
WifiSetup
Setup struct for the WiFi Station process.
WifiStation
Instance that runs the Wifi process

Enums§

Broadcast
Broadcast events are unexpected, such as losing connection to the host network.
KeyMgmt
Key management types for WiFi networks (eg: WPA-PSK, WPA-EAP, etc). In theory, more than one may be configured, but I believe wpa_supplicant defaults to all of them if omitted. Therefore, in practice, this is mostly important for setting key_mgmt to None for an open network.
SelectResult
Result from selecting a network, including a success or a specific failure (eg: incorect psk). Timeout does not necessarily mean failure; it only means that we did not received a parseable response. It could be that some valid message isn’t being parsed by the library.

Type Aliases§

BroadcastReceiver
Channel for broadcasting events. Subscribing to this channel is equivalent to “wpa_ctrl_attach”. Can be temporarily silenced using broadcast::Receiver’s unsubscribe
ScanResults
A vector of ScanResult, wrapped in an Arc. If more than one client is awaiting the result of a scan, the result will be shared between them.