-
Notifications
You must be signed in to change notification settings - Fork 2k
API reference
This is the detailed documentation of every class and function of the WiFiManager library. Some parts have been simplified to be easier to understand, so if you look at the source code, you might see some differences.
Call this function to start connection automatically, if not have saved a value, enter in AP mode. The name of the SSID will be "ESP" + ID chip;
boolean autoConnect();
none
Boolean, true if connected
Call this function to start connection automatically, if not have saved a value, enter in AP mode. The name of the SSID will be "ESP" + ID chip;
boolean autoConnect(char const *apName)
Desired SSID name. Note: in the version staging of ArduinoESP8266 does not work and always puts IA_THINKER or random SSID
Boolean, true if connected
Need to call it only after lib has been started with autoConnect or begin
void resetSettings()
none
none
Sets a custom ip /gateway /subnet configuration
setAPConfig(IPAddress ip, IPAddress gw, IPAddress sn);
ip
: IP address
gw
: Gateway Address
sn
: Subnet mask
use IPAddress function to create a valid ip chain.
IPAddress ip(192,168,1,5);
IPAddress gw(192,168,1,1);
IPAddress sn(255,255,255,0);
setAPConfig(ip, gw, sn);
none
Set function callback when enter in AP mode
void setAPCallback( void (*func)(void) );
pointer to function callback
It indicates whether it was possible to connect to a network
boolean hasConnected();
none
Returns true if the connection was successful
Sets timeout before webserver loop ends and exits even if there has been no setup. Usefully for devices that failed to connect at some point and got stuck in a webserver loop in seconds
void setTimeout(unsigned long seconds)
seconds
time in seconds
none
Activate the serial output for debug
void setDebugOutput(boolean debug)
debug
true if you want send to serial debug
none