Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Get gateway address in Arduino using ESP8266

I need the default gateway IP address for my ESP8266. I know that in LUA you can retrieve it with this code:

ip, netmask, gateway = wifi.sta.getip()
print(gateway)

But how using Arduino/C++?

like image 950
Fabiosoft Avatar asked Oct 19 '25 03:10

Fabiosoft


1 Answers

Use WiFi.gatewayIP().toString() to get it as string.

like image 143
cagdas Avatar answered Oct 22 '25 07:10

cagdas