Redesign it all with MQTT!
If any of you guys were following along with the developments of M5’s RFID, you know the general structure was to use HTTP Requests to transfer data between a client and server. However, this setup was really bottlenecked by the rpi pico’s networking libraries, which made it almost impossible to create different requests. As such, we have decided to completely redesign the system using MQTT as the primary communication protocol.
A quick example setup of MQTT
MQTT is an internet protocol built on top of TCP, which allows different devices to send “published events”, that get sent to a central MQTT Broker. This device will then relay the events to devices which are subscribed to that events. This allows for a very simple design thats much more lightweight than HTTP requests. This setup avoids running a full web server, and keeps the whole design much more minimal.
To implement MQTT on M5’s network, I will be using Mosquitto as the MQTT broker of choice, and Eclipse paho, as the MQTT library on the Raspberry Pi. Hopefully, this setup should simplify our design significantly.