Skip to main content

List USB serial devices with their associated USB metadata

Project description

lsusd — List USB Serial Devices

A zero-dependency command-line tool that maps USB serial device nodes to their USB metadata (vendor, product, serial number, VID:PID).

Example Output

❯ lsusd
┌────────────────────────────────┬────────────────────────────┬──────────────────┬───────────────────┬───────────┐
│          Device Node           │        USB Product         │    USB Vendor    │     USB Serial    │  VID:PID  │
├────────────────────────────────┼────────────────────────────┼──────────────────┼───────────────────┼───────────┤
│ /dev/cu.usbmodem2121101        │ USB JTAG/serial debug unit │ Espressif        │ D8:3B:DA:70:69:7C │ 303A:1001 │
├────────────────────────────────┼────────────────────────────┼──────────────────┼───────────────────┼───────────┤
│ /dev/cu.usbmodemF078E4E385A03  │ Flexbar                    │ ENIAC            │ F078E4E385A0      │ 303A:82BF │
├────────────────────────────────┼────────────────────────────┼──────────────────┼───────────────────┼───────────┤
│ /dev/cu.usbserial-113010893810 │ OBDLink SX                 │ ScanTool.net LLC │ 113010893810      │ 0403:6015 │
├────────────────────────────────┼────────────────────────────┼──────────────────┼───────────────────┼───────────┤
│ /dev/cu.usbserial-ST8XVRNW     │ ElmScan 5 Compact          │ ScanTool.net LLC │ ST8XVRNW          │ 0403:6001 │
└────────────────────────────────┴────────────────────────────┴──────────────────┴───────────────────┴───────────┘

Installation

pip / pipx

pip install lsusd
# or
pipx install lsusd

Homebrew

brew tap mickeyl/formulae
brew install lsusd

From source

pip install -e .

Usage

lsusd
# or
python -m lsusd

Options

Flag Description
-p, --plain Tab-separated output, no headers — suitable for cut, awk, etc.
-c, --csv CSV output with header row
-j, --json JSON array output
-n, --no-spinner Disable the progress spinner
--version Print version and exit

Supported Platforms

  • macOS — discovers devices via ioreg (/dev/cu.usbmodem*, /dev/cu.usbserial*)
  • Linux — discovers devices via sysfs (any tty with a USB ancestor, including devices renamed via udev)

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

lsusd-1.0.4.tar.gz (6.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

lsusd-1.0.4-py3-none-any.whl (7.7 kB view details)

Uploaded Python 3

File details

Details for the file lsusd-1.0.4.tar.gz.

File metadata

  • Download URL: lsusd-1.0.4.tar.gz
  • Upload date:
  • Size: 6.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for lsusd-1.0.4.tar.gz
Algorithm Hash digest
SHA256 5d600e887e45891089b1addd69226c8486b8744b51df15b34f31a14e1a2bb621
MD5 50f8f4c1749fd5d6f5ceed27f5a6c86b
BLAKE2b-256 a4aef784798bb3fae14c288008ad95dd468986bc8f2f4865b182ca51df55542c

See more details on using hashes here.

File details

Details for the file lsusd-1.0.4-py3-none-any.whl.

File metadata

  • Download URL: lsusd-1.0.4-py3-none-any.whl
  • Upload date:
  • Size: 7.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for lsusd-1.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 559aee13faad07a55dbd26ae552b5175212dd0672f5c81f17c23b66c5bc77068
MD5 b67f43ab2cffaf593e7437663d0171e3
BLAKE2b-256 f056bd0badbc6f78b3eec2558101f00d3481589da31e801a8d5970a0e3fbc6f0

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page