Thanks Matt!  Let me ask for some clarification below.

On Tue, Apr 6, 2010 at 8:51 AM, Matt Graham <danceswithcrows@usa.net> wrote:
From: Dazed_75 <lthielster@gmail.com>
> Can anyone give a brief description of how the system knows what driver
> to use for a given device?

USB devices all have a vendor ID and product ID (16-bit numbers) that they can
report via some standardized commands.  IIRC, when a USB module sees a new USB
device that has the right vendor and product ID for it on the bus, that module
claims that device, and then does whatever that device needs (initialization,
quirk detection, whatever).  

So basically, that module knows what vendor and product IDs it supports and is independent of the pci.ids and usb.ids files?  That would support what I thught about those files only being useful for the reporting to humans of what the vendor and product IDs mean since thwere is no information in those files other than the description (i.e. no references to modules/drivers, etc.).
 
Then the higher-level subsystems like v4l or
storage make that device available via block or char device files.  If you
have a helpful distro like Ubuntu, there might be udev rules that
automatically modprobe the right modules when they see a vendor/product of
1234:abcd show up on the bus.

Any idea where/how to find those and how to grok them?

All of this is controlled by the kernel code under /usr/src/linux/ , not by
any userspace files that lsusb uses.  Unless you've got one of those devices
that uses libusb, which is possible, like with some scanners.

> 3) If the generic answer is too complicated, how about specifically for a
> webcam or a 3G modem?

Webcams made in the last 2-3 years should all follow the USB Device Class
"video" standards, and should all be supported by the uvcvideo module.  You
should check to make sure that module exists, and if it doesn't, you need to
upgrade to the latest kernel you can get.

I did manage to get the webcam working for a short time a couple of years ago but it was not reliable and quit before long (I think because of an upgrade to ubuntu).  Unfortunately, I have no record of what I did.  I only vaguely recall doing something with v4l, cheese and something else.

lsmod shows:
uvcvideo     59080     0
videodev     36736     1     uvcvideo

I do not know if anything else there relates.  What I do not see anywhere is any reference that I can discern relates to this webcam model (other than in the usb.ids file and by running lsusb).  Searching the web seems to indicate that over the year people have made it work by compiling and installing a R5U870 driver for this Ricoh webcam (ID 05ca:1810).  That seems a bit much when it has been is use for years.

No idea about 3G modems, since I've never used one.

--
Matt G / Dances With Crows
The Crow202 Blog:  http://crow202.org/wordpress/
There is no Darkness in Eternity/But only Light too dim for us to see


---------------------------------------------------
PLUG-discuss mailing list - PLUG-discuss@lists.plug.phoenix.az.us
To subscribe, unsubscribe, or to change your mail settings:
http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss



--
Dazed_75 a.k.a. Larry

The spirit of resistance to government is so valuable on certain occasions, that I wish it always to be kept alive.
 - Thomas Jefferson