STGen: A Lightweight Process-Based Testbed for Scalable IoT Protocol Evaluation with Physically Validated Synthetic Sensor and Anomaly Generation
Hasan M. A. Islam, Md. M. R. Maharaz, M. Georgiades, S. M. N. Shahriar, P. Akibuzzaman, N. R. Aurna, Md. Masum, Riadul IslamThis paper introduces the Sensor Traffic Generator (STGen), a lightweight, pure-software testbed for evaluating IoT application- and transport-layer protocols at scale. Relative to existing software-based IoT evaluation platforms, STGen combines three design decisions that, to the best of our knowledge, no prior testbed offers together. Every emulated sensor node runs as an independent operating-system process using a real transport stack rather than a discrete-event model or a container. Sensor workloads are generated using physically grounded stochastic models calibrated against real deployment data. Experiments are specified in three independent tiers, IoT Protocols (N), Scenarios (M), and Networks (L), reducing configuration effort from a combinatorial N×M×L problem to a linear N+M+L workflow, with new protocols integrated by overriding a four-method abstract interface. STGen operates above OSI Layer 4 and therefore does not model PHY- or MAC-layer behavior, such as RF interference, CSMA/CA collision avoidance, or duty cycling. The sensor models are calibrated using 1,826,223 real-world readings from the Intel Berkeley Research Laboratory; for temperature, the synthetic stream matches the 37-day measurements of 54 Mica2Dot motes with a Kolmogorov–Smirnov D of 0.071 and a Jensen–Shannon divergence of 0.018, showing that STGen reproduces the statistical structure of real sensor data rather than only plausible values. By inverting these calibrated models, STGen also synthesizes labeled false-data-injection anomalies that are separable from normal traffic, with a receiver operating characteristic AUC of 0.898 for stealthy drift and 1.0 for hard physical range violations. In our experiments, STGen instantiates 6000 concurrently emulated sensor nodes on a commodity workstation in 1.02 s using 0.62 GB of memory (approximately 99 KB per node), which is more than two orders of magnitude below the per-node memory costs of container- and VM-based testbeds. STGen also exposes deployment-relevant behavior that controlled emulation alone may hide. Under live wide-area jitter, MQTT and CoAP exhibit different loss and latency patterns than those observed under uniformly degraded NetEm conditions, including MQTT reconnection storms. These results show that STGen provides a scalable and reproducible bridge between lightweight protocol emulation and practical deployment-oriented IoT protocol evaluation.