A Linux gateway that bridges serial communication (USB, serial, Bluetooth) to MQTT, enabling MQTT for microcontrollers without Ethernet or WiFi.
serial2mqtt is a Linux gateway that enables MQTT communication for microcontrollers lacking Ethernet or WiFi connectivity. It reads JSON-formatted commands from serial ports (USB, UART, Bluetooth) and translates them into MQTT publish/subscribe operations, bridging low-cost embedded devices to MQTT brokers. It solves the problem of integrating simple, serial-only microcontrollers into modern IoT ecosystems without requiring network hardware on the device itself.
Embedded developers and IoT hobbyists working with low-cost microcontrollers (e.g., STM32, ESP32 in serial mode) who need to integrate these devices into MQTT-based smart home or industrial automation systems without adding network hardware.
Developers choose serial2mqtt because it provides a lightweight, self-hosted gateway that eliminates the need for Ethernet/WiFi modules on microcontrollers, significantly reducing device cost and complexity. Its event-driven design, support for dynamic serial port management, and optional over-the-air firmware flashing offer a flexible and robust solution for serial-based IoT projects.
Implement a Linux gateway that reads serial port ( USB, serial , bluetooth) commands and transfers to MQTT host. MQTT without ethernet or Wifi on a low cost micocontroller. Don't develop a serial command interface , just use MQTT UI's and features.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Enables MQTT for cheap boards like STM32 Blue Pill and ESP32 in serial mode, reducing hardware costs and complexity, as highlighted in the README with examples.
Automatically handles USB device hot-plugging and reconnects on timeouts, ensuring reliability without manual intervention, per the event-driven architecture.
Forwards all serial input, including logs, to MQTT topics without disrupting data flow, simplifying debugging with color-coded outputs as shown.
Supports triggering external tools via MQTT commands to flash firmware, enabling over-the-air-like updates for connected microcontrollers.
Limited to Linux systems, excluding Windows or macOS, which restricts platform choice and adds barriers for mixed-environment teams.
Requires manual compilation with dependencies like paho-mqtt-c and OpenSSL, increasing setup time and potential for errors, as noted in build instructions.
Only supports JSON-formatted messages, making it unsuitable for binary data or legacy serial protocols, with binary support listed as a 'still to do' item.