mqtt_as Arduino RP2040 Connect

RP2040 based microcontroller boards running MicroPython.
Target audience: MicroPython users with an RP2040 boards.
This does not include conventional Linux-based Raspberry Pi boards.
beetle
Posts: 51
Joined: Sat Oct 16, 2021 11:35 am

Re: mqtt_as Arduino RP2040 Connect

Post by beetle » Sat Apr 23, 2022 4:04 pm

pythoncoder wrote:
Tue Apr 12, 2022 10:54 am
The message about "expected 1.4.8" must be referring to the NINA-W102 module firmware. This can be upgraded using this procedure but (see my posts above) I didn't find this easy. It's worth doing, but it won't fix your problem.

The difficulties connecting really shouldn't happen. I think there is no escaping that (even with my 1.4.8) the WiFi firmware support is flaky.
Thanks for getting the mqtt_as working on the Arduino RP2040. I'll be giving it a go soon.

First up I tried to update the board from the link you provided, and I also did not find it easy. I tried a number of times both using the Arduino IDE (old and new versions) and also updating via the Arduino cloud. Eventually the Arduino cloud was persuaded to update the board, so I hope I have all the latest requirements on the board.

Next up is to again try to put micro-python on the board. Last time, installing mp from my mac and programming the board via the Thonny running on my mac, when the board was connected I kept getting a 'no-name' folder appearing on my mac similar to what circuitpython does (although it calls its folder 'circuitpython').

No doubt I will find out if this still happens but just so I'm forewarned, is this no-name folder expected when running micropython on this board on a mac (it does not for all my other mp boards), and if not, and it happens again, should I be raising an issue on the micropython github, or mentioning it in the 'other boards' section of this forum, or perhaps raising it somewhere with the Arduino folks?

User avatar
pythoncoder
Posts: 5956
Joined: Fri Jul 18, 2014 8:01 am
Location: UK
Contact:

Re: mqtt_as Arduino RP2040 Connect

Post by pythoncoder » Sat Apr 23, 2022 5:54 pm

I'm not sure about "no name" as I've never used a mac. The normal outcome on Linux is that in boot mode a folder opens. When you drag the firmware file onto the open folder, the firmware gets copied across. The chip then boots, but because MicroPython doesn't support MSC (mass storage) mode the folder becomes invalid and Linux complains. This is normal - close the folder and access the REPL via USB serial e.g. mpremote or rshell.
Peter Hinch
Index to my micropython libraries.

hippy
Posts: 130
Joined: Sat Feb 20, 2021 2:46 pm
Location: UK

Re: mqtt_as Arduino RP2040 Connect

Post by hippy » Sun Apr 24, 2022 1:42 pm

pythoncoder wrote:
Sat Apr 23, 2022 5:54 pm
The chip then boots, but because MicroPython doesn't support MSC (mass storage) mode the folder becomes invalid and Linux complains.
It is worth noting that recent MicroPython releases can support MSC for RP2 builds .

There is a "#define MICROPY_HW_USB_MSC" in some of the boards' 'mpconfigboard.h' file. It is present and enabled for ARDUINO_NANO_RP2040_CONNECT, commented out for PICO, not present in the others.

https://github.com/micropython/micropyt ... oard.h#L12
https://github.com/micropython/micropyt ... board.h#L6

User avatar
pythoncoder
Posts: 5956
Joined: Fri Jul 18, 2014 8:01 am
Location: UK
Contact:

Re: mqtt_as Arduino RP2040 Connect

Post by pythoncoder » Sun Apr 24, 2022 1:59 pm

Good point.

FWIW I think MSC mode is a complete pain. I end up repeatedly explaining why people's filesystems are trashed.
Peter Hinch
Index to my micropython libraries.

beetle
Posts: 51
Joined: Sat Oct 16, 2021 11:35 am

Re: mqtt_as Arduino RP2040 Connect

Post by beetle » Mon Apr 25, 2022 9:49 pm

pythoncoder wrote:
Fri Apr 22, 2022 2:03 pm
The issues raised in the ticket are now fixed. The Arduino RP2040 Connect with NINA firmware 1.4.8 and today's firmware build now works with the official MQTT library.

I have pushed an update to mqtt_as which works with this hardware.
I've just downloaded your latest mqtt_as.py to the Arduino RP2040and its now working perfectly, so many thanks for that. Thank you very much too for your guidance on getting this board up and running as well :D

User avatar
pythoncoder
Posts: 5956
Joined: Fri Jul 18, 2014 8:01 am
Location: UK
Contact:

Re: mqtt_as Arduino RP2040 Connect

Post by pythoncoder » Tue Apr 26, 2022 10:58 am

Excellent! Thanks for letting me know. :D
Peter Hinch
Index to my micropython libraries.

Post Reply