With the supplied examples with an Internet connection, I get no connection and this output:
Client None 0.0.0.0
Connecting to wifi…
With this test program I get an internet connection:
#Pi Pico W Wlan_Test_01.py
import network
import time
ssid = '*****'
password = '*******'
wlan = network.WLAN(network.STA_IF)
wlan.active(True)
wlan.connect(ssid, password)
print("Waiting to connect:")
while not wlan.isconnected() and wlan.status() >= 0:
print(".", end="")
time.sleep(1)
print("")
print(wlan.ifconfig())
What’s wrong with the sample programs?