Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8296979
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T15:13:54+00:00 2026-06-08T15:13:54+00:00

I have a specific USB device whose Linux driver source code I would like

  • 0

I have a specific USB device whose Linux driver source code I would like to examine. My understanding is that the first step a USB driver takes is to register itself capable of handling a device with a specific vendor ID and product ID. In my case, the vendor ID is 0BDA and the product ID is 8187. Given this information, is there a way I can find the source file that registers itself as capable of handling this device, with a view to then finding out what other source files actual implement the driver details?

For reference, I am on kernel 3.2.0-26. I have tried a grep -rl 8187 /usr/src, but this lists a whole bunch of files, and I don’t know where to start.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T15:13:55+00:00Added an answer on June 8, 2026 at 3:13 pm

    There are a lot of other parameters besides vendor and product ID that can influence which driver is chosen. There’s a version number, device class, subclass, and protocol, and interface class, subclass, and protocol. The kernel reads all of those from the device and builds up a string containing all of them that looks like this (example is one of my devices, not yours):

    usb:v15A9p0004d0001dc00dsc00dp00icFFiscFFipFF
    

    That string is then passed to modprobe, which matches it against strings (with wildcards) found in the modules themselves. You can see the list of matching rules for a particular module by running modinfo on it. The source code construct that corresponds to those rules is MODULE_DEVICE_TABLE. The individual entries in the device table are usually built with the USB_DEVICE macro, so grepping USB_DEVICE.*8187 instead of just 8187 should narrow it down.

    If you have a device plugged in and working, you can find out which driver is associated with it by looking at its sysfs entry:

    ls -l /sys/bus/usb/devices/*/driver
    

    If you can build one of those device descriptor strings, you can ask modprobe to look the driver up for you without actually loading it by doing this (again my device as example):

    modprobe -v -n 'usb:v15A9p0004d0001dc00dsc00dp00icFFiscFFipFF'
    

    All of the numbers are available in the output of lsusb -v if you can get it. If not, try zeros and maybe you’ll get a wildcard match. Make sure you use uppercase letters for your hex digits, and lowercase for everything else. This will only work if the driver is present in /lib/modules so it’s no good for finding drivers that were left out of your kernel compile.

    If all else fails, the low-tech approach is to take the human-readable device name from lsusb, and google it plus the word “Linux”.

    Using some of the above methods, I found that your device’s driver is called rtl8187, with the vendor and product IDs registered from drivers/net/wireless/rtl818x/rtl8187/dev.c.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a specific class C and I would like to overload some math
I have a specific DB2 query, and I would like to execute this query
My app will be running from a USB key which have specific information like
I have a demo that runs off of a USB drive and I would
I have been writing some code that detects add and removal of USB devices,
I have been trying to get notified when a specific USB device is added
In my rails 3.1 app, I have specific files that are to be loaded
I have a specific question about looping variable names in WPF. XAML code looks
I have a specific requirement that all children of a particular JComponent have double
I have a specific question, that could use a general answer... When building Multi-Tier

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.