Confused about the MQTT sample :-(

Trying to compile this example (look me up - I’m an MQTT original…) on Raspberry Pi 400 in Arduino 1.8.x

It complains first about the line #include <AtWiFi.h> and if I change to rpcWifi.h it then complains:

In file included from /home/pi/Arduino/libraries/Seeed_Arduino_rpcWiFi-1.0.2/src/WiFiSTA.h:28:0,
                 from /home/pi/Arduino/libraries/Seeed_Arduino_rpcWiFi-1.0.2/src/WiFi.h:32,
                 from /home/pi/Arduino/libraries/Seeed_Arduino_rpcWiFi-1.0.2/src/rpcWiFi.h:1,
                 from /home/pi/Development/wio-mqtt/sketch_feb01a/sketch_feb01a.ino:18:
/home/pi/Arduino/libraries/Seeed_Arduino_rpcWiFi-1.0.2/src/WiFiGeneric.h:26:10: fatal error: seeed_rpcUnified.h: No such file or directory
 #include "seeed_rpcUnified.h"
          ^~~~~~~~~~~~~~~~~~~~
compilation terminated.

No sign of rpcUnified.h on my system but then, I’m not certainly my Wio Terminal is compatible, given this previous post.

It seems like a nice quality piece of kit, but I’m really unable to do anything useful with it in software, so that makes it a lot less exciting to me.

oh, okay - wow - seems like I missed some zips / GitHub resources I needed to download. I think I have them all now, but:

a) Still don’t know if my unit has the right eRPC firmware
b) there’s this…

/home/pi/Arduino/libraries/Seeed_Arduino_mbedtls-2.0.1/src/port/esp_hardware.c:11:10: fatal error: esp_system.h: No such file or directory
Multiple libraries were found for "Adafruit_ZeroDMA.h"
 #include <esp_system.h>
          ^~~~~~~~~~~~~~
 Used: /home/pi/.arduino15/packages/Seeeduino/hardware/samd/1.8.1/libraries/Adafruit_ZeroDMA
compilation terminated.
 Not used: /home/pi/Arduino/libraries/Adafruit_Zero_DMA_Library
exit status 1
Error compiling for board Seeeduino Wio Terminal.

Ah so also apparently for this I need a library from the dev branch, none of which can be simply installed.

I’m really quite experienced in all of this, but this is driving me insane (and it’s nearly 3am).

Polite request, would you please consider spending some time and effort really focused on usability here. I get that firmwares and softwares change, but if I can’t even update the firmware from a popular maker board (Ras Pi), and it doesn’t work with a known useful maker IDE (Arduino), and ArduPy doesn’t seem to work here either, I’m not going to spend time evangelising this to others.

Hi @andypiper,

Please delete any existing WiFi and Bluetooth related libraries at first:

After that install the following libraries for both Wi-Fi and Bluetooth:

Note: Make sure the mbedtls library is in dev branch (the above link already points to the dev branch)

Also the latest RTL firmware now is v2.1.1

Welcome to watch the video below to learn about installing the libraries and updating the RTL firmware:

After that watch the below video about the libraries update. We have made some changes to the libraries after the first video of the Wio Terminal Classroom with IoT has been released.

Hope it helps!

Best Regards,
Lakshantha

It is literally a brand new, 3-day old Pi 400, full OS reinstalled today. I did get confused about the required libraries as I didn’t realise I needed to download and install all of those zips and git repos, but it is clean. I guess at least one issue is that I cannot update the RTL firmware on the Wio Terminal right now, but that should be separate from the compilation of the sketch. Either way, I guess there’s no working MQTT example, which is a shame. Unfortunately that’s my weekend experimentation time gone so I guess I’ll move on to another thing.

Hi @andypiper,

Sorry to hear about the troubles.

Currently flashing the RTL firmware to Wio Terminal is only possible using Windows, Mac and Linux (X86). Unfortunately, you cannot use the RPI 400 to flash the firmware. Could you please use Windows, Mac or Linux (X86) to flash the firmware? The libraries I have shared above are all up-to-date.

Also, if you are looking into more MQTT examples, please follow the examples available on our wiki pages:

And also, for even more MQTT examples, which connect Wio Terminal to ThingSpeak, Adafruit IO, Microsoft Azure IoT, Google Cloud IoT and Node-RED, please follow this YouTube playlist.

Hope it helps!

Best Regards,
Lakshantha

I’ll see if I have time to use other systems, not sure you actually really read my main request:

would you please consider spending some time and effort really focused on usability here. I get that firmwares and softwares change, but if I can’t even update the firmware from a popular maker board (Ras Pi), and it doesn’t work with a known useful maker IDE (Arduino), and ArduPy doesn’t seem to work here either

I literally directly worked with the author of the library you mention, and I know how things work, I’ve been doing MQTT for 15+ years. I’m mostly concerned that you’re not getting a learner audience that could benefit without spending hours (and who often have a Raspberry Pi).

You may also want to write up your videos - not every developer enjoys a video overview.

Thanks for responding. If I have any time to come back to Wio Terminal then I will let you know if it is successful, in the meantime I have other boards to work with.