Which kind of USB device attached - equivalent for the full functionality of lsusb on macOS?
Solution 1:
This may take a bit of extrapolation, but use the value from "Speed" in system_profiler
For example, looking at the Logitech USB receiver (for my mouse and second keyboard):
$ system_profiler SPUSBDataType | grep Logitech -A5
Vendor ID: 0x046d (Logitech Inc.)
Version: 12.01
Speed: Up to 12 Mb/sec
Manufacturer: Logitech
Location ID: 0x14200000 / 3
Current Available (mA): 1000
Current Required (mA): 98
Extra Operating Current (mA): 0
Looking at the "Speed" value, it tells me that it's a USB 1.1 device. Doing the same lookup for my Seagate FreeAgent Go USB disk, I get the following:
system_profiler SPUSBDataType | grep Seagate -A5
Vendor ID: 0x0bc2 (Seagate LLC)
Version: 1.48
Serial Number: 2GE7WLWG
Speed: Up to 480 Mb/sec
Manufacturer: Seagate
Location ID: 0x14320000 / 23
Current Available (mA): 1000
Current Required (mA): 100
Extra Operating Current (mA): 0
Capacity: 500.11 GB (500,107,861,504 bytes)
It tells me it's got a speed of 480Mb/s which is a USB 2.0 device.
You don't have to output all that extra data, I am just using it for illustration purposes, instead you can just narrow it down to the line containing the speed value:
$ system_profiler SPUSBDataType | grep Seagate -A5 | grep Speed
Speed: Up to 480 Mb/sec
For reference, USB speeds/specs are as follows:
USB 1.x - 12Mb/sec USB 2.0 - 480Mb/sec USB 3.0 - 5Gb/s USB 3.1 - 10Gb/s