Skip to main content

Upgrade Notes

  • Exit codes now tell you why a command failed. Before, most failures exited 1. Now a missing box or net exits 3, an unreachable box 4, a timeout 5, and a box locked by someone else 6. A usage error or no selected box exits 2. A script that tests for exit code 1 must accept the new codes. The full table is in Exit Codes.
  • A declined confirmation now exits 7, not 0. This applies to lager supply, lager battery, lager arm, and lager debug erase and memrd. A script that answers “no” and expects success must accept exit code 7. A confirmation that gets no answer because stdin closed now exits 8, not 1.
  • lager with no command and no terminal shows help. Before, it started the interactive terminal and waited for input that a script never sends.
  • Viewer links for access-gated boxes carry the sign-in token only on a terminal. This applies to lager webcam start, url and start-all, and lager scope NET stream start and stream web. Piped output, JSON output and LAGER_NONINTERACTIVE=1 get the link without the token. A script that opened a piped link must now use --open, which webcam url and webcam start-all now also take.

Features

  • JSON output for scripts and AI agents. lager --output json and LAGER_OUTPUT=json print each result as one JSON object on stdout. A failure prints one error envelope on stderr, with code, exit_code, problem, cause and fixes. Warnings print as one JSON line each. A net command that fails on the Lager Box also prints the envelope. Text output is unchanged. See Scripts and AI Agents.
  • More commands take --json. These are lager hello, lager boxes, lager instruments, lager nets and lager defaults. The state commands of lager supply and lager battery take it, and so does lager debug <net> status. lager nets --json includes each net’s metadata, such as purpose and test_hints. The global JSON mode never approves lager debug erase.
  • LAGER_NONINTERACTIVE=1 stops every confirmation prompt. A command that needs a confirmation exits 8 and tells you to run it again with --yes. A command that asks for a value exits 2 and tells you to give the value as an option.
  • LAGER_READ_ONLY=1 runs only the commands that read. Any other command, including lager python, exits 10 before it does anything. A set-or-read command with no value counts as a read, for example lager supply <net> voltage or lager dac <net>. lager uart is refused only with --send, --interactive or --force.
  • lager agent gives an AI coding agent a guide to the CLI. lager agent install writes a skill and short rules for Claude Code. --target codex writes a block in AGENTS.md, and --target cursor writes a Cursor rule. The guide gives the safety class of each command and tells the agent to ask a human before it changes the bench. --help now shows the same safety class. See lager agent.
  • lager uart can stop on its own. --duration, --until REGEX and --max-bytes end a read. --send TEXT writes one line before the read. When --until finds no match in the --duration time, the command exits 5. lager debug <net> gdbserver --rtt --duration S stops the RTT stream after S seconds.
  • lager ble-sniffer <net> scan and rssi. scan lists each advertising device with its address, name, mean RSSI and decoded advertising data. rssi prints packets and mean, minimum and maximum RSSI for each device, plus the mean on each advertising channel. --address and --channel narrow both. A script uses .scan() and .rssi(). Contributed by @eindiran.
  • FTDI gpio nets can declare the level they power up at. lager nets set-power-up and nets add --power-up now accept FT232H, FT2232H and FT4232H nets on pins AD0-AD7. The part stores nothing, so the Lager Box keeps the levels and drives them as soon as the part is back on USB. Until then the pins read HIGH, so fit a pull-down to any line that switches a load.
  • A Mac Lager Box drives Rigol oscilloscopes and logic analyzers on USB. Captures, measurements, triggers and logic channels run through the scope daemon that the installer builds.
  • A Mac Lager Box streams webcams. lager webcam start, stop, url and snapshot work, and so do the web UI and a script’s webcam net. A net saved on a Linux Lager Box finds its camera on the Mac. The Mac’s built-in camera is avfoundation:<ID>.
  • A Mac Lager Box runs lager ble and lager blufi on the Mac’s Bluetooth. macOS shows no Bluetooth addresses, so address a device by the UUID that lager ble scan lists on that Mac.

Bug Fixes

  • lager dac accepts a value it cannot use. A value out of range or not a number now exits 2 before the Lager Box is contacted. A negative value, such as lager dac dac1 -0.5, is read as the voltage, not as an unknown option.
  • A net command waits a long time on a Lager Box that refuses connections. It now exits 4 at the lock request and names lager hello as the next step.
  • FTDI gpio pins float HIGH after a power cycle. When another process held the channel, Lager marked the channel as set up without restoring its outputs. Every later command then skipped the restore. The open now fails, so the next one restores the outputs.

Known Limitations

  • Rigol oscilloscopes on a Mac Lager Box are not yet tested on hardware. An MSO5000’s HDMI live view is not available on a Mac.
  • Webcam controls, such as focus and exposure, are not available on a Mac Lager Box.
  • A Mac Lager Box cannot pair a BLE device on request: macOS pairs a device itself. A XX:XX:XX:XX:XX:XX address is refused on a Mac.
  • The BLE sniffer scan and rssi commands need this version on the Lager Box too.

Installation

To install this version:
To upgrade from a previous version:
Then update your boxes: