Skip to content
Maximiliano Duarte edited this page Dec 21, 2015 · 13 revisions

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.

boolean WiFiManager::autoConnect()

Description

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;

Signatures

boolean autoConnect()

Arguments

none

Return value

Boolean, true if connected

boolean WiFiManager::autoConnect(char const *apName);

Description

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;

Signatures

boolean autoConnect(char const *apName)

Arguments

apName Desired SSID name. Note: in the version staging of ArduinoESP8266 does not work and always puts IA_THINKER or random SSID

Return value

Boolean, true if connected

boolean WiFiManager::autoConnect(char const *apName, char const *apPasswd);

Description

You can and should password protect the configuration access point. Simply add the password as a second parameter to autoConnect. A short password seems to have unpredictable results so use one that's around 8 characters or more in length. If not have saved a value, enter in AP mode. The name of the SSID will be "ESP" + ID chip;

Signatures

boolean autoConnect(char const *apName, char const *apPasswd)

Arguments

apName Desired SSID name. apPasswd pre-entered password

Note: in the version staging of ArduinoESP8266 does not work and always puts IA_THINKER or random SSID

Return value

Boolean, true if connected

void WiFiManager::resetSettings()

Description

Need to call it only after lib has been started with autoConnect or begin

Signatures

void resetSettings()

Arguments

none

Return value

none

void WiFiManager::setAPConfig(IPAddress ip, IPAddress gw, IPAddress sn);

Description

Sets a custom ip /gateway /subnet configuration

Signatures

setAPConfig(IPAddress ip, IPAddress gw, IPAddress sn);

Arguments

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);
Return value

none

void WiFiManager::setAPCallback( void (*func)(void) )

Description

Set function callback when enter in AP mode

Signatures

void setAPCallback( void (*func)(void) )

Arguments

pointer to function callback

boolean WiFiManager::hasConnected()

Description

It indicates whether it was possible to connect to a network

Signatures

boolean hasConnected()

Arguments

none

Return value

Returns true if the connection was successful

void WiFiManager::setTimeout(unsigned long seconds);

Description

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

Signatures

void setTimeout(unsigned long seconds)

Arguments

seconds time in seconds

Return value

none

void WiFiManager::setDebugOutput(boolean debug)

Description

Activate the serial output for debug Debug is enabled by default on Serial. To disable add before autoConnect

Signatures

void setDebugOutput(boolean debug)

Arguments

debug true if you want send to serial debug

Return value

none

String WiFiManager::urldecode(const char*)

Description

Decode values from URL

Signatures

String urldecode(const char* scr)

Arguments

scr pointer to array of char, to decode values from URL

Return value

String object

l

Clone this wiki locally