Package: android.hardware.wifi.supplicant@1.0

ISupplicantIface

interface ISupplicantIface

Interface exposed by the supplicant for each network interface(e.g wlan0)it controls.

Properties

ParamSizeLimits

enum ParamSizeLimits: uint32_t

Size limits for some of the params used in this interface.

Details
Members
WPS_DEVICE_NAME_MAX_LEN = 32
WPS_MANUFACTURER_MAX_LEN = 64
WPS_MODEL_NAME_MAX_LEN = 32
WPS_MODEL_NUMBER_MAX_LEN = 32
WPS_SERIAL_NUMBER_MAX_LEN = 32

Methods

getName

getName ()
generates (SupplicantStatus status, string name)

Retrieves the name of the network interface.

Details
Generates
status
Status of the operation.Possible status codes:|SupplicantStatusCode.SUCCESS|, |SupplicantStatusCode.FAILURE_IFACE_INVALID|
name
Name of the network interface, e.g ., wlan0

getType

getType ()
generates (SupplicantStatus status, IfaceType type)

Retrieves the type of the network interface.

Details
Generates
status
Status of the operation.Possible status codes:|SupplicantStatusCode.SUCCESS|, |SupplicantStatusCode.FAILURE_IFACE_INVALID|
type
Type of the network interface, e.g ., STA.

addNetwork

addNetwork ()
generates (SupplicantStatus status, ISupplicantNetwork network)

Add a new network to the interface.

Details
Generates
status
Status of the operation.Possible status codes:|SupplicantStatusCode.SUCCESS|, |SupplicantStatusCode.FAILURE_UNKNOWN|, |SupplicantStatusCode.FAILURE_IFACE_INVALID|
network
HIDL interface object representing the new network if successful, null otherwise.

removeNetwork

removeNetwork (SupplicantNetworkId id)
generates (SupplicantStatus status)

Remove a network from the interface.

Use |ISupplicantNetwork.getId() | on the corresponding network HIDL interface object to retrieve the ID.

Details
Parameters
id
Network ID allocated to the corresponding network.
Generates
status
Status of the operation.Possible status codes:|SupplicantStatusCode.SUCCESS|, |SupplicantStatusCode.FAILURE_UNKNOWN|, |SupplicantStatusCode.FAILURE_IFACE_INVALID|, |SupplicantStatusCode.FAILURE_NETWORK_UNKNOWN|

getNetwork

getNetwork (SupplicantNetworkId id)
generates (SupplicantStatus status, ISupplicantNetwork network)

Gets a HIDL interface object for the network corresponding to the |SupplicantNetworkId|.

Use |ISupplicantNetwork.getId() | on the corresponding network HIDL interface object to retrieve the ID.

Details
Parameters
id
Network ID allocated to the corresponding network.
Generates
status
Status of the operation.Possible status codes:|SupplicantStatusCode.SUCCESS|, |SupplicantStatusCode.FAILURE_UNKNOWN|, |SupplicantStatusCode.FAILURE_IFACE_INVALID|, |SupplicantStatusCode.FAILURE_NETWORK_UNKNOWN|
network
HIDL interface object representing the new network if successful, null otherwise.

listNetworks

listNetworks ()
generates (SupplicantStatus status, vec<SupplicantNetworkId> networkIds)

Retrieve a list of all the network Id's controlled by the supplicant.

The corresponding |ISupplicantNetwork| object for any network can be retrieved using |getNetwork| method.

Details
Generates
status
Status of the operation.Possible status codes:|SupplicantStatusCode.SUCCESS|, |SupplicantStatusCode.FAILURE_IFACE_INVALID|, |SupplicantStatusCode.FAILURE_UNKNOWN|
networkIds
List of all network Id's controlled by the supplicant.

setWpsDeviceName

setWpsDeviceName (string name)
generates (SupplicantStatus status)

Set the device name for WPS operations.User-friendly description of device(up to |WPS_DEVICE_NAME_MAX_LEN| octets encoded in UTF-8).

Details
Parameters
name
Name to be set.
Generates
status
Status of the operation.Possible status codes:|SupplicantStatusCode.SUCCESS|, |SupplicantStatusCode.FAILURE_IFACE_INVALID|, |SupplicantStatusCode.FAILURE_UNKNOWN|

setWpsDeviceType

setWpsDeviceType (uint8_t[8] type)
generates (SupplicantStatus status)

Set the device type for WPS operations.

Details
Parameters
type
Type of device.Refer to section B.1 of Wifi P2P Technical specification v1.2.
Generates
status
Status of the operation.Possible status codes:|SupplicantStatusCode.SUCCESS|, |SupplicantStatusCode.FAILURE_IFACE_INVALID|, |SupplicantStatusCode.FAILURE_UNKNOWN|

setWpsManufacturer

setWpsManufacturer (string manufacturer)
generates (SupplicantStatus status)

Set the manufacturer for WPS operations.The manufacturer of the device(up to |WPS_MANUFACTURER_MAX_LEN| ASCII characters).

Details
Parameters
manufacturer
Manufacture to be set.
Generates
status
Status of the operation.Possible status codes:|SupplicantStatusCode.SUCCESS|, |SupplicantStatusCode.FAILURE_IFACE_INVALID|, |SupplicantStatusCode.FAILURE_UNKNOWN|

setWpsModelName

setWpsModelName (string modelName)
generates (SupplicantStatus status)

Set the model name for WPS operations.Model of the device(up to |WPS_MODEL_NAME_MAX_LEN| ASCII characters).

Details
Parameters
modelName
Model name to be set.
Generates
status
Status of the operation.Possible status codes:|SupplicantStatusCode.SUCCESS|, |SupplicantStatusCode.FAILURE_IFACE_INVALID|, |SupplicantStatusCode.FAILURE_UNKNOWN|

setWpsModelNumber

setWpsModelNumber (string modelNumber)
generates (SupplicantStatus status)

Set the model number for WPS operations.Additional device description(up to |WPS_MODEL_NUMBER_MAX_LEN| ASCII characters).

Details
Parameters
modelNumber
Model number to be set.
Generates
status
Status of the operation.Possible status codes:|SupplicantStatusCode.SUCCESS|, |SupplicantStatusCode.FAILURE_IFACE_INVALID|, |SupplicantStatusCode.FAILURE_UNKNOWN|

setWpsSerialNumber

setWpsSerialNumber (string serialNumber)
generates (SupplicantStatus status)

Set the serial number for WPS operations.Serial number of the device(up to |WPS_SERIAL_NUMBER_MAX_LEN| characters)

Details
Parameters
serialNumber
Serial number to be set.
Generates
status
Status of the operation.Possible status codes:|SupplicantStatusCode.SUCCESS|, |SupplicantStatusCode.FAILURE_IFACE_INVALID|, |SupplicantStatusCode.FAILURE_UNKNOWN|

setWpsConfigMethods

setWpsConfigMethods (bitfield<WpsConfigMethods> configMethods)
generates (SupplicantStatus status)

Set the list of supported config methods for WPS operations.

Details
Parameters
configMethods
Mask of WPS configuration methods supported by the device.
Generates
status
Status of the operation.Possible status codes:|SupplicantStatusCode.SUCCESS|, |SupplicantStatusCode.FAILURE_IFACE_INVALID|, |SupplicantStatusCode.FAILURE_UNKNOWN|