105 virtual bool connect(
const std::string& ssid,
const std::string& passwd) = 0;
111 int max_count)
const = 0;
Listener for interface events.
virtual void onEvent(EventType type)
Abstraction for interacting with the hardware Wi-Fi interface.
virtual void removeEventListener(EventListener *listener)=0
Unregisters an interface event listener.
virtual void disconnect()=0
Disconnects from the current network.
virtual ConnectionStatus getStatus()=0
Returns the current connection status.
EventType
Interface event types.
virtual bool getApInfo(NetworkDetails *info) const =0
Returns current AP information; false if not connected.
virtual bool startScan()=0
Starts a scan.
virtual void addEventListener(EventListener *listener)=0
Registers an interface event listener.
virtual bool getScanResults(std::vector< NetworkDetails > *list, int max_count) const =0
Returns scan results, up to max_count entries.
virtual ~Interface()
Virtual destructor.
virtual bool scanCompleted() const =0
Returns true if the last scan has completed.
virtual bool connect(const std::string &ssid, const std::string &passwd)=0
Connects to the specified SSID/password.
ConnectionStatus
Wi-Fi connection status.
AuthMode
Wi-Fi authentication modes.
@ WIFI_AUTH_WPA3_PSK
WPA3-PSK.
@ WIFI_AUTH_WPA2_PSK
WPA2-PSK.
@ WIFI_AUTH_UNKNOWN
Unknown.
@ WIFI_AUTH_WPA2_ENTERPRISE
WPA2-Enterprise.
@ WIFI_AUTH_WPA_PSK
WPA-PSK.
@ WIFI_AUTH_WAPI_PSK
WAPI-PSK.
@ WIFI_AUTH_WPA_WPA2_PSK
WPA/WPA2-PSK.
@ WIFI_AUTH_WPA2_WPA3_PSK
WPA2/WPA3-PSK.
CipherType
Wi-Fi cipher types.
@ WIFI_CIPHER_TYPE_UNKNOWN
Unknown.
@ WIFI_CIPHER_TYPE_WEP104
WEP104.
@ WIFI_CIPHER_TYPE_GCMP
GCMP.
@ WIFI_CIPHER_TYPE_GCMP256
GCMP-256.
@ WIFI_CIPHER_TYPE_SMS4
SMS4.
@ WIFI_CIPHER_TYPE_NONE
None.
@ WIFI_CIPHER_TYPE_TKIP
TKIP.
@ WIFI_CIPHER_TYPE_WEP40
WEP40.
@ WIFI_CIPHER_TYPE_CCMP
CCMP.
@ WIFI_CIPHER_TYPE_AES_CMAC128
AES-CMAC-128.
@ WIFI_CIPHER_TYPE_AES_GMAC128
AES-GMAC-128.
@ WIFI_CIPHER_TYPE_TKIP_CCMP
TKIP+CCMP.
@ WIFI_CIPHER_TYPE_AES_GMAC256
AES-GMAC-256.
Detailed network information reported by the interface.
uint8_t ssid[33]
SSID of AP.
int8_t rssi
Signal strength of AP.
CipherType group_cipher
Group cipher of AP.
CipherType pairwise_cipher
Pairwise cipher of AP.
uint8_t primary
Channel of AP.
AuthMode authmode
Auth mode of AP.
uint8_t bssid[6]
MAC address of AP.