Package: android.hardware.wifi.supplicant@1.0

ISupplicantP2pIfaceCallback

interface ISupplicantP2pIfaceCallback

Callback Interface exposed by the supplicant service for each P2P mode interface(ISupplicantP2pIface).

Clients need to host an instance of this HIDL interface object and pass a reference of the object to the supplicant via the corresponding |ISupplicantP2pIface.registerCallback| method.

Properties

WpsDevPasswordId

enum WpsDevPasswordId: uint16_t

WPS Device Password ID

Details
Members
DEFAULT = 0x0000
USER_SPECIFIED = 0x0001
MACHINE_SPECIFIED = 0x0002
REKEY = 0x0003
PUSHBUTTON = 0x0004
REGISTRAR_SPECIFIED = 0x0005
NFC_CONNECTION_HANDOVER = 0x0007
P2PS_DEFAULT = 0x0008

P2pStatusCode

enum P2pStatusCode: uint32_t

Status codes for P2P operations.

Details
Members
SUCCESS = 0
FAIL_INFO_CURRENTLY_UNAVAILABLE = 1
FAIL_INCOMPATIBLE_PARAMS = 2
FAIL_LIMIT_REACHED = 3
FAIL_INVALID_PARAMS = 4
FAIL_UNABLE_TO_ACCOMMODATE = 5
FAIL_PREV_PROTOCOL_ERROR = 6
FAIL_NO_COMMON_CHANNELS = 7
FAIL_UNKNOWN_GROUP = 8
FAIL_BOTH_GO_INTENT_15 = 9
FAIL_INCOMPATIBLE_PROV_METHOD = 10
FAIL_REJECTED_BY_USER = 11
SUCCESS_DEFERRED = 12

P2pProvDiscStatusCode

enum P2pProvDiscStatusCode: uint8_t

Status codes for P2P discovery.

Details
Members
SUCCESS = 0
TIMEOUT = 1
REJECTED = 2
TIMEOUT_JOIN = 3
INFO_UNAVAILABLE = 4

Methods

onNetworkAdded

oneway onNetworkAdded (SupplicantNetworkId id)

Used to indicate that a new network has been added.

Details
RPC mode
oneway
Parameters
id
Network ID allocated to the corresponding network.

onNetworkRemoved

oneway onNetworkRemoved (SupplicantNetworkId id)

Used to indicate that a network has been removed.

Details
RPC mode
oneway
Parameters
id
Network ID allocated to the corresponding network.

onDeviceFound

oneway onDeviceFound (MacAddress srcAddress, MacAddress p2pDeviceAddress, uint8_t[8] primaryDeviceType, string deviceName, bitfield<WpsConfigMethods> configMethods, uint8_t deviceCapabilities, bitfield<P2pGroupCapabilityMask> groupCapabilities, uint8_t[6] wfdDeviceInfo)

Used to indicate that a P2P device has been found.

Details
RPC mode
oneway
Parameters
srcAddress
MAC address of the device found.This must either be the P2P device address or the P2P interface address.
p2pDeviceAddress
P2P device address.
primaryDeviceType
Type of device.Refer to section B.1 of Wifi P2P Technical specification v1.2.
deviceName
Name of the device.
configMethods
Mask of WPS configuration methods supported by the device.
deviceCapabilities
Refer to section 4.1.4 of Wifi P2P Technical specification v1.2.
groupCapabilities
Refer to section 4.1.4 of Wifi P2P Technical specification v1.2.
wfdDeviceInfo
WFD device info as described in section 5.1.2 of WFD technical specification v1.0.0.

onDeviceLost

oneway onDeviceLost (MacAddress p2pDeviceAddress)

Used to indicate that a P2P device has been lost.

Details
RPC mode
oneway
Parameters
p2pDeviceAddress
P2P device address.

onFindStopped

oneway onFindStopped ()

Used to indicate the termination of P2P find operation.

Details
RPC mode
oneway

onGoNegotiationRequest

oneway onGoNegotiationRequest (MacAddress srcAddress, WpsDevPasswordId passwordId)

Used to indicate the reception of a P2P Group Owner negotiation request.

Details
RPC mode
oneway
Parameters
srcAddress
MAC address of the device that initiated the GO negotiation request.
passwordId
Type of password.

onGoNegotiationCompleted

oneway onGoNegotiationCompleted (P2pStatusCode status)

Used to indicate the completion of a P2P Group Owner negotiation request.

Details
RPC mode
oneway
Parameters
status
Status of the GO negotiation.

onGroupFormationSuccess

oneway onGroupFormationSuccess ()

Used to indicate a successful formation of a P2P group.

Details
RPC mode
oneway

onGroupFormationFailure

oneway onGroupFormationFailure (string failureReason)

Used to indicate a failure to form a P2P group.

Details
RPC mode
oneway
Parameters
failureReason
Failure reason string for debug purposes.

onGroupStarted

oneway onGroupStarted (string groupIfname, bool isGo, Ssid ssid, uint32_t frequency, uint8_t[32] psk, string passphrase, MacAddress goDeviceAddress, bool isPersistent)

Used to indicate the start of a P2P group.

Details
RPC mode
oneway
Parameters
groupIfname
Interface name of the group .(For ex:p2p-p2p0-1 )
isGo
Whether this device is owner of the group.
ssid
SSID of the group.
frequency
Frequency on which this group is created.
psk
PSK used to secure the group.
passphrase
PSK passphrase used to secure the group.
goDeviceAddress
MAC Address of the owner of this group.
isPersistent
Whether this group is persisted or not.

onGroupRemoved

oneway onGroupRemoved (string groupIfname, bool isGo)

Used to indicate the removal of a P2P group.

Details
RPC mode
oneway
Parameters
groupIfname
Interface name of the group .(For ex:p2p-p2p0-1 )
isGo
Whether this device is owner of the group.

onInvitationReceived

oneway onInvitationReceived (MacAddress srcAddress, MacAddress goDeviceAddress, Bssid bssid, SupplicantNetworkId persistentNetworkId, uint32_t operatingFrequency)

Used to indicate the reception of a P2P invitation.

Details
RPC mode
oneway
Parameters
srcAddress
MAC address of the device that sent the invitation.
goDeviceAddress
MAC Address of the owner of this group.
bssid
Bssid of the group.
persistentNetworkId
Persistent network Id of the group.
operatingFrequency
Frequency on which the invitation was received.

onInvitationResult

oneway onInvitationResult (Bssid bssid, P2pStatusCode status)

Used to indicate the result of the P2P invitation request.

Details
RPC mode
oneway
Parameters
bssid
Bssid of the group.
status
Status of the invitation.

onProvisionDiscoveryCompleted

oneway onProvisionDiscoveryCompleted (MacAddress p2pDeviceAddress, bool isRequest, P2pProvDiscStatusCode status, bitfield<WpsConfigMethods> configMethods, string generatedPin)

Used to indicate the completion of a P2P provision discovery request.

Details
RPC mode
oneway
Parameters
p2pDeviceAddress
P2P device address.
isRequest
Whether we received or sent the provision discovery.
status
Status of the provision discovery.
configMethods
Mask of WPS configuration methods supported.
generatedPin
8 digit pin generated.

onServiceDiscoveryResponse

oneway onServiceDiscoveryResponse (MacAddress srcAddress, uint16_t updateIndicator, vec<uint8_t> tlvs)

Used to indicate the reception of a P2P service discovery response.

Details
RPC mode
oneway
Parameters
srcAddress
MAC address of the device that sent the service discovery.
updateIndicator
Service update indicator.Refer to section 3.1.3 of Wifi P2P Technical specification v1.2.
tlvs
Refer to section 3.1.3.1 of Wifi P2P Technical specification v1.2

onStaAuthorized

oneway onStaAuthorized (MacAddress srcAddress, MacAddress p2pDeviceAddress)

Used to indicate when a STA device is connected to this device.

Details
RPC mode
oneway
Parameters
srcAddress
MAC address of the device that was authorized.
p2pDeviceAddress
P2P device address.

onStaDeauthorized

oneway onStaDeauthorized (MacAddress srcAddress, MacAddress p2pDeviceAddress)

Used to indicate when a STA device is disconnected from this device.

Details
RPC mode
oneway
Parameters
srcAddress
MAC address of the device that was deauthorized.
p2pDeviceAddress
P2P device address.