ESP8266
Public Member Functions | Static Protected Member Functions | Static Protected Attributes | List of all members
ESP8266WiFiScanClass Class Reference
Inheritance diagram for ESP8266WiFiScanClass:
ESP8266WiFiClass

Public Member Functions

int8_t scanNetworks (bool async=false, bool show_hidden=false)
 
int8_t scanComplete ()
 
void scanDelete ()
 
bool getNetworkInfo (uint8_t networkItem, String &ssid, uint8_t &encryptionType, int32_t &RSSI, uint8_t *&BSSID, int32_t &channel, bool &isHidden)
 
String SSID (uint8_t networkItem)
 
uint8_t encryptionType (uint8_t networkItem)
 
int32_t RSSI (uint8_t networkItem)
 
uint8_t * BSSID (uint8_t networkItem)
 
String BSSIDstr (uint8_t networkItem)
 
int32_t channel (uint8_t networkItem)
 
bool isHidden (uint8_t networkItem)
 

Static Protected Member Functions

static void _scanDone (void *result, int status)
 
static void * _getScanInfoByIndex (int i)
 

Static Protected Attributes

static bool _scanAsync = false
 
static bool _scanStarted = false
 
static bool _scanComplete = false
 
static size_t _scanCount = 0
 
static void * _scanResult = 0
 

Member Function Documentation

void * ESP8266WiFiScanClass::_getScanInfoByIndex ( int  i)
staticprotected
Parameters
ispecify from which network item want to get the information
Returns
bss_info *
void ESP8266WiFiScanClass::_scanDone ( void *  result,
int  status 
)
staticprotected

private scan callback

Parameters
resultvoid *arg
statusSTATUS
uint8_t * ESP8266WiFiScanClass::BSSID ( uint8_t  i)

return MAC / BSSID of scanned wifi

Parameters
ispecify from which network item want to get the information
Returns
uint8_t * MAC / BSSID of scanned wifi
String ESP8266WiFiScanClass::BSSIDstr ( uint8_t  i)

return MAC / BSSID of scanned wifi

Parameters
ispecify from which network item want to get the information
Returns
String MAC / BSSID of scanned wifi
int32_t ESP8266WiFiScanClass::channel ( uint8_t  networkItem)
uint8_t ESP8266WiFiScanClass::encryptionType ( uint8_t  i)

Return the encryption type of the networks discovered during the scanNetworks

Parameters
ispecify from which network item want to get the information
Returns
encryption type (enum wl_enc_type) of the specified item on the networks scanned list
bool ESP8266WiFiScanClass::getNetworkInfo ( uint8_t  i,
String &  ssid,
uint8_t &  encType,
int32_t &  rssi,
uint8_t *&  bssid,
int32_t &  channel,
bool &  isHidden 
)

loads all infos from a scanned wifi in to the ptr parameters

Parameters
networkItemuint8_t
ssidconst char**
encryptionTypeuint8_t *
RSSIint32_t *
BSSIDuint8_t **
channelint32_t *
isHiddenbool *
Returns
(true if ok)
bool ESP8266WiFiScanClass::isHidden ( uint8_t  i)

return if the scanned wifi is Hidden (no SSID)

Parameters
networkItemspecify from which network item want to get the information
Returns
bool (true == hidden)
int32_t ESP8266WiFiScanClass::RSSI ( uint8_t  i)

Return the RSSI of the networks discovered during the scanNetworks

Parameters
ispecify from which network item want to get the information
Returns
signed value of RSSI of the specified item on the networks scanned list
int8_t ESP8266WiFiScanClass::scanComplete ( )

called to get the scan state in Async mode

Returns
scan result or status -1 if scan not fin -2 if scan not triggered
void ESP8266WiFiScanClass::scanDelete ( )

delete last scan result from RAM

int8_t ESP8266WiFiScanClass::scanNetworks ( bool  async = false,
bool  show_hidden = false 
)

Start scan WiFi networks available

Parameters
asyncrun in async mode
show_hiddenshow hidden networks
Returns
Number of discovered networks
String ESP8266WiFiScanClass::SSID ( uint8_t  i)

Return the SSID discovered during the network scan.

Parameters
ispecify from which network item want to get the information
Returns
ssid string of the specified item on the networks scanned list

Member Data Documentation

bool ESP8266WiFiScanClass::_scanAsync = false
staticprotected
bool ESP8266WiFiScanClass::_scanComplete = false
staticprotected
size_t ESP8266WiFiScanClass::_scanCount = 0
staticprotected
void * ESP8266WiFiScanClass::_scanResult = 0
staticprotected
bool ESP8266WiFiScanClass::_scanStarted = false
staticprotected