import { CaptivePortalState, IpConfiguration, UnifiedNetworkEventData, Status } from './NetCommon'; /** * @brief Enum to describe authentication modes. */ export declare enum AuthMode { /** Open authentication with open security (no security). */ OPEN = 0, /** Open or Shared Key authentication with Wired Equivalent Privacy (WEP).*/ WEP = 1, /** Authentication with Wi-Fi Protected Access (WPA). */ WPA = 2, /** Authentication with Wi-Fi Protected Access 2 (WPA2). */ WPA2 = 3, /** Authentication with Wi-Fi Protected Access 3 (WPA3). */ WPA3 = 4, /** Opportunistic Wireless Encryption (OWE) authentication type. */ OWE = 5, /** Unknown authentication. */ UNKNOWN = 6 } /** * @brief Enum to describe the status of {@link Profile}. */ export declare enum ConfigStatus { /** {@link Profile} is enabled and currently being used. */ CURRENT = 0, /** {@link Profile} is disabled. */ DISABLED = 1, /** {@link Profile} is enabled. */ ENABLED = 2, /** {@link Profile} is updated. */ UPDATED = 3 } /** * @brief Enum to describe disconnect reasons. */ export declare enum DisconnectReason { /** A connection attempt was unsuccessful at the association phrase. */ ASSOC_FAILURE = 0, /** A connection attempt was unsuccessful at the authentication phrase. */ AUTH_FAILURE = 1, /** Unable to obtain IP address. */ IP_FAILURE = 2, /** A disconnect request was generated locally. */ LOCALLY_GENERATED = 3, /** Interface is disabled. */ INTERFACE_DISABLED = 4, /** Undefined reason. */ UNDEFINED = 5 } /** * @brief Enum to describe Wi-Fi Key Managements. */ export declare enum KeyManagement { /** Unknown key management. */ NONE = 0, /** Wired Equivalent Privacy (WEP). */ WEP = 1, /** Wi-Fi Protected Access (WPA) Pre-Shared Key. */ WPAPSK = 2, /** Wi-Fi Protected Access 2 (WPA2) Pre-Shared Key. */ WPA2PSK = 3, /** Extensible Authentication Protocol (EAP). */ WPAEAP = 4, /** Wi-Fi Protected Access 3 (WPA3). */ WPA3 = 5 } /** * @brief Enum to describe Standard. */ export declare enum Standard { /** Unknown */ UNKNOWN = 0, /** 802.11a. */ STANDARD_11A = 1, /** 802.11b. */ STANDARD_11B = 2, /** 802.11g. */ STANDARD_11G = 3, /** 802.11n. */ STANDARD_11N = 4, /** 802.11ac. */ STANDARD_11AC = 5, /** 802.11ax. */ STANDARD_11AX = 6 } export interface Profile { /** Service Set Identifier (SSID). */ ssid: string; /** Pre-Shared Key (PSK). */ psk?: string; /** Simultaneous Authentication of Equals (SAE) password. */ saePassword?: string; /** the Wired Equivalent Privacy (WEP) keys. */ wepKeys?: Array; /** Index of the Wired Equivalent Privacy (WEP) keys. */ wepKeyIndex?: number; /** Authentication mode. */ authMode?: AuthMode; /** Hidden SSID. */ hiddenSsid?: boolean; /** Configuration status. */ configStatus?: ConfigStatus; /** tethered mode. */ tethered?: boolean; /** IP configuration. */ ipConfig?: IpConfiguration; /** Priority. */ priority?: number; } /** * @brief Represents an access point discovered while scanning. */ export interface ScanResultItem { /** Service Set Identifier (SSID). */ ssid: string; bssid?: string; /** Get authentication or security information. */ authMode: AuthMode; /** Received Signal Strength Indicator (RSSI) in dBm. */ rssi: number; frequency?: number; timestamp?: number; /** Key managements. */ keyManagements?: Array; } /** * @brief Represents an access point discovered during scanning. */ export interface ConnectionInfo { /** Basic Service Set Identifier (BSSID). */ bssid: string; /** Service Set Identifier (SSID). */ ssid: string; /** Authentication mode. */ authMode: AuthMode; /** IPv4 address. */ ipv4Address?: string; /** IPv6 address. */ ipv6Addresses?: Array; /** The center frequency. */ frequency?: number; } /** * @brief Represents a Wi-Fi statistics information. */ export interface StatisticsInfo { /** Received Signal Strength Indicator (RSSI) in dBm. */ rssi: number; /** the noise level in dBm */ noise: number; /** Number of TX success. */ txSuccess: number; /** Number of TX retries. */ txRetry: number; /** Number of TX failures. */ txFail: number; /** Number of RX success. */ rxSuccess: number; /** Number of RX retries. */ rxCrc: number; /** Number of RX failures. */ rxMic: number; } /** @hidden */ export interface RetScanResults { status: Status; list: Array; } /** @hidden */ export interface RetProfiles { status: Status; list?: Array; } /** @hidden */ export interface RetConnectionInfo { status: Status; info?: ConnectionInfo; } /** @hidden */ export interface RetStatisticsInfo { rssi?: string; noise?: string; txSuccess?: string; txRetry?: string; txFail?: string; rxSuccess?: string; rxCrc?: string; rxMic?: string; status: Status; } /** @hidden */ export interface WiFiEvent { id: string; captivePortalState?: CaptivePortalState; reason?: DisconnectReason; } /** * @brief Provide extra data for unified network event from Wi-Fi interface. * This is available for following unified network events. * - {@link UnifiedNetworkState.CONNECTED} from Wi-Fi interface * - {@link UnifiedNetworkState.BAD_PASSWORD} * - {@link UnifiedNetworkState.SHORT_DISCONNECT} * - {@link UnifiedNetworkState.LONG_DISCONNECT} */ export interface UnifiedWifiNetworkEventData extends UnifiedNetworkEventData { /** the SSID of current Wi-Fi network */ ssid: string; /** the authentication method of current Wi-Fi network */ authMode: AuthMode; /** * indicates if SSID is changed. * This value is only valid for following events. * - {@link UnifiedNetworkState.SHORT_DISCONNECT} * - {@link UnifiedNetworkState.LONG_DISCONNECT} */ ssidChanged?: boolean; }