Skip to content

Commit

Permalink
Merge branch 'master' into wifi_server_op_bool
Browse files Browse the repository at this point in the history
  • Loading branch information
d-a-v authored Nov 4, 2023
2 parents 1d764a8 + 497dacc commit acaba42
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 1 deletion.
8 changes: 7 additions & 1 deletion doc/filesystem.rst
Original file line number Diff line number Diff line change
Expand Up @@ -228,10 +228,16 @@ use esptool.py.

*ESP8266LittleFS* is the equivalent tool for LittleFS.

- Download the 2.6.0 or later version of the tool: https://github.com/earlephilhower/arduino-esp8266littlefs-plugin/releases
For Arduino IDE 1.x:
- Download the latest plugin from: https://github.com/earlephilhower/arduino-esp8266littlefs-plugin/releases
- Install as above
- To upload a LittleFS filesystem use Tools > ESP8266 LittleFS Data Upload

For Arduino IDE 2.x:
- Download the latest plugin from: https://github.com/earlephilhower/arduino-littlefs-upload/releases
- Follow the manual installation instructions in: https://github.com/earlephilhower/arduino-littlefs-upload/blob/main/README.md
- To upload a LittleFS filesystem use `Ctrl`+`Shift`+`P` and then select the `Upload LittleFS to Pico/ESP8266` item


File system object (SPIFFS/LittleFS/SD/SDFS)
--------------------------------------------
Expand Down
12 changes: 12 additions & 0 deletions libraries/ESP8266WiFi/src/ESP8266WiFiSTA.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -607,6 +607,18 @@ uint8_t* ESP8266WiFiSTAClass::BSSID(void) {
return reinterpret_cast<uint8_t*>(conf.bssid);
}

/**
* Fill the current bssid / mac associated with the network if configured
* @param bssid pointer to uint8_t array with length WL_MAC_ADDR_LENGTH
* @return bssid uint8_t *
*/
uint8_t* ESP8266WiFiSTAClass::BSSID(uint8_t* bssid) {
struct station_config conf;
wifi_station_get_config(&conf);
memcpy(bssid, conf.bssid, WL_MAC_ADDR_LENGTH);
return bssid;
}

/**
* Return the current bssid / mac associated with the network if configured
* @return String bssid mac
Expand Down
1 change: 1 addition & 0 deletions libraries/ESP8266WiFi/src/ESP8266WiFiSTA.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ class ESP8266WiFiSTAClass: public LwipIntf {
String psk() const;

uint8_t * BSSID();
uint8_t * BSSID(uint8_t* bssid);
String BSSIDstr();

int8_t RSSI();
Expand Down
15 changes: 15 additions & 0 deletions libraries/ESP8266WiFi/src/ESP8266WiFiScan.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,21 @@ uint8_t * ESP8266WiFiScanClass::BSSID(uint8_t i) {
return it->bssid;
}

/**
* fill MAC / BSSID of scanned wifi
* @param i specify from which network item want to get the information
* @param bssid pointer to uint8_t array with length WL_MAC_ADDR_LENGTH
* @return uint8_t * MAC / BSSID of scanned wifi
*/
uint8_t * ESP8266WiFiScanClass::BSSID(uint8_t i, uint8_t* bssid) {
struct bss_info* it = reinterpret_cast<struct bss_info*>(_getScanInfoByIndex(i));
if(!it) {
return 0;
}
memcpy(bssid, it->bssid, WL_MAC_ADDR_LENGTH);
return bssid;
}

/**
* return MAC / BSSID of scanned wifi
* @param i specify from which network item want to get the information
Expand Down
1 change: 1 addition & 0 deletions libraries/ESP8266WiFi/src/ESP8266WiFiScan.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ class ESP8266WiFiScanClass {
uint8_t encryptionType(uint8_t networkItem);
int32_t RSSI(uint8_t networkItem);
uint8_t * BSSID(uint8_t networkItem);
uint8_t * BSSID(uint8_t networkItem, uint8_t* bssid);
String BSSIDstr(uint8_t networkItem);
int32_t channel(uint8_t networkItem);
bool isHidden(uint8_t networkItem);
Expand Down

0 comments on commit acaba42

Please sign in to comment.