WifiControl for the ESP32: asynchronous scan and connection, the credentials are stored in the flash (Preferences, namespace "wifi") when a connection works, and used by begin().
More...
#include <WifiEsp32.h>
|
| void | begin () |
| | Station mode; connects with the stored credentials (if any).
|
| |
| bool | startScan () override |
| | Starts a scan in the background.
|
| |
| bool | scanDone (std::vector< WifiNetwork > &out) override |
| |
| void | connect (const char *ssid, const char *password) override |
| | Connects in the background; the credentials are stored when it works.
|
| |
| void | disconnect () override |
| |
| State | state () override |
| |
| std::string | ssid () override |
| | The network that is connected or that is being connected to.
|
| |
| std::string | ip () override |
| | The IP address while connected.
|
| |
| bool | hasCredentials () override |
| | Credentials are stored (they are used at the start).
|
| |
| void | forget () override |
| | Removes the stored credentials.
|
| |
| virtual | ~WifiControl ()=default |
| |
| virtual bool | startScan ()=0 |
| | Starts a scan in the background.
|
| |
| virtual bool | scanDone (std::vector< WifiNetwork > &out)=0 |
| |
| virtual void | connect (const char *ssid, const char *password)=0 |
| | Connects in the background; the credentials are stored when it works.
|
| |
| virtual void | disconnect ()=0 |
| |
| virtual State | state ()=0 |
| |
| virtual std::string | ssid ()=0 |
| | The network that is connected or that is being connected to.
|
| |
| virtual std::string | ip () |
| | The IP address while connected.
|
| |
| virtual bool | hasCredentials ()=0 |
| | Credentials are stored (they are used at the start).
|
| |
| virtual void | forget () |
| | Removes the stored credentials.
|
| |
|
| uint32_t | connectTimeoutMs = 20000 |
| | Time after which a connection attempt counts as failed.
|
| |
WifiControl for the ESP32: asynchronous scan and connection, the credentials are stored in the flash (Preferences, namespace "wifi") when a connection works, and used by begin().
Esp32Wifi wifi; void setup() { wifi.begin(); // connects with the stored credentials loginPage.setWifi(&wifi); }
◆ begin()
Station mode; connects with the stored credentials (if any).
◆ connect()
| void connect |
( |
const char * |
ssid, |
|
|
const char * |
password |
|
) |
| |
|
inlineoverridevirtual |
Connects in the background; the credentials are stored when it works.
Implements WifiControl.
◆ disconnect()
◆ forget()
Removes the stored credentials.
Reimplemented from WifiControl.
◆ hasCredentials()
Credentials are stored (they are used at the start).
Implements WifiControl.
◆ ip()
The IP address while connected.
Reimplemented from WifiControl.
◆ scanDone()
◆ ssid()
The network that is connected or that is being connected to.
Implements WifiControl.
◆ startScan()
Starts a scan in the background.
Implements WifiControl.
◆ state()
◆ connectTimeoutMs
| uint32_t connectTimeoutMs = 20000 |
Time after which a connection attempt counts as failed.
The documentation for this class was generated from the following file: