Ted Middleton
Ted Middleton

Reputation: 7274

Is there an equivalent of lsusb for OS X

This question seems to be all over google, but the answers all point to using System Profiler. That's nice, but with System Profiler all you get is something that looks like this:

            DasKeyboard:

              Product ID: 0x1919
              Vendor ID: 0x04d9  (Holtek Semiconductor, Inc.)
              Version: 1.06
              Speed: Up to 1.5 Mb/sec
              Location ID: 0x1d114000 / 11
              Current Available (mA): 500
              Current Required (mA): 100

            USB2.0 Hub:

              Product ID: 0x0608
              Vendor ID: 0x05e3  (Genesys Logic, Inc.)
              Version: 32.98
              Speed: Up to 480 Mb/sec
              Location ID: 0x1d113000 / 10
              Current Available (mA): 500
              Current Required (mA): 100

                Microsoft Basic Optical Mouse v2.0 :

                  Product ID: 0x00cb
                  Vendor ID: 0x045e  (Microsoft Corporation)
                  Version: 1.99
                  Speed: Up to 1.5 Mb/sec
                  Manufacturer: Microsoft 
                  Location ID: 0x1d113200 / 12
                  Current Available (mA): 500
                  Current Required (mA): 100

That's great if all you want are the contents of a bunch of device descriptors, but lsusb gives you so much more - information on interfaces and endpoints, interface associations, composite devices... where can you find this information in OS X? There must be a tool that does this?

Upvotes: 157

Views: 184784

Answers (10)

Sven Günther
Sven Günther

Reputation: 1

I would recommend cyme, It's written in rust. https://github.com/tuna-f1sh/cyme

example output of cyme

Upvotes: 0

Mikhail Iakhiaev
Mikhail Iakhiaev

Reputation: 1205

Homebrew users: you can get lsusb by installing usbutils formula from my tap:

brew install usbutils

It installs the REAL lsusb based on Linux sources (version 007).

Upvotes: 56

tuna_fish
tuna_fish

Reputation: 427

I'll through my hat into this having tried the answers here. The lsusb script is barely working and the macOS port of usbutils doesn't capture string descriptors or support --tree.

It lead me to create cyme, a modern cross-platform USB list tool using system_profiler -json under the hood. It also uses libusb for extra data/cross-platform and udev on Linux. It supports --lsusb compatible mode, which near matches lsusb's output for all args. It should scratch the macOS lsusb itch and more.

Upvotes: 5

David Grayson
David Grayson

Reputation: 87376

I typically run this command to list USB devices on macOS, along with details about them:

ioreg -p IOUSB -l -w 0

Upvotes: 119

jlhonora
jlhonora

Reputation: 10699

I got tired of forgetting the system_profiler SPUSBDataType syntax, so I made an lsusb alternative. You can find it here , or install it with homebrew:

brew install lsusb

Upvotes: 213

RayM
RayM

Reputation: 11

On Mac OS X, the Xcode developer suite includes the USB Proper.app application. This is found in /Developer/Applications/Utilities/. USB Prober will allow you to examine the device and interface descriptors.

Upvotes: 1

thiago
thiago

Reputation: 434

If you are a user of MacPorts, you may simply install usbutils

sudo port install usbutils

If you are not, this might be a good opportunity to install it, it has ports for several other useful linux tools.

Upvotes: 8

blekenbleu
blekenbleu

Reputation: 29

At least on 10.10.5, system_profiler SPUSBDataType output is NOT dynamically updated when a new USB device gets plugged in, while ioreg -p IOUSB -l -w 0 does.

Upvotes: 1

QJGui
QJGui

Reputation: 967

In mac osx , you can use the following command:

system_profiler SPUSBDataType

Upvotes: 20

lhagan
lhagan

Reputation: 49

How about ioreg? The output's much more detailed than the profiler, but it's a bit dense.

Source: https://lists.macosforge.org/pipermail/macports-users/2008-July/011115.html

Upvotes: 3

Related Questions