VLight Diagnostics & Troubleshooting Runbook
1. Diagnostics Commands
Server Health Check
Run diagnostic checks on the VLight server environment:
./vlight-server doctor
Expected output:
Running VLight Server Diagnostics...
[OK] V Language Runtime: v0.5.2
[OK] SQLite WAL Persistence: vlight.db
[OK] Pairing State Engine: Active (window open: false)
[OK] Device Node Registry: x nodes recorded
All server subsystems operational.
Embedded Toolchain Check
Verify that V, GCC, PlatformIO, and esptool are detected:
./vlight doctor
2. Common Issues & Solutions
A. Node Not Discovering Server
- Cause: UDP broadcast (port 9123) is blocked by host firewall or client isolation is enabled on the Wi-Fi router.
- Resolution:
- Allow UDP port 9123 in
ufw:sudo ufw allow 9123/udp - Verify that the server daemon is running:
./vlight-server status - Ensure that your ESP32 node and server share the same subnet.
- Allow UDP port 9123 in
B. Transpilation or C Build Errors
- Cause: Missing V module linking or freestanding embedded headers.
- Resolution:
- Run
vlight doctorto ensure that~/.vmodules/vlightis linked. - Ensure freestanding build flags are present:
v -gc none -no-bounds-checking -d no_main -d no_backtrace -o app.c main.v
- Run
C. ESP32 Boot Loops or Strapping Warnings
- Cause: WS2812B data pin is attached to a strapping pin or an input-only pin.
- Resolution:
- Run
./vlight targetsto check pin restrictions. - Avoid GPIO 0, 2, 5, 12, 15 on ESP32 during boot.
- Avoid GPIO 34-39 on ESP32 (input only).
- Use clean output pins such as GPIO 18, 19, 21, 22, 23.
- Run
D. Server Crash / Database Locked
- Cause: SQLite concurrent access without WAL mode.
- Resolution:
The VLight server automatically enables SQLite WAL mode (
PRAGMA journal_mode=WAL). If a crash occurred, remove stale lock files:rm -f vlight.db-shm vlight.db-wal ./vlight-server doctor