Discussion Forums

WiFi.localIP() in setup()

#1

Hi,

is it possible to retrieve the local IP (assigned by DHCP) in setup()?
When I call WiFi.localIP() it always returns 0.0.0.0
The first call of the function WiFi.localIP() in loop() will retrieve it’s actual assigned IP address.

Thomas