列出连接我的设备的 USB 端口名称,Mac。

4

我现在需要确定我的USB设备连接的端口名称,具体来说,我需要知道为以下内容填写什么:enter image description here

我正在使用Mac电脑,运行了命令行system_profiler SPUSBDataType,得到了以下信息。 我需要的设备是第二个: CP2102 USB to UART Bridge Controller。但是我怎样才能确定这个设备连接的串行端口呢?我需要它填写我的第一个图片。

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

另请参见https://apple.stackexchange.com/questions/242104/is-there-a-way-to-access-a-usb-serial-port-by-the-device-id-not-by-the-tty-po。 - scipilot
2个回答

15

在插入设备到USB端口之前和之后,在终端中尝试运行ls /dev/tty*命令。如果有一项只在USB设备插入时出现的条目,那么这将是对应该设备的条目。


1
在 MacBook 上执行以下操作:
# device not plugged in
ls /dev/ > notPluggedIn.txt

# device plugged in
ls /dev/ > pluggedIn.txt

# find what you plugged in
diff notPluggedIn.txt pluggedIn.txt

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接