Hi
At my university, we have a dedicated iot-network for various sensors and micro-controllers to connect to. This network is protected only by a white-list and uses an empty password. I have several devices connected to this network, including M5-stacks and a Pi 3, with no problems.
However, the Pico W seems to have a problem with the empty password. I can scan the network with no problems:
wlan.scan()
[.... (b'device', b'\x00,\xc8\x87\r@', 11, -77, 0, 1),
(b'eduroam', b'\x00,\xc8\x87\x0ba', 11, -84, 5, 2),
(b'device', b'\x00,\xc8\x87\x0b`', 11, -86, 0, 1),
...]
But when I try to connect, I get this error:
wlan.connect('device')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
OSError: [Errno 1] EPERM
>>>
Also, using an empty string as password gives same result:
wlan.connect('device', '')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
OSError: [Errno 1] EPERM
I can connect the same unit to my home network without problems, so I am fairly sure the Pico works (also, I have confirmed this on two units).
Any suggestions as to what I can do to get around this?
Best regards
Robert
Connect pico to wifi without password
Re: Connect pico to wifi without password
In the MicroPython doc it is declared this way
Have you tried key=NoneWLAN.connect(ssid=None, key=None, *, bssid=None)
Connect to the specified wireless network, using the specified key. If bssid is given then the connection will be
restricted to the access-point with that MAC address (the ssid must also be specified in this case).
-
- Posts: 2
- Joined: Wed Aug 03, 2022 7:48 pm
Re: Connect pico to wifi without password
Yes, this unfortunately gives the same result
Re: Connect pico to wifi without password
I have the same problem? Any progress?
-
- Posts: 2
- Joined: Thu Aug 18, 2022 1:51 pm
Re: Connect pico to wifi without password
I also have the same issue.
Re: Connect pico to wifi without password
Does the network have no security (i.e. open), or does it have an empty key?
You need to use
connect("network", security=0)
if it's an open network.
and
connect("network", key="")
if it's an empty key.
I think... It's also possible this is a bug with the Pico W. Can you try both and let me know.
You need to use
connect("network", security=0)
if it's an open network.
and
connect("network", key="")
if it's an empty key.
I think... It's also possible this is a bug with the Pico W. Can you try both and let me know.
-
- Posts: 2
- Joined: Thu Aug 18, 2022 1:51 pm
Re: Connect pico to wifi without password
The network has no security, but I tried both just to be sure and I still got the same error.
Re: Connect pico to wifi without password
OK thanks. Looks like there's already an issue tracking this -- https://github.com/micropython/micropython/issues/9016