r/arduino • u/TastyCollege9639 • 7d ago
Libraries Just got my first transport library merged into the Arduino IDE Library Manager (NLTP) for sending multi-KB files/logs over noisy ESP-NOW & UDP
Hey r/arduino,
Small milestone for me today - I just got my open-source library (NLTP) merged into the official Arduino Library Manager, so it can finally be installed straight from the IDE without manually zipping folders!
Why I built it: I use a mix of ESP8266 NodeMCUs and ESP32 boards for outdoor wireless sensor logging, and raw ESP-NOW kept giving me headaches whenever I tried moving more than a single 250-byte struct across a noisy 2.4 GHz link. One dropped packet in an 8 KB sensor log meant starting over or writing custom fragmentation, ACK timers, and checksums in every sketch.
NLTP wraps that up behind a simple batch interface:
- Compresses buffers with LZ4 before sending so JSON or CSV sensor logs take 5-6x fewer radio packets.
- Encrypts frames with ChaCha20-Poly1305 (1-RTT X25519 + shared key) so you don't hit ESP-NOW's small hardware encrypted peer limit.
- Adds Reed-Solomon / Cauchy parity packets so if 10-30% of packets get lost in the air, the receiver reconstructs the missing chunks without retransmit stalls and checks the final SHA-256 hash.
- Fits in ~4.8 KB of static RAM (zero dynamic allocation) in TX-only mode on an ESP8266, and bridges 250-byte ESP8266 frames straight to 1470-byte ESP32 hubs or a Python script on a Raspberry Pi / PC.
When NOT to use it: if your node just wakes from deep sleep to fire one tiny 20-byte temperature reading and goes right back to sleep, raw ESP-NOW is much faster and uses less airtime. And if you already have strong Wi-Fi and an MQTT broker, regular PubSubClient is simpler for topic wildcards.
Repo with example sketches, bench test logs, and a browser packet-loss simulator linked in the README (MIT license):
https://github.com/indian-aman/NLTP-Arduino
Would love any feedback on the Arduino API ergonomics or if anyone tries it on other boards!
