File tree 2 files changed +13
-0
lines changed
libraries/ESP8266WiFi/src
2 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -504,6 +504,18 @@ IPAddress ESP8266WiFiSTAClass::dnsIP(uint8_t dns_no) {
504
504
return IPAddress (dns_getserver (dns_no));
505
505
}
506
506
507
+ /* *
508
+ * Get the broadcast ip address.
509
+ * @return IPAddress Bradcast IP
510
+ */
511
+ IPAddress ESP8266WiFiSTAClass::broadcastIP ()
512
+ {
513
+ struct ip_info ip;
514
+ wifi_get_ip_info (STATION_IF, &ip);
515
+
516
+ return IPAddress (ip.ip .addr | ~(ip.netmask .addr ));
517
+ }
518
+
507
519
/* *
508
520
* Return Connection status.
509
521
* @return one of the value defined in wl_status_t
Original file line number Diff line number Diff line change @@ -70,6 +70,7 @@ class ESP8266WiFiSTAClass: public LwipIntf {
70
70
IPAddress gatewayIP ();
71
71
IPAddress dnsIP (uint8_t dns_no = 0 );
72
72
73
+ IPAddress broadcastIP ();
73
74
// STA WiFi info
74
75
wl_status_t status ();
75
76
String SSID () const ;
You can’t perform that action at this time.
0 commit comments