Status API
gatewayIP
The gatewayIP function will return the gateway IP address of the connected network.
Note: the network connection status should be CONNECTED
in order for this function to work properly. You can verify this using getConnectionStatus
function.
API Reference
IPAddress ip = NW.gatewayIP();
String ip = NW.gatewayIP().toString();