Sming Framework API
Sming - Open Source framework for high efficiency WiFi SoC ESP8266 native development with C++ language.
StationClass Class Reference
Inheritance diagram for StationClass:
ISystemReadyHandler

Public Member Functions

void enable (bool enabled, bool save=false)
 Enable / disable WiFi station. More...
 
bool isEnabled ()
 Get WiFi station enable status. More...
 
bool config (String ssid, String password, bool autoConnectOnStartup=true, bool save=true)
 Configure WiFi station. More...
 
bool connect ()
 Connect WiFi station to network. More...
 
bool disconnect ()
 Disconnect WiFi station from network. More...
 
bool isConnected ()
 Get WiFi station connectoin status. More...
 
bool isConnectionFailed ()
 Get WiFi station connection failure status. More...
 
EStationConnectionStatus getConnectionStatus ()
 Get WiFi station connection status. More...
 
const char * getConnectionStatusName ()
 Get WiFi station connection status name. More...
 
bool isEnabledDHCP ()
 Get WiFi station DHCP enabled status. More...
 
void enableDHCP (bool enable)
 Enable or disable WiFi station DHCP. More...
 
void setHostname (String hostname)
 Set WiFi station DHCP hostname. More...
 
String getHostname ()
 Set WiFi station DHCP hostname. More...
 
IPAddress getIP ()
 Get WiFi station IP address. More...
 
String getMAC ()
 Get WiFi station MAC address. More...
 
IPAddress getNetworkMask ()
 Get WiFi station network mask. More...
 
IPAddress getNetworkGateway ()
 Get WiFi station default gateway. More...
 
IPAddress getNetworkBroadcast ()
 GetWiFi station broadcast address. More...
 
bool setIP (IPAddress address)
 Set WiFi station IP address. More...
 
bool setIP (IPAddress address, IPAddress netmask, IPAddress gateway)
 Set WiFi station IP parameters. More...
 
String getSSID ()
 Get WiFi station SSID. More...
 
String getPassword ()
 Get WiFi station password. More...
 
sint8 getRssi ()
 
uint8 getChannel ()
 
bool startScan (ScanCompletedDelegate scanCompleted)
 Start WiFi station network scan. More...
 
void waitConnection (ConnectionDelegate successfulConnected)
 Assign handler for WiFi station connection. More...
 
void waitConnection (ConnectionDelegate successfulConnected, int secondsTimeOut, ConnectionDelegate connectionNotEstablished)
 Assign handler for WiFi station connection with timeout. More...
 
void smartConfigStart (SmartConfigType sctype, SmartConfigDelegate callback=NULL)
 Start WiFi station smart configuration. More...
 
void smartConfigStop ()
 Stop WiFi station smart configuration. More...
 

Protected Member Functions

virtual void onSystemReady ()
 Handle system ready events. More...
 
void internalCheckConnection ()
 
void internalSmartConfig (sc_status status, void *pdata)
 

Static Protected Member Functions

static void staticScanCompleted (void *arg, STATUS status)
 
static void staticCheckConnection ()
 
static void staticSmartConfigCallback (sc_status status, void *pdata)