JBImprovWiFi for the ESP32 and ESP8266 Arduino cores.
More...
#include <JBImprovWiFi.h>
|
| void | begin () override |
| | Called from JBImprov::begin().
|
| bool | isConnected () override |
| | true when connected to a network and an IP address is assigned.
|
| bool | connect (const char *ssid, const char *password, const char *hostname) override |
| | Start connecting to a network. Must return without waiting.
|
| ConnectStatus | connectStatus () override |
| | Progress of the attempt started by connect().
|
| void | cancelConnect () override |
| | Called when JBImprov gives up on an attempt (timeout or failure).
|
| bool | localIP (char *buffer, size_t size) override |
| | Write the local IPv4 address as text.
|
| bool | startScan () override |
| | Start an asynchronous scan.
|
| int | scanStatus () override |
| | Scan progress: the number of networks found when done, or JBIMPROV_SCAN_RUNNING / JBIMPROV_SCAN_FAILED.
|
| bool | scanResult (int index, JBImprovNetwork &network) override |
| | Get network index (0 based) of the last scan.
|
| void | scanDelete () override |
| | Free the scan results.
|
| bool | setHostname (const char *hostname) override |
| | Use a new hostname. It may take effect on the next connection.
|
| bool | defaultHostname (char *buffer, size_t size) override |
| | Write the hostname to use when none is set.
|
| const char * | hardware () override |
| | Hardware chip or variant for device info, e.g. "ESP32-S3".
|
| const char * | osName () override |
| | Name of the OS or framework for device info, or nullptr to leave it out.
|
| const char * | osVersion () override |
| | Version of the OS or framework for device info, or nullptr to leave it out.
|
JBImprovWiFi for the ESP32 and ESP8266 Arduino cores.
Credentials are stored by the core (WiFi.persistent() is on by default), so after a restart a plain WiFi.begin() reconnects to the provisioned network.
◆ begin()
| void JBImprovDefaultWiFi::begin |
( |
| ) |
|
|
overridevirtual |
◆ cancelConnect()
| void JBImprovDefaultWiFi::cancelConnect |
( |
| ) |
|
|
overridevirtual |
◆ connect()
| bool JBImprovDefaultWiFi::connect |
( |
const char * | ssid, |
|
|
const char * | password, |
|
|
const char * | hostname ) |
|
overridevirtual |
Start connecting to a network. Must return without waiting.
- Parameters
-
| ssid | Network name. |
| password | Empty string for an open network. |
| hostname | Hostname to use, may be empty. |
- Returns
- false if the attempt couldn't be started.
Implements JBImprovWiFi.
◆ connectStatus()
◆ defaultHostname()
| bool JBImprovDefaultWiFi::defaultHostname |
( |
char * | buffer, |
|
|
size_t | size ) |
|
overridevirtual |
Write the hostname to use when none is set.
- Returns
- false if there is none.
Reimplemented from JBImprovWiFi.
◆ hardware()
| const char * JBImprovDefaultWiFi::hardware |
( |
| ) |
|
|
overridevirtual |
Hardware chip or variant for device info, e.g. "ESP32-S3".
Reimplemented from JBImprovWiFi.
◆ isConnected()
| bool JBImprovDefaultWiFi::isConnected |
( |
| ) |
|
|
overridevirtual |
true when connected to a network and an IP address is assigned.
Implements JBImprovWiFi.
◆ localIP()
| bool JBImprovDefaultWiFi::localIP |
( |
char * | buffer, |
|
|
size_t | size ) |
|
overridevirtual |
Write the local IPv4 address as text.
- Returns
- false if there is none.
Implements JBImprovWiFi.
◆ osName()
| const char * JBImprovDefaultWiFi::osName |
( |
| ) |
|
|
overridevirtual |
Name of the OS or framework for device info, or nullptr to leave it out.
Reimplemented from JBImprovWiFi.
◆ osVersion()
| const char * JBImprovDefaultWiFi::osVersion |
( |
| ) |
|
|
overridevirtual |
Version of the OS or framework for device info, or nullptr to leave it out.
Reimplemented from JBImprovWiFi.
◆ scanDelete()
| void JBImprovDefaultWiFi::scanDelete |
( |
| ) |
|
|
overridevirtual |
◆ scanResult()
| bool JBImprovDefaultWiFi::scanResult |
( |
int | index, |
|
|
JBImprovNetwork & | network ) |
|
overridevirtual |
Get network index (0 based) of the last scan.
- Returns
- false if out of range.
Implements JBImprovWiFi.
◆ scanStatus()
| int JBImprovDefaultWiFi::scanStatus |
( |
| ) |
|
|
overridevirtual |
Scan progress: the number of networks found when done, or JBIMPROV_SCAN_RUNNING / JBIMPROV_SCAN_FAILED.
Implements JBImprovWiFi.
◆ setHostname()
| bool JBImprovDefaultWiFi::setHostname |
( |
const char * | hostname | ) |
|
|
overridevirtual |
Use a new hostname. It may take effect on the next connection.
- Returns
- false if the hostname isn't accepted (e.g. too long).
Reimplemented from JBImprovWiFi.
◆ startScan()
| bool JBImprovDefaultWiFi::startScan |
( |
| ) |
|
|
overridevirtual |
Start an asynchronous scan.
- Returns
- false if it couldn't be started.
Implements JBImprovWiFi.
The documentation for this class was generated from the following files: