Skip to content

Commit 8943ac4

Browse files
committed
add softAPgetStationNum
1 parent 293e55c commit 8943ac4

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

libraries/ESP8266WiFi/src/ESP8266WiFiAP.cpp

+9
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,15 @@ bool ESP8266WiFiAPClass::softAPdisconnect(bool wifioff) {
186186
return ret;
187187
}
188188

189+
190+
/**
191+
* Get the count of the Station / client that are connected to the softAP interface
192+
* @return Stations count
193+
*/
194+
uint8_t ESP8266WiFiAPClass::softAPgetStationNum() {
195+
return wifi_softap_get_station_num();
196+
}
197+
189198
/**
190199
* Get the softAP interface IP address.
191200
* @return IPAddress softAP IP

libraries/ESP8266WiFi/src/ESP8266WiFiAP.h

+2
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ class ESP8266WiFiAPClass {
4040
bool softAPConfig(IPAddress local_ip, IPAddress gateway, IPAddress subnet);
4141
bool softAPdisconnect(bool wifioff = false);
4242

43+
uint8_t softAPgetStationNum();
44+
4345
IPAddress softAPIP();
4446

4547
uint8_t* softAPmacAddress(uint8_t* mac);

0 commit comments

Comments
 (0)