cargo test. No Python is required.
The crate is a pure HTTP/JSON client of the Lager Box API. It covers:
- power supplies, battery simulators, e-loads and solar simulators
- GPIO, ADC, DAC, thermocouples, watt meters and energy analyzers
- SPI, I2C, USB hub ports, robot arms, webcams and routers
- oscilloscopes and YubiHSM 2 HSMs
- nets that a custom driver on the box runs
- streaming UART
- the box-level capabilities: its own BLE adapter, WiFi interface, and BluFi ESP32 provisioning
The package publishes on crates.io as
lager-net, because the bare
lager name is taken by an unrelated crate. The library target is still
named lager, so your code reads use lager::LagerBox;. Full API reference
lives on docs.rs/lager-net.Quickstart
Add the crate to your firmware project’s dev-dependencies:LagerBox::connect("hostname-or-ip") also works, with an optional
host:port or full URL.
Features
Both clients execute the exact same request builders and response parsers,
so the two transports cannot drift apart.
Errors
Everything returnslager::Result<T> with a single Error enum:
Requirements
- A Lager Box with software new enough to serve
POST /net/command— checklager.status()?.capabilities.net_command, or runlager update. Newer calls need newer box software, and each page names the version. An older box returnsError::UnsupportedByBox. - Rust 1.75+.
Logic-analyzer nets are not on the box HTTP API yet. The work list is in the crate’s
MISSING_ENDPOINTS.md.Reference
Getting started
- Client and Box — constructing
LagerBox, discovery, box locks, safety limits - Net Types — the index of every handle
- Errors — every
Errorvariant and when it fires
Firmware and debug
- Debug Probes — flash, erase, reset, read memory
- RTT — firmware logs, and driving an RTT console
- USB DFU — flashing without a debug probe
Power and simulation
Measurement
I/O and communication
Utilities
Security
- HSM — YubiHSM 2 keys and signing
Guides
- Testing with cargo test — structuring a suite, parallelism, CI
- Authentication — boxes behind an authenticating gateway
- Async Client —
AsyncLagerBox, and where it differs

