An ESP32-based 2D LiDAR telemetry pipeline using binary UDP, TCP, and MQTT
Abstract
Two-dimensional light detection and ranging (LiDAR) sensors are widely used in mobile robotics and monitoring, but streaming complete scan revolutions from resource-constrained microcontrollers over wireless fidelity (Wi-Fi) requires compact framing, transport-aware buffering, and reproducible instrumentation. This study presents a transport-independent telemetry framework for the Slamtec RPLidar A1 using an ESP32. The firmware acquires universal asynchronous receiver-transmitter (UART) measurements, detects revolution boundaries, packs angle-distance-quality points into a compact binary scan frame, and transmits complete scans through user datagram protocol (UDP)/binary (BIN), transmission control protocol (TCP)/BIN, or message queuing telemetry transport (MQTT)/BIN. A Python-based fast application programming interface (FastAPI) and Uvicorn service validates and reconstructs a canonical scan representation, exposes runtime counters, supports browser-based visualization, and records sessions for deterministic replay. Final operating parameters were selected through preliminary characterization of metadata encoding, motor duty cycle, quality retention, UDP fragmentation, and reconstruction stability. The official evaluation comprised 18 runs of approximately five minutes each under nominal and degraded-received signal strength indicator (RSSI) indoor Wi-Fi profiles. Across all protocol-profile combinations, all expected scan sequences were received, with 0.00% sequence loss, no duplicate sequences, no queue drops, and no source-timestamp inter-scan interval above 500 ms. The results demonstrate that the common binary architecture supports reproducible LiDAR scan telemetry with bounded host-process and embedded-resource use under the evaluated indoor conditions, without implying a universal protocol ranking.
Keywords
binary telemetry; ESP32; message queuing telemetry transport; transmission control protocol user datagram protocol; two-dimensional light detection and ranging;
Full Text:
PDFDOI: http://doi.org/10.12928/telkomnika.v24i6.27902
Refbacks
- There are currently no refbacks.

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.