Professional Documents
Culture Documents
Identify USB Driver
Identify USB Driver
Ubuntu, Debian, Mint, CentOS, Fedora & all Linux distro - blackMORE Ops
Identify USB Driver. Ubuntu, Debian, Mint, CentOS, Fedora & all Linux
distro
August 25, 2014 Driver, How to, Linux, Networking, USB, Wireless LAN (Wi-Fi)
This guide shows how you can identify USB Driver Chipset(most commonly Wireless) Information on Linux.
Often users troll different forums and blogs to find out they can identify which driver their PCI or USB
device is using. This guide applies to all possible scenarios. After reading and following this guide you will
be able to identify the followings:
2. Mouses
3. Keyboards
In short, any device drivers can be identified that is using plugged into a USB port. This guide will work for
any Linux distributions, namely –
1. Linux Mint
2. Ubuntu
3. Debian GNU/Linux
4. Mageia / Mandriva
5. Fedora
7. Arch Linux
9. PCLinuxOS
USB was designed to standardize the connection of computer peripherals (including keyboards, pointing
devices, digital cameras, printers, portable media players, disk drives and network adapters) to personal
computers, both to communicate and to supply electric power. It has become commonplace on other
devices, such as smartphones, PDAs and video game consoles. USB has effectively replaced a variety of
earlier interfaces, such as serial and parallel ports, as well as separate power chargers for portable devices.
Source: Wikipedia
unreliable answers? I will try my best to answer anything and everything in this post about all devices and
their drivers in here. So, stay tuned as this is going to a long a** post.
LS = List
root@kali:~# lsusb
Bus 002 Device 003: ID 148f:2870 Ralink Technology, Corp. RT2870 Wireless Adapter
Bus 002 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 004: ID 046d:c016 Logitech, Inc. Optical Wheel Mouse
Bus 001 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
root@kali:~# Privacy Policy on
Some
Cookies services
Usageused in
this site uses cookies to ACCEPT
tailor user experience or
https://www.blackmoreops.com/2014/08/25/identify-pci-usb-wired-wireless-driver-linux-identify-usb-driver/ 2/12
3/20/2020 Identify USB Driver. Ubuntu, Debian, Mint, CentOS, Fedora & all Linux distro - blackMORE Ops
tailor user experience or
to show ads.
Now you can see the device names, types etc. But unlike, lspci, it doesn’t give you that funky number at the
front.
Bus 002 Device 003: ID 148f:2870 Ralink Technology, Corp. RT2870 Wireless Adapter
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 0 (Defined at Interface level)
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 64
idVendor 0x148f Ralink Technology, Corp.
idProduct 0x2870 RT2870 Wireless Adapter
bcdDevice 1.01
iManufacturer 1 Ralink
iProduct 2 802.11 n WLAN
iSerial 3 1.0
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 67
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0x80
(Bus Powered)
MaxPower 450mA
Interface Descriptor:
Privacy Policy on
bLength 9
bDescriptorType 4
bInterfaceNumber 0 Some
Cookies services
Usageused in
bAlternateSetting 0 this site uses cookies to ACCEPT
tailor user experience or
https://www.blackmoreops.com/2014/08/25/identify-pci-usb-wired-wireless-driver-linux-identify-usb-driver/ 3/12
3/20/2020 Identify USB Driver. Ubuntu, Debian, Mint, CentOS, Fedora & all Linux distro - blackMORE Ops
bNumEndpoints 7
tailor user experience or
bInterfaceClass to show ads.
255 Vendor Specific Class
bInterfaceSubClass 255 Vendor Specific Subclass
bInterfaceProtocol 255 Vendor Specific Protocol
iInterface 5 1.0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x01 EP 1 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x02 EP 2 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x03 EP 3 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x04 EP 4 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x05 EP 5 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x06
Privacy Policy on
EP 6 OUT
Some services
Usageused in
bmAttributes 2
Transfer Type Bulk Cookies
Synch Type None this site uses cookies to ACCEPT
tailor user experience or
https://www.blackmoreops.com/2014/08/25/identify-pci-usb-wired-wireless-driver-linux-identify-usb-driver/ 4/12
3/20/2020 Identify USB Driver. Ubuntu, Debian, Mint, CentOS, Fedora & all Linux distro - blackMORE Ops
Usage Type Data
tailor user experience or
wMaxPacketSize 0x0200 to show ads.
1x 512 bytes
bInterval 0
Device Qualifier (for other device speed):
bLength 10
bDescriptorType 6
bcdUSB 2.00
bDeviceClass 0 (Defined at Interface level)
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 64
bNumConfigurations 1
Device Status: 0x0000
(Bus Powered)
So I found a different way to list the driver. I used lsusb -t to dump the physical USB device hierarchy as a
tree.
root@kali:~# lsusb -t
This was actually great as most computers got just 3/4 USB devices plugged in at anytime. (i.e. Keyboard,
Mouse and USB Wireless Adapter etc.). In my case I had just 2 device plugged in.
So my lsusb -t output looks very small and shows me exactly what I wanted to see.
root@kali:~# lsusb -t
/: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=ehci-pci/3p, 480M
|__ Port 1: Dev 2, If 0, Class=hub, Driver=hub/8p, 480M
|__ Port 5: Dev 3, If 0, Class=vend., Driver=rt2800usb, 480M
/: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=ehci-pci/3p, 480M
|__ Port 1: Dev 2, If 0, Class=hub, Driver=hub/6p, 480M
|__ Port 4: Dev 4, If 0, Class=HID, Driver=usbhid, 1.5M
root@kali:~#
Step 3: Get driver info for selected device – Identify USB driver
Now to get the full details of the driver you issue the following command:
Privacy Policy on
root@kali:~# modinfo rt2800usb
Some
Cookies services
Usageused in
This will list everything and anything
this site usesdriver
for that including
cookies to the driver file.
ACCEPT
tailor user experience or
https://www.blackmoreops.com/2014/08/25/identify-pci-usb-wired-wireless-driver-linux-identify-usb-driver/ 5/12
3/20/2020 Identify USB Driver. Ubuntu, Debian, Mint, CentOS, Fedora & all Linux distro - blackMORE Ops
root@kali:~# modinfo rt2800usb
tailor user experience or
filename: to show ads.
/lib/modules/3.14-kali1-amd64/kernel/drivers/net/wireless/rt2x00/rt2800usb.ko
license: GPL
firmware: rt2870.bin
description: Ralink RT2800 USB Wireless LAN driver.
version: 2.3.0
author: http://rt2x00.serialmonkey.com
srcversion: 8D709655B6AD993F0D5ACC4
alias: usb:v20F4p724Ad*dc*dsc*dp*ic*isc*ip*in*
alias: usb:v148Fp5572d*dc*dsc*dp*ic*isc*ip*in*
depends: rt2x00lib,rt2800lib,rt2x00usb,usbcore
intree: Y
vermagic: 3.14-kali1-amd64 SMP mod_unload modversions
parm: nohwcrypt:Disable hardware encryption. (bool)
root@kali:~#
So the driver file used for this particular USB Wireless Adapter is:
filename: /lib/modules/3.14-kali1-amd64/kernel/drivers/net/wireless/rt2x00/rt2800usb.ko
Now we know the device name, driver used, driver filename, vendor, publisher, dependencies, license and
Author details for the selected USB device (USB Wireless Adapter).
ls = List
hw = Hardwares
First you need to install lshw in your Linux system. Install using the following command:
Privacy
Now list all hardware and detailed Policy
info using theon
following command
Some
Cookies Usageused in
services
root@kali:~# lshw this site uses cookies to ACCEPT
tailor user experience or
https://www.blackmoreops.com/2014/08/25/identify-pci-usb-wired-wireless-driver-linux-identify-usb-driver/ 6/12
3/20/2020 Identify USB Driver. Ubuntu, Debian, Mint, CentOS, Fedora & all Linux distro - blackMORE Ops
tailor user experience or
lshw will give you anything and everything.
to show ads.If you want you can browse through the outputs and you will
find all the things you will ever need for a particular device.However, this is tedious job.
1. Display
2. Multimedia
3. Network etc.
For VGA/Display related output, you can use -C Display with lshw command.
For Audio/Multimedia related output, you can use -C Multimedia with lshw command.
For Network related output, you can use -C Network with lshw command.
So to find more info using lshw for this Ralink RT2800 USB Wireless adapter we will use the following
command:
Privacy Policy on
Some
Cookies services
Usageused in
this site uses cookies to ACCEPT
tailor user experience or
https://www.blackmoreops.com/2014/08/25/identify-pci-usb-wired-wireless-driver-linux-identify-usb-driver/ 7/12
3/20/2020 Identify USB Driver. Ubuntu, Debian, Mint, CentOS, Fedora & all Linux distro - blackMORE Ops
tailor user experience or
to show ads.
As you can see, it lists the driver name as well. We can get more details on that driver using modinfo now.
Step 4.2: Identify USB driver using GTK+ front-end for lshw
and finally last but not the least, lshw also got a GUI version (lshw-gtk). Install that if you don’t want to use
Launch GTK+ front-end for lshw using the following command on terminal
Refresh the window and you will see everything as per order. Double-click to expand each section.
Privacy Policy on
Some
Cookies services
Usageused in
this site uses cookies to ACCEPT
tailor user experience or
https://www.blackmoreops.com/2014/08/25/identify-pci-usb-wired-wireless-driver-linux-identify-usb-driver/ 8/12
3/20/2020 Identify USB Driver. Ubuntu, Debian, Mint, CentOS, Fedora & all Linux distro - blackMORE Ops
tailor user experience or
to show ads.
Note: Once you’ve identified the driver name, you need to use modinfo <driver-name> to extract the
details.
So I’ve got an ALFA AWUS036H USB 802.1b/g Long-Range Wireless USB Adapter. Following is how you use
dmesg
root@kali:~# dmesg
Now I will be using “dmesg | tail” command as we only want the last few lines from dmesg. BTW in case
you’re wondering, dmesg will print the Linux kernel ring buffer messages.
Privacy Policy on
root@kali:~# dmesg | tail
[85452.720179] usb 2-1.8: USB disconnect, device number 5
Some
Cookies services
Usageused in
[85514.996934] usb 1-1.4: USB disconnect, device number 5
[85526.132402] usb 1-1.4:
this site uses cookies to
new low-speed USB device number 6 using ehci-pci ACCEPT
[85526.204445] usb 1-1.4: device descriptor read/64, error -32
tailor user experience or
https://www.blackmoreops.com/2014/08/25/identify-pci-usb-wired-wireless-driver-linux-identify-usb-driver/ 9/12
3/20/2020 Identify USB Driver. Ubuntu, Debian, Mint, CentOS, Fedora & all Linux distro - blackMORE Ops
tailor user experience or
[85526.405449] usb 1-1.4: New USB device found, idVendor=046d, idProduct=c016
to show ads.
[85526.405455] usb 1-1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[85526.405459] usb 1-1.4: Product: Optical USB Mouse
[85526.405462] usb 1-1.4: Manufacturer: Logitech
[85526.408538] input: Logitech Optical USB Mouse as /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.4/1-1.4:1.0/0003:046D:C016.0004/input/
[85526.409084] hid-generic 0003:046D:C016.0004: input,hidraw0: USB HID v1.10 Mouse [Logitech Optical USB Mouse] on usb-0000:00:1a.0-1.4/
root@kali:~#
As you can see the last USB device plugged in was my USB Mouse (which is using hid-generic driver.)
Now let’s plug in my ALFA AWUS036H USB 802.1b/g Long-Range Wireless USB Adapter and use this same
“dmesg | tail” command.
Privacy Policy on
Some
Cookies services
Usageused in
this site uses cookies to ACCEPT
tailor user experience or
https://www.blackmoreops.com/2014/08/25/identify-pci-usb-wired-wireless-driver-linux-identify-usb-driver/ 10/12
3/20/2020 Identify USB Driver. Ubuntu, Debian, Mint, CentOS, Fedora & all Linux distro - blackMORE Ops
tailor user experience or
So there you go, dmesg picked the
to newly plugged in ALFA AWUS036H USB 802.1b/g Long-Range Wireless
show ads.
USB Adapter and spewed some lines in there. So which one is the driver? In my case it is using rtl8187
driver.
We can double check it using both “lsusb -t” and “lshw -C Network” command
root@kali:~# lsusb -t
/: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=ehci-pci/3p, 480M
|__ Port 1: Dev 2, If 0, Class=hub, Driver=hub/8p, 480M
|__ Port 5: Dev 3, If 0, Class=vend., Driver=rt2800usb, 480M
|__ Port 8: Dev 6, If 0, Class=>ifc, Driver=rtl8187, 480M
/: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=ehci-pci/3p, 480M
|__ Port 1: Dev 2, If 0, Class=hub, Driver=hub/6p, 480M
|__ Port 4: Dev 6, If 0, Class=HID, Driver=usbhid, 1.5M
root@kali:~#
and
See my list of supported Wifi Adapters that’s supported for injection and monitor mode — > 802.11 Recommended
USB Wireless Cards for Kali Linux
How to install Driver for TP-Link TL-WDN3200 N600 Wireless Dual Band USB Adapter in Linux
Any Linux driver can be installed similarly once you’ve identified the driver details. (or at least the files
from either vendors website or a 3rd party website).
Summary
I hope this article clears up the confusion on how to detect a driver for a particular USB device.
Those who care directly to this post, I was planning to write a single article on how to identify USB and PCI
driver but it seems that would be very very long post. So I’ve decided to divide the post into Two parts,
Thanks for reading. If you’ve found this article useful, please share.
Privacy Policy on
Some
Cookies services
Usageused in
this site uses cookies to ACCEPT
tailor user experience or
https://www.blackmoreops.com/2014/08/25/identify-pci-usb-wired-wireless-driver-linux-identify-usb-driver/ 12/12