fuchsia.wlan.policy

Added: 7

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

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

<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

NameType
updates 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

NameType
requests server_end<AccessPointController>
updates 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

NameType
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

NameType
id NetworkIdentifier

Response

NameType
status fuchsia.wlan.common/RequestStatus

GetSavedNetworks

Retrieve the currently saved networks using the provided iterator.

Request

NameType
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

NameType
config NetworkConfig

Response

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

Request

NameType
config NetworkConfig

Response

NameType
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

NameType
iterator server_end<ScanResultIterator>

StartClientConnections

Enables wlan to initiate connections to networks (either by autoconnecting to saved networks or acting 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). 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

NameType
status fuchsia.wlan.common/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

NameType
status fuchsia.wlan.common/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

NameType
updates 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

NameType
requests server_end<ClientController>
updates 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

NameType
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

NameType
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

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

FieldTypeDescriptionDefault
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

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

NameValueDescription
1

Denotes that the network is supported and connections can be attempted (given appropriate credentials when required).

2

The network uses a deprecated security protocol and is explicitly 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.

NameValueDescription
1

The connection attempt was terminated due to an error.

2

The network is disconnected.

3

The device is attempting a connection to a network.

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.

NameValueDescription
1

Allows for connectivity between co-located devices. Local only access points do not forward traffic to other network connections.

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

NameValueDescription
1

The requested connection attempt failed due to timeout.

2

The requested connection attempt failed due to suspected credential failure.

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

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.

NameValueDescription
1
2
3
4
6
7
8

OperatingBand strict

Type: uint32

Defined in fuchsia.wlan.policy/types.fidl

Operating band for wlan control request and status updates.

NameValueDescription
1

Allows for band switching depending on device operating mode and environment.

2

Restricted to 2.4 GHz bands only.

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.

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

2

Access point operation is starting up.

3

Access point operation is active.

ScanErrorCode strict

Type: uint32

Defined in fuchsia.wlan.policy/client_provider.fidl

Wlan scan error codes.

NameValueDescription
1

Unexpected scan error without a specific cause.

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.

NameValueDescription
1
2
3
4
5

WlanClientState strict

Type: uint32

Defined in fuchsia.wlan.policy/client_provider.fidl

Wlan operating state for client connections

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

OrdinalFieldTypeDescription
state OperatingState

Current access point operating state

mode ConnectivityMode

Requested operating connectivity mode

band OperatingBand

Access point operating band.

frequency uint32

Access point operating frequency (in MHz).

clients ConnectedClientInformation

Information about connected clients

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.

OrdinalFieldTypeDescription
bssid fuchsia.wlan.ieee80211/MacAddr

MAC address for the AP interface.

rssi int8

Calculated received signal strength for the beacon/probe response.

frequency uint32

Operating frequency for this network (in MHz).

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.

OrdinalFieldTypeDescription
state WlanClientState

State indicating whether wlan will attempt to connect to networks or not.

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.

OrdinalFieldTypeDescription
count uint8

Number of connected clients

NetworkConfig

Defined in fuchsia.wlan.policy/types.fidl

Network information used to establish a connection.

OrdinalFieldTypeDescription
id NetworkIdentifier

Identifier used to represent a specific network. No guarantee for uniqueness.

credential Credential

Information needed to join a network.

NetworkState

Defined in fuchsia.wlan.policy/client_provider.fidl

Information about current network connections and attempts.

OrdinalFieldTypeDescription
id NetworkIdentifier

Network id for the current connection (or attempt).

state ConnectionState

Current state for the connection.

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.

OrdinalFieldTypeDescription
id NetworkIdentifier

Network properties used to distinguish between networks and to group individual APs.

entries vector<Bss>

Individual access points offering the specified network.

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

OrdinalVariantTypeDescription
response ClientController_RemoveNetwork_Response
err NetworkConfigChangeError

ClientController_SaveNetwork_Result strict

Defined in fuchsia.wlan.policy/client_provider.fidl

OrdinalVariantTypeDescription
response ClientController_SaveNetwork_Response
err NetworkConfigChangeError

Credential flexible

Defined in fuchsia.wlan.policy/types.fidl

Information used to verify access to a target network.

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

ScanResultIterator_GetNext_Result strict

Defined in fuchsia.wlan.policy/client_provider.fidl

OrdinalVariantTypeDescription
response ScanResultIterator_GetNext_Response
err ScanErrorCode