mirror of
https://github.com/esp8266/Arduino.git
synced 2025-09-08 06:28:00 +03:00
Expand access to SDK's struct bss_info (#8683)
The NONOS SDK's `struct bss_info` in `user_interface.h` has grown since the beginning of this project. The additional elements are not accessible. Add a method for R/O access to full `struct bss_info`. See #7965 (comment)
This commit is contained in:
@@ -147,6 +147,14 @@ void ESP8266WiFiScanClass::scanDelete() {
|
||||
_scanComplete = false;
|
||||
}
|
||||
|
||||
/**
|
||||
* returns const pointer to the requested scanned wifi entry for furthor parsing.
|
||||
* @param networkItem int
|
||||
* @return struct bss_info*, may be NULL
|
||||
*/
|
||||
const bss_info *ESP8266WiFiScanClass::getScanInfoByIndex(int i) {
|
||||
return reinterpret_cast<const bss_info*>(_getScanInfoByIndex(i));
|
||||
};
|
||||
|
||||
/**
|
||||
* loads all infos from a scanned wifi in to the ptr parameters
|
||||
|
@@ -41,6 +41,7 @@ class ESP8266WiFiScanClass {
|
||||
void scanDelete();
|
||||
|
||||
// scan result
|
||||
const bss_info *getScanInfoByIndex(int i);
|
||||
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);
|
||||
|
Reference in New Issue
Block a user