Pico 2 Plus W ImportError: no module named 'picowireless'

I have just received my Pico Plus 2 W and started tinkering with it.
I flashed it with pico_plus2_rp2350_wireless-11d6a944ae9ed79e89cc9082327e787fad25f653-pimoroni-micropython.uf2
From here,
Release Version 0.0.7 - PSRAM Fixed (Again) · pimoroni/pimoroni-pico-rp2350 (github.com)
And I can run the examples from here,
pimoroni-pico-rp2350/micropython/examples/pico_plus_2_w at refs/heads/examples/ppp2w · pimoroni/pimoroni-pico-rp2350 (github.com)
If I go here and try to run the scan_networks.py
pimoroni-pico/micropython/examples/pico_wireless at main · pimoroni/pimoroni-pico (github.com)

I get

>>> %Run -c $EDITOR_CONTENT

MPY: soft reboot
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: no module named 'picowireless'
>>> 

So what am I missing?

That looks to be an old example for Pico Wireless Pack - you should now just be able to use the built in MicroPython network stuff:

https://docs.micropython.org/en/latest/library/network.WLAN.html

Looks like someone posted some useful code snippets here ;)

Yes, it is an old example. It was what I found doing a quick look see on GitHub.
This code from that other thread worked.

import network

wlan = network.WLAN(network.STA_IF)
wlan.active(True)
networks = wlan.scan()

print("{} networks found:\n".format(len(networks)))
print ("{:<64} {:<8} {:<6})".format('ssid', 'channel', 'rssi'))
for net in networks:
    print ("{:<64} {:<8} {:<6}".format(net[0].decode(), net[2], net[3]))

It only found 2 networks but it worked.

@hel , Thanks for that. I did do a quick search but missed that. My brain is in a fog as I’m rather sick with Covid. I’m stuck in the house and bored out of my mind. I figured I have a go at tinkering with my new toy. Thanks again. =)

Aw, Covid is rotten - hope you feel better soon!

1 Like