OSX系统列举USB设备方法

Linux 用户在列举USB设备时,可以使用lsusb命令来查看所有已经连接的usb设备,或者进入/dev/bus/usb/001之类进行查看。

而在Mac OS下,系统自带的命令则是system_profiler SPUSBDataType,使用这条命令可以查看所有连接的USB设备,如下:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
jeff@promote ⮀ ~ ⮀ system_profiler SPUSBDataType
USB:
USB 3.0 Bus:
BSD Name: en4
Host Controller Driver: AppleUSBXHCIWPT
PCI Device ID: 0x9cb1
PCI Revision ID: 0x0003
PCI Vendor ID: 0x8086
USB3.0 Hub:
Product ID: 0x0612
Vendor ID: 0x05e3 (Genesys Logic, Inc.)
Version: 92.16
Speed: Up to 5 Gb/sec
Manufacturer: GenesysLogic
Location ID: 0x14400000 / 6
Current Available (mA): 1800
Current Required (mA): 0
Extra Operating Current (mA): 0
Bluetooth USB Host Controller:
Product ID: 0x8290
Vendor ID: 0x05ac (Apple Inc.)
Version: 1.11
Speed: Up to 12 Mb/sec
Manufacturer: Broadcom Corp.
Location ID: 0x14300000 / 2
Current Available (mA): 1000
Current Required (mA): 0
Extra Operating Current (mA): 0
Built-In: Yes
Razer DeathAdder:
Product ID: 0x0016
Vendor ID: 0x1532
Version: 1.00
Speed: Up to 12 Mb/sec
Manufacturer: Razer
Location ID: 0x14200000 / 4
Current Available (mA): 1000
Current Required (mA): 100
Extra Operating Current (mA): 0
USB2.0 Hub:
Product ID: 0x0610
Vendor ID: 0x05e3 (Genesys Logic, Inc.)
Version: 92.16
Speed: Up to 480 Mb/sec
Manufacturer: GenesysLogic
Location ID: 0x14100000 / 5
Current Available (mA): 1000
Current Required (mA): 100
Extra Operating Current (mA): 0
BSD Name: en4
Apple USB Ethernet Adapter:
Product ID: 0x1402
Vendor ID: 0x05ac (Apple Inc.)
Version: 0.01
Serial Number: 1460AB
Speed: Up to 480 Mb/sec
Manufacturer: Apple Inc.
Location ID: 0x14140000 / 7
Current Available (mA): 1000
Current Required (mA): 250
Extra Operating Current (mA): 0
BSD Name: en4
iPhone:
Product ID: 0x12a8
Vendor ID: 0x05ac (Apple Inc.)
Version: 7.02
Serial Number: 1ba089f6c8745ae921e95dea83879c7e36b43b9c
Speed: Up to 480 Mb/sec
Manufacturer: Apple Inc.
Location ID: 0x14130000 / 8
Current Available (mA): 1000
Current Required (mA): 500
Extra Operating Current (mA): 0
Sleep current (mA): 500

而在图形界面上EL Capitan的操作步骤为:

  • 点击左上角苹果标志
  • 点击关于本机-> 系统报告 -> USB
  • 然后则可以查看系统总线上挂载的USB信息了

最后说下为啥写这个:最近在研究怎么在docker container中挂载USB,首先要获取总线上的USB设备,这是个开头吧。