I have built a "bare minimum" access point on a Pico W and cannot attach to it via Windows 11 or rPI Zero 2 W. I can see the access point on Windows but I get a network key error like: "The network key is not correct. Please try again.". The Zero 2 W (using sudo raspi-config) also complains about a key error but I didn't write down the words.
I have been banging my head against this for a couple of days. At one point I nuked my Pico and reinstalled an earlier MicroPython but that didn't help.
I'm using Thonny 4.1.4; MicroPython v1.23.0 on 2024-06-02; Raspberry Pi Pico W with RP2040
I thought I got this right but I'm not sure. Here is the code:Code:
import networkfrom time import sleep# making an access pointap = network.WLAN(network.AP_IF)ap.config(essid='PICO', password='123456')ap.active(True)while ap.active() == False: passprint('AP Mode Is Active, You can Now Connect to '+'PICO')count = 0while True: print('count '+str(count)) count += 1 sleep (5)
If haven't run a comparison, but the official Micropython documentation appears to say that an interface must have been active-ated before any other methods can be invoked on it.
Ref: https://docs.micropython.org/en/latest/ ... .WLAN.html
Perhaps WLAN.active() needs to precede WLAN.config() ?
And the documentation does not mention essid or password as valid keys for arguments to WLAN.config()
Or maybe the documentation and reality don't align. There is a 2-year-old discussion about this -
https://github.com/micropython/micropython/issues/8858
{note that this is historic, don't get confused by the coincidental closeness of the dates.}
Statistics: Posted by B.Goode — Tue Jul 09, 2024 4:00 pm