Wio RP2040 mini dev board - MQTT source code

From the Wio RP240 example using an MQTT client, you have to import a package called mqtt. This package has several differences from the regular MicroPython package umqtt.simple. For example:

  • topic and msg are passed as strings, unlike umqtt,simple which uses byte objects.
  • the subscribe callback takes 1 parameter which is an array containing two strings - the topic and message, unlike the umqtt.simple subscribe call back which takes 2 parameters topic and message which are byte objects

Can you provide a link to the documentation/source code for the MQTT client you are using?

Hi, can you tell me more details, like what tutorial to follow after needing this?

Thanks for responding to my question.

I am using the Wio Rp2040 mini dev board tutorial here:
https://wiki.seeedstudio.com/Use_MQTT_to_remotely_light_up_LED_lights/
as an example to write my python code to monitor onewire and other sensors. I want to use my code on the RP2040 and other SOC like ESP 8266. The since the examples don’t use the regular Micropython module umqtt.simple, I’d like to know what the differences are and whether it would work on the ESP.

It seems strange to be using examples like the MQTT and other networking examples as the only documentation for the interface to modules, especially when the interface is not the same as the standard Micropython version of the module.

Sorry, this software is not developed by us, so we have no way to provide the source code of MQTT, and we have not written a complete set of tutorials about the MQTT client. We only use this software on hardware that needs to be used. With a simple tutorial, we have not done any relevant tests on whether the 2040 can be used with ESP.