> ## Documentation Index
> Fetch the complete documentation index at: https://docs.lagerdata.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Setting Up Your Instruments

> Configure and manage instruments connected to a Lager Box

Before you use instruments with the Lager Client, you must identify and organize the connected devices. This applies to both the CLI and the Python library.

***

## View Connected Instruments

To view all instruments currently connected to a specific Lager Box, run:

```bash theme={null}
lager instruments --box my-lager-box
```

This command detects and lists all physical instruments connected to the Lager Box via USB or network.

**Example output:**

```
Name                     Channels                                                       VISA Address
========================================================================================================================
Rigol_DP831              power-supply: 1, 2, 3                                          USB0::0x1AB1::0x0E31::DP8C123456789::INSTR
LabJack_T7               adc: AIN0, AIN1, AIN2, AIN3, AIN4, AIN5, AIN6, AIN7, AIN8,     USB0::0x0CD5::0x0007::::INSTR
                         AIN9, AIN10, AIN11, AIN12, AIN13
                         dac: DAC0, DAC1
                         gpio: CIO0, CIO1, CIO2, CIO3, EIO0, EIO1, EIO2, EIO3, EIO4,
                         EIO5, EIO6, EIO7, MIO0, MIO1, MIO2, FIO0, FIO1, FIO2, FIO3,
                         FIO4, FIO5, FIO6, FIO7
                         i2c: FIO4-FIO5
                         spi: FIO0-FIO3
Aardvark                 gpio: SCL, SDA, MISO, SCK, MOSI, SS                            USB0::0x0403::0xE0D0::2420032::INSTR
                         i2c: I2C0
                         spi: SPI0
```

Each line in the `Channels` column names a net type and the channels for that type.

To view configured nets (logical mappings to instruments), use:

```bash theme={null}
lager nets --box my-lager-box
```

This shows the nets you created, grouped by instrument. Each group shows the instrument address.

### Example Output:

```
    Name      Net Type    Channel
======================================
Aardvark [USB0::0x0403::0xE0D0::2420032::INSTR]
├── I2C_0     i2c         I2C0
└── SPI_0     spi         SPI0

LabJack T7 [USB0::0x0CD5::0x0007::::INSTR]
├── ADC_0     adc         AIN0
├── GPIO_0    gpio        FIO3
└── GPIO_1    gpio        FIO2

SiLabs CP210x [USB0::0x10C4::0xEA60::0001::INSTR]
└── UART      uart        /dev/ttyUSB0
```

## Create Nets

Lager does not create nets when you plug in an instrument. Create them with one of these commands:

* `lager nets add` creates one net on a channel that you name.
* `lager nets add-all` creates a net for each free channel of each connected instrument.
* `lager nets add-batch` creates the nets in a JSON file.
* `lager nets tui` opens the Net Manager, where you select nets to add.

Some instruments carry several channels of the same type, such as a 4-channel oscilloscope. You can assign and configure a Net for each channel.

The LabJack T7 and the LabJack U3 report no serial number. Two units of the same model on one Lager Box cannot have nets. See the [Nets reference](https://docs.lagerdata.com/source/reference/cli/nets.md) for this rule and the other channel rules.

***

## Modify or Assign Nets Using the TUI

The interactive TUI (text user interface) assigns new Nets on a multi-channel instrument such as a LabJack or a PicoScope. It also renames an existing Net.

To launch the Net TUI, run:

```bash theme={null}
lager nets tui --box my-lager-box
```

### Within the TUI, you can:

* **Add** new Nets
* Pick the pins of a LabJack T7 `i2c` or `spi` Net
* **Rename** existing Nets
* **Edit Details** of a Net: its purpose, notes, and tags
* **Delete** unused Nets

See the [`nets tui` reference](https://docs.lagerdata.com/source/reference/cli/nets#tui) for the full list.

***

## RS-232 Instruments (Manual Assignment)

Some instruments have no USB control port. They connect through a USB-serial
adapter instead, such as a Rigol DP711 power supply on its RS-232 port. The
Lager Box sees only the adapter cable. It cannot tell which instrument is
behind that cable, so nothing appears automatically.

> **Rigol DP711 — crossover cable required.** The DP711's RS-232 port is
> wired as DTE, the same as the RS232-to-USB adapter Rigol ships with it.
> Connecting the two directly will **not** work — TX talks to TX and nothing
> gets through. You must insert a **null-modem (crossover) cable or adapter**
> between the DP711 and the USB-serial adapter so the TX/RX lines are
> swapped. Without it the cable shows up in `lager nets assign --list` but the
> supply never responds to commands.

Tell the box what the cable is connected to, once per cable:

```bash theme={null}
# See the unassigned USB-serial cables on the box
lager nets assign --list --box my-lager-box

# Assign the cable to the instrument — and create a supply net in one step
lager nets assign Rigol_DP711 --serial 00000006 --as-net main_supply --box my-lager-box
```

The Net TUI (`lager nets tui`) offers the same flow under the
**Assign Device** button. Pick the cable, pick the instrument, and name the
net.

After you assign it, the instrument appears in `lager instruments` and in the
TUI like any auto-detected device. You add nets for it in the usual way. The
box stores the assignment, which survives a reboot and a replug.

See the [`nets assign` reference](https://docs.lagerdata.com/source/reference/cli/nets#assign) for
port-pinned assignments, baud-rate overrides, and removal.

***

## Debug Nets

For debug instruments (e.g., Segger J-Link, ST-Link), you must specify the target MCU when creating the net.

This is easily done through the TUI, as it will prompt you to input the MCU type.

> **Important:** The MCU type must match a valid target device supported by your debug probe. If the MCU type is not recognized, the debugger will not function correctly.

***

## Next Steps

With your instruments configured, start controlling them:

* **[Interacting With Nets](https://docs.lagerdata.com/source/getting-started/interacting-with-nets.md)** -- Send commands to your instruments via CLI or Python


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.