All WiFi-related types, enums, and functions for wireless networking operations.
More...
|
| file | BaseWifi.h |
| | Unified WiFi base class for all WiFi implementations.
|
| |
| file | EspWifi.h |
| | Advanced ESP32 implementation of the unified BaseWifi class with ESP-IDF v5.5+ features.
|
| |
|
| #define | HF_WIFI_ERR_LIST(X) |
| | HardFOC WiFi error codes macro list.
|
| |
| #define | X(name, value, desc) name = value, |
| | Generate WiFi error enumeration using X-macro pattern.
|
| |
| #define | X(NAME, VALUE, DESC) |
| | Generate WiFi error enumeration using X-macro pattern.
|
| |
| #define | X(name, value, desc) |
| | Generate WiFi error enumeration using X-macro pattern.
|
| |
|
| enum class | hf_wifi_mode_t : hf_u8_t { hf_wifi_mode_t::HF_WIFI_MODE_STATION = 0
, hf_wifi_mode_t::HF_WIFI_MODE_ACCESS_POINT = 1
, hf_wifi_mode_t::HF_WIFI_MODE_STATION_AP = 2
, hf_wifi_mode_t::HF_WIFI_MODE_DISABLED = 3
} |
| | WiFi operating modes. More...
|
| |
| enum class | hf_wifi_security_t : hf_u8_t {
hf_wifi_security_t::HF_WIFI_SECURITY_OPEN = 0
, hf_wifi_security_t::HF_WIFI_SECURITY_WEP = 1
, hf_wifi_security_t::HF_WIFI_SECURITY_WPA_PSK = 2
, hf_wifi_security_t::HF_WIFI_SECURITY_WPA2_PSK = 3
,
hf_wifi_security_t::HF_WIFI_SECURITY_WPA_WPA2_PSK = 4
, hf_wifi_security_t::HF_WIFI_SECURITY_WPA2_ENTERPRISE = 5
, hf_wifi_security_t::HF_WIFI_SECURITY_WPA3_PSK = 6
, hf_wifi_security_t::HF_WIFI_SECURITY_WPA2_WPA3_PSK = 7
,
hf_wifi_security_t::HF_WIFI_SECURITY_WPA3_ENTERPRISE = 8
, hf_wifi_security_t::HF_WIFI_SECURITY_WAPI_PSK = 9
} |
| | WiFi security types. More...
|
| |
| enum class | hf_wifi_state_t : hf_u8_t {
hf_wifi_state_t::HF_WIFI_STATE_DISCONNECTED = 0
, hf_wifi_state_t::HF_WIFI_STATE_CONNECTING = 1
, hf_wifi_state_t::HF_WIFI_STATE_CONNECTED = 2
, hf_wifi_state_t::HF_WIFI_STATE_DISCONNECTING = 3
,
hf_wifi_state_t::HF_WIFI_STATE_RECONNECTING = 4
, hf_wifi_state_t::HF_WIFI_STATE_AP_STARTED = 5
, hf_wifi_state_t::HF_WIFI_STATE_AP_STOPPED = 6
, hf_wifi_state_t::HF_WIFI_STATE_SCANNING = 7
} |
| | WiFi connection states. More...
|
| |
| enum class | hf_wifi_power_save_t : hf_u8_t { hf_wifi_power_save_t::HF_WIFI_POWER_SAVE_NONE = 0
, hf_wifi_power_save_t::HF_WIFI_POWER_SAVE_MIN_MODEM = 1
, hf_wifi_power_save_t::HF_WIFI_POWER_SAVE_MAX_MODEM = 2
} |
| | WiFi power save modes. More...
|
| |
| enum class | hf_wifi_event_t : hf_u8_t {
hf_wifi_event_t::HF_WIFI_EVENT_STA_START = 0
, hf_wifi_event_t::HF_WIFI_EVENT_STA_STOP = 1
, hf_wifi_event_t::HF_WIFI_EVENT_STA_CONNECTED = 2
, hf_wifi_event_t::HF_WIFI_EVENT_STA_DISCONNECTED = 3
,
hf_wifi_event_t::HF_WIFI_EVENT_STA_AUTHMODE_CHANGE = 4
, hf_wifi_event_t::HF_WIFI_EVENT_STA_GOT_IP = 5
, hf_wifi_event_t::HF_WIFI_EVENT_STA_LOST_IP = 6
, hf_wifi_event_t::HF_WIFI_EVENT_AP_START = 7
,
hf_wifi_event_t::HF_WIFI_EVENT_AP_STOP = 8
, hf_wifi_event_t::HF_WIFI_EVENT_AP_STACONNECTED = 9
, hf_wifi_event_t::HF_WIFI_EVENT_AP_STADISCONNECTED = 10
, hf_wifi_event_t::HF_WIFI_EVENT_SCAN_DONE = 11
} |
| | WiFi event types for callback functions. More...
|
| |
All WiFi-related types, enums, and functions for wireless networking operations.
This module provides comprehensive WiFi functionality including:
- Station mode (client) operations
- Access Point mode operations
- Network scanning and discovery
- Security configuration (WPA/WPA2/WPA3)
- Connection management
- Event handling and callbacks
- Error handling and diagnostics
◆ HF_WIFI_ERR_LIST
| #define HF_WIFI_ERR_LIST |
( |
| X | ) |
|
Value: \
\
\
@ WIFI_ERR_INVALID_PASSWORD
@ WIFI_ERR_AP_START_FAILED
@ WIFI_ERR_HANDSHAKE_FAILED
@ WIFI_ERR_ASSOCIATION_FAILED
@ WIFI_ERR_DISCONNECTION_FAILED
@ WIFI_ERR_ALREADY_CONNECTED
@ WIFI_ERR_WPA3_NOT_SUPPORTED
@ WIFI_ERR_CONNECTION_FAILED
@ WIFI_ERR_CONFIG_INVALID
@ WIFI_ERR_NOT_INITIALIZED
@ WIFI_ERR_AP_STOP_FAILED
@ WIFI_ERR_ENTERPRISE_FAILED
@ WIFI_ERR_ALREADY_INITIALIZED
@ WIFI_ERR_AUTHENTICATION_FAILED
HardFOC WiFi error codes macro list.
X-macro pattern for comprehensive error enumeration. Each entry contains: X(NAME, VALUE, DESCRIPTION)
◆ X [1/3]
| #define X |
( |
| name, |
|
|
| value, |
|
|
| desc ) name = value, |
Generate WiFi error enumeration using X-macro pattern.
◆ X [2/3]
| #define X |
( |
| NAME, |
|
|
| VALUE, |
|
|
| DESC ) |
Value: case hf_wifi_err_t::NAME: \
return DESC;
Generate WiFi error enumeration using X-macro pattern.
◆ X [3/3]
| #define X |
( |
| name, |
|
|
| value, |
|
|
| desc ) |
Value: case hf_wifi_err_t::name: \
return desc;
Generate WiFi error enumeration using X-macro pattern.
◆ hf_wifi_event_callback_t
WiFi event callback function type.
◆ hf_wifi_scan_callback_t
Initial value:
std::function<void(const std::vector<hf_wifi_network_info_t>& networks)>
WiFi scan callback function type.
◆ hf_wifi_event_t
WiFi event types for callback functions.
| Enumerator |
|---|
| HF_WIFI_EVENT_STA_START | Station start
|
| HF_WIFI_EVENT_STA_STOP | Station stop
|
| HF_WIFI_EVENT_STA_CONNECTED | Station connected to AP
|
| HF_WIFI_EVENT_STA_DISCONNECTED | Station disconnected from AP
|
| HF_WIFI_EVENT_STA_AUTHMODE_CHANGE | Station auth mode changed
|
| HF_WIFI_EVENT_STA_GOT_IP | Station got IP from DHCP
|
| HF_WIFI_EVENT_STA_LOST_IP | Station lost IP
|
| HF_WIFI_EVENT_AP_START | Access Point started
|
| HF_WIFI_EVENT_AP_STOP | Access Point stopped
|
| HF_WIFI_EVENT_AP_STACONNECTED | Station connected to our AP
|
| HF_WIFI_EVENT_AP_STADISCONNECTED | Station disconnected from our AP
|
| HF_WIFI_EVENT_SCAN_DONE | Network scan completed
|
◆ hf_wifi_mode_t
WiFi operating modes.
| Enumerator |
|---|
| HF_WIFI_MODE_STATION | Station mode (client)
|
| HF_WIFI_MODE_ACCESS_POINT | Access Point mode
|
| HF_WIFI_MODE_STATION_AP | Station + Access Point mode
|
| HF_WIFI_MODE_DISABLED | WiFi disabled
|
◆ hf_wifi_power_save_t
WiFi power save modes.
| Enumerator |
|---|
| HF_WIFI_POWER_SAVE_NONE | No power save
|
| HF_WIFI_POWER_SAVE_MIN_MODEM | Minimum modem power save
|
| HF_WIFI_POWER_SAVE_MAX_MODEM | Maximum modem power save
|
◆ hf_wifi_security_t
WiFi security types.
| Enumerator |
|---|
| HF_WIFI_SECURITY_OPEN | Open network (no security)
|
| HF_WIFI_SECURITY_WEP | WEP security (deprecated)
|
| HF_WIFI_SECURITY_WPA_PSK | WPA Personal
|
| HF_WIFI_SECURITY_WPA2_PSK | WPA2 Personal
|
| HF_WIFI_SECURITY_WPA_WPA2_PSK | WPA/WPA2 Mixed Personal
|
| HF_WIFI_SECURITY_WPA2_ENTERPRISE | WPA2 Enterprise
|
| HF_WIFI_SECURITY_WPA3_PSK | WPA3 Personal
|
| HF_WIFI_SECURITY_WPA2_WPA3_PSK | WPA2/WPA3 Mixed Personal
|
| HF_WIFI_SECURITY_WPA3_ENTERPRISE | WPA3 Enterprise
|
| HF_WIFI_SECURITY_WAPI_PSK | WAPI Personal
|
◆ hf_wifi_state_t
WiFi connection states.
| Enumerator |
|---|
| HF_WIFI_STATE_DISCONNECTED | Disconnected from network
|
| HF_WIFI_STATE_CONNECTING | Attempting to connect
|
| HF_WIFI_STATE_CONNECTED | Connected to network
|
| HF_WIFI_STATE_DISCONNECTING | Disconnecting from network
|
| HF_WIFI_STATE_RECONNECTING | Attempting to reconnect
|
| HF_WIFI_STATE_AP_STARTED | Access Point started
|
| HF_WIFI_STATE_AP_STOPPED | Access Point stopped
|
| HF_WIFI_STATE_SCANNING | Scanning for networks
|
◆ GetErrorString()
Get error description string.
Helper function to convert error enum to string.
- Parameters
-
- Returns
- Error description string
◆ HfWifiErrToString()
| constexpr std::string_view HfWifiErrToString |
( |
hf_wifi_err_t | err | ) |
|
|
constexprnoexcept |
Convert hf_wifi_err_t to human-readable string.
- Parameters
-
| err | The error code to convert |
- Returns
- Pointer to error description string