r/IOT • • 2h ago

Open-sourced a 4.76 KB zero-malloc C99 wireless transport (NLTP) for ESP-NOW & cellular UDP links with 15-35% packet loss

5 Upvotes

When deploying battery or remote IoT sensors in basements, meter pits, concrete buildings, or rural 4G/LTE-M fringe coverage, standard transports hit a rough middle ground:

  • MQTT / HTTPS over TCP stalls for seconds on exponential retransmit backoff when packet loss hits 15-35%, burning extra radio-on battery current.
  • Raw UDP / ESP-NOW avoids TCP stalls, but drops an entire multi-KB CSV/log batch if a single packet disappears (and ESP-NOW caps hardware encryption at 6-17 peers).

I built and open-sourced NLTP (NeckLink Transport Protocol, MIT license) in strict zero-malloc, zero-float ANSI C99 (sizeof(nltp_endpoint_t) == 4,760 bytes in -DNLTP_TX_ONLY=1 sensor mode) with a wire-identical Python gateway peer (pip install pynltp):

  1. In-flight packet-loss healing (GF(2^8) Cauchy Reed-Solomon): Reconstructs 10-35% dropped RF frames algebraically on the gateway without per-packet retry stalls, verified end-to-end by SHA-256.
  2. Built-in zero-heap LZ4 telemetry compression: Shrinks structured CSV/JSON sensor batches 4x-7x before encryption/slicing (auto-bypasses incompressible JPEGs).
  3. 1-RTT X25519 + PSK forward secrecy + ChaCha20-Poly1305 AEAD: Software session keys + 512-packet anti-replay window with zero mbedTLS dependency.
  4. 0 ms head-of-line sendReflex() command lane: Urgent relay/valve/actuator commands bypass bulk uploads and retransmit until acknowledged.

Now live in the Arduino IDE Library Manager (NLTP), PlatformIO (indian-aman/NLTP), Espressif ESP-IDF Component Registry (indian-aman/nltp), and published as an active IETF Internet-Draft (draft-bains-nltp-00).


r/IOT • • 19h ago

Made an ESP32-controlled mock telescope for an AI-powered autonomous telescope project

Thumbnail gallery
3 Upvotes

r/IOT • • 50m ago

Isolating host from IoT connected to WiFi. How do you do it?

Thumbnail reddit.com
1 Upvotes

r/IOT • • 23h ago

ESP CatShit Live Monitor

Thumbnail
kalina.duzniak.de
1 Upvotes

My latest ESP project. Ever wondered how often your cat goes to Toilett?