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
- 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. - Rust 1.75+.
Oscilloscope / logic-analyzer workflows are not exposed on the box HTTP
API yet, so
Scope ships as a documented stub whose methods return
Error::NotSupportedByBox. Support lands when the box API does; the
endpoint sketch is tracked 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
- Oscilloscope — a documented stub today
- ADC
- Thermocouple
I/O and communication
Utilities
Guides
- Testing with cargo test — structuring a suite, parallelism, CI
- Authentication — boxes behind an authenticating gateway
- Async Client —
AsyncLagerBox, and where it differs

