High-Level Overview
lager.* hardware libraries.
Terminology
| Term | Definition |
|---|---|
| CLI | The lager-cli Python package (installed via pip install lager-cli). A Click-based command-line tool that runs on the developer’s laptop. |
| Tailscale VPN | A WireGuard-based mesh VPN that creates an encrypted tunnel between the developer’s machine and the Lagerbox. |
| Lagerbox | A Cybergeek mini PC running Linux, physically co-located with the test instruments. Runs a Docker container hosting the Flask/WebSocket server and hardware drivers. |
| Net | A logical name (e.g., psu1, uart0) that maps to a specific instrument + channel + address. Stored in /etc/lager/saved_nets.json on the box. |
| DUT | Device Under Test — the embedded board or product being tested. |
| Instrument | A piece of test equipment (power supply, oscilloscope, LabJack, debug probe, etc.) connected to the box via USB, serial, or LAN. |
lager python | CLI command that uploads a user-written Python script to the box for execution with full access to lager.* hardware libraries. |
Lagerbox Internals
Port Summary
| Port | Service | Exposed | Purpose |
|---|---|---|---|
| 5000 | Flask HTTP | Yes (VPN only) | Receives CLI commands, runs impl scripts |
| 8765 | WebSocket | Yes (VPN only) | Debug sessions (GDB, flash, reset) |
| 8080 | Hardware Service | No (container-internal) | Instrument control via Device proxy |
| 22 | SSH | Yes | Direct SSH access for deployment and debugging |
Net Abstraction
A Net is the central abstraction that decouples CLI commands from physical hardware details.Supported Net Types
| Net Type | Instruments |
|---|---|
power-supply | Rigol DP800, Keithley 2200/2280, Keysight E36x00 |
battery | Keithley 2281S |
eload | Rigol DL3021 |
solar | EA PSI / EL series |
analog | Rigol MSO5000 (oscilloscope analog channel) |
logic | Rigol MSO5000 (logic analyzer channel) |
adc | LabJack T7, USB-202 |
dac | LabJack T7, USB-202 |
gpio | LabJack T7, USB-202 |
thermocouple | Phidget thermocouple |
watt | Yocto-Watt, Joulescope JS220 |
debug | J-Link, CMSIS-DAP, ST-Link (via pyOCD) |
uart | USB-to-serial adapters |
i2c | Aardvark, LabJack T7, FT232H |
spi | LabJack T7, FT232H |
arm | Rotrics Dexarm |
usb-hub | Acroname, YKUSH |
Execution Flows
CLI Command Execution
Step-by-step data path forlager supply psu1 voltage 3.3 --yes:
Custom Script Execution (lager python)
The lager python command uploads a user-written Python script to the box for execution. It uses the same Flask :5000 execution path as CLI commands.
lager.* hardware libraries, and output is streamed back in real time.
Physical Wiring
How instruments physically connect between the Lagerbox and the DUT:Connection Types
| Connection | Used For | Protocol |
|---|---|---|
| USB | LabJack, debug probes, serial, hubs | Vendor-specific, CDC-ACM |
| USB-VISA | Rigol/Keithley/Keysight instruments | USBTMC (SCPI) |
| LAN-VISA | Bench instruments on local network | VXI-11 / raw TCP (SCPI) |
| Serial (UART) | DUT communication | RS-232 / TTL via USB adapter |
| SWD / JTAG | Firmware flash, debug, reset | ARM debug (via probe) |
| I2C / SPI | Peripheral communication with DUT | I2C / SPI via Aardvark or LabJack |
GitHub Actions CI Integration
A CI runner is an ephemeral GitHub Actions VM that joins Tailscale and runslager commands exactly like a developer would — no special CI-specific infrastructure is needed.
Required GitHub Secrets
| Secret | Purpose |
|---|---|
TAILSCALE_AUTHKEY | Ephemeral auth key so the runner can join the VPN |
LAGER_BOX_IP | Tailscale IP of the Lagerbox (e.g., 100.x.y.z) |

