32#include <soc/soc_caps.h>
558#if SOC_WIFI_HE_SUPPORT
563#if SOC_WIFI_HE_SUPPORT
575#if SOC_WIFI_HE_SUPPORT
682 std::array<char, 3> cc = {
'0',
'1',
'\0'};
687#if SOC_WIFI_SUPPORT_5G
703 std::optional<enum second_channel>
second;
792 bool capable =
false;
793 bool required =
false;
803 std::optional<mac_address> bssid = {};
811 bool rm_enabled =
false;
812 bool btm_enabled =
false;
813 bool mbo_enabled =
false;
814 bool ft_enabled =
false;
815 bool owe_enabled =
false;
816 bool transition_disable =
false;
835 bool ftm_responder =
false;
847 bool show_hidden =
false;
886 std::optional<enum second_channel>
second;
898 bool use_get_report_api =
false;
907 bool htltf_en =
true;
908 bool stbc_htltf2_en =
true;
909 bool ltf_merge_en =
true;
910 bool channel_filter_en =
true;
911 bool manu_scale =
false;
913 bool dump_ack_en =
false;
1285#ifdef CONFIG_COMPILER_CXX_EXCEPTIONS
1385#ifdef CONFIG_COMPILER_CXX_EXCEPTIONS
1426#ifdef CONFIG_COMPILER_CXX_EXCEPTIONS
1467#ifdef CONFIG_COMPILER_CXX_EXCEPTIONS
1562#ifdef CONFIG_COMPILER_CXX_EXCEPTIONS
1653#ifdef CONFIG_COMPILER_CXX_EXCEPTIONS
1811#ifdef CONFIG_COMPILER_CXX_EXCEPTIONS
1852#ifdef CONFIG_COMPILER_CXX_EXCEPTIONS
1936#ifdef CONFIG_COMPILER_CXX_EXCEPTIONS
1981#ifdef CONFIG_COMPILER_CXX_EXCEPTIONS
2004#ifdef CONFIG_COMPILER_CXX_EXCEPTIONS
2047#ifdef CONFIG_COMPILER_CXX_EXCEPTIONS
2125#ifdef CONFIG_COMPILER_CXX_EXCEPTIONS
2166#ifdef CONFIG_COMPILER_CXX_EXCEPTIONS
2207#ifdef CONFIG_COMPILER_CXX_EXCEPTIONS
2291#ifdef CONFIG_COMPILER_CXX_EXCEPTIONS
2367#ifdef CONFIG_COMPILER_CXX_EXCEPTIONS
2391#ifdef CONFIG_COMPILER_CXX_EXCEPTIONS
2436#ifdef CONFIG_COMPILER_CXX_EXCEPTIONS
2481#ifdef CONFIG_COMPILER_CXX_EXCEPTIONS
2521#ifdef CONFIG_COMPILER_CXX_EXCEPTIONS
2656#ifdef CONFIG_COMPILER_CXX_EXCEPTIONS
2706#ifdef CONFIG_COMPILER_CXX_EXCEPTIONS
2757#ifdef CONFIG_COMPILER_CXX_EXCEPTIONS
2836#ifdef CONFIG_COMPILER_CXX_EXCEPTIONS
2926#ifdef CONFIG_COMPILER_CXX_EXCEPTIONS
3046#ifdef CONFIG_COMPILER_CXX_EXCEPTIONS
3055inline void start() {
3116inline std::vector<ap_record>
scan(
const scan_config&
cfg) {
3366#ifdef CONFIG_COMPILER_CXX_EXCEPTIONS
3497struct is_error_code_enum<
idfxx::wifi::errc> : true_type {};
3501#include "sdkconfig.h"
3502#ifdef CONFIG_IDFXX_STD_FORMAT
3509struct formatter<
idfxx::
flags<idfxx::wifi::role>> {
3510 constexpr auto parse(format_parse_context& ctx) {
return ctx.begin(); }
3512 template<
typename FormatContext>
3515 return std::copy(s.begin(), s.end(), ctx.out());
3520struct formatter<
idfxx::wifi::auth_mode> {
3521 constexpr auto parse(format_parse_context& ctx) {
return ctx.begin(); }
3523 template<
typename FormatContext>
3526 return std::copy(s.begin(), s.end(), ctx.out());
3531struct formatter<
idfxx::wifi::cipher_type> {
3532 constexpr auto parse(format_parse_context& ctx) {
return ctx.begin(); }
3534 template<
typename FormatContext>
3537 return std::copy(s.begin(), s.end(), ctx.out());
3542struct formatter<
idfxx::wifi::disconnect_reason> {
3543 constexpr auto parse(format_parse_context& ctx) {
return ctx.begin(); }
3545 template<
typename FormatContext>
3548 return std::copy(s.begin(), s.end(), ctx.out());
Type-safe set of flags from a scoped enum.
A MAC-48 (6-byte) hardware address.
Network interface handle.
Non-Volatile Storage handle.
Error category for WiFi errors.
std::string message(int ec) const override final
Returns a human-readable message for the given error code.
const char * name() const noexcept override final
Returns the name of the error category.
Concept for types that can be both received and posted as event data.
std::string to_string(core_id c)
Returns a string representation of a CPU core identifier.
constexpr idfxx::event< event_id, ap_sta_connected_event_data > ap_sta_connected
Station connected to soft-AP event.
void disable_pmf_config(enum role iface)
Disables PMF (Protected Management Frames) for the specified interface.
result< channel_info > try_get_channel()
Gets the current primary and secondary channel.
constexpr idfxx::event< event_id > nan_replied
NAN replied event.
void set_csi_rx_cb(void(*cb)(void *, void *), void *ctx)
Registers a callback for CSI data reception.
result< void > try_set_band_mode(enum band_mode m)
Sets the WiFi band mode.
constexpr idfxx::event< event_id > btwt_teardown
Broadcast TWT teardown event.
result< enum power_save > try_get_power_save()
Gets the current power save mode.
void set_ap_config(const ap_config &cfg)
Sets the WiFi access point configuration.
constexpr idfxx::event< event_id, ftm_report_event_data > ftm_report
FTM report received event.
void deauth_sta(uint16_t aid)
Deauthenticates a station from the soft-AP.
result< void > try_set_roles(flags< role > roles)
Sets the active WiFi roles.
result< uint16_t > try_scan_get_ap_num()
Gets the number of APs found in the last scan.
result< std::string > try_get_country_code()
Gets the current country code.
constexpr idfxx::event< event_id, ap_sta_disconnected_event_data > ap_sta_disconnected
Station disconnected from soft-AP event.
void set_promiscuous_rx_cb(void(*cb)(void *, int))
Sets the promiscuous mode receive callback.
void set_max_tx_power(int8_t power)
Sets the maximum transmit power.
flags< promiscuous_ctrl_filter > get_promiscuous_ctrl_filter()
Gets the current promiscuous mode control frame sub-type filter.
void ftm_end_session()
Ends the current FTM session.
void set_csi_config(const csi_config &cfg)
Sets the CSI configuration.
bandwidth
WiFi channel bandwidth.
uint16_t get_inactive_time(enum role iface)
Gets the inactive time before a station is deauthenticated.
constexpr idfxx::event< event_id > connectionless_module_wake_interval_start
Connectionless module wake interval start event.
event_mask
WiFi event mask flags.
void set_storage(enum storage s)
Sets the WiFi configuration storage location.
constexpr idfxx::event< event_id > itwt_probe
Individual TWT probe event.
void set_promiscuous(bool en)
Enables or disables promiscuous mode.
result< void > try_ftm_initiate_session(const ftm_initiator_config &cfg)
Initiates an FTM (Fine Timing Measurement) session.
constexpr idfxx::event< event_id > dpp_cfg_recvd
DPP configuration received event.
result< void > try_set_rssi_threshold(int32_t rssi)
Sets the RSSI threshold for the sta_bss_rssi_low event.
void config_11b_rate(enum role iface, bool disable)
Enables or disables 802.11b rate for the specified interface.
void deinit()
Deinitializes the WiFi subsystem and frees resources.
constexpr idfxx::event< event_id > sta_stop
Station stopped event.
promiscuous_pkt_type
Promiscuous mode packet type.
constexpr idfxx::event< event_id > sta_wps_er_timeout
WPS enrollee timeout event.
void restore()
Restores WiFi stack persistent settings to defaults.
uint16_t ap_get_sta_aid(mac_address mac)
Gets the association ID for a station connected to the soft-AP.
void set_sta_config(const sta_config &cfg)
Sets the WiFi station configuration.
storage
WiFi configuration storage location.
result< void > try_config_80211_tx_rate(enum role iface, enum phy_rate rate)
Sets the 802.11 TX rate for the specified interface.
result< flags< promiscuous_filter > > try_get_promiscuous_filter()
Gets the current promiscuous mode packet type filter.
result< void > try_set_csi(bool en)
Enables or disables CSI (Channel State Information) collection.
constexpr idfxx::event< event_id > ap_wps_rg_failed
AP WPS registrar failed event.
std::vector< ap_record > scan(const scan_config &cfg={})
Performs a blocking scan for access points.
promiscuous_filter
Promiscuous mode filter flags.
result< bandwidths_config > try_get_bandwidths(enum role iface)
Gets bandwidths for dual-band operation on the specified interface.
result< void > try_set_sta_config(const sta_config &cfg)
Sets the WiFi station configuration.
result< void > try_connectionless_module_set_wake_interval(uint16_t interval)
Sets the connectionless module wake interval.
result< void > try_statis_dump(flags< statis_module > modules)
Dumps WiFi statistics for the specified modules.
enum band_mode get_band_mode()
Gets the current WiFi band mode.
void set_roles(flags< role > roles)
Sets the active WiFi roles.
constexpr idfxx::event< event_id > ap_start
Soft-AP started event.
constexpr idfxx::event< event_id > twt_wakeup
TWT wakeup event.
result< void > try_config_11b_rate(enum role iface, bool disable)
Enables or disables 802.11b rate for the specified interface.
void scan_start(const scan_config &cfg={})
Starts a non-blocking scan for access points.
result< void > try_set_promiscuous(bool en)
Enables or disables promiscuous mode.
constexpr idfxx::event< event_id > roc_done
Remain-on-channel done event.
result< void > try_stop()
Stops the WiFi subsystem.
result< void > try_deinit()
Deinitializes the WiFi subsystem and frees resources.
result< flags< promiscuous_ctrl_filter > > try_get_promiscuous_ctrl_filter()
Gets the current promiscuous mode control frame sub-type filter.
void set_band(enum band b)
Sets the WiFi band.
result< enum band_mode > try_get_band_mode()
Gets the current WiFi band mode.
constexpr idfxx::event< event_id > ap_wrong_password
AP detected wrong password from station event.
auth_mode
WiFi authentication mode.
const event_base< event_id > events
WiFi event base.
result< void > try_ftm_resp_set_offset(int16_t offset)
Sets the FTM responder offset.
std::vector< ftm_report_entry > ftm_get_report(size_t max_entries)
Retrieves the FTM measurement report entries.
result< void > try_deauth_sta(uint16_t aid)
Deauthenticates a station from the soft-AP.
result< enum band > try_get_band()
Gets the current WiFi band.
csi_config get_csi_config()
Gets the current CSI configuration.
result< netif::interface > try_create_default_sta_netif()
Creates a default WiFi station network interface.
promiscuous_ctrl_filter
Promiscuous mode control frame sub-type filter flags.
result< void > try_set_power_save(enum power_save ps)
Sets the power save mode.
void tx_80211(enum role iface, std::span< const uint8_t > buffer, bool en_sys_seq)
Transmits a raw 802.11 frame.
constexpr idfxx::event< event_id > sta_wps_er_pbc_overlap
WPS PBC overlap detected event.
void force_wakeup_acquire()
Acquires a WiFi wakeup lock.
void register_80211_tx_cb(void(*cb)(const void *))
Registers a callback for 802.11 TX completion.
int get_rssi()
Gets the current RSSI of the connected AP.
result< void > try_set_country(const country_config &cfg)
Sets the WiFi country configuration.
result< void > try_set_promiscuous_ctrl_filter(flags< promiscuous_ctrl_filter > filter)
Sets the promiscuous mode control frame sub-type filter.
@ connectionless_module_wake_interval_start
@ sta_beacon_offset_unstable
result< std::vector< sta_info > > try_get_sta_list()
Gets the list of stations connected to the soft-AP.
result< void > try_set_inactive_time(enum role iface, uint16_t sec)
Sets the inactive time before a station is deauthenticated.
bandwidths_config get_bandwidths(enum role iface)
Gets bandwidths for dual-band operation on the specified interface.
enum bandwidth get_bandwidth(enum role iface)
Gets the current channel bandwidth for the specified interface.
result< enum bandwidth > try_get_bandwidth(enum role iface)
Gets the current channel bandwidth for the specified interface.
sae_pk_mode
SAE-PK (Public Key) mode.
void init(const init_config &cfg={})
Initializes the WiFi subsystem.
void set_promiscuous_ctrl_filter(flags< promiscuous_ctrl_filter > filter)
Sets the promiscuous mode control frame sub-type filter.
vendor_ie_id
Vendor-specific IE index.
constexpr idfxx::event< event_id, ap_probe_req_event_data > ap_probe_req_received
Probe request received by soft-AP event.
constexpr idfxx::event< event_id > itwt_teardown
Individual TWT teardown event.
result< void > try_set_ap_config(const ap_config &cfg)
Sets the WiFi access point configuration.
result< void > try_scan_stop()
Stops an in-progress scan.
result< void > try_start()
Starts the WiFi subsystem.
result< void > try_tx_80211(enum role iface, std::span< const uint8_t > buffer, bool en_sys_seq)
Transmits a raw 802.11 frame.
bool get_promiscuous()
Gets whether promiscuous mode is enabled.
constexpr idfxx::event< event_id > itwt_setup
Individual TWT setup event.
result< void > try_set_scan_parameters(const scan_default_params ¶ms)
Sets the default scan timing parameters.
constexpr idfxx::event< event_id, disconnected_event_data > sta_disconnected
Station disconnected event with disconnection details.
protocols_config get_protocols(enum role iface)
Gets the enabled WiFi protocols for dual-band operation.
scan_method
WiFi scan method.
constexpr idfxx::event< event_id > action_tx_status
Action frame TX status event.
second_channel
WiFi secondary channel position relative to the primary channel.
statis_module
WiFi statistics module flags.
netif::interface create_default_ap_netif()
Creates a default WiFi access point network interface.
void connect()
Connects to the configured access point.
sort_method
WiFi AP sort method for connection.
constexpr idfxx::event< event_id > ap_wps_rg_pbc_overlap
AP WPS PBC overlap detected event.
errc
Error codes for WiFi operations.
cipher_type
WiFi cipher type.
result< uint16_t > try_get_inactive_time(enum role iface)
Gets the inactive time before a station is deauthenticated.
constexpr idfxx::event< event_id > sta_neighbor_rep
Station neighbor report received event.
result< csi_config > try_get_csi_config()
Gets the current CSI configuration.
result< void > try_disable_pmf_config(enum role iface)
Disables PMF (Protected Management Frames) for the specified interface.
result< uint16_t > try_ap_get_sta_aid(mac_address mac)
Gets the association ID for a station connected to the soft-AP.
sta_config get_sta_config()
Gets the current WiFi station configuration.
result< void > try_force_wakeup_release()
Releases a WiFi wakeup lock.
result< flags< event_mask > > try_get_event_mask()
Gets the current WiFi event mask.
phy_rate
WiFi PHY transmission rate.
constexpr idfxx::event< event_id, home_channel_change_event_data > home_channel_change
Home channel changed event.
void set_bandwidth(enum role iface, enum bandwidth bw)
Sets the channel bandwidth for the specified interface.
uint16_t sta_get_aid()
Gets the association ID assigned by the AP in station mode.
constexpr idfxx::event< event_id > btwt_setup
Broadcast TWT setup event.
void connectionless_module_set_wake_interval(uint16_t interval)
Sets the connectionless module wake interval.
void config_80211_tx_rate(enum role iface, enum phy_rate rate)
Sets the 802.11 TX rate for the specified interface.
constexpr idfxx::event< event_id > sta_wps_er_success
WPS enrollee success event.
enum band get_band()
Gets the current WiFi band.
flags< event_mask > get_event_mask()
Gets the current WiFi event mask.
result< void > try_set_bandwidths(enum role iface, const bandwidths_config &bw)
Sets bandwidths for dual-band operation on the specified interface.
result< protocols_config > try_get_protocols(enum role iface)
Gets the enabled WiFi protocols for dual-band operation.
result< void > try_set_protocol(enum role iface, flags< protocol > protos)
Sets the enabled WiFi protocols for the specified interface.
protocol
WiFi protocol flags.
netif::interface create_default_sta_netif()
Creates a default WiFi station network interface.
result< ap_config > try_get_ap_config()
Gets the current WiFi access point configuration.
scan_default_params get_scan_parameters()
Gets the current default scan timing parameters.
enum power_save get_power_save()
Gets the current power save mode.
result< bool > try_get_promiscuous()
Gets whether promiscuous mode is enabled.
void set_promiscuous_filter(flags< promiscuous_filter > filter)
Sets the promiscuous mode packet type filter.
result< void > try_disconnect()
Disconnects from the current access point.
constexpr idfxx::event< event_id > ap_wps_rg_timeout
AP WPS registrar timeout event.
void statis_dump(flags< statis_module > modules)
Dumps WiFi statistics for the specified modules.
vendor_ie_type
Vendor-specific IE type.
void ftm_initiate_session(const ftm_initiator_config &cfg)
Initiates an FTM (Fine Timing Measurement) session.
result< void > try_set_protocols(enum role iface, const protocols_config &cfg)
Sets the enabled WiFi protocols for dual-band operation.
result< void > try_init(const init_config &cfg={})
Initializes the WiFi subsystem.
role
WiFi role (station and/or access point).
void set_power_save(enum power_save ps)
Sets the power save mode.
result< void > try_set_max_tx_power(int8_t power)
Sets the maximum transmit power.
void set_mac(enum role iface, mac_address mac)
Sets the MAC address for the specified interface.
result< uint16_t > try_sta_get_aid()
Gets the association ID assigned by the AP in station mode.
result< void > try_set_storage(enum storage s)
Sets the WiFi configuration storage location.
std::vector< ap_record > scan_get_results()
Retrieves results from a completed scan.
country_config get_country()
Gets the current WiFi country configuration.
void set_country(const country_config &cfg)
Sets the WiFi country configuration.
constexpr idfxx::event< event_id > nan_receive
NAN receive event.
disconnect_reason
WiFi disconnection reason codes.
@ pairwise_cipher_invalid
@ no_ap_found_in_authmode_threshold
@ service_change_precludes_ts
@ no_ssp_roaming_agreement
@ no_ap_found_in_rssi_threshold
@ not_authorized_this_location
@ alterative_channel_occupied
@ assoc_comeback_time_too_long
@ invalid_ft_action_frame_count
@ bss_transition_disassoc
@ ieee_802_1x_auth_failed
@ fourway_handshake_timeout
@ transmission_link_establish_failed
@ no_ap_found_w_compatible_security
@ group_key_update_timeout
std::string get_country_code()
Gets the current country code.
result< void > try_set_mac(enum role iface, mac_address mac)
Sets the MAC address for the specified interface.
ap_record get_ap_info()
Gets information about the currently connected access point.
constexpr idfxx::event< event_id, connected_event_data > sta_connected
Station connected event with connection details.
void start()
Starts the WiFi subsystem.
void scan_stop()
Stops an in-progress scan.
void disconnect()
Disconnects from the current access point.
void clear_ap_list()
Clears the AP list stored from a previous scan.
void set_protocol(enum role iface, flags< protocol > protos)
Sets the enabled WiFi protocols for the specified interface.
result< void > try_set_dynamic_cs(bool enabled)
Enables or disables dynamic CS (Carrier Sense).
result< ap_record > try_get_ap_info()
Gets information about the currently connected access point.
constexpr idfxx::event< event_id > dpp_uri_ready
DPP URI ready event.
void set_country_code(std::string_view cc, bool ieee80211d_enabled)
Sets the country code.
result< void > try_scan_start(const scan_config &cfg={})
Starts a non-blocking scan for access points.
std::vector< sta_info > get_sta_list()
Gets the list of stations connected to the soft-AP.
ap_config get_ap_config()
Gets the current WiFi access point configuration.
int64_t get_tsf_time(enum role iface)
Gets the TSF (Timing Synchronization Function) time for the specified interface.
void set_rssi_threshold(int32_t rssi)
Sets the RSSI threshold for the sta_bss_rssi_low event.
void set_dynamic_cs(bool enabled)
Enables or disables dynamic CS (Carrier Sense).
result< void > try_set_vendor_ie(bool enable, enum vendor_ie_type type, enum vendor_ie_id id, const void *vnd_ie)
Sets a vendor-specific information element.
result< void > try_register_80211_tx_cb(void(*cb)(const void *))
Registers a callback for 802.11 TX completion.
constexpr idfxx::event< event_id > sta_wps_er_pin
WPS enrollee PIN received event.
constexpr idfxx::event< event_id, bss_rssi_low_event_data > sta_bss_rssi_low
BSS RSSI dropped below threshold event.
constexpr idfxx::event< event_id > ndp_indication
NDP indication event.
result< std::vector< ftm_report_entry > > try_ftm_get_report(size_t max_entries)
Retrieves the FTM measurement report entries.
constexpr idfxx::event< event_id > itwt_suspend
Individual TWT suspend event.
void set_protocols(enum role iface, const protocols_config &cfg)
Sets the enabled WiFi protocols for dual-band operation.
void set_vendor_ie_cb(void(*cb)(void *, int, const uint8_t *, const void *, int), void *ctx)
Registers a callback for received vendor-specific IEs.
int8_t get_max_tx_power()
Gets the current maximum transmit power.
ftm_status
FTM (Fine Timing Measurement) session status.
flags< promiscuous_filter > get_promiscuous_filter()
Gets the current promiscuous mode packet type filter.
result< void > try_set_band(enum band b)
Sets the WiFi band.
power_save
WiFi power save mode.
channel_info get_channel()
Gets the current primary and secondary channel.
constexpr idfxx::event< event_id > sta_beacon_offset_unstable
Station beacon offset unstable event.
constexpr idfxx::event< event_id > nan_svc_match
NAN service match event.
void ftm_resp_set_offset(int16_t offset)
Sets the FTM responder offset.
mac_address get_mac(enum role iface)
Gets the MAC address for the specified interface.
constexpr idfxx::event< event_id, scan_done_event_data > scan_done
Scan completed event with scan results summary.
result< enum phy_mode > try_get_negotiated_phymode()
Gets the PHY mode negotiated with the connected AP.
result< void > try_set_channel(uint8_t primary, std::optional< enum second_channel > second=std::nullopt)
Sets the primary and secondary channel.
result< void > try_clear_fast_connect()
Clears the fast-connect data stored in memory.
constexpr idfxx::event< event_id > ap_wps_rg_success
AP WPS registrar success event.
void clear_fast_connect()
Clears the fast-connect data stored in memory.
result< country_config > try_get_country()
Gets the current WiFi country configuration.
constexpr idfxx::event< event_id > sta_wps_er_failed
WPS enrollee failed event.
void set_scan_parameters(const scan_default_params ¶ms)
Sets the default scan timing parameters.
constexpr idfxx::event< event_id > sta_start
Station started event.
void set_csi(bool en)
Enables or disables CSI (Channel State Information) collection.
flags< protocol > get_protocol(enum role iface)
Gets the enabled WiFi protocols for the specified interface.
result< int > try_get_rssi()
Gets the current RSSI of the connected AP.
result< sta_config > try_get_sta_config()
Gets the current WiFi station configuration.
result< void > try_set_promiscuous_filter(flags< promiscuous_filter > filter)
Sets the promiscuous mode packet type filter.
void set_event_mask(flags< event_mask > mask)
Sets the WiFi event mask.
result< void > try_set_event_mask(flags< event_mask > mask)
Sets the WiFi event mask.
void set_inactive_time(enum role iface, uint16_t sec)
Sets the inactive time before a station is deauthenticated.
result< std::vector< ap_record > > try_scan_get_results()
Retrieves results from a completed scan.
void set_channel(uint8_t primary, std::optional< enum second_channel > second=std::nullopt)
Sets the primary and secondary channel.
result< void > try_restore()
Restores WiFi stack persistent settings to defaults.
result< void > try_set_country_code(std::string_view cc, bool ieee80211d_enabled)
Sets the country code.
result< void > try_ftm_end_session()
Ends the current FTM session.
void set_band_mode(enum band_mode m)
Sets the WiFi band mode.
channel_5g
5 GHz WiFi channel flags.
flags< role > get_roles()
Gets the currently active WiFi roles.
result< scan_default_params > try_get_scan_parameters()
Gets the current default scan timing parameters.
result< void > try_set_csi_config(const csi_config &cfg)
Sets the CSI configuration.
result< int8_t > try_get_max_tx_power()
Gets the current maximum transmit power.
constexpr idfxx::event< event_id > ready
WiFi ready event.
result< flags< protocol > > try_get_protocol(enum role iface)
Gets the enabled WiFi protocols for the specified interface.
result< void > try_set_vendor_ie_cb(void(*cb)(void *, int, const uint8_t *, const void *, int), void *ctx)
Registers a callback for received vendor-specific IEs.
result< void > try_set_promiscuous_rx_cb(void(*cb)(void *, int))
Sets the promiscuous mode receive callback.
void set_vendor_ie(bool enable, enum vendor_ie_type type, enum vendor_ie_id id, const void *vnd_ie)
Sets a vendor-specific information element.
result< void > try_force_wakeup_acquire()
Acquires a WiFi wakeup lock.
result< void > try_set_bandwidth(enum role iface, enum bandwidth bw)
Sets the channel bandwidth for the specified interface.
void force_wakeup_release()
Releases a WiFi wakeup lock.
constexpr idfxx::event< event_id > dpp_failed
DPP failed event.
result< void > try_connect()
Connects to the configured access point.
constexpr idfxx::event< event_id > nan_stopped
NAN stopped event.
constexpr idfxx::event< event_id, authmode_change_event_data > sta_authmode_change
Station authentication mode changed event.
void stop()
Stops the WiFi subsystem.
result< void > try_clear_ap_list()
Clears the AP list stored from a previous scan.
constexpr idfxx::event< event_id > ap_wps_rg_pin
AP WPS registrar PIN received event.
enum phy_mode get_negotiated_phymode()
Gets the PHY mode negotiated with the connected AP.
void set_bandwidths(enum role iface, const bandwidths_config &bw)
Sets bandwidths for dual-band operation on the specified interface.
result< flags< role > > try_get_roles()
Gets the currently active WiFi roles.
result< netif::interface > try_create_default_ap_netif()
Creates a default WiFi access point network interface.
constexpr idfxx::event< event_id > ndp_terminated
NDP terminated event.
constexpr idfxx::event< event_id > ndp_confirm
NDP confirm event.
result< std::vector< ap_record > > try_scan(const scan_config &cfg={})
Performs a blocking scan for access points.
sae_pwe_method
SAE PWE (Password Element) derivation method.
result< mac_address > try_get_mac(enum role iface)
Gets the MAC address for the specified interface.
country_policy
WiFi country policy.
constexpr idfxx::event< event_id > nan_started
NAN started event.
constexpr idfxx::event< event_id > sta_beacon_timeout
Station beacon timeout event.
result< void > try_set_csi_rx_cb(void(*cb)(void *, void *), void *ctx)
Registers a callback for CSI data reception.
uint16_t scan_get_ap_num()
Gets the number of APs found in the last scan.
constexpr idfxx::event< event_id > ap_stop
Soft-AP stopped event.
std::error_code make_error_code(errc e) noexcept
Creates a std::error_code from an idfxx::errc value.
const wifi::error_category & wifi_category() noexcept
Returns a reference to the WiFi error category singleton.
T unwrap(result< T > result)
Throws a std::system_error if the result is an error.
std::expected< T, std::error_code > result
result type wrapping a value or error code.
flags(E) -> flags< E >
Class template argument deduction guide.
Configuration for WiFi access point mode.
Information about a probe request received by the soft-AP.
Information about a discovered access point.
enum cipher_type pairwise_cipher
std::optional< enum second_channel > second
enum cipher_type group_cipher
Information about a station connecting to the soft-AP.
Information about a station disconnecting from the soft-AP.
enum disconnect_reason reason
Information about an authentication mode change.
Bandwidth configuration for dual-band operation.
WiFi channel information.
std::optional< enum second_channel > second
Information about a successful station connection.
WiFi country configuration.
CSI (Channel State Information) configuration.
Information about a station disconnection.
enum disconnect_reason reason
FTM initiator session configuration.
Single FTM report measurement entry.
Information about an FTM report.
std::vector< ftm_report_entry > entries
HE (High Efficiency) AP information.
Information about a home channel change.
std::optional< enum second_channel > old_second
std::optional< enum second_channel > new_second
Configuration for WiFi initialization.
std::optional< bool > nvs_enable
std::optional< bool > ampdu_rx_enable
std::optional< unsigned int > static_rx_buf_num
std::optional< unsigned int > dynamic_rx_buf_num
std::optional< unsigned int > rx_ba_win
std::optional< unsigned int > dynamic_tx_buf_num
std::optional< unsigned int > static_tx_buf_num
std::optional< unsigned int > cache_tx_buf_num
std::optional< bool > ampdu_tx_enable
std::optional< core_id > wifi_task_core_id
Protected Management Frame (PMF) configuration.
Protocol configuration for dual-band operation.
Configuration for a WiFi scan operation.
Default scan timing parameters.
Information about a completed scan.
Configuration for WiFi station mode.
Information about a station connected to the soft-AP.