Skip to main content
Your Mac can be the Lager Box itself. Plug instruments into it and run lager install. Then every lager command and lager python script works with them.
The macOS Box is new. Most instruments that work on a Linux Box work on a Mac, but some are not supported yet. See What Is Not Supported Yet before you rely on one.

How It Works

A Linux Box runs its Box software in a Docker container that reaches the USB instruments directly. Docker on a Mac cannot pass USB devices into a container, so a Mac Box runs in two parts:
  • a host agent, a background service in your login session, that owns the USB instruments; and
  • the Box container, which runs your scripts and the lager services. It has no device access and asks the agent for each instrument.
lager install sets up both. You do not run or configure the agent yourself.

What You Need

  • An Apple silicon Mac (M1 or later). Intel Macs are not supported.
  • A current macOS. The port is developed and tested on macOS 14 and later.
  • Docker Desktop or OrbStack. If Docker is installed but stopped, the installer starts it. If neither is installed, the installer offers to install OrbStack.
  • Homebrew (recommended). The installer uses it for libusb, Rust, SEGGER J-Link, PicoScope 7, the ARM GDB, and OrbStack. Without Homebrew, those pieces are reported as “Not set up”.
  • Python 3.10 or higher and the Lager CLI: pip3 install lager-cli.
  • An administrator account. The installer asks for your password once, to create /etc/lager.

Step 1: Run the Installer in a Terminal

Open Terminal and run:
With no --ip, lager install installs on this Mac. Before it starts it:
  • lists what Homebrew will install, and which installers ask for your password (SEGGER J-Link and PicoScope 7 do);
  • asks to continue, and what name to save the Box under (default local).
It then:
  • creates /etc/lager (your password is asked for once, by sudo);
  • downloads the Box image (several GB the first time);
  • sets up the host agent, LabJack support (U3/U6 and T4/T7/T8), J-Link and the ARM GDB;
  • starts the agent and the Box container.
At the end, a Set up: line lists what is ready. A Not set up: line lists each part it did not install, with the reason.
Run it in a terminal window, because the password prompt needs one. From a pipe, a script or CI, the installer stops at once. It prints the commands that create /etc/lager by hand:
After those, lager install needs no password.
Useful options: --version takes a release, for example v0.66.0. A branch name or a commit has no Box image, so the installer stops before it changes anything.

Step 2: Verify

Use the name you chose in Step 1 instead of local if you changed it.

Step 3: Add Nets

Nets are added the same way as on a Linux Box (Setting Up Instruments), with these differences.
  • Serial ports have Linux-style names. Inside the Box, the Mac’s /dev/cu.* ports are called ttyUSB0, ttyUSB1, … (USB serial adapters) and ttyACM0, … (USB CDC devices such as a J-Link VCOM), numbered in sorted order. There are no /dev/serial/by-id names, so a net copied from a Linux Box needs its port renamed.
  • lager instruments opens no port on a Mac. It reads the USB registry and shows the serial port of each adapter that it recognizes.
  • A LabJack T7 reports no serial number on macOS, so its address ends in ::::INSTR. Only one T7 per Mac can be told apart.

Recovering

If an instrument stops answering:
  1. Unplug it and plug it back in, then try the command again.
  2. Restart the host agent:
  3. Restart the Box container: docker restart lager.
After you plug in a LabJack T7 again, an ADC read after a DAC change can show the old value. To stop this, restart the host agent (step 2).
Running lager install again repairs an install in place and keeps your nets.

Updating

This installs the Box again at this CLI’s version. It leaves out the parts that your last lager install left out with --skip-jlink or --skip-picoscope. The installer downloads the new Box image before it stops the running Box. If the download fails, the running Box stays as it was.

Uninstalling

This removes the agent, the container and the agent’s files. /etc/lager (your saved nets) is kept. With --purge-config, the installer copies /etc/lager to your home directory, then empties it. The directory itself stays. Docker must be running. If Docker is installed but stopped, the uninstall removes nothing. Start Docker, then run lager uninstall again.

Installing on Another Mac

You can install a Box on a Mac that you reach over SSH:
The CLI copies the installer to that Mac and runs it there. Run the command in a terminal, because that Mac asks for its password once, to create /etc/lager. lager update and lager uninstall with the same address work on that Mac.
A Box on another Mac listens on every network interface, so other machines can reach it. A Linux Box has a firewall in front of these ports. A Mac Box does not. Install a Box on another Mac only on a network that you trust.

What Is Not Supported Yet

These work on a Linux Box but not yet on a Mac Box:
  • OpenOCD debug probes (J-Link works);
  • Rigol oscilloscopes and logic analyzers (PicoScope works);
  • serial-port supplies (Rigol DP700, EA PSB), DexArm, and nets pinned by /dev/serial/by-id or by-path;
  • webcams and HDMI capture;
  • Bluetooth (BLE) and BluFi;
  • lager diagnose, DFU, and lager update --check for a local Box.
Not planned: WiFi control, and scripts that use raw USB, pyftdi or bleak directly. Those fail with a clear message.