我目前需要弄清楚我的usb设备所连接的端口名称是什么。更具体地说,我需要知道要为以下内容添加什么
我使用的是Mac,我运行了命令行system_profiler SPUSBDataType
,它给了我以下内容。 我感兴趣的设备是第二个:CP2102 USB转UART桥接控制器。但是如何确定该设备连接的串口?我的第一张照片需要它。
USB:
USB 3.0 Bus:
Host Controller Driver: AppleUSBXHCIWPT
PCI Device ID: 0x9cb1
PCI Revision ID: 0x0003
PCI Vendor ID: 0x8086
Bluetooth USB Host Controller:
Product ID: 0x8290
Vendor ID: 0x05ac (Apple Inc.)
Version: 1.46
Speed: Up to 12 Mb/sec
Manufacturer: Broadcom Corp.
Location ID: 0x14300000 / 2
Current Available (mA): 500
Current Required (mA): 0
Extra Operating Current (mA): 0
Built-In: Yes
CP2102 USB to UART Bridge Controller:
Product ID: 0xea60
Vendor ID: 0x10c4 (Silicon Laboratories, Inc.)
Version: 1.00
Serial Number: 0001
Speed: Up to 12 Mb/sec
Manufacturer: Silicon Labs
Location ID: 0x14200000 / 9
Current Available (mA): 500
Current Required (mA): 100
Extra Operating Current (mA): 0
Microsoft USB Optical Mouse:
Product ID: 0x00cb
Vendor ID: 0x045e (Microsoft Corporation)
Version: 1.00
Speed: Up to 1.5 Mb/sec
Manufacturer: PixArt
Location ID: 0x14100000 / 4
Current Available (mA): 500
Current Required (mA): 100
Extra Operating Current (mA): 0
df
命令,它给了我以下内容:Filesystem 512-blocks Used Available Capacity iused ifree %iused Mounted on
/dev/disk1 974716928 77014080 897190848 8% 754757 4294212522 0% /
devfs 380 380 0 100% 660 0 100% /dev
map -hosts 0 0 0 100% 0 0 100% /net
map auto_home 0 0 0 100% 0 0 100% /home
map -fstab 0 0 0 100% 0 0 100% /Network/Servers
/dev/disk2s1 202248 198912 3336 99% 12 4294967267 0% /Volumes/VirtualBox
/dev/disk3s1 81800 67720 14080 83% 121 4294967158 0% /Volumes/Sublime Text
/dev/disk5s1 1228720 386824 841896 32% 370 4294966909 0% /Volumes/Etcher
答案 0 :(得分:6)
尝试在将设备插入USB之前和之后在终端中运行ls /dev/tty*
。如果只有插入USB设备时才会出现该条目,那么该条目将是与设备对应的条目。