fuchsia.wlan.policy

PROTOCOLS

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

NameType
requests request<AccessPointController>
updates AccessPointStateUpdates

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

NameType
updates AccessPointStateUpdates

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

NameType
config NetworkConfig
mode ConnectivityMode
band OperatingBand

Response

NameType
status fuchsia.wlan.common/RequestStatus

StopAccessPoint

Deactivate AccessPoint operation for a specified network configuration.

Request

NameType
config NetworkConfig

Response

NameType
status fuchsia.wlan.common/RequestStatus

StopAllAccessPoints

Deactivates all AccessPoints currently operating on the device.

Request

NameType

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

NameType
access_points vector<AccessPointState>

Response

NameType

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

NameType
requests request<ClientController>
updates ClientStateUpdates

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

NameType
updates ClientStateUpdates

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.

StartClientConnections

Enables wlan to initiate connections to networks (either autoconnect to saved networks or act on incoming calls triggering connections). Depending on the underlying capabilities of the device, this call may impact other device operation (for example, acting as an access point).

Request

NameType

Response

NameType
status fuchsia.wlan.common/RequestStatus

StopClientConnections

Disables connections to wlan networks and tears down any existing connections.

Request

NameType

Response

NameType
status fuchsia.wlan.common/RequestStatus

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.

Request

NameType
iterator request<ScanResultIterator>

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.

Request

NameType
config NetworkConfig

Response

NameType
result ClientController_SaveNetwork_Result

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

NameType
config NetworkConfig

Response

NameType
result ClientController_RemoveNetwork_Result

GetSavedNetworks

Retrieve the currently saved networks using the provided iterator.

Request

NameType
iterator request<NetworkConfigIterator>

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

NameType
id NetworkIdentifier

Response

NameType
status fuchsia.wlan.common/RequestStatus

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. When all scan results have been handled, GetNext will return an empty vector and the channel will be closed. If an error is encountered during the scan, it will be returned after all scan results have been retrieved.

Request

NameType

Response

NameType
result ScanResultIterator_GetNext_Result

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

NameType

Response

NameType
configs vector<NetworkConfig>

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

NameType
summary ClientStateSummary

Response

NameType

STRUCTS

ClientController_SaveNetwork_Response

generated

NameTypeDescriptionDefault

ClientController_RemoveNetwork_Response

generated

NameTypeDescriptionDefault

ScanResultIterator_GetNext_Response

generated

NameTypeDescriptionDefault
scan_results vector<ScanResult> No default

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.

NameTypeDescriptionDefault
ssid vector<uint8>[32] 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

Empty

Defined in fuchsia.wlan.policy/types.fidl

Empty struct used in place of optional values.

NameTypeDescriptionDefault

ENUMS

ConnectivityMode

Type: uint32

Defined in fuchsia.wlan.policy/access_point_provider.fidl

Connectivity operating mode for the access point.

NameValueDescription
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).

OperatingState

Type: uint32

Defined in fuchsia.wlan.policy/access_point_provider.fidl

Current detailed operating state for an access point.

NameValueDescription
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.

ScanErrorCode

Type: uint32

Defined in fuchsia.wlan.policy/client_provider.fidl

Wlan scan error codes.

NameValueDescription
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.

WlanClientState

Type: uint32

Defined in fuchsia.wlan.policy/client_provider.fidl

Wlan operating state for client connections

NameValueDescription
CONNECTIONS_DISABLED 1
CONNECTIONS_ENABLED 2

Compatibility

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.

NameValueDescription
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.

NetworkConfigChangeError

Type: uint32

Defined in fuchsia.wlan.policy/client_provider.fidl

Potential error cases for saving and removing network configurations. This is intentionally sparse and will be expanded as use cases develop.

NameValueDescription
GENERAL_ERROR 1

ConnectionState

Type: uint32

Defined in fuchsia.wlan.policy/client_provider.fidl

Connection states used to update registered wlan observers.

NameValueDescription
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.

DisconnectStatus

Type: uint32

Defined in fuchsia.wlan.policy/client_provider.fidl

Disconnect and connection attempt failure status codes

NameValueDescription
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.

SecurityType

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.

NameValueDescription
NONE 1
WEP 2
WPA 3
WPA2 4
WPA3 5

OperatingBand

Type: uint32

Defined in fuchsia.wlan.policy/types.fidl

Operating band for wlan control request and status updates.

NameValueDescription
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.

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.

OrdinalNameTypeDescription
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

ConnectedClientInformation

Defined in fuchsia.wlan.policy/access_point_provider.fidl

Connected client information. This is initially limited to the number of connected clients.

OrdinalNameTypeDescription
1 count uint8 Number of connected clients

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.

OrdinalNameTypeDescription
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.

Bss

Defined in fuchsia.wlan.policy/client_provider.fidl

Information for a particular ScanResult entry.

OrdinalNameTypeDescription
1 bssid uint8[6] 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 int64 Realtime timestamp for this scan result entry.

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.

OrdinalNameTypeDescription
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.

NetworkState

Defined in fuchsia.wlan.policy/client_provider.fidl

Information about current network connections and attempts.

OrdinalNameTypeDescription
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

NetworkConfig

Defined in fuchsia.wlan.policy/types.fidl

Network information used to establish a connection.

OrdinalNameTypeDescription
1 id NetworkIdentifier Identifier used to represent a specific network. No guarantee for uniqueness.
2 credential Credential Information needed to join a network.

UNIONS

ClientController_SaveNetwork_Result

generated

NameTypeDescription
response ClientController_SaveNetwork_Response
err NetworkConfigChangeError

ClientController_RemoveNetwork_Result

generated

NameTypeDescription
response ClientController_RemoveNetwork_Response
err NetworkConfigChangeError

ScanResultIterator_GetNext_Result

generated

NameTypeDescription
response ScanResultIterator_GetNext_Response
err ScanErrorCode

XUNIONS

Credential

Defined in fuchsia.wlan.policy/types.fidl

Information used to verify access to a target network.

NameTypeDescription
none Empty The network does not use credentials (open networks).
password vector<uint8> Plaintext password (handled as binary data).
psk vector<uint8> Hash representation of the network passphrase (handled as binary data).