- Unit tests (host) —
tests/, run withmake -C tests.- CRC, ringbuf, bloom, replay window, AES-CCM vectors, frame pack/unpack, dedup, fragmentation reassembly, routing decisions.
- Integration tests (host simulator) —
tools/sim/.- In-process N-node mesh over a virtual radio with packet loss + delay.
- Scenarios: 3-node line, 5-node star, partition + heal, flood attack, replay attack, route churn.
- Hardware-in-the-loop
- 2-node ping (RSSI sanity).
- 3-node forced relay (block direct path with antenna mismatch).
- 24 h soak (memory leaks, duty-cycle accountancy).
- Security tests
- KAT vectors for AES-CCM (NIST SP 800-38C).
- Replay injection.
- MIC fail injection → IDS reaction.
- Flood injection (>20 fps) → blacklist.
tools/sim/altnet_sim builds the same source tree with -DALTNET_HOST=1
and links N node instances against a virtual_radio HAL that dispatches
frames in memory with configurable BER, jitter, and topology adjacency.
- Provision each node with
tools/provisioner/provision.py. - Place at least one gateway with WiFi access for monitoring.
- Verify topology in the dashboard — every node should see ≥ 2 neighbors for resilience.
- Tune SF: SF7 for dense urban (<500 m), SF9 default, SF12 only for long-range fixed nodes (heavy duty-cycle penalty).
- Set realm
NKand admin pubkey identical across all nodes. - Smoke test: send broadcast
ping, expect ACKs from N-1 nodes.