PROTOCOLS
AccessPointController
Defined in fuchsia.wlan.policy/access_point_provider.fidl
AccessPointControllers allow the caller to trigger wlan state changes. This includes whether the device will act as an access point and provide a wlan network for other co-located devices.
StartAccessPoint
Enables wlan to initiate AccessPoint operation using the provided network configuration, connectivity mode and band.
Request
Name | Type |
---|---|
config |
NetworkConfig
|
mode |
ConnectivityMode
|
band |
OperatingBand
|
Response
Name | Type |
---|---|
status |
RequestStatus
|
StopAccessPoint
Deactivate AccessPoint operation for a specified network configuration.
Request
Name | Type |
---|---|
config |
NetworkConfig
|
Response
Name | Type |
---|---|
status |
RequestStatus
|
StopAllAccessPoints
Deactivates all AccessPoints currently operating on the device.
Request
<EMPTY>
AccessPointListener
Defined in fuchsia.wlan.policy/access_point_provider.fidl
The AccessPointListener API provides a mechanism for callers to receive state change updates about wlan access point operation.
GetListener
Registration for callers to receive wlan access point (ap) mode state updates.
Request
Name | Type |
---|---|
updates |
client_end:AccessPointStateUpdates
|
AccessPointProvider
Defined in fuchsia.wlan.policy/access_point_provider.fidl
The AccessPointProvider API provides a mechanism for access point control and is intended to be called by applications or entities representing the user (ex, Settings). This API is not intended to be called by other applications to change wlan state without explicit user control.
The second aim of this API design is to eliminate the "last-caller wins" paradigm by limiting the number of controlling applications. A single caller at a time is permitted to make API calls that impact wlan state.
GetController
Control channel used by a single caller to trigger wlan access point (ap) mode state changes. The caller also provides a channel to receive wlan ap updates. Only one caller can have the control channel open at a time. Attempts to register as a controller while there is an active control registration will result in the new caller's provided channel being closed.
Request
Name | Type |
---|---|
requests |
server_end:AccessPointController
|
updates |
client_end:AccessPointStateUpdates
|
AccessPointStateUpdates
Defined in fuchsia.wlan.policy/access_point_provider.fidl
AccessPoint operation status changes along with associated connection status.
OnAccessPointStateUpdate
Updates registered listeners with the current summary of wlan access point operating states. This will be called when there are changes with active access point networks - both the number of access points and their individual activity. Registered listeners are responsible for deciding what information has changed (this is dependent on when they last acknowledged the update).
Request
Name | Type |
---|---|
access_points |
vector<AccessPointState>
|
Response
<EMPTY>
ClientController
Defined in fuchsia.wlan.policy/client_provider.fidl
ClientControllers allow the caller to trigger wlan state changes. This includes whether connections will be attempted, scan triggers and saved network configuration changes.
Individual calls provided by the API are triggered after registering with the wlan ClientProvider via the OpenControlChannel call.
Connect
Request to attempt a connection to the specified network. The target of the connect call must already be a saved network. This call is not a blocking call for the duration of the connection attempt. If the call cannot be immediately attempted, a failure status will be returned. If the connection request will be attempted, an acknowledgment status will be returned. Updates to the connection status are disseminated via the ClientStateUpdates protocol. If the connect attempt fails, the service will fall back to default behavior with scanning and connecting via network selection.
Request
Name | Type |
---|---|
id |
NetworkIdentifier
|
Response
Name | Type |
---|---|
status |
RequestStatus
|
GetSavedNetworks
Retrieve the currently saved networks using the provided iterator.
Request
Name | Type |
---|---|
iterator |
server_end:NetworkConfigIterator
|
RemoveNetwork
Removes a saved network configuration, if one exists. This method will automatically trigger a disconnection if the NetworkConfig was used to establish the connection.
Request
Name | Type |
---|---|
config |
NetworkConfig
|
Response
Name | Type |
---|---|
payload |
ClientController_RemoveNetwork_Result
|
SaveNetwork
Saves a network and any credential information needed to connect. Multiple entries for the same NetworkIdentifier can exist if the credentials are different. If a caller attempts to save a NetworkConfig with the same NetworkIdentifier and same Credentials as a previously saved network the method will effectively be a no-op. Saved networks will be used to autoconnect, and are also available to use with the Connect() API.
Request
Name | Type |
---|---|
config |
NetworkConfig
|
Response
Name | Type |
---|---|
payload |
ClientController_SaveNetwork_Result
|
ScanForNetworks
Triggers a network scan. Note, even in normal operation, some scan requests may be rejected due to timing with connection establishment or other critical connection maintenance. If the scan is cancelled or errors, the caller is notified via a status update in the ScanResultIterator. In the current implementation, client connections must be started for a scan to be performed.
Request
Name | Type |
---|---|
iterator |
server_end:ScanResultIterator
|
StartClientConnections
Enables WLAN client functionality. Once enabled, automatic connections will be attempted for saved networks, and callers can initiate operations via the ScanForNetworks() and Connect() APIs. Depending on the underlying capabilities of the device, this call may impact other device operation (for example, acting as an access point). The returned status represents acknowledgement of the request. The ClientListener protocol should be monitored to learn when client functionality has been enabled.
Request
<EMPTY>
Response
Name | Type |
---|---|
status |
RequestStatus
|
StopClientConnections
Tears down any existing connections to wlan networks and disables initiation of new connections. The returned status represents acknowledgements of the request. The ClientListener protocol should be monitored to learn when client functionality has been disabled.
Request
<EMPTY>
Response
Name | Type |
---|---|
status |
RequestStatus
|
ClientListener
Defined in fuchsia.wlan.policy/client_provider.fidl
The ClientListener API provides a mechanism for callers to receive state change updates about wlan operation.
GetListener
Registration for callers to receive wlan client mode state updates.
Request
Name | Type |
---|---|
updates |
client_end:ClientStateUpdates
|
ClientProvider
Defined in fuchsia.wlan.policy/client_provider.fidl
The ClientProvider API provides a mechanism for wlan control and is intended to be called by applications or entities representing the user (ex, Settings). This API is not intended to be called by other applications to change wlan state without explicit user control.
The second aim of this API design is to eliminate the "last-caller wins" paradigm by limiting the number of controlling applications. A single caller at a time is permitted to make API calls that impact wlan state.
GetController
Control channel used by a single caller to trigger wlan client mode state changes. The caller also provides a channel to receive wlan updates. Only one caller can have the control channel open at a time. Attempts to register as a controller while there is an active control registration will result in the new caller's provided channel being closed.
Request
Name | Type |
---|---|
requests |
server_end:ClientController
|
updates |
client_end:ClientStateUpdates
|
ClientStateUpdates
Defined in fuchsia.wlan.policy/client_provider.fidl
Wlan status changes for client connections and the associated network state. These updates contain information about whether or not the device will attempt to connect to networks, saved network configuration change information, individual connection state information by NetworkIdentifier and connection attempt information. The connection and network related calls are based on NetworkIdentifier to allow multiple simultaneous connections on supporting devices.
OnClientStateUpdate
Updates registered listeners with the current summary of wlan client state. This will be called when there is any change to the state and the registered listeners are responsible for deciding what information has changed (since this is dependent on when they last acknowledged the update).
Request
Name | Type |
---|---|
summary |
ClientStateSummary
|
Response
<EMPTY>
NetworkConfigIterator
Defined in fuchsia.wlan.policy/client_provider.fidl
Iterator used by callers to retrieve saved network information.
GetNext
Method allowing the next block of saved networks to be handled.
Request
<EMPTY>
Response
Name | Type |
---|---|
configs |
vector<NetworkConfig>
|
ScanResultIterator
Defined in fuchsia.wlan.policy/client_provider.fidl
Iterator used to send back scan results to the caller. The corresponding channel will be closed after the scan is complete and results are returned or fails due to an error.
GetNext
Allows caller to request the next set of scan results. After all scan results have been sent, the next call to GetNext will return an empty vector and the channel will be closed. If an error is encountered during the scan, the error will be returned and the channel will be closed. No scan results will be provided.
Request
<EMPTY>
Response
Name | Type |
---|---|
payload |
ScanResultIterator_GetNext_Result
|
STRUCTS
ClientController_RemoveNetwork_Response
Defined in fuchsia.wlan.policy/client_provider.fidl
<EMPTY>
ClientController_SaveNetwork_Response
Defined in fuchsia.wlan.policy/client_provider.fidl
<EMPTY>
Empty
Defined in fuchsia.wlan.policy/types.fidl
Empty struct used in place of optional values.
<EMPTY>
NetworkIdentifier
Defined in fuchsia.wlan.policy/types.fidl
Primary means of distinguishing between available networks - the combination of the (mostly) human recognizable name and the security type. The security type is used to distinguish between different network protection (or lack thereof) types.
Field | Type | Description | Default |
---|---|---|---|
ssid |
fuchsia.wlan.ieee80211/Ssid
|
Network name, often used by users to choose between networks in the UI. |
No default |
type |
SecurityType
|
Protection type (or not) for the network. |
No default |
ScanResultIterator_GetNext_Response
Defined in fuchsia.wlan.policy/client_provider.fidl
Field | Type | Description | Default |
---|---|---|---|
scan_results |
vector<ScanResult>
|
No default |
ENUMS
Compatibility strict
Type: uint32
Defined in fuchsia.wlan.policy/client_provider.fidl
High level compatibility for the scan result. Not all network security protocols are supported. New protocols may be detected before they are connectable and deprecated protocols may explicitly be unsupported due to security and privacy concerns.
Name | Value | Description |
---|---|---|
SUPPORTED |
1 |
Denotes that the network is supported and connections can be attempted (given appropriate credentials when required). |
DISALLOWED_INSECURE |
2 |
The network uses a deprecated security protocol and is explicitly not supported. |
DISALLOWED_NOT_SUPPORTED |
3 |
The network uses a currently unsupported security protocol. |
ConnectionState strict
Type: uint32
Defined in fuchsia.wlan.policy/client_provider.fidl
Connection states used to update registered wlan observers.
Name | Value | Description |
---|---|---|
FAILED |
1 |
The connection attempt was terminated due to an error. |
DISCONNECTED |
2 |
The network is disconnected. |
CONNECTING |
3 |
The device is attempting a connection to a network. |
CONNECTED |
4 |
The connection is now established. Note: This does not make any guarantees about higher level network reachability. |
ConnectivityMode strict
Type: uint32
Defined in fuchsia.wlan.policy/access_point_provider.fidl
Connectivity operating mode for the access point.
Name | Value | Description |
---|---|---|
LOCAL_ONLY |
1 |
Allows for connectivity between co-located devices. Local only access points do not forward traffic to other network connections. |
UNRESTRICTED |
2 |
Allows for full connectivity with traffic potentially being forwarded to other network connections (ex., tethering mode). |
DisconnectStatus strict
Type: uint32
Defined in fuchsia.wlan.policy/client_provider.fidl
Disconnect and connection attempt failure status codes
Name | Value | Description |
---|---|---|
TIMED_OUT |
1 |
The requested connection attempt failed due to timeout. |
CREDENTIALS_FAILED |
2 |
The requested connection attempt failed due to suspected credential failure. |
CONNECTION_STOPPED |
3 |
The existing connection was explicitly disconnected by an action of wlan service on this device. This can be the result of wlan connections being disabled, network configuration being removed or a connection attempt to a different network (as examples). |
CONNECTION_FAILED |
4 |
The existing connection failed unexpectedly in a way that is not an explicitly triggered disconnect by the device (or user). Examples of unexpected disconnections include: an underlying error (driver, firmware, etc.), beacon loss, access point failure. |
NetworkConfigChangeError strict
Type: uint32
Defined in fuchsia.wlan.policy/client_provider.fidl
Potential error cases for saving and removing network configurations.
Name | Value | Description |
---|---|---|
GENERAL_ERROR |
1 |
|
NETWORK_CONFIG_MISSING_FIELD_ERROR |
2 |
|
NETWORK_CONFIG_WRITE_ERROR |
3 |
|
SSID_EMPTY_ERROR |
4 |
|
CREDENTIAL_LEN_ERROR |
6 |
|
INVALID_SECURITY_CREDENTIAL_ERROR |
7 |
|
UNSUPPORTED_CREDENTIAL_ERROR |
8 |
OperatingBand strict
Type: uint32
Defined in fuchsia.wlan.policy/types.fidl
Operating band for wlan control request and status updates.
Name | Value | Description |
---|---|---|
ANY |
1 |
Allows for band switching depending on device operating mode and environment. |
ONLY_2_4GHZ |
2 |
Restricted to 2.4 GHz bands only. |
ONLY_5GHZ |
3 |
Restricted to 5 GHz bands only. |
OperatingState strict
Type: uint32
Defined in fuchsia.wlan.policy/access_point_provider.fidl
Current detailed operating state for an access point.
Name | Value | Description |
---|---|---|
FAILED |
1 |
Access point operation failed. Access points that enter the failed state will have one update informing registered listeners of the failure and then an additional update with the access point removed from the list. |
STARTING |
2 |
Access point operation is starting up. |
ACTIVE |
3 |
Access point operation is active. |
RequestStatus strict
Type: uint32
Defined in fuchsia.wlan.policy/types.fidl
Name | Value | Description |
---|---|---|
ACKNOWLEDGED |
0 |
|
REJECTED_NOT_SUPPORTED |
1 |
|
REJECTED_INCOMPATIBLE_MODE |
2 |
|
REJECTED_ALREADY_IN_USE |
3 |
|
REJECTED_DUPLICATE_REQUEST |
4 |
ScanErrorCode strict
Type: uint32
Defined in fuchsia.wlan.policy/client_provider.fidl
Wlan scan error codes.
Name | Value | Description |
---|---|---|
GENERAL_ERROR |
1 |
Unexpected scan error without a specific cause. |
CANCELLED |
2 |
Scan was cancelled and stopped. This can happen due to operating state changes, higher priority operations or conflicting requests. |
SecurityType strict
Type: uint32
Defined in fuchsia.wlan.policy/types.fidl
High level protection type for the network. This does not convey all details needed for the mechanism of the connection, but is primarily used to map the target network to proper scan results.
Name | Value | Description |
---|---|---|
NONE |
1 |
|
WEP |
2 |
|
WPA |
3 |
|
WPA2 |
4 |
|
WPA3 |
5 |
WlanClientState strict
Type: uint32
Defined in fuchsia.wlan.policy/client_provider.fidl
Wlan operating state for client connections
Name | Value | Description |
---|---|---|
CONNECTIONS_DISABLED |
1 |
|
CONNECTIONS_ENABLED |
2 |
TABLES
AccessPointState
Defined in fuchsia.wlan.policy/access_point_provider.fidl
Information about the individual operating access points. This includes limited information about any connected clients.
Ordinal | Field | Type | Description |
---|---|---|---|
1 |
state |
OperatingState
|
Current access point operating state |
2 |
mode |
ConnectivityMode
|
Requested operating connectivity mode |
3 |
band |
OperatingBand
|
Access point operating band. |
4 |
frequency |
uint32
|
Access point operating frequency (in MHz). |
5 |
clients |
ConnectedClientInformation
|
Information about connected clients |
6 |
id |
NetworkIdentifier
|
Identifying information of the access point whose state has changed. |
Bss
Defined in fuchsia.wlan.policy/client_provider.fidl
Information for a particular ScanResult entry.
Ordinal | Field | Type | Description |
---|---|---|---|
1 |
bssid |
fuchsia.wlan.ieee80211/MacAddr
|
MAC address for the AP interface. |
2 |
rssi |
int8
|
Calculated received signal strength for the beacon/probe response. |
3 |
frequency |
uint32
|
Operating frequency for this network (in MHz). |
4 |
timestamp_nanos |
zx/Time
|
Time of the scan result relative to when the system was powered on. See https://fuchsia.dev/fuchsia-src/concepts/time/language_support#monotonic_time |
ClientStateSummary
Defined in fuchsia.wlan.policy/client_provider.fidl
Information about the current client state for the device. This includes if the device will attempt to connect to access points (when applicable), any existing connections and active connection attempts and their outcomes.
Ordinal | Field | Type | Description |
---|---|---|---|
1 |
state |
WlanClientState
|
State indicating whether wlan will attempt to connect to networks or not. |
2 |
networks |
vector<NetworkState>
|
Active connections, connection attempts or failed connections. |
ConnectedClientInformation
Defined in fuchsia.wlan.policy/access_point_provider.fidl
Connected client information. This is initially limited to the number of connected clients.
Ordinal | Field | Type | Description |
---|---|---|---|
1 |
count |
uint8
|
Number of connected clients |
NetworkConfig
Defined in fuchsia.wlan.policy/types.fidl
Network information used to establish a connection.
Ordinal | Field | Type | Description |
---|---|---|---|
1 |
id |
NetworkIdentifier
|
Identifier used to represent a specific network. No guarantee for uniqueness. |
2 |
credential |
Credential
|
Information needed to join a network. |
NetworkState
Defined in fuchsia.wlan.policy/client_provider.fidl
Information about current network connections and attempts.
Ordinal | Field | Type | Description |
---|---|---|---|
1 |
id |
NetworkIdentifier
|
Network id for the current connection (or attempt). |
2 |
state |
ConnectionState
|
Current state for the connection. |
3 |
status |
DisconnectStatus
|
Extra information for debugging or Settings display |
ScanResult
Defined in fuchsia.wlan.policy/client_provider.fidl
Information from an observed wlan network. This includes the network name, security type, detected access point information and network compatibility information.
Ordinal | Field | Type | Description |
---|---|---|---|
1 |
id |
NetworkIdentifier
|
Network properties used to distinguish between networks and to group individual APs. |
2 |
entries |
vector<Bss>
|
Individual access points offering the specified network. |
3 |
compatibility |
Compatibility
|
Indication if the detected network is supported by the implementation. |
UNIONS
ClientController_RemoveNetwork_Result strict
Defined in fuchsia.wlan.policy/client_provider.fidl
Ordinal | Variant | Type | Description |
---|---|---|---|
1 |
response |
ClientController_RemoveNetwork_Response
|
|
2 |
err |
NetworkConfigChangeError
|
ClientController_SaveNetwork_Result strict
Defined in fuchsia.wlan.policy/client_provider.fidl
Ordinal | Variant | Type | Description |
---|---|---|---|
1 |
response |
ClientController_SaveNetwork_Response
|
|
2 |
err |
NetworkConfigChangeError
|
Credential flexible
Defined in fuchsia.wlan.policy/types.fidl
Information used to verify access to a target network.
Ordinal | Variant | Type | Description |
---|---|---|---|
1 |
none |
Empty
|
The network does not use credentials (open networks). |
2 |
password |
vector<uint8>
|
Plaintext password (handled as binary data). |
3 |
psk |
vector<uint8>
|
Hash representation of the network passphrase (handled as binary data). |
ScanResultIterator_GetNext_Result strict
Defined in fuchsia.wlan.policy/client_provider.fidl
Ordinal | Variant | Type | Description |
---|---|---|---|
1 |
response |
ScanResultIterator_GetNext_Response
|
|
2 |
err |
ScanErrorCode
|