Zephyr API Documentation 4.0.0
A Scalable Open Source RTOS
|
Wi-Fi Management API. More...
Data Structures | |
struct | wifi_cipher_desc |
struct | wifi_eap_cipher_config |
struct | wifi_eap_config |
struct | wifi_version |
Wi-Fi version. More... | |
struct | wifi_band_channel |
Wi-Fi structure to uniquely identify a band-channel pair. More... | |
struct | wifi_scan_params |
Wi-Fi scan parameters structure. More... | |
struct | wifi_scan_result |
Wi-Fi scan result, each result is provided to the net_mgmt_event_callback via its info attribute (see net_mgmt.h) More... | |
struct | wifi_connect_req_params |
Wi-Fi connect request parameters. More... | |
struct | wifi_status |
Generic Wi-Fi status for commands and events. More... | |
struct | wifi_iface_status |
Wi-Fi interface status. More... | |
struct | wifi_ps_params |
Wi-Fi power save parameters. More... | |
struct | wifi_twt_params |
Wi-Fi TWT parameters. More... | |
struct | wifi_twt_flow_info |
Wi-Fi TWT flow information. More... | |
struct | wifi_enterprise_creds_params |
Wi-Fi enterprise mode credentials. More... | |
struct | wifi_ps_config |
Wi-Fi power save configuration. More... | |
struct | wifi_11k_params |
Wi-Fi 11k parameters. More... | |
struct | wifi_reg_chan_info |
Per-channel regulatory attributes. More... | |
struct | wifi_reg_domain |
Regulatory domain information or configuration. More... | |
struct | wifi_raw_scan_result |
Wi-Fi raw scan result. More... | |
struct | wifi_ap_sta_info |
AP mode - connected STA details. More... | |
struct | wifi_mode_info |
Wi-Fi mode setup. More... | |
struct | wifi_filter_info |
Wi-Fi filter setting for monitor, prmoiscuous, TX-injection modes. More... | |
struct | wifi_channel_info |
Wi-Fi channel setting for monitor and TX-injection modes. More... | |
struct | wifi_ap_config_params |
Wi-Fi AP configuration parameter. More... | |
struct | wifi_wps_config_params |
Wi-Fi wps setup. More... | |
struct | wifi_mgmt_ops |
Wi-Fi management API. More... | |
struct | net_wifi_mgmt_offload |
Wi-Fi management offload API. More... | |
Macros | |
#define | WIFI_COUNTRY_CODE_LEN 2 |
Length of the country code string. | |
#define | WIFI_SSID_MAX_LEN 32 |
Max SSID length. | |
#define | WIFI_PSK_MIN_LEN 8 |
Minimum PSK length. | |
#define | WIFI_PSK_MAX_LEN 64 |
Maximum PSK length. | |
#define | WIFI_SAE_PSWD_MAX_LEN 128 |
Max SAW password length. | |
#define | WIFI_MAC_ADDR_LEN 6 |
MAC address length. | |
#define | WIFI_ENT_IDENTITY_MAX_LEN 64 |
Max enterprise identity length. | |
#define | WIFI_ENT_PSWD_MAX_LEN 128 |
Max enterprise password length. | |
#define | WIFI_CHANNEL_MIN 1 |
Minimum channel number. | |
#define | WIFI_CHANNEL_MAX 233 |
Maximum channel number. | |
#define | WIFI_CHANNEL_ANY 255 |
Any channel number. | |
#define | WIFI_INTERFACE_INDEX_MIN 1 |
Network interface index min value. | |
#define | WIFI_INTERFACE_INDEX_MAX 255 |
Network interface index max value. | |
#define | NET_REQUEST_WIFI_SCAN (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_SCAN) |
Request a Wi-Fi scan. | |
#define | NET_REQUEST_WIFI_CONNECT (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_CONNECT) |
Request a Wi-Fi connect. | |
#define | NET_REQUEST_WIFI_DISCONNECT (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_DISCONNECT) |
Request a Wi-Fi disconnect. | |
#define | NET_REQUEST_WIFI_AP_ENABLE (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_AP_ENABLE) |
Request a Wi-Fi access point enable. | |
#define | NET_REQUEST_WIFI_AP_DISABLE (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_AP_DISABLE) |
Request a Wi-Fi access point disable. | |
#define | NET_REQUEST_WIFI_IFACE_STATUS (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_IFACE_STATUS) |
Request a Wi-Fi network interface status. | |
#define | NET_REQUEST_WIFI_11K_CONFIG (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_11K_CONFIG) |
#define | NET_REQUEST_WIFI_11K_NEIGHBOR_REQUEST (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_11K_NEIGHBOR_REQUEST) |
#define | NET_REQUEST_WIFI_PS (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_PS) |
Request a Wi-Fi power save. | |
#define | NET_REQUEST_WIFI_TWT (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_TWT) |
Request a Wi-Fi TWT. | |
#define | NET_REQUEST_WIFI_PS_CONFIG (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_PS_CONFIG) |
Request a Wi-Fi power save configuration. | |
#define | NET_REQUEST_WIFI_REG_DOMAIN (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_REG_DOMAIN) |
Request a Wi-Fi regulatory domain. | |
#define | NET_REQUEST_WIFI_MODE (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_MODE) |
Request current Wi-Fi mode. | |
#define | NET_REQUEST_WIFI_PACKET_FILTER (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_PACKET_FILTER) |
Request Wi-Fi packet filter. | |
#define | NET_REQUEST_WIFI_CHANNEL (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_CHANNEL) |
Request a Wi-Fi channel. | |
#define | NET_REQUEST_WIFI_AP_STA_DISCONNECT (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_AP_STA_DISCONNECT) |
Request a Wi-Fi access point to disconnect a station. | |
#define | NET_REQUEST_WIFI_VERSION (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_VERSION) |
Request a Wi-Fi version. | |
#define | NET_REQUEST_WIFI_CONN_PARAMS (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_CONN_PARAMS) |
Request a Wi-Fi connection parameters. | |
#define | NET_REQUEST_WIFI_RTS_THRESHOLD (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_RTS_THRESHOLD) |
Request a Wi-Fi RTS threshold. | |
#define | NET_REQUEST_WIFI_AP_CONFIG_PARAM (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_AP_CONFIG_PARAM) |
Request a Wi-Fi AP parameters configuration. | |
#define | NET_REQUEST_WIFI_PMKSA_FLUSH (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_PMKSA_FLUSH) |
Request a Wi-Fi PMKSA cache entries flush. | |
#define | NET_REQUEST_WIFI_ENTERPRISE_CREDS (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_ENTERPRISE_CREDS) |
Set Wi-Fi enterprise mode CA/client Cert and key. | |
#define | NET_REQUEST_WIFI_RTS_THRESHOLD_CONFIG (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_RTS_THRESHOLD_CONFIG) |
Request a Wi-Fi RTS threshold configuration. | |
#define | NET_REQUEST_WIFI_WPS_CONFIG (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_WPS_CONFIG) |
#define | NET_REQUEST_WIFI_START_ROAMING (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_START_ROAMING) |
#define | NET_REQUEST_WIFI_NEIGHBOR_REP_COMPLETE (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_NEIGHBOR_REP_COMPLETE) |
#define | NET_EVENT_WIFI_SCAN_RESULT (_NET_WIFI_EVENT | NET_EVENT_WIFI_CMD_SCAN_RESULT) |
Event emitted for Wi-Fi scan result. | |
#define | NET_EVENT_WIFI_SCAN_DONE (_NET_WIFI_EVENT | NET_EVENT_WIFI_CMD_SCAN_DONE) |
Event emitted when Wi-Fi scan is done. | |
#define | NET_EVENT_WIFI_CONNECT_RESULT (_NET_WIFI_EVENT | NET_EVENT_WIFI_CMD_CONNECT_RESULT) |
Event emitted for Wi-Fi connect result. | |
#define | NET_EVENT_WIFI_DISCONNECT_RESULT (_NET_WIFI_EVENT | NET_EVENT_WIFI_CMD_DISCONNECT_RESULT) |
Event emitted for Wi-Fi disconnect result. | |
#define | NET_EVENT_WIFI_IFACE_STATUS (_NET_WIFI_EVENT | NET_EVENT_WIFI_CMD_IFACE_STATUS) |
Event emitted for Wi-Fi network interface status. | |
#define | NET_EVENT_WIFI_TWT (_NET_WIFI_EVENT | NET_EVENT_WIFI_CMD_TWT) |
Event emitted for Wi-Fi TWT information. | |
#define | NET_EVENT_WIFI_TWT_SLEEP_STATE (_NET_WIFI_EVENT | NET_EVENT_WIFI_CMD_TWT_SLEEP_STATE) |
Event emitted for Wi-Fi TWT sleep state. | |
#define | NET_EVENT_WIFI_RAW_SCAN_RESULT (_NET_WIFI_EVENT | NET_EVENT_WIFI_CMD_RAW_SCAN_RESULT) |
Event emitted for Wi-Fi raw scan result. | |
#define | NET_EVENT_WIFI_DISCONNECT_COMPLETE (_NET_WIFI_EVENT | NET_EVENT_WIFI_CMD_DISCONNECT_COMPLETE) |
Event emitted Wi-Fi disconnect is completed. | |
#define | NET_EVENT_WIFI_SIGNAL_CHANGE (_NET_WIFI_EVENT | NET_EVENT_WIFI_CMD_SIGNAL_CHANGE) |
Event signal change of connected AP. | |
#define | NET_EVENT_WIFI_NEIGHBOR_REP_COMP (_NET_WIFI_EVENT | NET_EVENT_WIFI_CMD_NEIGHBOR_REP_COMPLETE) |
Event Neighbor Report Completed. | |
#define | NET_EVENT_WIFI_AP_ENABLE_RESULT (_NET_WIFI_EVENT | NET_EVENT_WIFI_CMD_AP_ENABLE_RESULT) |
Event emitted for Wi-Fi access point enable result. | |
#define | NET_EVENT_WIFI_AP_DISABLE_RESULT (_NET_WIFI_EVENT | NET_EVENT_WIFI_CMD_AP_DISABLE_RESULT) |
Event emitted for Wi-Fi access point disable result. | |
#define | NET_EVENT_WIFI_AP_STA_CONNECTED (_NET_WIFI_EVENT | NET_EVENT_WIFI_CMD_AP_STA_CONNECTED) |
Event emitted when Wi-Fi station is connected in AP mode. | |
#define | NET_EVENT_WIFI_AP_STA_DISCONNECTED (_NET_WIFI_EVENT | NET_EVENT_WIFI_CMD_AP_STA_DISCONNECTED) |
Event emitted Wi-Fi station is disconnected from AP. | |
#define | MAX_REG_CHAN_NUM 42 |
Max regulatory channel number. | |
#define | WIFI_WPS_PIN_MAX_LEN 8 |
Typedefs | |
typedef void(* | scan_result_cb_t) (struct net_if *iface, int status, struct wifi_scan_result *entry) |
Scan result callback. | |
Functions | |
const char * | wifi_security_txt (enum wifi_security_type security) |
Helper function to get user-friendly security type name. | |
const char * | wifi_mfp_txt (enum wifi_mfp_options mfp) |
Helper function to get user-friendly MFP name. | |
const char * | wifi_band_txt (enum wifi_frequency_bands band) |
Helper function to get user-friendly frequency band name. | |
const char * | wifi_state_txt (enum wifi_iface_state state) |
Helper function to get user-friendly interface state name. | |
const char * | wifi_mode_txt (enum wifi_iface_mode mode) |
Helper function to get user-friendly interface mode name. | |
const char * | wifi_link_mode_txt (enum wifi_link_mode link_mode) |
Helper function to get user-friendly link mode name. | |
const char * | wifi_ps_txt (enum wifi_ps ps_name) |
Helper function to get user-friendly ps name. | |
const char * | wifi_ps_mode_txt (enum wifi_ps_mode ps_mode) |
Helper function to get user-friendly ps mode name. | |
const char * | wifi_twt_operation_txt (enum wifi_twt_operation twt_operation) |
Helper function to get user-friendly twt operation name. | |
const char * | wifi_twt_negotiation_type_txt (enum wifi_twt_negotiation_type twt_negotiation) |
Helper function to get user-friendly twt negotiation type name. | |
const char * | wifi_twt_setup_cmd_txt (enum wifi_twt_setup_cmd twt_setup) |
Helper function to get user-friendly twt setup cmd name. | |
static const char * | wifi_twt_get_err_code_str (int16_t err_no) |
Helper function to get user-friendly TWT error code name. | |
const char * | wifi_ps_wakeup_mode_txt (enum wifi_ps_wakeup_mode ps_wakeup_mode) |
Helper function to get user-friendly ps wakeup mode name. | |
const char *const | wifi_ps_exit_strategy_txt (enum wifi_ps_exit_strategy ps_exit_strategy) |
Helper function to get user-friendly ps exit strategy name. | |
static const char * | wifi_ps_get_config_err_code_str (int16_t err_no) |
Helper function to get user-friendly power save error code name. | |
void | wifi_mgmt_raise_connect_result_event (struct net_if *iface, int status) |
Wi-Fi management connect result event. | |
void | wifi_mgmt_raise_disconnect_result_event (struct net_if *iface, int status) |
Wi-Fi management disconnect result event. | |
void | wifi_mgmt_raise_iface_status_event (struct net_if *iface, struct wifi_iface_status *iface_status) |
Wi-Fi management interface status event. | |
void | wifi_mgmt_raise_twt_event (struct net_if *iface, struct wifi_twt_params *twt_params) |
Wi-Fi management TWT event. | |
void | wifi_mgmt_raise_twt_sleep_state (struct net_if *iface, int twt_sleep_state) |
Wi-Fi management TWT sleep state event. | |
void | wifi_mgmt_raise_raw_scan_result_event (struct net_if *iface, struct wifi_raw_scan_result *raw_scan_info) |
Wi-Fi management raw scan result event. | |
void | wifi_mgmt_raise_disconnect_complete_event (struct net_if *iface, int status) |
Wi-Fi management disconnect complete event. | |
void | wifi_mgmt_raise_ap_enable_result_event (struct net_if *iface, enum wifi_ap_status status) |
Wi-Fi management AP mode enable result event. | |
void | wifi_mgmt_raise_ap_disable_result_event (struct net_if *iface, enum wifi_ap_status status) |
Wi-Fi management AP mode disable result event. | |
void | wifi_mgmt_raise_ap_sta_connected_event (struct net_if *iface, struct wifi_ap_sta_info *sta_info) |
Wi-Fi management AP mode STA connected event. | |
void | wifi_mgmt_raise_ap_sta_disconnected_event (struct net_if *iface, struct wifi_ap_sta_info *sta_info) |
Wi-Fi management AP mode STA disconnected event. | |
Wi-Fi utility functions. | |
Utility functions for the Wi-Fi subsystem. | |
int | wifi_utils_parse_scan_bands (char *scan_bands_str, uint8_t *band_map) |
Convert a band specification string to a bitmap representing the bands. | |
int | wifi_utils_parse_scan_ssids (char *scan_ssids_str, const char *ssids[], uint8_t num_ssids) |
Append a string containing an SSID to an array of SSID strings. | |
int | wifi_utils_parse_scan_chan (char *scan_chan_str, struct wifi_band_channel *chan, uint8_t max_channels) |
Convert a string containing a specification of scan channels to an array. | |
bool | wifi_utils_validate_chan (uint8_t band, uint16_t chan) |
Validate a channel against a band. | |
bool | wifi_utils_validate_chan_2g (uint16_t chan) |
Validate a channel against the 2.4 GHz band. | |
bool | wifi_utils_validate_chan_5g (uint16_t chan) |
Validate a channel against the 5 GHz band. | |
bool | wifi_utils_validate_chan_6g (uint16_t chan) |
Validate a channel against the 6 GHz band. | |
#define | WIFI_UTILS_MAX_BAND_STR_LEN 3 |
Maximum length of the band specification string. | |
#define | WIFI_UTILS_MAX_CHAN_STR_LEN 4 |
Maximum length of the channel specification string. | |
Wi-Fi Management API.
#define MAX_REG_CHAN_NUM 42 |
#include <zephyr/net/wifi_mgmt.h>
Max regulatory channel number.
#define NET_EVENT_WIFI_AP_DISABLE_RESULT (_NET_WIFI_EVENT | NET_EVENT_WIFI_CMD_AP_DISABLE_RESULT) |
#include <zephyr/net/wifi_mgmt.h>
Event emitted for Wi-Fi access point disable result.
#define NET_EVENT_WIFI_AP_ENABLE_RESULT (_NET_WIFI_EVENT | NET_EVENT_WIFI_CMD_AP_ENABLE_RESULT) |
#include <zephyr/net/wifi_mgmt.h>
Event emitted for Wi-Fi access point enable result.
#define NET_EVENT_WIFI_AP_STA_CONNECTED (_NET_WIFI_EVENT | NET_EVENT_WIFI_CMD_AP_STA_CONNECTED) |
#include <zephyr/net/wifi_mgmt.h>
Event emitted when Wi-Fi station is connected in AP mode.
#define NET_EVENT_WIFI_AP_STA_DISCONNECTED (_NET_WIFI_EVENT | NET_EVENT_WIFI_CMD_AP_STA_DISCONNECTED) |
#include <zephyr/net/wifi_mgmt.h>
Event emitted Wi-Fi station is disconnected from AP.
#define NET_EVENT_WIFI_CONNECT_RESULT (_NET_WIFI_EVENT | NET_EVENT_WIFI_CMD_CONNECT_RESULT) |
#include <zephyr/net/wifi_mgmt.h>
Event emitted for Wi-Fi connect result.
#define NET_EVENT_WIFI_DISCONNECT_COMPLETE (_NET_WIFI_EVENT | NET_EVENT_WIFI_CMD_DISCONNECT_COMPLETE) |
#include <zephyr/net/wifi_mgmt.h>
Event emitted Wi-Fi disconnect is completed.
#define NET_EVENT_WIFI_DISCONNECT_RESULT (_NET_WIFI_EVENT | NET_EVENT_WIFI_CMD_DISCONNECT_RESULT) |
#include <zephyr/net/wifi_mgmt.h>
Event emitted for Wi-Fi disconnect result.
#define NET_EVENT_WIFI_IFACE_STATUS (_NET_WIFI_EVENT | NET_EVENT_WIFI_CMD_IFACE_STATUS) |
#include <zephyr/net/wifi_mgmt.h>
Event emitted for Wi-Fi network interface status.
#define NET_EVENT_WIFI_NEIGHBOR_REP_COMP (_NET_WIFI_EVENT | NET_EVENT_WIFI_CMD_NEIGHBOR_REP_COMPLETE) |
#include <zephyr/net/wifi_mgmt.h>
Event Neighbor Report Completed.
#define NET_EVENT_WIFI_RAW_SCAN_RESULT (_NET_WIFI_EVENT | NET_EVENT_WIFI_CMD_RAW_SCAN_RESULT) |
#include <zephyr/net/wifi_mgmt.h>
Event emitted for Wi-Fi raw scan result.
#define NET_EVENT_WIFI_SCAN_DONE (_NET_WIFI_EVENT | NET_EVENT_WIFI_CMD_SCAN_DONE) |
#include <zephyr/net/wifi_mgmt.h>
Event emitted when Wi-Fi scan is done.
#define NET_EVENT_WIFI_SCAN_RESULT (_NET_WIFI_EVENT | NET_EVENT_WIFI_CMD_SCAN_RESULT) |
#include <zephyr/net/wifi_mgmt.h>
Event emitted for Wi-Fi scan result.
#define NET_EVENT_WIFI_SIGNAL_CHANGE (_NET_WIFI_EVENT | NET_EVENT_WIFI_CMD_SIGNAL_CHANGE) |
#include <zephyr/net/wifi_mgmt.h>
Event signal change of connected AP.
#define NET_EVENT_WIFI_TWT (_NET_WIFI_EVENT | NET_EVENT_WIFI_CMD_TWT) |
#include <zephyr/net/wifi_mgmt.h>
Event emitted for Wi-Fi TWT information.
#define NET_EVENT_WIFI_TWT_SLEEP_STATE (_NET_WIFI_EVENT | NET_EVENT_WIFI_CMD_TWT_SLEEP_STATE) |
#include <zephyr/net/wifi_mgmt.h>
Event emitted for Wi-Fi TWT sleep state.
#define NET_REQUEST_WIFI_11K_CONFIG (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_11K_CONFIG) |
#include <zephyr/net/wifi_mgmt.h>
#define NET_REQUEST_WIFI_11K_NEIGHBOR_REQUEST (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_11K_NEIGHBOR_REQUEST) |
#include <zephyr/net/wifi_mgmt.h>
#define NET_REQUEST_WIFI_AP_CONFIG_PARAM (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_AP_CONFIG_PARAM) |
#include <zephyr/net/wifi_mgmt.h>
Request a Wi-Fi AP parameters configuration.
#define NET_REQUEST_WIFI_AP_DISABLE (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_AP_DISABLE) |
#include <zephyr/net/wifi_mgmt.h>
Request a Wi-Fi access point disable.
#define NET_REQUEST_WIFI_AP_ENABLE (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_AP_ENABLE) |
#include <zephyr/net/wifi_mgmt.h>
Request a Wi-Fi access point enable.
#define NET_REQUEST_WIFI_AP_STA_DISCONNECT (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_AP_STA_DISCONNECT) |
#include <zephyr/net/wifi_mgmt.h>
Request a Wi-Fi access point to disconnect a station.
#define NET_REQUEST_WIFI_CHANNEL (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_CHANNEL) |
#include <zephyr/net/wifi_mgmt.h>
Request a Wi-Fi channel.
#define NET_REQUEST_WIFI_CONN_PARAMS (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_CONN_PARAMS) |
#include <zephyr/net/wifi_mgmt.h>
Request a Wi-Fi connection parameters.
#define NET_REQUEST_WIFI_CONNECT (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_CONNECT) |
#include <zephyr/net/wifi_mgmt.h>
Request a Wi-Fi connect.
#define NET_REQUEST_WIFI_DISCONNECT (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_DISCONNECT) |
#include <zephyr/net/wifi_mgmt.h>
Request a Wi-Fi disconnect.
#define NET_REQUEST_WIFI_ENTERPRISE_CREDS (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_ENTERPRISE_CREDS) |
#include <zephyr/net/wifi_mgmt.h>
Set Wi-Fi enterprise mode CA/client Cert and key.
#define NET_REQUEST_WIFI_IFACE_STATUS (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_IFACE_STATUS) |
#include <zephyr/net/wifi_mgmt.h>
Request a Wi-Fi network interface status.
#define NET_REQUEST_WIFI_MODE (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_MODE) |
#include <zephyr/net/wifi_mgmt.h>
Request current Wi-Fi mode.
#define NET_REQUEST_WIFI_NEIGHBOR_REP_COMPLETE (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_NEIGHBOR_REP_COMPLETE) |
#include <zephyr/net/wifi_mgmt.h>
#define NET_REQUEST_WIFI_PACKET_FILTER (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_PACKET_FILTER) |
#include <zephyr/net/wifi_mgmt.h>
Request Wi-Fi packet filter.
#define NET_REQUEST_WIFI_PMKSA_FLUSH (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_PMKSA_FLUSH) |
#include <zephyr/net/wifi_mgmt.h>
Request a Wi-Fi PMKSA cache entries flush.
#define NET_REQUEST_WIFI_PS (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_PS) |
#include <zephyr/net/wifi_mgmt.h>
Request a Wi-Fi power save.
#define NET_REQUEST_WIFI_PS_CONFIG (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_PS_CONFIG) |
#include <zephyr/net/wifi_mgmt.h>
Request a Wi-Fi power save configuration.
#define NET_REQUEST_WIFI_REG_DOMAIN (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_REG_DOMAIN) |
#include <zephyr/net/wifi_mgmt.h>
Request a Wi-Fi regulatory domain.
#define NET_REQUEST_WIFI_RTS_THRESHOLD (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_RTS_THRESHOLD) |
#include <zephyr/net/wifi_mgmt.h>
Request a Wi-Fi RTS threshold.
#define NET_REQUEST_WIFI_RTS_THRESHOLD_CONFIG (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_RTS_THRESHOLD_CONFIG) |
#include <zephyr/net/wifi_mgmt.h>
Request a Wi-Fi RTS threshold configuration.
#define NET_REQUEST_WIFI_SCAN (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_SCAN) |
#include <zephyr/net/wifi_mgmt.h>
Request a Wi-Fi scan.
#define NET_REQUEST_WIFI_START_ROAMING (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_START_ROAMING) |
#include <zephyr/net/wifi_mgmt.h>
#define NET_REQUEST_WIFI_TWT (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_TWT) |
#include <zephyr/net/wifi_mgmt.h>
Request a Wi-Fi TWT.
#define NET_REQUEST_WIFI_VERSION (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_VERSION) |
#include <zephyr/net/wifi_mgmt.h>
Request a Wi-Fi version.
#define NET_REQUEST_WIFI_WPS_CONFIG (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_WPS_CONFIG) |
#include <zephyr/net/wifi_mgmt.h>
#define WIFI_CHANNEL_ANY 255 |
#include <zephyr/net/wifi.h>
Any channel number.
#define WIFI_CHANNEL_MAX 233 |
#include <zephyr/net/wifi.h>
Maximum channel number.
#define WIFI_CHANNEL_MIN 1 |
#include <zephyr/net/wifi.h>
Minimum channel number.
#define WIFI_COUNTRY_CODE_LEN 2 |
#include <zephyr/net/wifi.h>
Length of the country code string.
#define WIFI_ENT_IDENTITY_MAX_LEN 64 |
#include <zephyr/net/wifi.h>
Max enterprise identity length.
#define WIFI_ENT_PSWD_MAX_LEN 128 |
#include <zephyr/net/wifi.h>
Max enterprise password length.
#define WIFI_INTERFACE_INDEX_MAX 255 |
#include <zephyr/net/wifi.h>
Network interface index max value.
#define WIFI_INTERFACE_INDEX_MIN 1 |
#include <zephyr/net/wifi.h>
Network interface index min value.
#define WIFI_MAC_ADDR_LEN 6 |
#include <zephyr/net/wifi.h>
MAC address length.
#define WIFI_PSK_MAX_LEN 64 |
#include <zephyr/net/wifi.h>
Maximum PSK length.
#define WIFI_PSK_MIN_LEN 8 |
#include <zephyr/net/wifi.h>
Minimum PSK length.
#define WIFI_SAE_PSWD_MAX_LEN 128 |
#include <zephyr/net/wifi.h>
Max SAW password length.
#define WIFI_SSID_MAX_LEN 32 |
#include <zephyr/net/wifi.h>
Max SSID length.
#define WIFI_UTILS_MAX_BAND_STR_LEN 3 |
#include <zephyr/net/wifi_utils.h>
Maximum length of the band specification string.
#define WIFI_UTILS_MAX_CHAN_STR_LEN 4 |
#include <zephyr/net/wifi_utils.h>
Maximum length of the channel specification string.
#define WIFI_WPS_PIN_MAX_LEN 8 |
#include <zephyr/net/wifi_mgmt.h>
typedef void(* scan_result_cb_t) (struct net_if *iface, int status, struct wifi_scan_result *entry) |
#include <zephyr/net/wifi_mgmt.h>
Scan result callback.
iface | Network interface |
status | Scan result status |
entry | Scan result entry |
enum net_event_wifi_cmd |
#include <zephyr/net/wifi_mgmt.h>
Wi-Fi management events.
enum net_request_wifi_cmd |
#include <zephyr/net/wifi_mgmt.h>
Wi-Fi management commands.
enum wifi_ap_config_param |
#include <zephyr/net/wifi.h>
Wi-Fi AP mode configuration parameter.
Enumerator | |
---|---|
WIFI_AP_CONFIG_PARAM_MAX_INACTIVITY | Used for AP mode configuration parameter ap_max_inactivity. |
WIFI_AP_CONFIG_PARAM_MAX_NUM_STA | Used for AP mode configuration parameter max_num_sta. |
enum wifi_ap_status |
#include <zephyr/net/wifi_mgmt.h>
Wi-Fi AP mode result codes.
To be overlaid on top of wifi_status in the AP mode enable or disable result event for detailed status.
enum wifi_cipher_type |
#include <zephyr/net/wifi.h>
Group cipher and pairwise cipher types.
Enumerator | |
---|---|
WPA_CAPA_ENC_CCMP | AES in counter mode with CBC-MAC (CCMP-128). |
WPA_CAPA_ENC_GCMP | 128-bit Galois/Counter Mode Protocol. |
WPA_CAPA_ENC_GCMP_256 | 256-bit Galois/Counter Mode Protocol. |
#include <zephyr/net/wifi.h>
Wi-Fi power save error codes.
enum wifi_conn_status |
#include <zephyr/net/wifi_mgmt.h>
Wi-Fi connect result codes.
To be overlaid on top of wifi_status in the connect result event for detailed status.
enum wifi_disconn_reason |
#include <zephyr/net/wifi_mgmt.h>
Wi-Fi disconnect reason codes.
To be overlaid on top of wifi_status in the disconnect result event for detailed reason.
enum wifi_eap_type |
#include <zephyr/net/wifi.h>
EPA method Types.
enum wifi_filter |
#include <zephyr/net/wifi.h>
Mode filter settings.
enum wifi_frequency_bands |
#include <zephyr/net/wifi.h>
IEEE 802.11 operational frequency bands (not exhaustive).
#include <zephyr/net/wifi.h>
group mgmt cipher types.
#include <zephyr/net/wifi_mgmt.h>
Wi-Fi AP status.
Enumerator | |
---|---|
WIFI_HAPD_IFACE_UNINITIALIZED | |
WIFI_HAPD_IFACE_DISABLED | |
WIFI_HAPD_IFACE_COUNTRY_UPDATE | |
WIFI_HAPD_IFACE_ACS | |
WIFI_HAPD_IFACE_HT_SCAN | |
WIFI_HAPD_IFACE_DFS | |
WIFI_HAPD_IFACE_ENABLED |
enum wifi_iface_mode |
#include <zephyr/net/wifi.h>
Wi-Fi interface modes.
Based on https://w1.fi/wpa_supplicant/devel/defs_8h.html#a4aeb27c1e4abd046df3064ea9756f0bc
enum wifi_iface_state |
#include <zephyr/net/wifi.h>
Wi-Fi interface states.
Based on https://w1.fi/wpa_supplicant/devel/defs_8h.html#a4aeb27c1e4abd046df3064ea9756f0bc
enum wifi_link_mode |
#include <zephyr/net/wifi.h>
Wi-Fi link operating modes.
As per https://en.wikipedia.org/wiki/Wi-Fi#Versions_and_generations.
Enumerator | |
---|---|
WIFI_0 | 802.11 (legacy). |
WIFI_1 | 802.11b. |
WIFI_2 | 802.11a. |
WIFI_3 | 802.11g. |
WIFI_4 | 802.11n. |
WIFI_5 | 802.11ac. |
WIFI_6 | 802.11ax. |
WIFI_6E | 802.11ax 6GHz. |
WIFI_7 | 802.11be. |
enum wifi_mfp_options |
#include <zephyr/net/wifi.h>
IEEE 802.11w - Management frame protection.
Enumerator | |
---|---|
WIFI_MFP_DISABLE | MFP disabled. |
WIFI_MFP_OPTIONAL | MFP optional. |
WIFI_MFP_REQUIRED | MFP required. |
enum wifi_mgmt_op |
#include <zephyr/net/wifi_mgmt.h>
Generic get/set operation for any command.
Enumerator | |
---|---|
WIFI_MGMT_GET | Get operation. |
WIFI_MGMT_SET | Set operation. |
#include <zephyr/net/wifi.h>
Wifi operational mode.
enum wifi_ps |
#include <zephyr/net/wifi.h>
Wi-Fi power save states.
Enumerator | |
---|---|
WIFI_PS_DISABLED | Power save disabled. |
WIFI_PS_ENABLED | Power save enabled. |
#include <zephyr/net/wifi.h>
Wi-Fi power save exit strategy.
Enumerator | |
---|---|
WIFI_PS_EXIT_CUSTOM_ALGO | PS-Poll frame based. |
WIFI_PS_EXIT_EVERY_TIM | QoS NULL frame based. |
enum wifi_ps_mode |
#include <zephyr/net/wifi.h>
Wi-Fi power save modes.
Enumerator | |
---|---|
WIFI_PS_MODE_LEGACY | Legacy power save mode. |
WIFI_PS_MODE_WMM | WMM power save mode. |
enum wifi_ps_param_type |
#include <zephyr/net/wifi.h>
Wi-Fi power save parameters.
enum wifi_ps_wakeup_mode |
#include <zephyr/net/wifi.h>
Wi-Fi power save modes.
Enumerator | |
---|---|
WIFI_PS_WAKEUP_MODE_DTIM | DTIM based wakeup. |
WIFI_PS_WAKEUP_MODE_LISTEN_INTERVAL | Listen interval based wakeup. |
enum wifi_scan_type |
#include <zephyr/net/wifi.h>
Wi-Fi scanning types.
Enumerator | |
---|---|
WIFI_SCAN_TYPE_ACTIVE | Active scanning (default). |
WIFI_SCAN_TYPE_PASSIVE | Passive scanning. |
enum wifi_security_type |
#include <zephyr/net/wifi.h>
IEEE 802.11 security types.
enum wifi_suiteb_type |
#include <zephyr/net/wifi.h>
Enterprise security WPA3 suiteb types.
Enumerator | |
---|---|
WIFI_SUITEB | suiteb. |
WIFI_SUITEB_192 | suiteb-192. |
enum wifi_twt_fail_reason |
#include <zephyr/net/wifi.h>
Target Wake Time (TWT) error codes.
#include <zephyr/net/wifi.h>
Wi-Fi Target Wake Time (TWT) negotiation types.
Enumerator | |
---|---|
WIFI_TWT_INDIVIDUAL | TWT individual negotiation. |
WIFI_TWT_BROADCAST | TWT broadcast negotiation. |
WIFI_TWT_WAKE_TBTT | TWT wake TBTT negotiation. |
enum wifi_twt_operation |
#include <zephyr/net/wifi.h>
Wi-Fi Target Wake Time (TWT) operations.
Enumerator | |
---|---|
WIFI_TWT_SETUP | TWT setup operation. |
WIFI_TWT_TEARDOWN | TWT teardown operation. |
enum wifi_twt_setup_cmd |
#include <zephyr/net/wifi.h>
Wi-Fi Target Wake Time (TWT) setup commands.
#include <zephyr/net/wifi.h>
Wi-Fi Target Wake Time (TWT) negotiation status.
Enumerator | |
---|---|
WIFI_TWT_RESP_RECEIVED | TWT response received for TWT request. |
WIFI_TWT_RESP_NOT_RECEIVED | TWT response not received for TWT request. |
enum wifi_twt_sleep_state |
#include <zephyr/net/wifi_mgmt.h>
Wi-Fi TWT sleep states.
Enumerator | |
---|---|
WIFI_TWT_STATE_SLEEP | TWT sleep state: sleeping. |
WIFI_TWT_STATE_AWAKE | TWT sleep state: awake. |
#include <zephyr/net/wifi.h>
Wi-Fi Target Wake Time (TWT) teradown status.
Enumerator | |
---|---|
WIFI_TWT_TEARDOWN_SUCCESS | TWT teardown success. |
WIFI_TWT_TEARDOWN_FAILED | TWT teardown failure. |
enum wifi_wps_op |
#include <zephyr/net/wifi_mgmt.h>
Operation for WPS.
Enumerator | |
---|---|
WIFI_WPS_PBC | WPS pbc. |
WIFI_WPS_PIN_GET | Get WPS pin number. |
WIFI_WPS_PIN_SET | Set WPS pin number. |
const char * wifi_band_txt | ( | enum wifi_frequency_bands | band | ) |
#include <zephyr/net/wifi.h>
Helper function to get user-friendly frequency band name.
const char * wifi_link_mode_txt | ( | enum wifi_link_mode | link_mode | ) |
#include <zephyr/net/wifi.h>
Helper function to get user-friendly link mode name.
const char * wifi_mfp_txt | ( | enum wifi_mfp_options | mfp | ) |
#include <zephyr/net/wifi.h>
Helper function to get user-friendly MFP name.
void wifi_mgmt_raise_ap_disable_result_event | ( | struct net_if * | iface, |
enum wifi_ap_status | status ) |
#include <zephyr/net/wifi_mgmt.h>
Wi-Fi management AP mode disable result event.
iface | Network interface |
status | AP mode disable result status |
void wifi_mgmt_raise_ap_enable_result_event | ( | struct net_if * | iface, |
enum wifi_ap_status | status ) |
#include <zephyr/net/wifi_mgmt.h>
Wi-Fi management AP mode enable result event.
iface | Network interface |
status | AP mode enable result status |
void wifi_mgmt_raise_ap_sta_connected_event | ( | struct net_if * | iface, |
struct wifi_ap_sta_info * | sta_info ) |
#include <zephyr/net/wifi_mgmt.h>
Wi-Fi management AP mode STA connected event.
iface | Network interface |
sta_info | STA information |
void wifi_mgmt_raise_ap_sta_disconnected_event | ( | struct net_if * | iface, |
struct wifi_ap_sta_info * | sta_info ) |
#include <zephyr/net/wifi_mgmt.h>
Wi-Fi management AP mode STA disconnected event.
iface | Network interface |
sta_info | STA information |
void wifi_mgmt_raise_connect_result_event | ( | struct net_if * | iface, |
int | status ) |
#include <zephyr/net/wifi_mgmt.h>
Wi-Fi management connect result event.
iface | Network interface |
status | Connect result status |
void wifi_mgmt_raise_disconnect_complete_event | ( | struct net_if * | iface, |
int | status ) |
#include <zephyr/net/wifi_mgmt.h>
Wi-Fi management disconnect complete event.
iface | Network interface |
status | Disconnect complete status |
void wifi_mgmt_raise_disconnect_result_event | ( | struct net_if * | iface, |
int | status ) |
#include <zephyr/net/wifi_mgmt.h>
Wi-Fi management disconnect result event.
iface | Network interface |
status | Disconnect result status |
void wifi_mgmt_raise_iface_status_event | ( | struct net_if * | iface, |
struct wifi_iface_status * | iface_status ) |
#include <zephyr/net/wifi_mgmt.h>
Wi-Fi management interface status event.
iface | Network interface |
iface_status | Interface status |
void wifi_mgmt_raise_raw_scan_result_event | ( | struct net_if * | iface, |
struct wifi_raw_scan_result * | raw_scan_info ) |
#include <zephyr/net/wifi_mgmt.h>
Wi-Fi management raw scan result event.
iface | Network interface |
raw_scan_info | Raw scan result |
void wifi_mgmt_raise_twt_event | ( | struct net_if * | iface, |
struct wifi_twt_params * | twt_params ) |
#include <zephyr/net/wifi_mgmt.h>
Wi-Fi management TWT event.
iface | Network interface |
twt_params | TWT parameters |
void wifi_mgmt_raise_twt_sleep_state | ( | struct net_if * | iface, |
int | twt_sleep_state ) |
#include <zephyr/net/wifi_mgmt.h>
Wi-Fi management TWT sleep state event.
iface | Network interface |
twt_sleep_state | TWT sleep state |
const char * wifi_mode_txt | ( | enum wifi_iface_mode | mode | ) |
#include <zephyr/net/wifi.h>
Helper function to get user-friendly interface mode name.
const char *const wifi_ps_exit_strategy_txt | ( | enum wifi_ps_exit_strategy | ps_exit_strategy | ) |
#include <zephyr/net/wifi.h>
Helper function to get user-friendly ps exit strategy name.
|
inlinestatic |
#include <zephyr/net/wifi.h>
Helper function to get user-friendly power save error code name.
const char * wifi_ps_mode_txt | ( | enum wifi_ps_mode | ps_mode | ) |
#include <zephyr/net/wifi.h>
Helper function to get user-friendly ps mode name.
const char * wifi_ps_txt | ( | enum wifi_ps | ps_name | ) |
#include <zephyr/net/wifi.h>
Helper function to get user-friendly ps name.
const char * wifi_ps_wakeup_mode_txt | ( | enum wifi_ps_wakeup_mode | ps_wakeup_mode | ) |
#include <zephyr/net/wifi.h>
Helper function to get user-friendly ps wakeup mode name.
const char * wifi_security_txt | ( | enum wifi_security_type | security | ) |
#include <zephyr/net/wifi.h>
Helper function to get user-friendly security type name.
const char * wifi_state_txt | ( | enum wifi_iface_state | state | ) |
#include <zephyr/net/wifi.h>
Helper function to get user-friendly interface state name.
|
inlinestatic |
#include <zephyr/net/wifi.h>
Helper function to get user-friendly TWT error code name.
const char * wifi_twt_negotiation_type_txt | ( | enum wifi_twt_negotiation_type | twt_negotiation | ) |
#include <zephyr/net/wifi.h>
Helper function to get user-friendly twt negotiation type name.
const char * wifi_twt_operation_txt | ( | enum wifi_twt_operation | twt_operation | ) |
#include <zephyr/net/wifi.h>
Helper function to get user-friendly twt operation name.
const char * wifi_twt_setup_cmd_txt | ( | enum wifi_twt_setup_cmd | twt_setup | ) |
#include <zephyr/net/wifi.h>
Helper function to get user-friendly twt setup cmd name.
int wifi_utils_parse_scan_bands | ( | char * | scan_bands_str, |
uint8_t * | band_map ) |
#include <zephyr/net/wifi_utils.h>
Convert a band specification string to a bitmap representing the bands.
The function will parse a string which specifies Wi-Fi frequency band values as a comma separated string and convert it to a bitmap. The string can use the following characters to represent the bands:
For the bitmap generated refer to wifi_frequency_bands for bit position of each band.
E.g. a string "2,5,6" will be converted to a bitmap value of 0x7
scan_bands_str | String which spe. |
band_map | Pointer to the bitmap variable to be updated. |
0 | on success. |
-errno | value in case of failure. |
int wifi_utils_parse_scan_chan | ( | char * | scan_chan_str, |
struct wifi_band_channel * | chan, | ||
uint8_t | max_channels ) |
#include <zephyr/net/wifi_utils.h>
Convert a string containing a specification of scan channels to an array.
The function will parse a string which specifies channels to be scanned as a string and convert it to an array.
The channel string has to be formatted using the colon (:), comma(,), hyphen (-) and underscore (_) delimiters as follows:
An example channel specification specifying channels in the 2.4 GHz and 5 GHz bands is as below: 2:1,5,7,9-11_5:36-48,100,163-167
scan_chan_str | List of channels expressed in the format described above. |
chan | Pointer to an array where the parsed channels are to be stored. |
max_channels | Maximum number of channels to store |
0 | on success. |
-errno | value in case of failure. |
int wifi_utils_parse_scan_ssids | ( | char * | scan_ssids_str, |
const char * | ssids[], | ||
uint8_t | num_ssids ) |
#include <zephyr/net/wifi_utils.h>
Append a string containing an SSID to an array of SSID strings.
scan_ssids_str | string to be appended in the list of scanned SSIDs. |
ssids | Pointer to an array where the SSIDs pointers are to be stored. |
num_ssids | Maximum number of SSIDs that can be stored. |
0 | on success. |
-errno | value in case of failure. |
#include <zephyr/net/wifi_utils.h>
Validate a channel against a band.
band | Band to validate the channel against. |
chan | Channel to validate. |
true | if the channel is valid for the band. |
false | if the channel is not valid for the band. |
#include <zephyr/net/wifi_utils.h>
Validate a channel against the 2.4 GHz band.
chan | Channel to validate. |
true | if the channel is valid for the band. |
false | if the channel is not valid for the band. |
#include <zephyr/net/wifi_utils.h>
Validate a channel against the 5 GHz band.
chan | Channel to validate. |
true | if the channel is valid for the band. |
false | if the channel is not valid for the band. |
#include <zephyr/net/wifi_utils.h>
Validate a channel against the 6 GHz band.
chan | Channel to validate. |
true | if the channel is valid for the band. |
false | if the channel is not valid for the band. |