Firmware Test Checklist
End-to-end checklist for verifying a new firmware build (with scripts baked in) works correctly — from clean flash through data pushing.
Before you start
- Router is connected and reachable (SSH to
192.168.1.1) - You have the new
.binfirmware file ready - You know the router's IMEI (check
ssh [email protected] "cat /etc/router_imei"if it was previously deployed)
Phase 1 — Clean up existing router record
The registration script treats a 409 (already exists) as a no-op and won't update the version. Delete the router first so registration creates a fresh row.
- Open the Comlink dashboard → Routers
- Find the router by IMEI and delete it
- Confirm the row is gone in Supabase →
router_versionstable
Phase 2 — Flash the firmware
- Open LuCI → System → Backup / Flash Firmware
- Upload the new
.binfile - Uncheck "Keep settings" — this gives a clean overlay so no stale files from a previous deployment survive
- Click Flash and confirm
- Wait for the router to come back (~3–5 min)
- Confirm you can SSH in:
ssh [email protected]
Phase 3 — Verify files are present (baked in by firmware)
ssh [email protected] "ls /root/scripts/ && cat /root/scripts/version.txt"
- All scripts present:
detect_router_identity.sh,push_devices.sh,push_dhcp.sh,push_signal_strength.sh,push_sim_slot.sh,auto-update.sh,register_router.sh,test_deployment.sh -
version.txtshows the expected version -
supabase_config.envis present:ssh [email protected] "test -f /root/supabase_config.env && echo OK" - Crontab is installed:
ssh [email protected] "crontab -l" -
router-detectinit is enabled:ssh [email protected] "/etc/init.d/router-detect enabled && echo enabled"
Phase 4 — Watch startup detection (automatic on boot)
router-detect runs automatically after boot. Watch it complete:
ssh [email protected] "tail -f /var/log/router_startup.log"
- Log shows
router-detect started at <timestamp> - Log shows
Internet available after Xs, running detection... - Log shows
Successfully detected IMEI: <imei> on port: <port> - Log shows
Registering router in database... - Log shows
[REGISTER] SUCCESS: Router registered successfully
If internet isn't available yet the script waits up to 10 min (checks every 30s). If the log isn't there yet, give it a moment and re-check.
Phase 5 — Verify registration in Supabase
- Supabase →
router_versionstable has a new row for the IMEI -
current_versionmatches the firmware version -
update_status=success
Phase 6 — Verify data pushing (cron)
Wait up to 5 minutes for the first cron cycle, then:
ssh [email protected] "cat /var/log/telemetry.log"
-
push_devices.shran without errors -
push_dhcp.shran without errors -
push_signal_strength.shran without errors -
push_sim_slot.shran without errors
Spot-check in Supabase that the corresponding tables have rows with recent timestamps.
Phase 7 — Full sanity check
Run the built-in test script for a structured pass/fail summary:
ssh [email protected] "/root/scripts/test_deployment.sh"
- Section 1/3 (files & config) — all OK
- Section 2/3 (startup detection) —
router_startup.logpresent - Section 3/3 (script runs) — all scripts passed
- Summary shows
All N scripts passed
Done
If all boxes are checked, the firmware build is verified end-to-end.