lsusb

Linux shell get device id from user input

徘徊边缘 提交于 2020-01-14 23:37:07
问题 I am working on an install script for a program that needs the device id from lsusb in it's configuration so I was thinking of doing the following: $usblist=(lsusb) #put the list into a array for each line. #use the array to give the user a selection list usinging whiptail. #from that line strip out the device id and vender id from the selected line. Sorry I haven't gotten very far with my code but I am stuck on this and have no idea how to do what I would like to do. Please can someone help.

Is there an equivalent of lsusb for OS X

老子叫甜甜 提交于 2019-12-31 07:59:45
问题 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

Use iSerialNumber USB device descriptor to uniquely identify GoPro Camera

强颜欢笑 提交于 2019-12-11 03:58:47
问题 The field I'm interested is iSerial from the output of: lsusb -d <idVendor>:<idProduct> -v Example output of a non-unique iSerialNumber: Device Descriptor: bLength 18 bDescriptorType 1 bcdUSB 1.10 bDeviceClass 239 Miscellaneous Device bDeviceSubClass 2 ? bDeviceProtocol 1 Interface Association bMaxPacketSize0 64 idVendor 0x0402 ALi Corp. idProduct 0x9665 Gateway Webcam bcdDevice 0.09 iManufacturer 3 iProduct 1 iSerial 0 <-- Three string descriptors exist to provide details of the manufacturer

Mac OS X下的USB设备连接与访问

眉间皱痕 提交于 2019-12-09 10:06:02
由于COM协议的广泛使用,很多设备虽然接口改为了USB,但内部数据通讯协议仍然使用的是COM(即传统的RS232串口协议,新的使用TTL)。很多设备使用了PL2302/CH340/FTDI等芯片来通过USB模拟出串口协议,如Arduino/NodeMCU等都采用类似的机制。 在Windows下,安装驱动程序后可以直接在“设备管理器”找到模拟的COM设备(找不到的话,可能驱动有问题了,有时候重新启动或重新安装能解决)。在Linux下可以通过lsusb和dmesg列出USB端口和所模拟的COM设备端口(如/dev/tty.usb0等等)。在Mac OS X下怎么办呢? Mac OS X下有两种办法,一个是直接列出设备 ,这个设备树的管理与Linux是一样的: ls /dev/tty.* 第二个办法是安装lsusb命令程序,如下所示: $ brew update $ brew tap jlhonora/lsusb $ brew install lsusb $ lsusb 还可以使用下面的命令查看系统的USB设备信息: system_profiler SPUSBDataType 串口转USB的设备可以通过标准串口进行数据访问,如minicom/screen/xconsole等进行工具访问。xconsole是基于Python的串口访问工具,需要安装pyserial支持库,可以从 https:

Is there an equivalent of lsusb for OS X

淺唱寂寞╮ 提交于 2019-12-02 14:25:40
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