Other than 'essid' not being what I would use I can't see why it doesn't work. This is what I have used and that has worked for connecting from an Android phone and another Pico W but I didn't test beyond that, didn't try connecting from a Pi nor Windows..
Make sure you power-cycle your Pico W before running the code to ensure networking is reset to its default state.
Code:
ssid = "?"password = "?" # Set to empty string to have an Open Access Pointif password == "": print("Creating Open Access Point '{}'".format(ssid))else: print("Creating Access Point '{}' with Password '{}".format(ssid, password))ap = network.WLAN(network.AP_IF)if password == "" : ap.config(ssid=ssid, security=0)else : ap.config(ssid=ssid, password=password)ap.config(pm=0xA11140)ap.active(True)while not ap.active(): print(" Waiting") time.sleep(1)if password == "" : print("Open Access Point created")else : print("Access Point created")info = ap.ifconfig()desc = ["IP Address", "Netmask", "Gateway", "DNS"]for n in range(4): print(" {:<12} : {}".format(desc[n], info[n]))
Statistics: Posted by hippy — Wed Jul 10, 2024 11:44 am