Extreme MQTT on PicoRuby
summary
A C binding called picoruby-net-mqtt-femto runs LWIP's MQTT client on a Raspberry Pi Pico W and implements QoS 0 and QoS 1 with automatic retransmit and exponential backoff. Connection uses cyw43_arch_poll outside the LWIP lock to avoid a deadlock, the receive ring buffer is 4 slots (1,180 bytes), and RAM accounting shows a 150 KB mrbc heap + 90 KB LWIP BSS leaving ~3 KB free so MQTTS fails because Mbed TLS requests ~40 KB; this prototype controls an industrial switch and mostly works within the RP2040 264 KB limit.
AI-written summary · about
chapters (7)
- 0:00Introduction
- 3:32What is MQTT
- 7:26Implementation layers
- 12:51Source code deep dive
- 17:55Reconnect and sleep
- 20:08Memory limits
- 26:09Wrap-up and limits
related talks
01h 26mRaspberry Pi Pico with C++OS: Coroutines and std::execution in Embedded Systems
33mmruby/c: Running on Less Than 64KB RAM Microcontroller
58mImplementing a Modern C++ MQTT Client for Embedded Devices
30mPicoruby and PRK Firmware
43mUsing Both Cores of Raspberry Pi Pico with C++OS
31mA Beginner's Complete Guide to Microcontroller Programming w..
12mMQTT-SN in Zephyr: Lightweight Messaging for Constrained Devices
39mA Slice of Zephyr Pi!
