WiFi Access Point (AP)
The WiFi access point enables the ESP to host its own WiFi network to which other devices can connect.
API Reference
Header File
Classes
-
class WifiAp : public espp::BaseComponent
WiFi Access Point (AP)
WiFi Access Point Example
espp::WifiAp wifi_ap({.ssid = CONFIG_ESP_WIFI_SSID, .password = CONFIG_ESP_WIFI_PASSWORD});
Note
If CONFIG_ESP32_WIFI_NVS_ENABLED is set to
y
(which is the default), then you must ensure that you callnvs_flash_init()
prior to creating the WiFi Access Point.Public Functions
-
inline explicit WifiAp(const Config &config)
Initialize the WiFi Access Point (AP)
- Parameters
config – WifiAp::Config structure with initialization information.
-
inline const std::string &get_name() const
Get the name of the component
Note
This is the tag of the logger
- Returns
A const reference to the name of the component
-
inline void set_log_tag(const std::string_view &tag)
Set the tag for the logger
- Parameters
tag – The tag to use for the logger
-
inline espp::Logger::Verbosity get_log_level() const
Get the log level for the logger
See also
See also
- Returns
The verbosity level of the logger
-
inline void set_log_level(espp::Logger::Verbosity level)
Set the log level for the logger
See also
See also
- Parameters
level – The verbosity level to use for the logger
-
inline void set_log_verbosity(espp::Logger::Verbosity level)
Set the log verbosity for the logger
See also
See also
See also
Note
This is a convenience method that calls set_log_level
- Parameters
level – The verbosity level to use for the logger
-
inline espp::Logger::Verbosity get_log_verbosity() const
Get the log verbosity for the logger
See also
See also
See also
Note
This is a convenience method that calls get_log_level
- Returns
The verbosity level of the logger
-
inline void set_log_rate_limit(std::chrono::duration<float> rate_limit)
Set the rate limit for the logger
See also
Note
Only calls to the logger that have _rate_limit suffix will be rate limited
- Parameters
rate_limit – The rate limit to use for the logger
-
struct Config
-
inline explicit WifiAp(const Config &config)