micropython-mqtt icon indicating copy to clipboard operation
micropython-mqtt copied to clipboard

ValueError thrown when connecting to WiFi on Nano RP2040

Open sebromero opened this issue 2 months ago • 5 comments

On Arduino Nano RP2040 connecting to WiFi fails due to line s.config(pm=0xA11140) which throws ValueError: AP required. I'm on MicroPython 1.26.1 and Nina FW 2.0.0.

sebromero avatar Oct 26 '25 22:10 sebromero

On Arduino Nano RP2040 connecting to WiFi fails due to line s.config(pm=0xA11140) which throws ValueError: AP required. I'm on MicroPython 1.26.1 and Nina FW 2.0.0.

You know that line is for a Rpi pico w? Just comment it out.

ebolisa avatar Oct 26 '25 23:10 ebolisa

@ebolisa I figured, but since this package is supposed to be compatible with Arduino Nano RP2040 Connect, it might make sense to check for the board in addition to the platform and skip that command for that board.

sebromero avatar Oct 27 '25 00:10 sebromero

@ebolisa I figured, but since this package is supposed to be compatible with Arduino Nano RP2040 Connect, it might make sense to check for the board in addition to the platform and skip that command for that board.

I recall one of the files does check for the type of board and, based on the result, the right pin for a LED is selected.

ebolisa avatar Oct 27 '25 09:10 ebolisa

Unfortunately my attempts to run MicroPython on the Arduino Nano RP2040 Connect were a failure, even after working with Jimmo. I gave up in disgust and consigned the thing to the bin.

I would be open to a PR that fixes issues with this platform.

peterhinch avatar Oct 28 '25 08:10 peterhinch

Thank you @peterhinch , I'll give it a shot.

sebromero avatar Oct 28 '25 11:10 sebromero