Package: android.hardware.wifi.hostapd@1.0

IHostapd

interface IHostapd

Top-level object for managing SoftAPs.

Properties

ParamSizeLimits

enum ParamSizeLimits: uint32_t

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

Details
Members
SSID_MAX_LEN_IN_BYTES = 32
Max length of SSID param.
WPA2_PSK_PASSPHRASE_MIN_LEN_IN_BYTES = 8
Min length of PSK passphrase param.
WPA2_PSK_PASSPHRASE_MAX_LEN_IN_BYTES = 63
Max length of PSK passphrase param.

EncryptionType

enum EncryptionType: uint32_t

Possble Security types.

Details
Members
NONE
WPA
WPA2

Band

enum Band: uint32_t

Band to use for the SoftAp operations.When using ACS, special value |BAND_ANY| can be used to indicate that any supported band can be used.This special case is currently supported only with drivers with which offloaded ACS is used.

Details
Members
BAND_2_4_GHZ
BAND_5_GHZ
BAND_ANY

HwModeParams

struct HwModeParams {bool enable80211N; bool enable80211AC}

Parameters to control the HW mode for the interface.

Details
Members
enable80211N
Whether IEEE 802.11n(HT)is enabled or not.Note:hwMode=G(2.4 GHz)and hwMode=A(5 GHz)is used to specify the band.
enable80211AC
Whether IEEE 802.11ac(VHT)is enabled or not.Note:hw_mode=a is used to specify that 5 GHz band is used with VHT.

ChannelParams

struct ChannelParams {bool enableAcs; bool acsShouldExcludeDfs; uint32_t channel; Band band}

Parameters to control the channel selection for the interface.

Details
Members
enableAcs
Whether to enable ACS(Automatic Channel Selection)or not.The channel can be selected automatically at run time by setting this flag, which must enable the ACS survey based algorithm.
acsShouldExcludeDfs
This option can be used to exclude all DFS channels from the ACS channel list in cases where the driver supports DFS channels.
channel
Channel number(IEEE 802.11)to use for the interface.If ACS is enabled, this field is ignored.
band
Band to use for the SoftAp operations.

IfaceParams

struct IfaceParams {string ifaceName; HwModeParams hwModeParams; ChannelParams channelParams}

Parameters to use for setting up the access point interface.

Details
Members
ifaceName
Name of the interface
hwModeParams
Hw mode params for the interface
channelParams
Chanel params for the interface

NetworkParams

struct NetworkParams {Ssid ssid; bool isHidden; EncryptionType encryptionType; string pskPassphrase}

Parameters to use for setting up the access point network.

Details
Members
ssid
SSID to set for the network
isHidden
Whether the network needs to be hidden or not.
encryptionType
Key management mask for the network.
pskPassphrase
Passphrase for WPA_PSK network.

Methods

addAccessPoint

addAccessPoint (IfaceParams ifaceParams, NetworkParams nwParams)
generates (HostapdStatus status)

Adds a new access point for hostapd to control.

This should trigger the setup of an access point with the specified interface and network params.

Details
Parameters
ifaceParams
AccessPoint Params for the access point.
nwParams
Network Params for the access point.
Generates
status
Status of the operation.Possible status codes:|HostapdStatusCode.SUCCESS|, |HostapdStatusCode.FAILURE_ARGS_INVALID|, |HostapdStatusCode.FAILURE_UNKNOWN|, |HostapdStatusCode.FAILURE_IFACE_EXISTS|

removeAccessPoint

removeAccessPoint (string ifaceName)
generates (HostapdStatus status)

Removes an existing access point from hostapd.

This should bring down the access point previously setup on the interface.

Details
Parameters
ifaceName
Name of the interface.
Generates
status
Status of the operation.Possible status codes:|HostapdStatusCode.SUCCESS|, |HostapdStatusCode.FAILURE_UNKNOWN|, |HostapdStatusCode.FAILURE_IFACE_UNKNOWN|

terminate

oneway terminate ()

Terminate the service.This must de-register the service and clear all state.If this HAL supports the lazy HAL protocol, then this may trigger daemon to exit and wait to be restarted.

Details
RPC mode
oneway