with this code:
wifi.setmode(wifi.STATION)
wifi.sta.config("SSID","PWD")
wifi.sta.connect()I try to get an IP from my network. But the problem is that the function is not waiting until an IP address is given.
So in my scripts other lines of code do not work because of missing IP.
Is there a mechanism to wait for the IP?
I tried with a
while (wifi.sta.getip()!=nil)A constant timer will also not work because the delay may vary.
Any ideas?