如何查看LINUX下的一个USB设备使用的驱动模块
来源:互联网 发布:java 发送http请求 编辑:程序博客网 时间:2024/06/07 03:06
http://unix.stackexchange.com/questions/60078/find-out-which-modules-are-associated-with-a-usb-device
Finding the Kernel Driver(s)
The victim device
$ lsusb Bus 010 Device 002: ID 046d:c01e Logitech, Inc. MX518 Optical MouseBus 010 Device 003: ID 051d:0002 American Power Conversion Uninterruptible Power Supply
We're going to try to find out what driver is used for the APC UPS. Note that there are two answers to this question: The driver that the kernel would use, and the driver that is currently in use. Userspace can instruct the kernel to use a different driver (and in the case of my APC UPS, nut
has).
Method 1: Using usbutils (easy)
The usbutils
package (on Debian, at least) includes a script calledusb-devices
. If you run it, it outputs information about the devices on the system, including which driver is used:
$ usb-devices⋮T: Bus=10 Lev=01 Prnt=01 Port=01 Cnt=02 Dev#= 3 Spd=1.5 MxCh= 0D: Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1P: Vendor=051d ProdID=0002 Rev=01.06S: Manufacturer=American Power ConversionS: Product=Back-UPS RS 1500 FW:8.g9 .D USB FW:g9 S: SerialNumber=XXXXXXXXXXXX C: #Ifs= 1 Cfg#= 1 Atr=a0 MxPwr=24mAI: If#= 0 Alt= 0 #EPs= 1 Cls=03(HID ) Sub=00 Prot=00 Driver=usbfs⋮
Note that this lists the current driver, not the default one. There isn't a way to find the default one.
Method 2: Using debugfs (requires root)
If you have debugfs mounted, the kernel maintains a file in the same format asusb-devices
prints out at /sys/kernel/debug/usb/devices
; you can view withless
, etc. Note that debugfs interfaces are not stable, so different kernel versions may print in a different format, or be missing the file entirely.
Once again, this only shows the current driver, not the default.
- 如何查看LINUX下的一个USB设备使用的驱动模块
- 如何查看LINUX下的一个USB设备使用的驱动模块
- Linux下的USB设备驱动
- 如何编译一个linux下的驱动模块
- 如何找到一个usb设备的具体驱动
- Linux下的硬件驱动——USB设备
- Linux下的硬件驱动——USB设备
- Linux下的硬件驱动——USB设备
- Linux下的硬件驱动——USB设备
- Linux下的硬件驱动——USB设备
- Linux下的硬件驱动——USB设备
- 介绍Linux操作系统下的USB硬件设备驱动
- linux下如何使用USB存储设备
- 如何查看USB设备的VID\PID
- linux下的SPI模块驱动使用
- Linux下的硬件驱动——USB设备(下)(驱动开发部分)
- Linux下的硬件驱动——USB设备(下)(驱动开发部分)
- Linux下的硬件驱动——USB设备(下)(驱动开发部分)
- 【jQuery】jQuery双击事件与单击事件的冲突解决
- HTTP长连接和短连接
- 【angularjs学习笔记】利用angularjs和requirejs构建模块化单页面应用
- Datapump 小节-1
- 第7周项目2-建立链队算法库
- 如何查看LINUX下的一个USB设备使用的驱动模块
- python 学习笔记1_pythonb的来源、特点
- java ssl协议使用:
- Responsive设计——meta标签
- Angular $q 完全指南
- 第3章 程序的机器级表示
- 浮动的div层置顶显示
- ROS机器人Diego 1#制作(一)BOM清单
- iOS开发-xCode6(iOS 8)中应用程序图标和启动页面设置