Shell Direct lookup of Vid Pid

How can I use the Vid Pid output from lsusb to find out what driver support exists?

lsusb shows

Bus /dev/usb Device /dev/ugen1.6: ID 048d:9006 Integrated Technology Express, Inc. IT9135 BDA Afatech DVB-T HDTV Dongle

lynx https://linux-hardware.org/index.php?id=usb:[B]048d-9006[/B]

shows some info about (Linux) support for this device.

I guess a simple sed/awk script could provide a direct lookup, but I can't get my head around the simplest way of doing this.

Any suggestions?

If I get this working I'll try and find a FreeBSD equivalent, although I'm not sure if such a thing exists or not.
 
EDIT: Complete statement.
Not at the computer atm, but I would guess:
lsusb | awk '{print "lynx https://linux-hardware.org/index.php?id=usb:[B]$6[/B]"}'
 
I find it hard to take this topic seriously when you are referencing a linux tool on FreeBSD.

We use usbconfig and it does everything you will ever need. Ever.

Also I suggest you read /etc/devd.conf and study what happens when you plug in a usb drive.
 
If you have the source tree installed you can lookup the PID and VID from there.
/usr/src/sys/dev/usb/usbdevs

 
I find it hard to take this topic seriously when you are referencing a linux tool on FreeBSD.

We use usbconfig and it does everything you will ever need. Ever.

usbconfig:-

Code:
ugen1.6: <ITE Technologies, Inc. DVB-T TV Stick> at usbus1, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON (500mA)

lsusb:-

Code:
Bus /dev/usb Device /dev/ugen1.6: ID 048d:9006 Integrated Technology Express, Inc. IT9135 BDA Afatech DVB-T HDTV Dongle

Personally, I prefer having easy access to the Vid/Pid.
 
If you have the source tree installed you can lookup the PID and VID from there.
/usr/src/sys/dev/usb/usbdevs

/usr/src/sys/dev/usb/usbdevs:-

* List of known USB vendors

FreeBSD$
/* $NetBSD: usbdevs,v 1.392 2004/12/29 08:38:44 imp Exp $ */

/*-
* Copyright (c) 1998-2004 The NetBSD Foundation, Inc.
* All rights reserved.
*

Am I right in thinking this list is almost 20 years old?
 
usbdevs?id=5630d3135ecbc26c18788a215f8cdc35e339192a
Code:
 author   Nick Hibma <n_hibma@FreeBSD.org>    1999-11-18 18:02:44 +0000

Add usbdevs and friends.
usbdevs?id=37705f86ba70b0430ac41931f4a2fe6052e7087f
Code:
 author   Warner Losh <imp@FreeBSD.org>      2004-12-26 07:14:55 +0000

Minor merges from NetBSD (up through 1.388):
Add $NetBSD$ in a comment at the top Update copyright dates Update header comment

+/* $NetBSD: usbdevs,v 1.388 2004/11/05 13:51:16 scw Exp $ */
/*
- * Copyright (c) 1998, 1999, 2000 The NetBSD Foundation, Inc.
+ * Copyright (c) 1998-2004 The NetBSD Foundation, Inc.
* All rights reserved.
usbdevs
Code:
                            Commit message (Expand)                                    Author             Age     Files Lines
* usbdevs: add quirk for WD MyPassport Ultra External HDD                      Eugene Grosbein         2023-12-03 1     -0/+1
* usb: add quirks for the Genesys GL3220 card reader                           Mazin Fadl              2023-10-11 1     -0/+1
* usb: add necessary quirks for the NOREL Systems NS1081 SD reader             Mazin Fadl              2023-10-11 1     -0/+4
* sys: Remove $FreeBSD$: one-line bare tag                                     Warner Losh             2023-08-16 1     -1/+0
* ure(4): add support for Thinkpad Hybrid USB-C with USB-A dock                Joerg Pulz              2023-07-04 1     -1/+2
* usb: Fixed botched spacing                                                   Jessica Clarke          2023-06-27 1     -1/+1
* Add vendor id for Quectel USB modem and align with quectel marketing names.  Gabriele Lagan        2023-06-27 1     -5/+21
* bcm5974(4): add Magic Trackpad 2 (USB only) support                          Val Packett             2023-04-25 1     -0/+1
* u3g(4): Add device ID for the Quectel EM160R                                 Allan Jude              2023-03-01 1     -0/+1
* usbdevs: Add APC Smart-UPS1000                                               Cy Schubert             2023-02-28 1     -0/+3
...
 
usbconfig:-

Code:
ugen1.6: <ITE Technologies, Inc. DVB-T TV Stick> at usbus1, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON (500mA)

lsusb:-

Code:
Bus /dev/usb Device /dev/ugen1.6: ID 048d:9006 Integrated Technology Express, Inc. IT9135 BDA Afatech DVB-T HDTV Dongle

Personally, I prefer having easy access to the Vid/Pid.
You may want to try usbconfig -d ugen1.6 dump_device_desc
usbconfig(8) has other subcommands too.
 
I would like to expand on usbconfig a little.

While balanga was proud of his lsusb I was a jerk to him. sorry for that..

usbconfig
Code:
ugen0.1: <Intel EHCI root HUB> at usbus0, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=SAVE (0mA)
ugen1.1: <Intel EHCI root HUB> at usbus1, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=SAVE (0mA)
ugen1.2: <vendor 0x8087 product 0x0024> at usbus1, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=SAVE (0mA)
ugen0.2: <vendor 0x8087 product 0x0024> at usbus0, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=SAVE (0mA)
ugen1.3: <Broadcom Corp 5880> at usbus1, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON (100mA)

Notice how some devices have the format that balanga prefers.
ugen1.2: <vendor 0x8087 product 0x0024> at usbus1, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=SAVE (0mA)

Why is that?
It is because there is no device driver found and it gives you the PID and VID (ironically here Intel)

Now notice what a recognized device looks like:
ugen1.3: <Broadcom Corp 5880> at usbus1, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON (100mA)
No VID and PID but the proper device name. You don't need it because it is working. Check software config.

That's my two cents on usbconfig.
 
Back
Top