RDK Documentation (Open Sourced RDK Components)
Wi-Fi HAL Data Structure

Description

Data Structures

struct  _wifi_pairedSSIDInfo
 SSID information. More...
 
struct  _wifi_radioTrafficStats
 
struct  _wifi_radioTrafficStatsMeasure
 
struct  _wifi_ssidTrafficStats
 
struct  _wifi_neighbor_ap
 
struct  _wifi_diag_ipping_setting
 
struct  _wifi_diag_ipping_result
 
struct  _wifi_sta_stats
 

Macros

#define ULONG   unsigned long
 Defines for the basic data types.
 
#define BOOL   unsigned char
 
#define CHAR   char
 
#define UCHAR   unsigned char
 
#define INT   int
 
#define UINT   unsigned int
 
#define FLOAT   float
 
#define TRUE   1
 Defines for TRUE/FALSE/ENABLE flags.
 
#define FALSE   0
 
#define ENABLE   1
 
#define RETURN_OK   0
 Defines for function returns. More...
 
#define RETURN_ERR   -1
 
#define RADIO_INDEX_1   1
 
#define RADIO_INDEX_2   2
 
#define AP_INDEX_1   1
 
#define AP_INDEX_2   2
 
#define AP_INDEX_3   3
 
#define AP_INDEX_4   4
 
#define AP_INDEX_5   5
 
#define AP_INDEX_6   6
 
#define AP_INDEX_7   7
 
#define AP_INDEX_8   8
 
#define AP_INDEX_9   9
 
#define AP_INDEX_10   10
 
#define AP_INDEX_11   11
 
#define AP_INDEX_12   12
 
#define AP_INDEX_13   13
 
#define AP_INDEX_14   14
 
#define AP_INDEX_15   15
 
#define AP_INDEX_16   16
 
#define WIFI_HAL_MAJOR_VERSION   2
 Defines for HAL version 2.0.0. More...
 
#define WIFI_HAL_MINOR_VERSION   0
 This is the minor version of the HAL.
 
#define WIFI_HAL_MAINTENANCE_VERSION   0
 This is the maintenance version of the HAL.
 

Typedefs

typedef struct _wifi_pairedSSIDInfo wifi_pairedSSIDInfo_t
 SSID information. More...
 
typedef enum _WiFiHalStatus_t WiFiHalStatus_t
 
typedef struct _wifi_radioTrafficStats wifi_radioTrafficStats_t
 
typedef struct _wifi_radioTrafficStatsMeasure wifi_radioTrafficStatsMeasure_t
 
typedef struct _wifi_ssidTrafficStats wifi_ssidTrafficStats_t
 
typedef struct _wifi_neighbor_ap wifi_neighbor_ap_t
 
typedef struct _wifi_diag_ipping_setting wifi_diag_ipping_setting_t
 
typedef struct _wifi_diag_ipping_result wifi_diag_ipping_result_t
 
typedef struct _wifi_sta_stats wifi_sta_stats_t
 

Enumerations

enum  wifiRSSILevel_t
 Enumerators for Wifi RSSI Levels. More...
 
enum  _WiFiHalStatus_t
 
enum  WIFI_HAL_FREQ_BAND
 
enum  wifiStatusCode_t
 Enumerators for Wi-Fi connection status. More...
 
enum  wifiSecurityMode_t
 Wifi Security modes. More...
 

Data Structure Documentation

◆ _wifi_pairedSSIDInfo

struct _wifi_pairedSSIDInfo

SSID information.

Structure which saves the paired SSID information.

Definition at line 119 of file wifi_client_hal.h.

Collaboration diagram for _wifi_pairedSSIDInfo:
Collaboration graph
Data Fields
CHAR ap_ssid[64] The current service set identifier in use by the neighboring WiFi SSID. The value MAY be empty for hidden SSIDs.
CHAR ap_bssid[64] [MACAddress] The BSSID (Basic Service Set ID) used for the neighboring WiFi SSID.
CHAR ap_security[64] Security of AP.
CHAR ap_passphrase[128] Passphrase of AP.
CHAR ap_wep_key[128] wep_key of AP incase of WEP security

◆ _wifi_radioTrafficStats

struct _wifi_radioTrafficStats

Definition at line 345 of file wifi_common_hal.h.

Collaboration diagram for _wifi_radioTrafficStats:
Collaboration graph
Data Fields
unsigned long radio_BytesSent The total number of bytes transmitted out of the interface, including framing characters.
unsigned long radio_BytesReceived The total number of bytes received on the interface, including framing characters.
unsigned long radio_PacketsSent The total number of packets transmitted out of the interface.
unsigned long radio_PacketsReceived The total number of packets received on the interface.
unsigned long radio_ErrorsSent The total number of outbound packets that could not be transmitted because of errors.
unsigned long radio_ErrorsReceived The total number of inbound packets that contained errors preventing them from being delivered to a higher-layer protocol.
unsigned long radio_DiscardPacketsSent The total number of outbound packets which were chosen to be discarded even though no errors had been detected to prevent their being transmitted. One possible reason for discarding such a packet could be to free up buffer space.
unsigned long radio_DiscardPacketsReceived The total number of inbound packets which were chosen to be discarded even though no errors had been detected to prevent their being delivered. One possible reason for discarding such a packet could be to free up buffer space.
unsigned long radio_PLCPErrorCount The number of packets that were received with a detected Physical Layer Convergence Protocol (PLCP) header error.
unsigned long radio_FCSErrorCount The number of packets that were received with a detected FCS error. This parameter is based on dot11FCSErrorCount from [Annex C/802.11-2012].
unsigned long radio_InvalidMACCount The number of packets that were received with a detected invalid MAC header error.
unsigned long radio_PacketsOtherReceived The number of packets that were received, but which were destined for a MAC address that is not associated with this interface.
int radio_NoiseFloor The noise floor for this radio channel where a recoverable signal can be obtained. Expressed as a signed integer in the range (-110:0). Measurement should capture all energy (in dBm) from sources other than Wi-Fi devices as well as interference from Wi-Fi devices too weak to be decoded. Measured in dBm.
unsigned long radio_ChannelUtilization Percentage of time the channel was occupied by the radio’s own activity (Activity Factor) or the activity of other radios. Channel utilization MUST cover all user traffic, management traffic, and time the radio was unavailable for CSMA activities, including DIFS intervals, etc. The metric is calculated and updated in this parameter at the end of the interval defined by "Radio Statistics Measuring Interval". The calculation of this metric MUST only use the data collected from the just completed interval. If this metric is queried before it has been updated with an initial calculation, it MUST return -1. Units in Percentage.
int radio_ActivityFactor Percentage of time that the radio was transmitting or receiving Wi-Fi packets to/from associated clients. Activity factor MUST include all traffic that deals with communication between the radio and clients associated to the radio as well as management overhead for the radio, including NAV timers, beacons, probe responses,time for receiving devices to send an ACK, SIFC intervals, etc. The metric is calculated and updated in this parameter at the end of the interval defined by "Radio Statistics Measuring Interval". The calculation of this metric MUST only use the data collected from the just completed interval. If this metric is queried before it has been updated with an initial calculation, it MUST return -1. Units in Percentage.
int radio_CarrierSenseThreshold_Exceeded Percentage of time that the radio was unable to transmit or receive Wi-Fi packets to/from associated clients due to energy detection (ED) on the channel or clear channel assessment (CCA). The metric is calculated and updated in this Parameter at the end of the interval defined by "Radio Statistics Measuring Interval". The calculation of this metric MUST only use the data collected from the just completed interval. If this metric is queried before it has been updated with an initial calculation, it MUST return -1. Units in Percentage.
int radio_RetransmissionMetirc Percentage of packets that had to be re-transmitted. Multiple re-transmissions of the same packet count as one. The metric is calculated and updated in this parameter at the end of the interval defined by "Radio Statistics Measuring Interval". The calculation of this metric MUST only use the data collected from the just completed interval. If this metric is queried before it has been updated with an initial calculation, it MUST return -1. Units in percentage.
int radio_MaximumNoiseFloorOnChannel Maximum Noise on the channel during the measuring interval. The metric is updated in this parameter at the end of the interval defined by "Radio Statistics Measuring Interval". The calculation of this metric MUST only use the data collected in the just completed interval. If this metric is queried before it has been updated with an initial calculation, it MUST return -1. Units in dBm.
int radio_MinimumNoiseFloorOnChannel Minimum Noise on the channel. The metric is updated in this Parameter at the end of the interval defined by "Radio Statistics Measuring Interval". The calculation of this metric MUST only use the data collected in the just completed interval. If this metric is queried before it has been updated with an initial calculation, it MUST return -1. Units in dBm.
int radio_MedianNoiseFloorOnChannel Median Noise on the channel during the measuring interval. The metric is updated in this parameter at the end of the interval defined by "Radio Statistics Measuring Interval". The calculation of this metric MUST only use the data collected in the just completed interval. If this metric is queried before it has been updated with an initial calculation, it MUST return -1. Units in dBm.
unsigned long radio_StatisticsStartTime The date and time at which the collection of the current set of statistics started. This time must be updated whenever the radio statistics are reset.

◆ _wifi_radioTrafficStatsMeasure

struct _wifi_radioTrafficStatsMeasure

Definition at line 372 of file wifi_common_hal.h.

Collaboration diagram for _wifi_radioTrafficStatsMeasure:
Collaboration graph
Data Fields
int radio_RadioStatisticsMeasuringRate Input //"The rate at which radio related statistics are periodically collected. Only statistics that explicitly indicate the use of this parameter MUST use the rate set in this parameter Other parameter's are assumed to collect data in real-time or nearly real-time. Default value is 30 seconds. This parameter MUST be persistent across reboots. If this parameter is changed, then use of the new rate MUST be deferred until the start of the next interval and all metrics using this rate MUST return -1 until the completion of the next full interval Units in Seconds".
int radio_RadioStatisticsMeasuringInterval Input //The interval for which radio data MUST be retained in order and at the end of which appropriate calculations are executed and reflected in the associated radio object's. Only statistics that explicitly indicate the use of this parameter MUST use the interval set in this parameter Default value is 30 minutes. This parameter MUST be persistent across reboots. If this item is modified, then all metrics leveraging this interval as well as the metrics “Total number 802.11 packet of TX” and “Total number 802.11 packet of RX“ MUST be re-initialized immediately. Additionally, the “Statistics Start Time” must be reset to the current time. Units in Seconds.

◆ _wifi_ssidTrafficStats

struct _wifi_ssidTrafficStats

Definition at line 379 of file wifi_common_hal.h.

Collaboration diagram for _wifi_ssidTrafficStats:
Collaboration graph
Data Fields
unsigned long ssid_BytesSent The total number of bytes transmitted out of the interface, including framing characters.
unsigned long ssid_BytesReceived The total number of bytes received on the interface, including framing characters.
unsigned long ssid_PacketsSent The total number of packets transmitted out of the interface.
unsigned long ssid_PacketsReceived The total number of packets received on the interface.
unsigned long ssid_RetransCount The total number of transmitted packets which were retransmissions. Two retransmissions of the same packet results in this counter incrementing by two.
unsigned long ssid_FailedRetransCount The number of packets that were not transmitted successfully due to the number of retransmission attempts exceeding an 802.11 retry limit. This parameter is based on dot11FailedCount from [802.11-2012].
unsigned long ssid_RetryCount
unsigned long ssid_MultipleRetryCount The number of packets that were successfully transmitted after more than one retransmission. This parameter is based on dot11MultipleRetryCount from [802.11-2012].
unsigned long ssid_ACKFailureCount
unsigned long ssid_AggregatedPacketCount The number of aggregated packets that were transmitted. This applies only to 802.11n and 802.11ac.
unsigned long ssid_ErrorsSent The total number of outbound packets that could not be transmitted because of errors.
unsigned long ssid_ErrorsReceived The total number of inbound packets that contained errors preventing them from being delivered to a higher-layer protocol.
unsigned long ssid_UnicastPacketsSent The total number of inbound packets that contained errors preventing them from being delivered to a higher-layer protocol.
unsigned long ssid_UnicastPacketsReceived The total number of received packets, delivered by this layer to a higher layer, which were not addressed to a multicast or broadcast address at this layer.
unsigned long ssid_DiscardedPacketsSent
unsigned long ssid_DiscardedPacketsReceived The total number of inbound packets which were chosen to be discarded even though no errors had been detected to prevent their being delivered. One possible reason for discarding such a packet could be to free up buffer space.
unsigned long ssid_MulticastPacketsSent The total number of packets that higher-level protocols requested for transmission and which were addressed to a multicast address at this layer, including those that were discarded or not sent.
unsigned long ssid_MulticastPacketsReceived The total number of received packets, delivered by this layer to a higher layer, which were addressed to a multicast address at this layer.
unsigned long ssid_BroadcastPacketsSent The total number of packets that higher-level protocols requested for transmission and which were addressed to a broadcast address at this layer, including those that were discarded or not sent.
unsigned long ssid_BroadcastPacketsRecevied The total number of packets that higher-level protocols requested for transmission and which were addressed to a broadcast address at this layer, including those that were discarded or not sent.
unsigned long ssid_UnknownPacketsReceived The total number of packets received via the interface which were discarded because of an unknown or unsupported protocol.

◆ _wifi_neighbor_ap

struct _wifi_neighbor_ap

Definition at line 409 of file wifi_common_hal.h.

Collaboration diagram for _wifi_neighbor_ap:
Collaboration graph
Data Fields
char ap_SSID[64] The current service set identifier in use by the neighboring WiFi SSID. The value MAY be empty for hidden SSIDs.
char ap_BSSID[64] [MACAddress] The BSSID used for the neighboring WiFi SSID.
char ap_Mode[64] The mode the neighboring WiFi radio is operating in. Enumeration of: AdHoc, Infrastructure.
unsigned int ap_Channel The current radio channel used by the neighboring WiFi radio.
int ap_SignalStrength An indicator of radio signal strength (RSSI) of the neighboring WiFi radio measured in dBm, as an average of the last 100 packets received.
char ap_SecurityModeEnabled[64] The type of encryption the neighboring WiFi SSID advertises. Enumeration of:None, WPA-WPA2 etc.
char ap_EncryptionMode[64] Comma-separated list of strings. The type of encryption the neighboring WiFi SSID advertises. Each list item is an enumeration of: TKIP, AES.
char ap_OperatingFrequencyBand[16] Indicates the frequency band at which the radio this SSID instance is operating. Enumeration of:2.4GHz, 5GHz.
char ap_SupportedStandards[64] Comma-separated list of strings. List items indicate which IEEE 802.11 standards this Result instance can support simultaneously, in the frequency band specified by OperatingFrequencyBand. Each list item is an enumeration of:
char ap_OperatingStandards[16] Comma-separated list of strings. Each list item MUST be a member of the list reported by theSupportedStandards parameter. List items indicate which IEEE 802.11 standard that is detected for thisResult.
char ap_OperatingChannelBandwidth[16] Indicates the bandwidth at which the channel is operating. Enumeration of:
unsigned int ap_BeaconPeriod Time interval (in ms) between transmitting beacons.
int ap_Noise Indicator of average noise strength (in dBm) received from the neighboring WiFi radio.
char ap_BasicDataTransferRates[256] Comma-separated list (maximum list length 256) of strings. Basic data transmit rates (in Mbps) for the SSID. For example, if BasicDataTransferRates is "1,2", this indicates that the SSID is operating with basic rates of 1 Mbps and 2 Mbps.
char ap_SupportedDataTransferRates[256] Comma-separated list (maximum list length 256) of strings. Data transmit rates (in Mbps) for unicast frames at which the SSID will permit a station to connect. For example, if SupportedDataTransferRates is "1,2,5.5", this indicates that the SSID will only permit connections at 1 Mbps, 2 Mbps and 5.5 Mbps.
unsigned int ap_DTIMPeriod The number of beacon intervals that elapse between transmission of Beacon frames containing a TIM element whose DTIM count field is 0. This value is transmitted in the DTIM Period field of beacon frames. [802.11-2012].
unsigned int ap_ChannelUtilization[64] Indicates the fraction of the time AP senses that the channel is in use by the neighboring AP for transmissions.

◆ _wifi_diag_ipping_setting

struct _wifi_diag_ipping_setting

Definition at line 432 of file wifi_common_hal.h.

Collaboration diagram for _wifi_diag_ipping_setting:
Collaboration graph
Data Fields
char ipping_Interface[256] The value MUST be the path name of a row in the IP.Interface table. The IP-layer interface over which the test is to be performed. This identifies the source IP address to use when performing the test. Example: Device.IP.Interface.1. If an empty string is specified, the CPE MUST use the interface as directed by its routing policy (Forwarding table entries) to determine the appropriate interface.
char ipping_Host[256] Host name or address of the host to ping. In the case where Host is specified by name, and the name resolves to more than one address, it is up to the device implementation to choose which address to use.
unsigned int ipping_NumberOfRepetitions Number of repetitions of the ping test to perform before reporting the results.
unsigned int ipping_Timeout Timeout in milliseconds for the ping test.
unsigned int ipping_DataBlockSize Size of the data block in bytes to be sent for each ping.
unsigned int ipping_DSCP DiffServ codepoint to be used for the test packets. By default the CPE SHOULD set this value to zero.

◆ _wifi_diag_ipping_result

struct _wifi_diag_ipping_result

Definition at line 443 of file wifi_common_hal.h.

Collaboration diagram for _wifi_diag_ipping_result:
Collaboration graph
Data Fields
char ipping_DiagnosticsState[64] Indicates availability of diagnostic data. Enumeration of: Complete, Error_CannotResolveHostName, Error_Internal, Error_Other.
unsigned int ipping_SuccessCount Result parameter indicating the number of successful pings (those in which a successful response was received prior to the timeout) in the most recent ping test.
unsigned int ipping_FailureCount Result parameter indicating the number of failed pings in the most recent ping test.
unsigned int ipping_AverageResponseTime Result parameter indicating the average response time in milliseconds over all repetitions with successful responses of the most recent ping test. If there were no successful responses, this value MUST be zero.
unsigned int ipping_MinimumResponseTime Result parameter indicating the minimum response time in milliseconds over all repetitions with successful responses of the most recent ping test. If there were no successful responses, this value MUST be zero.
unsigned int ipping_MaximumResponseTime Result parameter indicating the maximum response time in milliseconds over all repetitions with successful responses of the most recent ping test. If there were no successful responses, this value MUST be zero.

◆ _wifi_sta_stats

struct _wifi_sta_stats

Definition at line 455 of file wifi_common_hal.h.

Collaboration diagram for _wifi_sta_stats:
Collaboration graph
Data Fields
char sta_SSID[64] The current connected SSID name.
char sta_BSSID[64] The BSSID used for connected SSID.
char sta_BAND[16] The BAND used for connected SSID.
char sta_SecMode[64] WiFi Security Mode WPA2-PSK , WPA2-EAP etc..
char sta_Encryption[64] WiFi Encryption Type AES, TKIP, etc.
float sta_PhyRate Indicates the Physical rate (Mbps)
float sta_Noise Indicator of average noise strength (in dBm) received from the connected WiFi radio.
float sta_RSSI RSSI value in dBm.
unsigned int sta_Frequency Current Operating Frequency.
unsigned int sta_LastDataDownlinkRate

The data transmit rate in kbps that was most recently used for transmission from the access point to the end point device.

unsigned int sta_LastDataUplinkRate

The data transmit rate in kbps that was most recently used for transmission from the end point to the access point device.

unsigned int sta_Retransmissions

The number of packets that had to be re-transmitted, from the last 100 packets sent to the access point. \ Multiple re-transmissions of the same packet count as one.

Macro Definition Documentation

◆ RETURN_OK

#define RETURN_OK   0

Defines for function returns.

RETURN_OK Return value for the success case RETURN_ERR Return value for the failure case

Definition at line 218 of file wifi_common_hal.h.

◆ WIFI_HAL_MAJOR_VERSION

#define WIFI_HAL_MAJOR_VERSION   2

Defines for HAL version 2.0.0.

This is the major version of this HAL.

Definition at line 250 of file wifi_common_hal.h.

Typedef Documentation

◆ wifi_pairedSSIDInfo_t

SSID information.

Structure which saves the paired SSID information.

Enumeration Type Documentation

◆ wifiRSSILevel_t

Enumerators for Wifi RSSI Levels.

Enumerator
WIFI_RSSI_NONE 

No signal (0 bar)

WIFI_RSSI_POOR 

Poor (1 bar)

WIFI_RSSI_FAIR 

Fair (2 bars)

WIFI_RSSI_GOOD 

Good (3 bars)

WIFI_RSSI_EXCELLENT 

Excellent (4 bars)

Definition at line 257 of file wifi_common_hal.h.

◆ wifiStatusCode_t

Enumerators for Wi-Fi connection status.

Enumerator
WIFI_HAL_SUCCESS 

Successful connect/disconnect

WIFI_HAL_CONNECTING 

Attempting to connect to a Network/AP using wps or SSID selection

WIFI_HAL_DISCONNECTING 

Attempting to disconnect to a Network/AP

WIFI_HAL_ERROR_NOT_FOUND 

Device/AP not found

WIFI_HAL_ERROR_TIMEOUT_EXPIRED 

Timeout expired

WIFI_HAL_ERROR_DEV_DISCONNECT 

Failed/Error in Device/AP Disconnect

WIFI_HAL_ERROR_SSID_CHANGED 

the SSID of the network changed

WIFI_HAL_ERROR_CONNECTION_LOST 

the connection to the network was lost

WIFI_HAL_ERROR_CONNECTION_FAILED 

the connection failed for an unknown reason

WIFI_HAL_ERROR_CONNECTION_INTERRUPTED 

the connection was interrupted

WIFI_HAL_ERROR_INVALID_CREDENTIALS 

the connection failed due to invalid credentials

WIFI_HAL_UNRECOVERABLE_ERROR 

The device has encountered an unrecoverable (driver or hardware failures) errors

WIFI_HAL_ERROR_AUTH_FAILED 

the connection failed due to authentication failure

WIFI_HAL_ERROR_UNKNOWN 

Unknown/unspecified error

Definition at line 290 of file wifi_common_hal.h.

◆ wifiSecurityMode_t

Wifi Security modes.

Security modes are used to prevent the unauthorized access or damage to computers using wireless networks. Wired Equivalent Privacy (WEP), Wi-Fi Protected Access (WPA), and Wi-Fi Protected Access II (WPA2) are the primary security algorithms. WEP is the oldest and has proven to be vulnerable as more and more security flaws have been discovered. WPA improved security, but is now also considered vulnerable to intrusion. WPA2 is currently used and the most secure one.

Enumerator
WIFI_SECURITY_NONE 

No Security.

WIFI_SECURITY_WEP_64 

WEP with 64 bit encryption.

WIFI_SECURITY_WEP_128 

WEP with 128 bit encryption.

WIFI_SECURITY_WPA_PSK_TKIP 

WPA(Pre-Shared Key) with TKIP (Temporal Key Integrity Protocol) encryption.

WIFI_SECURITY_WPA_PSK_AES 

WPA(Pre-Shared Key) with AES (Advanced Encryption Standard) encryption.

WIFI_SECURITY_WPA2_PSK_TKIP 

WPA2(Pre-Shared Key) with TKIP (Temporal Key Integrity Protocol) encryption.

WIFI_SECURITY_WPA2_PSK_AES 

WPA2(Pre-Shared Key) with AES (Advanced Encryption Standard) encryption.

WIFI_SECURITY_WPA_ENTERPRISE_TKIP 

WPA Enterprise with TKIP (Temporal Key Integrity Protocol) encryption.

WIFI_SECURITY_WPA_ENTERPRISE_AES 

WPA Enterprise with AES (Advanced Encryption Standard) encryption.

WIFI_SECURITY_WPA2_ENTERPRISE_TKIP 

WPA2 Enterprise with TKIP (Temporal Key Integrity Protocol) encryption.

WIFI_SECURITY_WPA2_ENTERPRISE_AES 

WPA2 Enterprise with AES (Advanced Encryption Standard) encryption.

WIFI_SECURITY_WPA_WPA2_PSK 

WPA2(Pre-Shared Key) with TKIP AES encryption.

WIFI_SECURITY_WPA_WPA2_ENTERPRISE 

WPA,WPA2 Enterprise with TKIP AES encryption.

WIFI_SECURITY_WPA3_PSK_AES 

WPA3(Pre-Shared Key) with AES encryption.

WIFI_SECURITY_WPA3_SAE 

WPA3 with SAE encryption.

WIFI_SECURITY_NOT_SUPPORTED 

Security mode not supported.

Definition at line 320 of file wifi_common_hal.h.