PicoW does not connect to open WiFi networks (ones with no password)

Issue #288 new
Simon Walters created an issue

I noticed that PicoW support had been added :)

I can control pins fine but no luck with using WiFi

Comments (14)

  1. John Maloney repo owner

    Make sure you have the "Pico W" firmware installed. A good test is the "set user LED" block. If the non-WiFi RP2040 firmware is installed on a Pico W board, it will run but the user LED won't light because its controlled by a different pin on the Pico W board.

    You can also click the "board type" block in the Input category. It will say "Pico W" if the WiFi firmware is installed, "RP2040" if the non-WiFi firmware is installed.

    Note: if you install the Pico W firmware on a non-WiFi board it won't work at all. Internally, it is trying to communicate with the non-existent WiFi board and waiting forever for it to respond.

    If the correct firmware is installed, you should see the user LED blinking slowly while the board tries to connect to WiFi. If that happens, but it still doesn't connect, it could be a WiFI reception issue. Make sure that the antenna of the PicoW board is in "free air" and especially that it is not close to anything metal that might block the WiFi signal.

  2. Simon Walters reporter

    All tests indicate that I’ve got the PicoW firmware installed

    “Make sure that the antenna of the PicoW board is in "free air" and especially that it is not close to anything metal that might block the WiFi signal.”

    This isn’t my first rodeo John :)

    As I’m typing this, I realise I’ve not made sure the WiFi on the board works in another language - I’ll just go and try Micropython/Circuitpython on it…

  3. John Maloney repo owner

    Trying MicroPython is a good test.

    But I thought of another possible explanation. The PicoW might not be compatible with your WiFi network. The PicoW doesn't handle 5 GHz networks, only the older 2.4 GHz ones.

    The Raspberry Pi Pico W docs make a point of warning folks not to block the antenna, so that could be more of a problem with the Pico W than with other WiFi boards (e.g. ESP boards). Or maybe they only say that for the benefit of first time rodeo goers. :-)

  4. Simon Walters reporter

    Just tried it using Thonny IDE with MicroPython and it connected and gets IP address if I use my secure SSID (SKYEEF88) but not if I use my open on (CYCY) that doesn’t have password set.

    I thought that might have been the issue in MicroBlocks but my SKYEEF88 attempt didn’t work either

    But I went back to Microblocks and it turneds out that I hadn’t clicked to set the password variable so it was set to 0 :(

  5. John Maloney repo owner

    Great!

    To summarize: both MicroBlocks and MicroPython can connect to your SKYEEF88 network, but neither can connect to your CYCY network.

    Is your CYCY network using the 5 MHz band, perhaps? The Pico W WiFi chip doesn't support 5 MHz.

  6. Simon Walters reporter

    “both MicroBlocks and MicroPython can connect to your SKYEEF88 network, but neither can connect to your CYCY network”

    Yes - its the same 2.4GHz network -my access points have multiple SSID capaibility - i use the CYCY open one for house IoT to save having to use passwords :)

  7. John Maloney repo owner

    Well, that's quite puzzling. You might check your WiFi router settings to see if there is some other difference between the two networks other than fact that CYCY does not have a password.

    Another experiment would be to temporarily set a password for the CYCY network to see if that makes a difference.

    There could be code in WiFi stack for the Pico W that does not handle empty-string passwords correctly. I suspect MicroPython and MicroBlocks both use the same underlying lwip (lightweight IP) TCP/IP stack for the WiFi chip, so any issues in that stack would show up in both systems.

  8. Simon Walters reporter

    I’m imaging that that the underlying code doesn’t like non-secure networks. I don’t think many people run WiFi nowadays without a password. So just another avenue of pleasure that’s denied to me

  9. John Maloney repo owner

    Yep, looks like that's the case.

    I did some experiments using the D1 mini as a hotspot. The Pico W can connect if the network has a password of at eight characters. It cannot join the network if the password is the empty string or is seven characters. I did not test other password lengths but would guess that passwords of more than eight characters will also work and any length under eight characters will fail.

    Although this does not appear to be a bug in the MicroBlocks firmware, I'll leave the issue active so people will know about it.

    Although this does not appear to be a bug in the MicroBlocks firmware, I will leave the issue active so people will know about it.

    This is probably due to a bug in the WiFi stack. That's even more likely if MicroPython on the Pico W manifests this same behavior.

    The Pico W is only a few months old so I imagine this bug will get fixed in coming months.

    When I get some time I'll create a test case in Arduino C and report the problem to Earle Philhower, the maintainer of the Arduino framework for the Pico. He can pass it on to the upstream WiFi stack maintainers if necessary.

  10. John Maloney repo owner

    Although this does not appear to be a bug in the MicroBlocks firmware, I'll leave the issue active so people will know about it.

  11. Log in to comment