LinuxCommandLibrary

pio-device

List connected PlatformIO (serial) devices

TLDR

List all available serial ports

$ pio device list
copy

List all available logical devices
$ pio device list --logical
copy

Start an interactive device monitor
$ pio device monitor
copy

Start an interactive device monitor and listen to a specific port
$ pio device monitor --port [/dev/ttyUSBX]
copy

Start an interactive device monitor and set a specific baud rate (defaults to 9600)
$ pio device monitor --baud [57600]
copy

Start an interactive device monitor and set a specific EOL character (defaults to CRLF)
$ pio device monitor --eol [CRLF|CR|LF]
copy

Go to the menu of the interactive device monitor
$ <Ctrl t>
copy

SYNOPSIS

pio-device [options] device

PARAMETERS

-l, --list
    Lists all detected PIO devices.

-i, --info device
    Displays detailed information about the specified PIO device.

-e, --enable device
    Enables the specified PIO device.

-d, --disable device
    Disables the specified PIO device.

-r, --read device
    Reads the current value of the PIO device.

-w, --write device value
    Writes the specified value to the PIO device.

-m, --mode device mode
    Sets the mode of the PIO device (e.g., input, output).

-h, --help
    Displays help message.

DESCRIPTION

The `pio-device` command is a utility for managing parallel I/O (PIO) devices in a Linux system. It allows users to query the status of PIO devices, enable or disable them, and configure their parameters. This tool is crucial for systems utilizing parallel ports for various applications like controlling external hardware, legacy printer support, or custom data acquisition. Modern systems often rely on USB-based serial connections, but `pio-device` remains relevant where older hardware or specific embedded systems are employed. The command provides a low-level interface, giving precise control over individual PIO pins and their behavior. It may require root privileges for certain operations such as enabling or disabling devices or modifying their configurations. The `pio-device` command offers an alternative means for interacting with the PIO interface.
It can provide detailed information about the PIO device such as the port address and interrupt request line (IRQ).

CAVEATS

Requires root privileges to enable, disable, or configure devices. PIO devices are becoming less common in modern systems.

DEVICE NAMING

The device argument refers to the name or identifier of the PIO device. This name is usually assigned by the kernel during device initialization. Use the `-l` option to determine the available device names. For example, /dev/parport0.

EXAMPLE

To display information about a PIO device named 'parport0', the command would be:
`pio-device -i parport0`

Copied to clipboard