MQTT-SN via UDP
Embedded messaging system built on Raspberry Pi Pico W to support reliable MQTT-SN communication, QoS delivery, and image transfer across an MQTT-SN to MQTT pipeline.

Project Overview
This project implements MQTT-SN on the Raspberry Pi Pico W for reliable wireless communication in resource-constrained embedded environments. The system supports dependable message delivery across QoS 0, QoS 1, and QoS 2, while also handling chunked image transfer from an SD card through an MQTT-SN gateway and into standard MQTT subscribers.
Key Highlights
Implemented an MQTT-SN client on Raspberry Pi Pico W for lightweight embedded communication over UDP.
Supported QoS 0, QoS 1, and QoS 2 flows with timer-based retransmission and reliability handling.
Built SD-card image transfer with chunking, publish sequencing, and subscriber-side reassembly.
Integrated Paho MQTT-SN Gateway and Mosquitto broker to bridge MQTT-SN traffic into standard MQTT workflows.
Designed reusable Wi-Fi UDP and FAT filesystem driver abstractions for embedded networking and storage.
Used Pico W dual-core execution to separate networking/protocol tasks from file I/O and buffering.
Problem
Traditional MQTT relies on TCP and is not always ideal for constrained embedded devices operating with limited memory, power, and unstable wireless conditions. The challenge was to build a lightweight yet reliable communication system that supports QoS guarantees, topic registration, and binary file transfer in an IoT setting.
Solution
The system implements a full MQTT-SN client over UDP on Raspberry Pi Pico W, connected through a Paho MQTT-SN Gateway that translates traffic into standard MQTT for a Mosquitto broker and downstream subscribers. It includes topic registration, publish/subscribe workflows, timer-wheel-based retransmission, and SD-card-backed image chunking and reassembly, enabling both text messaging and reliable binary transfer across the embedded messaging pipeline.
Outcome
The project delivered a working embedded communication system that demonstrates protocol implementation, retransmission logic, and end-to-end data transfer on constrained hardware. It strengthened my experience in embedded C, MQTT-SN internals, UDP networking, file I/O, driver design, and reliability-focused system testing.