Supplementary Material for LAMP: A
Selective-ACK Transport Protocol for Reliable Bulk
Data Transmission over LoRa Networks
Alessandro Monticelli, Student Member, IEEE
*A. Monticelli is with the Department of Computer Science and Engineering (DISI), University of Bologna, 40126 Bologna, Italy
(e-mail: alessandr.monticell4@studio.unibo.it).
Abstract
This supplementary document provides extended implementation details, architectural state machines, and secondary parametric
simulation blocks supporting the main manuscript “LAMP: A Selective-ACK Transport Protocol for Reliable Bulk Data
Transmission over LoRa Networks”. Specifically, we document: (i) the preliminary commercial transceiver proof-of-concept and its
architectural lessons; (ii) the detailed Hardware Abstraction Layer (HAL) architecture on ESP32-S3 and desktop Unity test harness;
(iii) formal finite state machine specifications for session lifecycle and data transfer; and (iv) extended ns-3 simulation studies
evaluating message size scaling up to 62.2 kB (Block F), asymmetric acknowledgment loss sensitivity (Block G), retransmission
poll rule ablation (Block H), and additional propagation channel profiles (Rural, Water, Static).
Index Terms
LoRa, SACK, transport protocol, embedded systems, HAL, state machines, sensitivity analysis.
I. Preliminary Proof of Concept: Commercial UART Transceivers
Prior to developing the native C++17 LAMP stack on Semtech SX1262 transceivers, an initial proof-of-concept was developed and
evaluated using commercial Ebyte E220-series LoRa modules. These modules encapsulate physical-layer modulation
behind an internal microcontroller running proprietary AT-command firmware accessible over an asynchronous UART
interface.
While initial lab tests confirmed the basic feasibility of transport fragmentation over LoRa physical links, the trial exposed three
critical architectural bottlenecks that motivated the ground-up redesign of LAMP:
Opaque PHY and Inflexible MAC Control: The proprietary internal firmware prevented direct access to raw baseband
parameters, fine-grained symbol timing, carrier-activity detection (CAD), and exact FIFO interrupt timestamps, making
deterministic timeout scheduling and half-duplex turnaround guard times impossible to guarantee.
Inflated Protocol Overhead: The vendor-mandated framing structure introduced substantial packet encapsulation bloat,
reducing the net application payload capacity per frame and significantly increasing channel time-on-air (ToA).
Absence of Receiver Feedback and Repair: The commercial module firmware offered no native selective
acknowledgment or sliding-window ARQ mechanisms, forcing early prototype firmware to resort to crude
unacknowledged bursts or inefficient Stop-and-Wait retries.
These empirical findings motivated the complete transition to the open-source Semtech SX126x architecture driven via RadioLib and
decoupled by a clean Hardware Abstraction Layer (HAL).
II. Hardware Abstraction Layer and Implementation Architecture
A. Centralized Configuration and Parameter Decoupling
To eliminate hardcoded constants and enable deterministic tuning across heterogeneous embedded targets, all protocol
operational parameters are centralized within a compile-time configuration namespace (LoRaMultiPacketConfig):
Memory
and Concurrency Bounds: Governs maximum concurrent reassembly sessions (MAX_CONCURRENT_SESSIONS = 10,
reducible on memory-constrained microcontrollers), physical FIFO buffer bounds (PHY_BUFFER_SIZE = 256 bytes,
matching transceiver hardware FIFO limits), and completed sequence deduplication depth (MAX_COMPLETED_HISTORY
= 16).
Session Lifecycle Thresholds: Defines handshake initiation timeouts (DEFAULT_SYN_TIMEOUT_MS = 3000 ms),
connection inactivity teardown periods (DEFAULT_CONN_INACTIVITY_TIMEOUT_MS = 15000 ms), and the
reassembly inactivity limit, measured from the last chunk received: the larger of PRUNE_TIMEOUT_MS = 15000 ms and
\((R_{\mathrm {max}}+1)\) SACK timeouts.
B. Hardware Abstraction Layer (HAL) Interface
The core transport logic communicates exclusively through abstract interfaces (IRadio and IPlatform). On physical nodes,
EspHal wraps ESP32-S3 hardware resources:
SPI Bus Access: High-speed SPI transfers (up to 16 MHz) for register configuration and FIFO packet buffering to the
Semtech SX1262.
GPIO Interrupt Management: Hardware interrupt dispatch for NSS, RST, BUSY, and DIO1 (packet transmission and
reception completion triggers).
Monotonic Timing: High-resolution platform timers backed by esp_timer_get_time() providing microsecond-level
precision decoupled from RTOS tick scheduling.
C. Host-Based Unit Testing Suite
Following a test-driven development (TDD) discipline, the protocol core is verified on a desktop host environment using the Unity test
framework within PlatformIO (72 native unit tests), executing without hardware-in-the-loop dependencies:
Modbus CRC-16 Verification: Frame integrity calculation across variable-length headers and padded chunk payloads.
Reassembly State Engine: Dynamic bitmap updates, out-of-order chunk reassembly, and duplicate suppression.
Deterministic Pruning: Verification that abandoned or stale sessions are evicted when inactivity timers expire.
Concurrency Keys: Proving that multiple active senders with identical message IDs remain isolated through \((\mathtt {srcAddr}, \mathtt {messageId})\) dual indexing.
Simultaneous Open & Tie-Breaking: Confirming deterministic resolution when two nodes initiate concurrent 3-way
handshakes.
III. Finite State Machine Formal Specifications
Fig. 1 details the formal finite state machines governing the connection lifecycle and data transfer engines within
LAMP.
(a) Connection Session Lifecycle FSM (Stateful vs. Stateless)(b) Data Transfer & SACK-ARQ FSM (Reliable vs. Unreliable)
Fig. 1: Finite State Machine (FSM) specifications for connection session lifecycle and data transfer modes.
A. Protocol Sequence Interactions
Fig. 2 and Fig. 3 illustrate the detailed message interaction flows for connection establishment, rejection handling, and SACK-ARQ
selective repair.
IV. Extended Simulation Studies: Blocks F, G, and H
A. Block F: Message Size Scaling (10 B to 62.2 kB)
Block F evaluates protocol performance under large payload scaling at SF7 across message sizes \(N \in \{20, 50, 100, 255\}\) chunks of 244 B (4.9 to 62.2 kB,
reaching the maximum capacity of a single LAMP session). Comparative baselines include Stop-and-Wait, MPLR [1], and
LoRaMesher [2].
Fig. 4 depicts the 90% PDR delivery range in the Urban channel and goodput under static lossless conditions. The delivery range of
LAMP remains invariant to message size (Mode 4 maintains 4.13 km; Mode 3 maintains 4.56 km up to 100 chunks and
4.13 km at 255 chunks). Conversely, architectures assigning individual per-frame retry budgets experience compounding
degradation as \(N\) increases: Stop-and-Wait drops from 3.38 km to 2.26 km, while LoRaMesher (\(R=10\)) falls from 4.13 km to
3.09 km.
For MPLR, behavior depends on the interpretation of its retry budget: if \(R_{\mathrm {max}}\) applies globally across the entire multi-batch transfer, range
collapses to 3.7 km at \(N=50\) and fails to reach 90% at \(N=255\). If \(R_{\mathrm {max}}\) is refreshed per batch of 40 frames, MPLR maintains 4.13 km, matching
Mode 4. Under this favorable reading, LAMP retains higher goodput due to its compact 9-byte header (+3% faster at 62.2 kB,
delivering in 103 s vs. 106 s).
Fig. 4: Urban range (largest distance with mean \(PDR_{\mathrm {app}} \ge 90\%\)) and goodput at +5 dB (static channel) versus the number of 244-byte chunks
per message, SF7, 50 seeds. MPLR is evaluated under both global retry budget and per-batch refresh.
B. Block G: Asymmetric SACK Feedback Loss Robustness
Block G investigates performance when feedback frames (SACK, SYN-ACK, ACK) are subjected to loss probability \(p_{\mathrm {ack}} \in \{0, 20, 40\}\%\), concurrent with
data frame loss \(p \in [0, 50]\%\) (SF7, \(N=20\)).
Because lost SACK feedback triggers the timer-driven poll mechanism, the penalty is predominantly manifested as latency rather than
transfer aborts. At \(p=20\%\) and \(p_{\mathrm {ack}}=20\%\), Mode 3 maintains 98% transfer completion, with elapsed time increasing moderately from 11.1 s to 11.7 s;
at \(p_{\mathrm {ack}}=40\%\), completion remains at 92% (13.1 s). In Mode 4, lost SYN-ACK frames incur handshake retries, increasing latency to 15.8 s at
\(p=20\%, p_{\mathrm {ack}}=40\%\).
In contrast, Stop-and-Wait exhibits severe sensitivity to feedback losses: at \(p=30\%\), its completion rate plunges from 100% (lossless
feedback) down to 84% at \(p_{\mathrm {ack}}=20\%\) and 46% at \(p_{\mathrm {ack}}=40\%\), whereas LAMP Mode 3 preserves 90% and 76% completion under the same harsh feedback
loss regimes.
C. Block H: Retransmission Timeout and Poll Rule Ablation
Block H isolates the architectural benefit of the LAMP timeout poll rule (which retransmits the final chunk carrying FLAG_ACK_REQ
upon SACK expiration, rather than restarting full-window retransmission). Without this targeted poll rule, Mode 3 completion drops
drastically under high frame loss: at \(p=30\%\), completion falls from 92% to 80%; at \(p=40\%\), completion plummets from 56% to 40%. This confirms
that targeted polling prevents catastrophic retry exhaustion.
D. Rural, Water, and Static Propagation Comparisons
For completeness, Figs. 5a, 5b, and 6 provide the detailed comparative performance curves of LAMP against MPLR, LoRaMesher, and
Stop-and-Wait across Rural, Water, and Static AWGN channel environments, complementing the Urban channel results reported in the
main manuscript.
(a)
Rural
Propagation
Channel(b)
Water
Propagation
Channel
Fig. 5: \(PDR_{\mathrm {app}}\) versus distance across alternative propagation environments for LAMP and related protocols (SF7, 50 seeds, 90%
PDR threshold marked with dotted line).
(a)
PDR
vs.
Nominal
SNR
in
Static
Channel(b)
Goodput
vs.
Nominal
SNR
in
Static
Channel
Fig. 6: Performance comparison under Static AWGN conditions versus nominal SNR for LAMP and related protocols (SF7,
4.88 kB transfer, 50 seeds).
References
[1] T. Chen, D. Eager, and D. Makaroff, “Efficient image transmission using LoRa technology in agricultural monitoring IoT systems,” in 2019 IEEE
International Conference on Internet of Things (iThings) and IEEE Green Computing and Communications (GreenCom) and IEEE Cyber, Physical and
Social Computing (CPSCom) and IEEE Smart Data (SmartData), 2019, pp. 937–944.
[2] J. M. Solé, R. Pueyo Centelles, F. Freitag, R. Meseguer, and R. Baig Viñas, “Large and reliable data transfer service for LoRa mesh network
applications,” Computer Communications, vol. 248, p. 108404, 2026.