Skip to main content
Control programmable USB hub ports through the Lager CLI for power management and device connectivity.

Syntax

lager usb [OPTIONS] [NET_NAME] [COMMAND]

Global Options

OptionDescription
--box TEXTLagerbox name or IP address
--helpShow help message and exit

Arguments

ArgumentDescription
NET_NAMEUSB net name (optional - lists nets if omitted)
COMMANDPower command: enable, disable, or toggle

Commands

CommandDescription
enableEnable (power on) the USB port
disableDisable (power off) the USB port
toggleToggle the current power state

Usage

List USB Nets

When invoked without a net name, lists all USB nets on the gateway:
lager usb --box my-lager-box
Output:
Name    Net Type  Instrument    Channel  Address
USB1    usb       Acroname_Hub  0        USB::123456
USB2    usb       Acroname_Hub  1        USB::123456
CAM_USB usb       YKUSH         0        USB::789012

Control USB Port Power

lager usb NET_NAME COMMAND [--box BOX]
Examples:
# Enable USB port
lager usb USB1 enable --box my-lager-box

# Disable USB port
lager usb USB1 disable --box my-lager-box

# Toggle USB port state
lager usb USB1 toggle --box my-lager-box

Examples

# List all USB nets
lager usb --box my-lager-box

# Power on a USB port for a camera
lager usb CAM_USB enable --box my-lager-box

# Power off USB port to reset a device
lager usb USB1 disable --box my-lager-box

# Toggle power state (useful for power cycling)
lager usb USB1 toggle --box my-lager-box

# Power cycle a device (disable then enable)
lager usb USB1 disable --box my-lager-box
sleep 2
lager usb USB1 enable --box my-lager-box

Supported Hardware

ManufacturerModelDescription
AcronameUSBHub3+Programmable USB 3.0 hub
AcronameUSBHub2x44-port programmable hub
YKUSHYKUSH3USB switchable hub

Notes

  • Net names (e.g., USB1, CAM_USB) refer to USB ports configured on your testbed
  • Commands are case-insensitive (enable, ENABLE, and Enable all work)
  • Useful for power cycling USB devices during testing
  • USB hubs must be connected to the gateway and configured as instruments
  • Default net can be set with lager defaults add --usb-net
  • Create USB nets with lager nets create <name> usb <channel> <address>