File tree Expand file tree Collapse file tree 2 files changed +13
-0
lines changed 
libraries/ESP8266WiFi/src Expand file tree Collapse file tree 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) {
504504 return  IPAddress (dns_getserver (dns_no));
505505}
506506
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+ 
507519/* *
508520 * Return Connection status. 
509521 * @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 {
7070 IPAddress gatewayIP ();
7171 IPAddress dnsIP (uint8_t  dns_no = 0 );
7272
73+  IPAddress broadcastIP ();
7374 //  STA WiFi info
7475 wl_status_t  status ();
7576 String SSID () const ;
                                 You can’t perform that action at this time. 
               
                  
0 commit comments