Package: android.hardware.wifi.supplicant@1.0

ISupplicantP2pIface

interface ISupplicantP2pIface extends ISupplicantIface

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

Properties

WpsProvisionMethod

enum WpsProvisionMethod: uint32_t
Details
Members
PBC
Push button method.
DISPLAY
Display pin method configuration - pin is generated and displayed on device.
KEYPAD
Keypad pin method configuration - pin is entered on device.

MiracastMode

enum MiracastMode: uint8_t

Enum describing the modes of Miracast supported via driver commands.

Details
Members
DISABLED = 0
SOURCE = 1
Operating as source.
SINK = 2
Operating as sink.

FreqRange

struct FreqRange {uint32_t min; uint32_t max}

Use to specify a range of frequencies.For example:2412-2432, 2462, 5000-6000, etc.

Details
Members
min
max

Methods

registerCallback

registerCallback (ISupplicantP2pIfaceCallback callback)
generates (SupplicantStatus status)

Register for callbacks from this interface.

These callbacks are invoked for events that are specific to this interface.Registration of multiple callback objects is supported.These objects must be automatically deleted when the corresponding client process is dead or if this interface is removed.

Details
Parameters
callback
An instance of the |ISupplicantP2pIfaceCallback| HIDL interface object.
Generates
status
Status of the operation.Possible status codes:|SupplicantStatusCode.SUCCESS|, |SupplicantStatusCode.FAILURE_UNKNOWN|, |SupplicantStatusCode.FAILURE_IFACE_INVALID|

getDeviceAddress

getDeviceAddress ()
generates (SupplicantStatus status, MacAddress deviceAddress)

Gets the MAC address of the device.

Details
Generates
status
Status of the operation.Possible status codes:|SupplicantStatusCode.SUCCESS|, |SupplicantStatusCode.FAILURE_UNKNOWN|, |SupplicantStatusCode.FAILURE_IFACE_INVALID|
deviceAddress
MAC address of the device.

setSsidPostfix

setSsidPostfix (vec<uint8_t> postfix)
generates (SupplicantStatus status)

Set the postfix to be used for P2P SSID's.

Details
Parameters
postfix
String to be appended to SSID.
Generates
status
Status of the operation.Possible status codes:|SupplicantStatusCode.SUCCESS|, |SupplicantStatusCode.FAILURE_ARGS_INVALID|, |SupplicantStatusCode.FAILURE_UNKNOWN|, |SupplicantStatusCode.FAILURE_IFACE_INVALID|

setGroupIdle

setGroupIdle (string groupIfName, uint32_t timeoutInSec)
generates (SupplicantStatus status)

Set the Maximum idle time in seconds for P2P groups.This value controls how long a P2P group is maintained after there is no other members in the group.As a group owner, this means no associated stations in the group.As a P2P client, this means no group owner seen in scan results.

Details
Parameters
groupIfName
Group interface name to use.
timeoutInSec
Timeout value in seconds.
Generates
status
Status of the operation.Possible status codes:|SupplicantStatusCode.SUCCESS|, |SupplicantStatusCode.FAILURE_UNKNOWN|, |SupplicantStatusCode.FAILURE_IFACE_INVALID|

setPowerSave

setPowerSave (string groupIfName, bool enable)
generates (SupplicantStatus status)

Turn on/off power save mode for the interface.

Details
Parameters
groupIfName
Group interface name to use.
enable
Indicate if power save is to be turned on/off.
Generates
status
Status of the operation.Possible status codes:|SupplicantStatusCode.SUCCESS|, |SupplicantStatusCode.FAILURE_UNKNOWN|, |SupplicantStatusCode.FAILURE_IFACE_INVALID|, |SupplicantStatusCode.FAILURE_IFACE_DISABLED|

find

find (uint32_t timeoutInSec)
generates (SupplicantStatus status)

Initiate a P2P service discovery with an optional timeout.

Details
Parameters
timeoutInSec
Max time to be spent is peforming discovery.Set to 0 to indefinely continue discovery untill and explicit |stopFind| is sent.
Generates
status
Status of the operation.Possible status codes:|SupplicantStatusCode.SUCCESS|, |SupplicantStatusCode.FAILURE_UNKNOWN|, |SupplicantStatusCode.FAILURE_IFACE_INVALID| |SupplicantStatusCode.FAILURE_IFACE_DISABLED|

stopFind

stopFind ()
generates (SupplicantStatus status)

Stop an ongoing P2P service discovery.

Details
Generates
status
Status of the operation.Possible status codes:|SupplicantStatusCode.SUCCESS|, |SupplicantStatusCode.FAILURE_UNKNOWN|, |SupplicantStatusCode.FAILURE_IFACE_INVALID| |SupplicantStatusCode.FAILURE_IFACE_DISABLED|

flush

flush ()
generates (SupplicantStatus status)

Flush P2P peer table and state.

Details
Generates
status
Status of the operation.Possible status codes:|SupplicantStatusCode.SUCCESS|, |SupplicantStatusCode.FAILURE_UNKNOWN|, |SupplicantStatusCode.FAILURE_IFACE_INVALID|

connect

connect (MacAddress peerAddress, WpsProvisionMethod provisionMethod, string preSelectedPin, bool joinExistingGroup, bool persistent, uint32_t goIntent)
generates (SupplicantStatus status, string generatedPin)

Start P2P group formation with a discovered P2P peer.This includes optional group owner negotiation, group interface setup, provisioning, and establishing data connection.

Details
Parameters
peerAddress
MAC address of the device to connect to.
provisionMethod
Provisioning method to use.
preSelectedPin
Pin to be used, if |provisionMethod| uses one of the preselected |PIN*| methods.
joinExistingGroup
Indicates that this is a command to join an existing group as a client.It skips the group owner negotiation part.This must send a Provision Discovery Request message to the target group owner before associating for WPS provisioning.
persistent
Used to request a persistent group to be formed.
goIntent
Used to override the default Intent for this group owner negotiation(Values from 1-15). Refer to section 4.1.6 in Wi-Fi Peer-to-Peer(P2P)Technical Specification Version 1.7.
Generates
status
Status of the operation.Possible status codes:|SupplicantStatusCode.SUCCESS|, |SupplicantStatusCode.FAILURE_ARGS_INVALID|, |SupplicantStatusCode.FAILURE_UNKNOWN|, |SupplicantStatusCode.FAILURE_IFACE_INVALID|
generatedPin
Pin generated, if |provisionMethod| uses one of the generated |PIN*| methods.

cancelConnect

cancelConnect ()
generates (SupplicantStatus status)

Cancel an ongoing P2P group formation and joining-a-group related operation.This operation unauthorizes the specific peer device(if any had been authorized to start group formation), stops P2P find(if in progress), stops pending operations for join-a-group, and removes the P2P group interface(if one was used)that is in the WPS provisioning step.If the WPS provisioning step has been completed, the group is not terminated.

Details
Generates
status
Status of the operation.Possible status codes:|SupplicantStatusCode.SUCCESS|, |SupplicantStatusCode.FAILURE_NOT_STARTED|, |SupplicantStatusCode.FAILURE_UNKNOWN|, |SupplicantStatusCode.FAILURE_IFACE_INVALID|

provisionDiscovery

provisionDiscovery (MacAddress peerAddress, WpsProvisionMethod provisionMethod)
generates (SupplicantStatus status)

Send P2P provision discovery request to the specified peer.The parameters for this command are the P2P device address of the peer and the desired configuration method.

Details
Parameters
peerAddress
MAC address of the device to send discovery.
provisionMethod
Provisioning method to use.
Generates
status
Status of the operation.Possible status codes:|SupplicantStatusCode.SUCCESS|, |SupplicantStatusCode.FAILURE_UNKNOWN|, |SupplicantStatusCode.FAILURE_IFACE_INVALID|

addGroup

addGroup (bool persistent, SupplicantNetworkId persistentNetworkId)
generates (SupplicantStatus status)

Set up a P2P group owner manually(i.e ., without group owner negotiation with a specific peer). This is also known as autonomous group owner.Optional |persistentNetworkId| may be used to specify restart of a persistent group.

Details
Parameters
persistent
Used to request a persistent group to be formed.
persistentNetworkId
Used to specify the restart of a persistent group.Set to UINT32_MAX for a non-persistent group.
Generates
status
Status of the operation.Possible status codes:|SupplicantStatusCode.SUCCESS|, |SupplicantStatusCode.FAILURE_UNKNOWN|, |SupplicantStatusCode.FAILURE_IFACE_INVALID|

removeGroup

removeGroup (string groupIfName)
generates (SupplicantStatus status)

Terminate a P2P group.If a new virtual network interface was used for the group, it must also be removed.The network interface name of the group interface is used as a parameter for this command.

Details
Parameters
groupIfName
Group interface name to use.
Generates
status
Status of the operation.Possible status codes:|SupplicantStatusCode.SUCCESS|, |SupplicantStatusCode.FAILURE_UNKNOWN|, |SupplicantStatusCode.FAILURE_IFACE_INVALID|

reject

reject (MacAddress peerAddress)
generates (SupplicantStatus status)

Reject connection attempt from a peer(specified with a device address). This is a mechanism to reject a pending group owner negotiation with a peer and request to automatically block any further connection or discovery of the peer.

Details
Parameters
peerAddress
MAC address of the device to reject.
Generates
status
Status of the operation.Possible status codes:|SupplicantStatusCode.SUCCESS|, |SupplicantStatusCode.FAILURE_UNKNOWN|, |SupplicantStatusCode.FAILURE_IFACE_INVALID| |SupplicantStatusCode.FAILURE_IFACE_DISABLED|

invite

invite (string groupIfName, MacAddress goDeviceAddress, MacAddress peerAddress)
generates (SupplicantStatus status)

Invite a device to a persistent group.If the peer device is the group owner of the persistent group, the peer parameter is not needed.Otherwise it is used to specify which device to invite.|goDeviceAddress| parameter may be used to override the group owner device address for Invitation Request should it not be known for some reason(this should not be needed in most cases).

Details
Parameters
groupIfName
Group interface name to use.
goDeviceAddress
MAC address of the group owner device.
peerAddress
MAC address of the device to invite.
Generates
status
Status of the operation.Possible status codes:|SupplicantStatusCode.SUCCESS|, |SupplicantStatusCode.FAILURE_UNKNOWN|, |SupplicantStatusCode.FAILURE_IFACE_INVALID|

reinvoke

reinvoke (SupplicantNetworkId persistentNetworkId, MacAddress peerAddress)
generates (SupplicantStatus status)

Reinvoke a device from a persistent group.

Details
Parameters
persistentNetworkId
Used to specify the persistent group.
peerAddress
MAC address of the device to reinvoke.
Generates
status
Status of the operation.Possible status codes:|SupplicantStatusCode.SUCCESS|, |SupplicantStatusCode.FAILURE_UNKNOWN|, |SupplicantStatusCode.FAILURE_IFACE_INVALID|

configureExtListen

configureExtListen (uint32_t periodInMillis, uint32_t intervalInMillis)
generates (SupplicantStatus status)

Configure Extended Listen Timing.

If enabled, listen state must be entered every |intervalInMillis| for at least |periodInMillis|.Both values have acceptable range of 1-65535(with interval obviously having to be larger than or equal to duration). If the P2P module is not idle at the time the Extended Listen Timing timeout occurs, the Listen State operation must be skipped.

Details
Parameters
periodInMillis
Period in milliseconds.
intervalInMillis
Interval in milliseconds.
Generates
status
Status of the operation.Possible status codes:|SupplicantStatusCode.SUCCESS|, |SupplicantStatusCode.FAILURE_ARGS_INVALID|, |SupplicantStatusCode.FAILURE_UNKNOWN|, |SupplicantStatusCode.FAILURE_IFACE_INVALID|

setListenChannel

setListenChannel (uint32_t channel, uint32_t operatingClass)
generates (SupplicantStatus status)

Set P2P Listen channel.

When specifying a social channel on the 2.4 GHz band(1/6/11)there is no need to specify the operating class since it defaults to 81.When specifying a social channel on the 60 GHz band(2), specify the 60 GHz operating class(180).

Details
Parameters
channel
Wifi channel.eg, 1, 6, 11.
operatingClass
Operating Class indicates the channel set of the AP indicated by this BSSID
Generates
status
Status of the operation.Possible status codes:|SupplicantStatusCode.SUCCESS|, |SupplicantStatusCode.FAILURE_UNKNOWN|, |SupplicantStatusCode.FAILURE_IFACE_INVALID|

setDisallowedFrequencies

setDisallowedFrequencies (vec<FreqRange> ranges)
generates (SupplicantStatus status)

Set P2P disallowed frequency ranges.

Specify ranges of frequencies that are disallowed for any p2p operations.

Details
Parameters
ranges
List of ranges which needs to be disallowed.
Generates
status
Status of the operation.Possible status codes:|SupplicantStatusCode.SUCCESS|, |SupplicantStatusCode.FAILURE_UNKNOWN|, |SupplicantStatusCode.FAILURE_IFACE_INVALID|

getSsid

getSsid (MacAddress peerAddress)
generates (SupplicantStatus status, Ssid ssid)

Gets the operational SSID of the device.

Details
Parameters
peerAddress
MAC address of the peer.
Generates
status
Status of the operation.Possible status codes:|SupplicantStatusCode.SUCCESS|, |SupplicantStatusCode.FAILURE_UNKNOWN|, |SupplicantStatusCode.FAILURE_IFACE_INVALID|
ssid
SSID of the device

getGroupCapability

getGroupCapability (MacAddress peerAddress)
generates (SupplicantStatus status, bitfield<P2pGroupCapabilityMask> capabilities)

Gets the capability of the group which the device is a member of.

Details
Parameters
peerAddress
MAC address of the peer.
Generates
status
Status of the operation.Possible status codes:|SupplicantStatusCode.SUCCESS|, |SupplicantStatusCode.FAILURE_UNKNOWN|, |SupplicantStatusCode.FAILURE_IFACE_INVALID|
capabilities
Mask combination of |P2pGroupCapabilityMask| values.

addBonjourService

addBonjourService (vec<uint8_t> query, vec<uint8_t> response)
generates (SupplicantStatus status)

This command can be used to add a bonjour service.

Details
Parameters
query
Hex dump of the query data.
response
Hex dump of the response data.
Generates
status
Status of the operation.Possible status codes:|SupplicantStatusCode.SUCCESS|, |SupplicantStatusCode.FAILURE_UNKNOWN|, |SupplicantStatusCode.FAILURE_IFACE_INVALID|

removeBonjourService

removeBonjourService (vec<uint8_t> query)
generates (SupplicantStatus status)

This command can be used to remove a bonjour service.

Details
Parameters
query
Hex dump of the query data.
Generates
status
Status of the operation.Possible status codes:|SupplicantStatusCode.SUCCESS|, |SupplicantStatusCode.FAILURE_UNKNOWN|, |SupplicantStatusCode.FAILURE_NOT_STARTED|, |SupplicantStatusCode.FAILURE_IFACE_INVALID|

addUpnpService

addUpnpService (uint32_t version, string serviceName)
generates (SupplicantStatus status)

This command can be used to add a UPNP service.

Details
Parameters
version
Version to be used.
serviceName
Service name to be used.
Generates
status
Status of the operation.Possible status codes:|SupplicantStatusCode.SUCCESS|, |SupplicantStatusCode.FAILURE_UNKNOWN|, |SupplicantStatusCode.FAILURE_IFACE_INVALID|

removeUpnpService

removeUpnpService (uint32_t version, string serviceName)
generates (SupplicantStatus status)

This command can be used to remove a UPNP service.

Details
Parameters
version
Version to be used.
serviceName
Service name to be used.
Generates
status
Status of the operation.Possible status codes:|SupplicantStatusCode.SUCCESS|, |SupplicantStatusCode.FAILURE_UNKNOWN|, |SupplicantStatusCode.FAILURE_NOT_STARTED|, |SupplicantStatusCode.FAILURE_IFACE_INVALID|

flushServices

flushServices ()
generates (SupplicantStatus status)

This command can be used to flush all services from the device.

Details
Generates
status
Status of the operation.Possible status codes:|SupplicantStatusCode.SUCCESS|, |SupplicantStatusCode.FAILURE_UNKNOWN|, |SupplicantStatusCode.FAILURE_IFACE_INVALID|

requestServiceDiscovery

requestServiceDiscovery (MacAddress peerAddress, vec<uint8_t> query)
generates (SupplicantStatus status, uint64_t identifier)

Schedule a P2P service discovery request.The parameters for this command are the device address of the peer device(or 00:00:00:00:00:00 for wildcard query that is sent to every discovered P2P peer that supports service discovery)and P2P Service Query TLV(s)as hexdump.

Details
Parameters
peerAddress
MAC address of the device to discover.
query
Hex dump of the query data.
Generates
status
Status of the operation.Possible status codes:|SupplicantStatusCode.SUCCESS|, |SupplicantStatusCode.FAILURE_UNKNOWN|, |SupplicantStatusCode.FAILURE_IFACE_INVALID|
identifier
Identifier for the request.Can be used to cancel the request.

cancelServiceDiscovery

cancelServiceDiscovery (uint64_t identifier)
generates (SupplicantStatus status)

Cancel a previous service discovery request.

Details
Parameters
identifier
Identifier for the request to cancel.
Generates
status
Status of the operation.Possible status codes:|SupplicantStatusCode.SUCCESS|, |SupplicantStatusCode.FAILURE_NOT_STARTED|, |SupplicantStatusCode.FAILURE_UNKNOWN|, |SupplicantStatusCode.FAILURE_IFACE_INVALID|

setMiracastMode

setMiracastMode (MiracastMode mode)
generates (SupplicantStatus status)

Send driver command to set Miracast mode.

Details
Parameters
mode
Mode of Miracast.
Generates
status
Status of the operation.Possible status codes:|SupplicantStatusCode.SUCCESS|, |SupplicantStatusCode.FAILURE_UNKNOWN|, |SupplicantStatusCode.FAILURE_IFACE_INVALID|

startWpsPbc

startWpsPbc (string groupIfName, Bssid bssid)
generates (SupplicantStatus status)

Initiate WPS Push Button setup.The PBC operation requires that a button is also pressed at the AP/Registrar at about the same time(2 minute window).

Details
Parameters
groupIfName
Group interface name to use.
bssid
BSSID of the AP.Use zero'ed bssid to indicate wildcard.
Generates
status
Status of the operation.Possible status codes:|SupplicantStatusCode.SUCCESS|, |SupplicantStatusCode.FAILURE_UNKNOWN|, |SupplicantStatusCode.FAILURE_IFACE_INVALID|

startWpsPinKeypad

startWpsPinKeypad (string groupIfName, string pin)
generates (SupplicantStatus status)

Initiate WPS Pin Keypad setup.

Details
Parameters
groupIfName
Group interface name to use.
pin
8 digit pin to be used.
Generates
status
Status of the operation.Possible status codes:|SupplicantStatusCode.SUCCESS|, |SupplicantStatusCode.FAILURE_UNKNOWN|, |SupplicantStatusCode.FAILURE_IFACE_INVALID|

startWpsPinDisplay

startWpsPinDisplay (string groupIfName, Bssid bssid)
generates (SupplicantStatus status, string generatedPin)

Initiate WPS Pin Display setup.

Details
Parameters
groupIfName
Group interface name to use.
bssid
BSSID of the AP.Use zero'ed bssid to indicate wildcard.
Generates
status
Status of the operation.Possible status codes:|SupplicantStatusCode.SUCCESS|, |SupplicantStatusCode.FAILURE_UNKNOWN|, |SupplicantStatusCode.FAILURE_IFACE_INVALID|
generatedPin
8 digit pin generated.

cancelWps

cancelWps (string groupIfName)
generates (SupplicantStatus status)

Cancel any ongoing WPS operations.

Details
Parameters
groupIfName
Group interface name to use.
Generates
status
Status of the operation.Possible status codes:|SupplicantStatusCode.SUCCESS|, |SupplicantStatusCode.FAILURE_UNKNOWN|, |SupplicantStatusCode.FAILURE_IFACE_INVALID|

enableWfd

enableWfd (bool enable)
generates (SupplicantStatus status)

Enable/Disable Wifi Display.

Details
Parameters
enable
true to enable, false to disable.
Generates
status
Status of the operation.Possible status codes:|SupplicantStatusCode.SUCCESS|, |SupplicantStatusCode.FAILURE_UNKNOWN|, |SupplicantStatusCode.FAILURE_IFACE_INVALID|

setWfdDeviceInfo

setWfdDeviceInfo (uint8_t[6] info)
generates (SupplicantStatus status)

Set Wifi Display device info.

Details
Parameters
info
WFD device info as described in section 5.1.2 of WFD technical specification v1.0.0.
Generates
status
Status of the operation.Possible status codes:|SupplicantStatusCode.SUCCESS|, |SupplicantStatusCode.FAILURE_UNKNOWN|, |SupplicantStatusCode.FAILURE_IFACE_INVALID|

createNfcHandoverRequestMessage

createNfcHandoverRequestMessage ()
generates (SupplicantStatus status, vec<uint8_t> request)

Creates a NFC handover request message.

Details
Generates
status
Status of the operation.Possible status codes:|SupplicantStatusCode.SUCCESS|, |SupplicantStatusCode.FAILURE_UNKNOWN|, |SupplicantStatusCode.FAILURE_IFACE_INVALID|
request
Bytes representing the handover request as specified in section 3.1.1 of NFC Connection Handover 1.2 Technical Specification.

createNfcHandoverSelectMessage

createNfcHandoverSelectMessage ()
generates (SupplicantStatus status, vec<uint8_t> select)

Creates a NFC handover select message.

Details
Generates
status
Status of the operation.Possible status codes:|SupplicantStatusCode.SUCCESS|, |SupplicantStatusCode.FAILURE_UNKNOWN|, |SupplicantStatusCode.FAILURE_IFACE_INVALID|
select
Bytes representing the handover select as specified in section 3.1.2 of NFC Connection Handover 1.2 Technical Specification.

reportNfcHandoverResponse

reportNfcHandoverResponse (vec<uint8_t> request)
generates (SupplicantStatus status)

Report the response of the NFC handover request.

Details
Parameters
request
Bytes representing the handover request as specified in section 3.1.1 of NFC Connection Handover 1.2 Technical Specification.
Generates
status
Status of the operation.Possible status codes:|SupplicantStatusCode.SUCCESS|, |SupplicantStatusCode.FAILURE_UNKNOWN|, |SupplicantStatusCode.FAILURE_IFACE_INVALID|

reportNfcHandoverInitiation

reportNfcHandoverInitiation (vec<uint8_t> select)
generates (SupplicantStatus status)

Report the initiation of the NFC handover select.

Details
Parameters
select
Bytes representing the handover select as specified in section 3.1.2 of NFC Connection Handover 1.2 Technical Specification.
Generates
status
Status of the operation.Possible status codes:|SupplicantStatusCode.SUCCESS|, |SupplicantStatusCode.FAILURE_UNKNOWN|, |SupplicantStatusCode.FAILURE_IFACE_INVALID|

saveConfig

saveConfig ()
generates (SupplicantStatus status)

Persist the current configuration to disk.

Details
Generates
status
Status of the operation.Possible status codes:|SupplicantStatusCode.SUCCESS|, |SupplicantStatusCode.FAILURE_UNKNOWN|, |SupplicantStatusCode.FAILURE_IFACE_INVALID|