Sming Framework API
Sming - Open Source framework for high efficiency WiFi SoC ESP8266 native development with C++ language.
WiFi Access Point

Control and monitoring of WiFi access point interface. More...

Functions

void AccessPointClass::enable (bool enabled, bool save=false)
 Enable or disable WiFi AP. More...
 
bool AccessPointClass::isEnabled ()
 Get WiFi AP enable status. More...
 
bool AccessPointClass::config (const String &ssid, String password, AUTH_MODE mode, bool hidden=false, int channel=7, int beaconInterval=200)
 Configure WiFi AP. More...
 
IPAddress AccessPointClass::getIP ()
 Get WiFi AP IP address. More...
 
bool AccessPointClass::setIP (IPAddress address)
 Set WiFi AP IP addres. More...
 
String AccessPointClass::getMAC (char sep= '\0')
 Get WiFi AP MAC address. More...
 
IPAddress AccessPointClass::getNetworkMask ()
 Get WiFi AP network mask. More...
 
IPAddress AccessPointClass::getNetworkGateway ()
 Get WiFi AP default gateway. More...
 
IPAddress AccessPointClass::getNetworkBroadcast ()
 Get WiFi AP broadcast address. More...
 
String AccessPointClass::getSSID ()
 Get WiFi access point SSID. More...
 
String AccessPointClass::getPassword ()
 Get WiFi access point password. More...
 

Variables

AccessPointClass WifiAccessPoint
 Global instance of WiFi access point object. More...
 

Detailed Description

Control and monitoring of WiFi access point interface.

Access point class.

Note
The WiFi access point interface provides a WiFi network access point. Control of WiFi AP including WiFi SSID and password and IP address.
See also
WiFi Station Interface
Todo:
How is wifi access point dhcp controlled?

Function Documentation

bool AccessPointClass::config ( const String ssid,
String  password,
AUTH_MODE  mode,
bool  hidden = false,
int  channel = 7,
int  beaconInterval = 200 
)

Configure WiFi AP.

Parameters
ssidWiFi AP SSID
passwordWiFi AP password
modeWiFi AP mode
hiddenTrue to hide WiFi AP (Default: Visible)
channelWiFi AP channel (Default: 7)
beaconIntervalWiFi AP beacon interval in milliseconds (Default: 200ms)
Return values
boolTrue on success
void AccessPointClass::enable ( bool  enabled,
bool  save = false 
)

Enable or disable WiFi AP.

Parameters
enabledTrue to enable AP. False to disable.
saveTrue to save operational mode to flash, False to set current operational mode only
IPAddress AccessPointClass::getIP ( )

Get WiFi AP IP address.

Return values
IPAddressWiFi AP IP address
String AccessPointClass::getMAC ( char  sep = '\0')

Get WiFi AP MAC address.

Parameters
optionalseparator between bytes (e.g. ':')
Return values
StringWiFi AP MAC address
IPAddress AccessPointClass::getNetworkBroadcast ( )

Get WiFi AP broadcast address.

Return values
IPAddressWiFi AP broadcast address
IPAddress AccessPointClass::getNetworkGateway ( )

Get WiFi AP default gateway.

Return values
IPAddressWiFi AP default gateway
IPAddress AccessPointClass::getNetworkMask ( )

Get WiFi AP network mask.

Return values
IPAddressWiFi AP network mask
String AccessPointClass::getPassword ( )

Get WiFi access point password.

Return values
StringWiFi access point password
String AccessPointClass::getSSID ( )

Get WiFi access point SSID.

Return values
StringWiFi access point SSID
bool AccessPointClass::isEnabled ( )

Get WiFi AP enable status.

Return values
boolTrue if WiFi AP enabled.
bool AccessPointClass::setIP ( IPAddress  address)

Set WiFi AP IP addres.

Parameters
addressNew IP address for WiFi AP
Return values
boolTrue on success

Variable Documentation

AccessPointClass WifiAccessPoint

Global instance of WiFi access point object.

Note
Use WiFiAccessPoint.function to access WiFi access point functions
Example:
1 if(WiFiAccessPoint.config("ESP_AP", AUTH_OPEN))
2  WiFiAccessPoint.enable(true);