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...


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 (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 ()
 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...


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

Detailed Description

Control and monitoring of WiFi access point interface.

Access point class.

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
How is wifi access point dhcp controlled?

Function Documentation

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

Configure WiFi AP.

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.

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 ( )

Get WiFi AP MAC address.

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.

addressNew IP address for WiFi AP
Return values
boolTrue on success

Variable Documentation

AccessPointClass WifiAccessPoint

Global instance of WiFi access point object.

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