LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General > LinuxAnswers Discussion
User Name
Password
LinuxAnswers Discussion This forum is to discuss articles posted to LinuxAnswers.

Notices


Reply
  Search this Thread
Old 08-11-2009, 07:30 PM   #16
reinoud
LQ Newbie
 
Registered: Aug 2009
Posts: 2

Rep: Reputation: 0
compiler warnings fixed


Most Compiler problems fixed by including:

stdbool.h (otherwise it doesn't know bool and true) and string.h (to remedy warnings about strlen)
Also, in C99 i can't use for (int i=0 bla bla)
first define int i; for (i=0 blabla) does the job.

Also rename read to read_from_device and write to write_to_device
 
Old 03-23-2010, 08:15 AM   #17
muthumb14
LQ Newbie
 
Registered: Jun 2006
Posts: 2

Rep: Reputation: 0
What about applications development

yes I agree that we can detaect the mounted USB through LIBUSB, could we write the program to detect the FILEs in the USB and to opne the FILEs etc..

Rgds,
Muthu
 
Old 11-18-2010, 03:38 AM   #18
arkroan
LQ Newbie
 
Registered: Nov 2010
Location: UK
Distribution: Ubuntu
Posts: 2

Rep: Reputation: 0
Quote:
Configuration and Endpoints are one of the two important descriptors of any USB device. These descriptors are defined using the
Does this guide end at this point?? I am not able to see any more of it.
 
Old 11-18-2010, 03:52 AM   #19
arkroan
LQ Newbie
 
Registered: Nov 2010
Location: UK
Distribution: Ubuntu
Posts: 2

Rep: Reputation: 0
Quote:
Originally Posted by alain91 View Post
Hello,

Here is the end of the article :



Important attributes of USB devices useful in device driver coding
Configuration and Endpoints are one of the two important descriptors of any USB device. These desciptors are defined using the “struct usb_config_descriptor” and “struct_usb_endpoint_descriptor” respectively .

dev->descriptor.idVendor : Reveals the Vendor-Id of the USB device connected to the system.

dev->descriptor.idProduct : Reveals the Product-Id of the USB device connected to the system.

dev->descriptor.iManufacturer : Reveals the name of the Manufacturer USB device connected to the system.

EndpointAddress:Combination of endpoint address and enpoint direction on a USB device.

InterfaceNumber : One of the several interfaces that is allocated to the connected USB device.

AlternateSetting:This is part of the a single interface allocated to the USB device.


Prerequites for Libusb programming
Linux system with Kernel 2.4 above series.
Proficiency in C language.
Good understanding of USB device internals.
Idea about USBFS.
Oh now i see it.. Sorry for the previous post.
 
Old 07-17-2012, 08:36 AM   #20
dollysingh
LQ Newbie
 
Registered: Jul 2012
Posts: 3

Rep: Reputation: Disabled
Question Output is same for all usb drive.

Hi,

I compiled the code.
I run it for 2 different pen drives but in both case I got the same output.
Manufacture name is not right and same output is repeated lot of times.

Output goes like this:

bus/device idVendor/idProduct
008/001 1D6B/0001
- Manufacturer : Linux 2.6.38.8-customc uhci_hcd
- Product : UHCI Host Controller
- Serial Number: 0000:00:1d.2
wTotalLength: 25
bNumInterfaces: 1
bConfigurationValue: 1
iConfiguration: 0
bmAttributes: e0h
MaxPower: 0
bInterfaceNumber: 0
bAlternateSetting: 0
bNumEndpoints: 1
bInterfaceClass: 9
bInterfaceSubClass: 0
bInterfaceProtocol: 0
iInterface: 0
bEndpointAddress: 81h
bmAttributes: 03h
wMaxPacketSize: 2
bInterval: 255
bRefresh: 0
bSynchAddress: 0
007/001 1D6B/0001
- Manufacturer : Linux 2.6.38.8-customc uhci_hcd
- Product : UHCI Host Controller
- Serial Number: 0000:00:1d.1
wTotalLength: 25
bNumInterfaces: 1
bConfigurationValue: 1
iConfiguration: 0
bmAttributes: e0h
MaxPower: 0
bInterfaceNumber: 0
bAlternateSetting: 0
bNumEndpoints: 1
bInterfaceClass: 9
bInterfaceSubClass: 0
bInterfaceProtocol: 0
iInterface: 0
bEndpointAddress: 81h
bmAttributes: 03h
wMaxPacketSize: 2
bInterval: 255
bRefresh: 0
bSynchAddress: 0
006/001 1D6B/0001
- Manufacturer : Linux 2.6.38.8-customc uhci_hcd
- Product : UHCI Host Controller
- Serial Number: 0000:00:1d.0
wTotalLength: 25
bNumInterfaces: 1
bConfigurationValue: 1
iConfiguration: 0
bmAttributes: e0h
MaxPower: 0
bInterfaceNumber: 0
bAlternateSetting: 0
bNumEndpoints: 1
bInterfaceClass: 9
bInterfaceSubClass: 0
bInterfaceProtocol: 0
iInterface: 0
bEndpointAddress: 81h
bmAttributes: 03h
wMaxPacketSize: 2
bInterval: 255
bRefresh: 0
bSynchAddress: 0
005/002 08FF/2810
- Product : Fingerprint Sensor
wTotalLength: 32
bNumInterfaces: 1
bConfigurationValue: 1
iConfiguration: 0
bmAttributes: a0h
MaxPower: 50
bInterfaceNumber: 0
bAlternateSetting: 0
bNumEndpoints: 2
bInterfaceClass: 255
bInterfaceSubClass: 255
bInterfaceProtocol: 255
iInterface: 0
bEndpointAddress: 81h
bmAttributes: 02h
wMaxPacketSize: 64
bInterval: 0
bRefresh: 0
bSynchAddress: 0
bEndpointAddress: 02h
bmAttributes: 02h
wMaxPacketSize: 8
bInterval: 0
bRefresh: 0
bSynchAddress: 0
005/001 1D6B/0001
- Manufacturer : Linux 2.6.38.8-customc uhci_hcd
- Product : UHCI Host Controller
- Serial Number: 0000:00:1a.2
wTotalLength: 25
bNumInterfaces: 1
bConfigurationValue: 1
iConfiguration: 0
bmAttributes: e0h
MaxPower: 0
bInterfaceNumber: 0
bAlternateSetting: 0
bNumEndpoints: 1
bInterfaceClass: 9
bInterfaceSubClass: 0
bInterfaceProtocol: 0
iInterface: 0
bEndpointAddress: 81h
bmAttributes: 03h
wMaxPacketSize: 2
bInterval: 255
bRefresh: 0
bSynchAddress: 0
004/001 1D6B/0001
- Manufacturer : Linux 2.6.38.8-customc uhci_hcd
- Product : UHCI Host Controller
- Serial Number: 0000:00:1a.1
wTotalLength: 25
bNumInterfaces: 1
bConfigurationValue: 1
iConfiguration: 0
bmAttributes: e0h
MaxPower: 0
bInterfaceNumber: 0
bAlternateSetting: 0
bNumEndpoints: 1
bInterfaceClass: 9
bInterfaceSubClass: 0
bInterfaceProtocol: 0
iInterface: 0
bEndpointAddress: 81h
bmAttributes: 03h
wMaxPacketSize: 2
bInterval: 255
bRefresh: 0
bSynchAddress: 0
003/006 413C/8156
- Manufacturer : Dell Computer Corp
- Product : Dell Wireless 370 Bluetooth Mini-card
wTotalLength: 216
bNumInterfaces: 4
bConfigurationValue: 1
iConfiguration: 0
bmAttributes: e0h
MaxPower: 50
bInterfaceNumber: 0
bAlternateSetting: 0
bNumEndpoints: 3
bInterfaceClass: 224
bInterfaceSubClass: 1
bInterfaceProtocol: 1
iInterface: 0
bEndpointAddress: 81h
bmAttributes: 03h
wMaxPacketSize: 16
bInterval: 1
bRefresh: 0
bSynchAddress: 0
bEndpointAddress: 82h
bmAttributes: 02h
wMaxPacketSize: 64
bInterval: 1
bRefresh: 0
bSynchAddress: 0
bEndpointAddress: 02h
bmAttributes: 02h
wMaxPacketSize: 64
bInterval: 1
bRefresh: 0
bSynchAddress: 0
bInterfaceNumber: 1
bAlternateSetting: 0
bNumEndpoints: 2
bInterfaceClass: 224
bInterfaceSubClass: 1
bInterfaceProtocol: 1
iInterface: 0
bEndpointAddress: 83h
bmAttributes: 01h
wMaxPacketSize: 0
bInterval: 1
bRefresh: 0
bSynchAddress: 0
bEndpointAddress: 03h
bmAttributes: 01h
wMaxPacketSize: 0
bInterval: 1
bRefresh: 0
bSynchAddress: 0
bInterfaceNumber: 1
bAlternateSetting: 1
bNumEndpoints: 2
bInterfaceClass: 224
bInterfaceSubClass: 1
bInterfaceProtocol: 1
iInterface: 0
bEndpointAddress: 83h
bmAttributes: 01h
wMaxPacketSize: 9
bInterval: 1
bRefresh: 0
bSynchAddress: 0
bEndpointAddress: 03h
bmAttributes: 01h
wMaxPacketSize: 9
bInterval: 1
bRefresh: 0
bSynchAddress: 0
bInterfaceNumber: 1
bAlternateSetting: 2
bNumEndpoints: 2
bInterfaceClass: 224
bInterfaceSubClass: 1
bInterfaceProtocol: 1
iInterface: 0
bEndpointAddress: 83h
bmAttributes: 01h
wMaxPacketSize: 17
bInterval: 1
bRefresh: 0
bSynchAddress: 0
bEndpointAddress: 03h
bmAttributes: 01h
wMaxPacketSize: 17
bInterval: 1
bRefresh: 0
bSynchAddress: 0
bInterfaceNumber: 1
bAlternateSetting: 3
bNumEndpoints: 2
bInterfaceClass: 224
bInterfaceSubClass: 1
bInterfaceProtocol: 1
iInterface: 0
bEndpointAddress: 83h
bmAttributes: 01h
wMaxPacketSize: 32
bInterval: 1
bRefresh: 0
bSynchAddress: 0
bEndpointAddress: 03h
bmAttributes: 01h
wMaxPacketSize: 32
bInterval: 1
bRefresh: 0
bSynchAddress: 0
bInterfaceNumber: 1
bAlternateSetting: 4
bNumEndpoints: 2
bInterfaceClass: 224
bInterfaceSubClass: 1
bInterfaceProtocol: 1
iInterface: 0
bEndpointAddress: 83h
bmAttributes: 01h
wMaxPacketSize: 64
bInterval: 1
bRefresh: 0
bSynchAddress: 0
bEndpointAddress: 03h
bmAttributes: 01h
wMaxPacketSize: 64
bInterval: 1
bRefresh: 0
bSynchAddress: 0
bInterfaceNumber: 1
bAlternateSetting: 5
bNumEndpoints: 2
bInterfaceClass: 224
bInterfaceSubClass: 1
bInterfaceProtocol: 1
iInterface: 0
bEndpointAddress: 83h
bmAttributes: 01h
wMaxPacketSize: 64
bInterval: 1
bRefresh: 0
bSynchAddress: 0
bEndpointAddress: 03h
bmAttributes: 01h
wMaxPacketSize: 64
bInterval: 1
bRefresh: 0
bSynchAddress: 0
bInterfaceNumber: 2
bAlternateSetting: 0
bNumEndpoints: 2
bInterfaceClass: 255
bInterfaceSubClass: 255
bInterfaceProtocol: 255
iInterface: 0
bEndpointAddress: 84h
bmAttributes: 02h
wMaxPacketSize: 32
bInterval: 1
bRefresh: 0
bSynchAddress: 0
bEndpointAddress: 04h
bmAttributes: 02h
wMaxPacketSize: 32
bInterval: 1
bRefresh: 0
bSynchAddress: 0
bInterfaceNumber: 3
bAlternateSetting: 0
bNumEndpoints: 0
bInterfaceClass: 254
bInterfaceSubClass: 1
bInterfaceProtocol: 0
iInterface: 0
003/004 413C/8158
wTotalLength: 62
bNumInterfaces: 1
bConfigurationValue: 1
iConfiguration: 0
bmAttributes: e0h
MaxPower: 1
bInterfaceNumber: 0
bAlternateSetting: 0
bNumEndpoints: 1
bInterfaceClass: 3
bInterfaceSubClass: 1
bInterfaceProtocol: 2
iInterface: 0
bEndpointAddress: 81h
bmAttributes: 03h
wMaxPacketSize: 4
bInterval: 10
bRefresh: 0
bSynchAddress: 0
003/003 413C/8157
wTotalLength: 34
bNumInterfaces: 1
bConfigurationValue: 1
iConfiguration: 0
bmAttributes: e0h
MaxPower: 1
bInterfaceNumber: 0
bAlternateSetting: 0
bNumEndpoints: 1
bInterfaceClass: 3
bInterfaceSubClass: 1
bInterfaceProtocol: 1
iInterface: 0
bEndpointAddress: 81h
bmAttributes: 03h
wMaxPacketSize: 8
bInterval: 10
bRefresh: 0
bSynchAddress: 0
003/002 0A5C/4500
- Manufacturer : Broadcom
- Product : BCM2046B1
wTotalLength: 25
bNumInterfaces: 1
bConfigurationValue: 1
iConfiguration: 0
bmAttributes: e0h
MaxPower: 47
bInterfaceNumber: 0
bAlternateSetting: 0
bNumEndpoints: 1
bInterfaceClass: 9
bInterfaceSubClass: 0
bInterfaceProtocol: 0
iInterface: 0
bEndpointAddress: 81h
bmAttributes: 03h
wMaxPacketSize: 1
bInterval: 255
bRefresh: 0
bSynchAddress: 0
003/001 1D6B/0001
- Manufacturer : Linux 2.6.38.8-customc uhci_hcd
- Product : UHCI Host Controller
- Serial Number: 0000:00:1a.0
wTotalLength: 25
bNumInterfaces: 1
bConfigurationValue: 1
iConfiguration: 0
bmAttributes: e0h
MaxPower: 0
bInterfaceNumber: 0
bAlternateSetting: 0
bNumEndpoints: 1
bInterfaceClass: 9
bInterfaceSubClass: 0
bInterfaceProtocol: 0
iInterface: 0
bEndpointAddress: 81h
bmAttributes: 03h
wMaxPacketSize: 2
bInterval: 255
bRefresh: 0
bSynchAddress: 0
002/003 058F/6387
- Manufacturer : Generic
- Product : Mass Storage
- Serial Number: 1180FF3A
wTotalLength: 32
bNumInterfaces: 1
bConfigurationValue: 1
iConfiguration: 0
bmAttributes: 80h
MaxPower: 50
bInterfaceNumber: 0
bAlternateSetting: 0
bNumEndpoints: 2
bInterfaceClass: 8
bInterfaceSubClass: 6
bInterfaceProtocol: 80
iInterface: 0
bEndpointAddress: 01h
bmAttributes: 02h
wMaxPacketSize: 512
bInterval: 0
bRefresh: 0
bSynchAddress: 0
bEndpointAddress: 82h
bmAttributes: 02h
wMaxPacketSize: 512
bInterval: 0
bRefresh: 0
bSynchAddress: 0
002/001 1D6B/0002
- Manufacturer : Linux 2.6.38.8-customc ehci_hcd
- Product : EHCI Host Controller
- Serial Number: 0000:00:1d.7
wTotalLength: 25
bNumInterfaces: 1
bConfigurationValue: 1
iConfiguration: 0
bmAttributes: e0h
MaxPower: 0
bInterfaceNumber: 0
bAlternateSetting: 0
bNumEndpoints: 1
bInterfaceClass: 9
bInterfaceSubClass: 0
bInterfaceProtocol: 0
iInterface: 0
bEndpointAddress: 81h
bmAttributes: 03h
wMaxPacketSize: 4
bInterval: 12
bRefresh: 0
bSynchAddress: 0
001/004 05CA/18A0
- Manufacturer : Ricoh co. Ltd.
- Product : Integrated Webcam
- Serial Number: CN0TX6137248789NAHC8
wTotalLength: 1144
bNumInterfaces: 2
bConfigurationValue: 1
iConfiguration: 0
bmAttributes: 80h
MaxPower: 50
bInterfaceNumber: 0
bAlternateSetting: 0
bNumEndpoints: 1
bInterfaceClass: 14
bInterfaceSubClass: 1
bInterfaceProtocol: 0
iInterface: 2
bEndpointAddress: 81h
bmAttributes: 03h
wMaxPacketSize: 64
bInterval: 16
bRefresh: 0
bSynchAddress: 0
bInterfaceNumber: 1
bAlternateSetting: 0
bNumEndpoints: 0
bInterfaceClass: 14
bInterfaceSubClass: 2
bInterfaceProtocol: 0
iInterface: 0
bInterfaceNumber: 1
bAlternateSetting: 1
bNumEndpoints: 1
bInterfaceClass: 14
bInterfaceSubClass: 2
bInterfaceProtocol: 0
iInterface: 0
bEndpointAddress: 82h
bmAttributes: 05h
wMaxPacketSize: 5076
bInterval: 1
bRefresh: 0
bSynchAddress: 0
bInterfaceNumber: 1
bAlternateSetting: 2
bNumEndpoints: 1
bInterfaceClass: 14
bInterfaceSubClass: 2
bInterfaceProtocol: 0
iInterface: 0
bEndpointAddress: 82h
bmAttributes: 05h
wMaxPacketSize: 4976
bInterval: 1
bRefresh: 0
bSynchAddress: 0
bInterfaceNumber: 1
bAlternateSetting: 3
bNumEndpoints: 1
bInterfaceClass: 14
bInterfaceSubClass: 2
bInterfaceProtocol: 0
iInterface: 0
bEndpointAddress: 82h
bmAttributes: 05h
wMaxPacketSize: 968
bInterval: 1
bRefresh: 0
bSynchAddress: 0
bInterfaceNumber: 1
bAlternateSetting: 4
bNumEndpoints: 1
bInterfaceClass: 14
bInterfaceSubClass: 2
bInterfaceProtocol: 0
iInterface: 0
bEndpointAddress: 82h
bmAttributes: 05h
wMaxPacketSize: 632
bInterval: 1
bRefresh: 0
bSynchAddress: 0
bInterfaceNumber: 1
bAlternateSetting: 5
bNumEndpoints: 1
bInterfaceClass: 14
bInterfaceSubClass: 2
bInterfaceProtocol: 0
iInterface: 0
bEndpointAddress: 82h
bmAttributes: 05h
wMaxPacketSize: 800
bInterval: 1
bRefresh: 0
bSynchAddress: 0
bInterfaceNumber: 1
bAlternateSetting: 6
bNumEndpoints: 1
bInterfaceClass: 14
bInterfaceSubClass: 2
bInterfaceProtocol: 0
iInterface: 0
bEndpointAddress: 82h
bmAttributes: 05h
wMaxPacketSize: 5100
bInterval: 1
bRefresh: 0
bSynchAddress: 0
bInterfaceNumber: 1
bAlternateSetting: 7
bNumEndpoints: 1
bInterfaceClass: 14
bInterfaceSubClass: 2
bInterfaceProtocol: 0
iInterface: 0
bEndpointAddress: 82h
bmAttributes: 05h
wMaxPacketSize: 5100
bInterval: 1
bRefresh: 0
bSynchAddress: 0
bInterfaceNumber: 1
bAlternateSetting: 8
bNumEndpoints: 1
bInterfaceClass: 14
bInterfaceSubClass: 2
bInterfaceProtocol: 0
iInterface: 0
bEndpointAddress: 82h
bmAttributes: 05h
wMaxPacketSize: 5100
bInterval: 1
bRefresh: 0
bSynchAddress: 0
bInterfaceNumber: 1
bAlternateSetting: 9
bNumEndpoints: 1
bInterfaceClass: 14
bInterfaceSubClass: 2
bInterfaceProtocol: 0
iInterface: 0
bEndpointAddress: 82h
bmAttributes: 05h
wMaxPacketSize: 5120
bInterval: 1
bRefresh: 0
bSynchAddress: 0
bInterfaceNumber: 1
bAlternateSetting: 10
bNumEndpoints: 1
bInterfaceClass: 14
bInterfaceSubClass: 2
bInterfaceProtocol: 0
iInterface: 0
bEndpointAddress: 82h
bmAttributes: 05h
wMaxPacketSize: 5052
bInterval: 1
bRefresh: 0
bSynchAddress: 0
bInterfaceNumber: 1
bAlternateSetting: 11
bNumEndpoints: 1
bInterfaceClass: 14
bInterfaceSubClass: 2
bInterfaceProtocol: 0
iInterface: 0
bEndpointAddress: 82h
bmAttributes: 05h
wMaxPacketSize: 4956
bInterval: 1
bRefresh: 0
bSynchAddress: 0
bInterfaceNumber: 1
bAlternateSetting: 12
bNumEndpoints: 1
bInterfaceClass: 14
bInterfaceSubClass: 2
bInterfaceProtocol: 0
iInterface: 0
bEndpointAddress: 82h
bmAttributes: 05h
wMaxPacketSize: 840
bInterval: 1
bRefresh: 0
bSynchAddress: 0
bInterfaceNumber: 1
bAlternateSetting: 13
bNumEndpoints: 1
bInterfaceClass: 14
bInterfaceSubClass: 2
bInterfaceProtocol: 0
iInterface: 0
bEndpointAddress: 82h
bmAttributes: 05h
wMaxPacketSize: 624
bInterval: 1
bRefresh: 0
bSynchAddress: 0
bInterfaceNumber: 1
bAlternateSetting: 14
bNumEndpoints: 1
bInterfaceClass: 14
bInterfaceSubClass: 2
bInterfaceProtocol: 0
iInterface: 0
bEndpointAddress: 82h
bmAttributes: 05h
wMaxPacketSize: 700
bInterval: 1
bRefresh: 0
bSynchAddress: 0
bInterfaceNumber: 1
bAlternateSetting: 15
bNumEndpoints: 1
bInterfaceClass: 14
bInterfaceSubClass: 2
bInterfaceProtocol: 0
iInterface: 0
bEndpointAddress: 82h
bmAttributes: 05h
wMaxPacketSize: 5120
bInterval: 1
bRefresh: 0
bSynchAddress: 0
bInterfaceNumber: 1
bAlternateSetting: 16
bNumEndpoints: 1
bInterfaceClass: 14
bInterfaceSubClass: 2
bInterfaceProtocol: 0
iInterface: 0
bEndpointAddress: 82h
bmAttributes: 05h
wMaxPacketSize: 5120
bInterval: 1
bRefresh: 0
bSynchAddress: 0
bInterfaceNumber: 1
bAlternateSetting: 17
bNumEndpoints: 1
bInterfaceClass: 14
bInterfaceSubClass: 2
bInterfaceProtocol: 0
iInterface: 0
bEndpointAddress: 82h
bmAttributes: 05h
wMaxPacketSize: 5120
bInterval: 1
bRefresh: 0
bSynchAddress: 0
bInterfaceNumber: 1
bAlternateSetting: 18
bNumEndpoints: 1
bInterfaceClass: 14
bInterfaceSubClass: 2
bInterfaceProtocol: 0
iInterface: 0
bEndpointAddress: 82h
bmAttributes: 05h
wMaxPacketSize: 5120
bInterval: 1
bRefresh: 0
bSynchAddress: 0
001/001 1D6B/0002
- Manufacturer : Linux 2.6.38.8-customc ehci_hcd
- Product : EHCI Host Controller
- Serial Number: 0000:00:1a.7
wTotalLength: 25
bNumInterfaces: 1
bConfigurationValue: 1
iConfiguration: 0
bmAttributes: e0h
MaxPower: 0
bInterfaceNumber: 0
bAlternateSetting: 0
bNumEndpoints: 1
bInterfaceClass: 9
bInterfaceSubClass: 0
bInterfaceProtocol: 0
iInterface: 0
bEndpointAddress: 81h
bmAttributes: 03h
wMaxPacketSize: 4
bInterval: 12
bRefresh: 0
bSynchAddress: 0
"

Please help !
 
Old 07-17-2012, 09:15 AM   #21
dollysingh
LQ Newbie
 
Registered: Jul 2012
Posts: 3

Rep: Reputation: Disabled
Hi,

I compiled the code.
I run it for 2 different pen drives but in both case I got the same output.
Manufacture name is not right and same output is repeated lot of times.

Output goes like this:

bus/device idVendor/idProduct
008/001 1D6B/0001
- Manufacturer : Linux 2.6.38.8-customc uhci_hcd
- Product : UHCI Host Controller
- Serial Number: 0000:00:1d.2
wTotalLength: 25
bNumInterfaces: 1
bConfigurationValue: 1
iConfiguration: 0
bmAttributes: e0h
MaxPower: 0
bInterfaceNumber: 0
bAlternateSetting: 0
bNumEndpoints: 1
bInterfaceClass: 9
bInterfaceSubClass: 0
bInterfaceProtocol: 0
iInterface: 0
bEndpointAddress: 81h
bmAttributes: 03h
wMaxPacketSize: 2
bInterval: 255
bRefresh: 0
bSynchAddress: 0
007/001 1D6B/0001
- Manufacturer : Linux 2.6.38.8-customc uhci_hcd
- Product : UHCI Host Controller
- Serial Number: 0000:00:1d.1
wTotalLength: 25
bNumInterfaces: 1
bConfigurationValue: 1
iConfiguration: 0
bmAttributes: e0h
MaxPower: 0
bInterfaceNumber: 0
bAlternateSetting: 0
bNumEndpoints: 1
bInterfaceClass: 9
bInterfaceSubClass: 0
bInterfaceProtocol: 0
iInterface: 0
bEndpointAddress: 81h
bmAttributes: 03h
wMaxPacketSize: 2
bInterval: 255
bRefresh: 0
bSynchAddress: 0
006/001 1D6B/0001
- Manufacturer : Linux 2.6.38.8-customc uhci_hcd
- Product : UHCI Host Controller
- Serial Number: 0000:00:1d.0
wTotalLength: 25
bNumInterfaces: 1
bConfigurationValue: 1
iConfiguration: 0
bmAttributes: e0h
MaxPower: 0
bInterfaceNumber: 0
bAlternateSetting: 0
bNumEndpoints: 1
bInterfaceClass: 9
bInterfaceSubClass: 0
bInterfaceProtocol: 0
iInterface: 0
bEndpointAddress: 81h
bmAttributes: 03h
wMaxPacketSize: 2
bInterval: 255
bRefresh: 0
bSynchAddress: 0
005/002 08FF/2810
- Product : Fingerprint Sensor
wTotalLength: 32
bNumInterfaces: 1
bConfigurationValue: 1
iConfiguration: 0
bmAttributes: a0h
MaxPower: 50
bInterfaceNumber: 0
bAlternateSetting: 0
bNumEndpoints: 2
bInterfaceClass: 255
bInterfaceSubClass: 255
bInterfaceProtocol: 255
iInterface: 0
bEndpointAddress: 81h
bmAttributes: 02h
wMaxPacketSize: 64
bInterval: 0
bRefresh: 0
bSynchAddress: 0
bEndpointAddress: 02h
bmAttributes: 02h
wMaxPacketSize: 8
bInterval: 0
bRefresh: 0
bSynchAddress: 0
005/001 1D6B/0001
- Manufacturer : Linux 2.6.38.8-customc uhci_hcd
- Product : UHCI Host Controller
- Serial Number: 0000:00:1a.2
wTotalLength: 25
bNumInterfaces: 1
bConfigurationValue: 1
iConfiguration: 0
bmAttributes: e0h
MaxPower: 0
bInterfaceNumber: 0
bAlternateSetting: 0
bNumEndpoints: 1
bInterfaceClass: 9
bInterfaceSubClass: 0
bInterfaceProtocol: 0
iInterface: 0
bEndpointAddress: 81h
bmAttributes: 03h
wMaxPacketSize: 2
bInterval: 255
bRefresh: 0
bSynchAddress: 0
004/001 1D6B/0001
- Manufacturer : Linux 2.6.38.8-customc uhci_hcd
- Product : UHCI Host Controller
- Serial Number: 0000:00:1a.1
wTotalLength: 25
bNumInterfaces: 1
bConfigurationValue: 1
iConfiguration: 0
bmAttributes: e0h
MaxPower: 0
bInterfaceNumber: 0
bAlternateSetting: 0
bNumEndpoints: 1
bInterfaceClass: 9
bInterfaceSubClass: 0
bInterfaceProtocol: 0
iInterface: 0
bEndpointAddress: 81h
bmAttributes: 03h
wMaxPacketSize: 2
bInterval: 255
bRefresh: 0
bSynchAddress: 0
003/006 413C/8156
- Manufacturer : Dell Computer Corp
- Product : Dell Wireless 370 Bluetooth Mini-card
wTotalLength: 216
bNumInterfaces: 4
bConfigurationValue: 1
iConfiguration: 0
bmAttributes: e0h
MaxPower: 50
bInterfaceNumber: 0
bAlternateSetting: 0
bNumEndpoints: 3
bInterfaceClass: 224
bInterfaceSubClass: 1
bInterfaceProtocol: 1
iInterface: 0
bEndpointAddress: 81h
bmAttributes: 03h
wMaxPacketSize: 16
bInterval: 1
bRefresh: 0
bSynchAddress: 0
bEndpointAddress: 82h
bmAttributes: 02h
wMaxPacketSize: 64
bInterval: 1
bRefresh: 0
bSynchAddress: 0
bEndpointAddress: 02h
bmAttributes: 02h
wMaxPacketSize: 64
bInterval: 1
bRefresh: 0
bSynchAddress: 0
bInterfaceNumber: 1
bAlternateSetting: 0
bNumEndpoints: 2
bInterfaceClass: 224
bInterfaceSubClass: 1
bInterfaceProtocol: 1
iInterface: 0
bEndpointAddress: 83h
bmAttributes: 01h
wMaxPacketSize: 0
bInterval: 1
bRefresh: 0
bSynchAddress: 0
bEndpointAddress: 03h
bmAttributes: 01h
wMaxPacketSize: 0
bInterval: 1
bRefresh: 0
bSynchAddress: 0
bInterfaceNumber: 1
bAlternateSetting: 1
bNumEndpoints: 2
bInterfaceClass: 224
bInterfaceSubClass: 1
bInterfaceProtocol: 1
iInterface: 0
bEndpointAddress: 83h
bmAttributes: 01h
wMaxPacketSize: 9
bInterval: 1
bRefresh: 0
bSynchAddress: 0
bEndpointAddress: 03h
bmAttributes: 01h
wMaxPacketSize: 9
bInterval: 1
bRefresh: 0
bSynchAddress: 0
bInterfaceNumber: 1
bAlternateSetting: 2
bNumEndpoints: 2
bInterfaceClass: 224
bInterfaceSubClass: 1
bInterfaceProtocol: 1
iInterface: 0
bEndpointAddress: 83h
bmAttributes: 01h
wMaxPacketSize: 17
bInterval: 1
bRefresh: 0
bSynchAddress: 0
bEndpointAddress: 03h
bmAttributes: 01h
wMaxPacketSize: 17
bInterval: 1
bRefresh: 0
bSynchAddress: 0
bInterfaceNumber: 1
bAlternateSetting: 3
bNumEndpoints: 2
bInterfaceClass: 224
bInterfaceSubClass: 1
bInterfaceProtocol: 1
iInterface: 0
bEndpointAddress: 83h
bmAttributes: 01h
wMaxPacketSize: 32
bInterval: 1
bRefresh: 0
bSynchAddress: 0
bEndpointAddress: 03h
bmAttributes: 01h
wMaxPacketSize: 32
bInterval: 1
bRefresh: 0
bSynchAddress: 0
bInterfaceNumber: 1
bAlternateSetting: 4
bNumEndpoints: 2
bInterfaceClass: 224
bInterfaceSubClass: 1
bInterfaceProtocol: 1
iInterface: 0
bEndpointAddress: 83h
bmAttributes: 01h
wMaxPacketSize: 64
bInterval: 1
bRefresh: 0
bSynchAddress: 0
bEndpointAddress: 03h
bmAttributes: 01h
wMaxPacketSize: 64
bInterval: 1
bRefresh: 0
bSynchAddress: 0
bInterfaceNumber: 1
bAlternateSetting: 5
bNumEndpoints: 2
bInterfaceClass: 224
bInterfaceSubClass: 1
bInterfaceProtocol: 1
iInterface: 0
bEndpointAddress: 83h
bmAttributes: 01h
wMaxPacketSize: 64
bInterval: 1
bRefresh: 0
bSynchAddress: 0
bEndpointAddress: 03h
bmAttributes: 01h
wMaxPacketSize: 64
bInterval: 1
bRefresh: 0
bSynchAddress: 0
bInterfaceNumber: 2
bAlternateSetting: 0
bNumEndpoints: 2
bInterfaceClass: 255
bInterfaceSubClass: 255
bInterfaceProtocol: 255
iInterface: 0
bEndpointAddress: 84h
bmAttributes: 02h
wMaxPacketSize: 32
bInterval: 1
bRefresh: 0
bSynchAddress: 0
bEndpointAddress: 04h
bmAttributes: 02h
wMaxPacketSize: 32
bInterval: 1
bRefresh: 0
bSynchAddress: 0
bInterfaceNumber: 3
bAlternateSetting: 0
bNumEndpoints: 0
bInterfaceClass: 254
bInterfaceSubClass: 1
bInterfaceProtocol: 0
iInterface: 0
003/004 413C/8158
wTotalLength: 62
bNumInterfaces: 1
bConfigurationValue: 1
iConfiguration: 0
bmAttributes: e0h
MaxPower: 1
bInterfaceNumber: 0
bAlternateSetting: 0
bNumEndpoints: 1
bInterfaceClass: 3
bInterfaceSubClass: 1
bInterfaceProtocol: 2
iInterface: 0
bEndpointAddress: 81h
bmAttributes: 03h
wMaxPacketSize: 4
bInterval: 10
bRefresh: 0
bSynchAddress: 0
003/003 413C/8157
wTotalLength: 34
bNumInterfaces: 1
bConfigurationValue: 1
iConfiguration: 0
bmAttributes: e0h
MaxPower: 1
bInterfaceNumber: 0
bAlternateSetting: 0
bNumEndpoints: 1
bInterfaceClass: 3
bInterfaceSubClass: 1
bInterfaceProtocol: 1
iInterface: 0
bEndpointAddress: 81h
bmAttributes: 03h
wMaxPacketSize: 8
bInterval: 10
bRefresh: 0
bSynchAddress: 0
003/002 0A5C/4500
- Manufacturer : Broadcom
- Product : BCM2046B1
wTotalLength: 25
bNumInterfaces: 1
bConfigurationValue: 1
iConfiguration: 0
bmAttributes: e0h
MaxPower: 47
bInterfaceNumber: 0
bAlternateSetting: 0
bNumEndpoints: 1
bInterfaceClass: 9
bInterfaceSubClass: 0
bInterfaceProtocol: 0
iInterface: 0
bEndpointAddress: 81h
bmAttributes: 03h
wMaxPacketSize: 1
bInterval: 255
bRefresh: 0
bSynchAddress: 0
003/001 1D6B/0001
- Manufacturer : Linux 2.6.38.8-customc uhci_hcd
- Product : UHCI Host Controller
- Serial Number: 0000:00:1a.0
wTotalLength: 25
bNumInterfaces: 1
bConfigurationValue: 1
iConfiguration: 0
bmAttributes: e0h
MaxPower: 0
bInterfaceNumber: 0
bAlternateSetting: 0
bNumEndpoints: 1
bInterfaceClass: 9
bInterfaceSubClass: 0
bInterfaceProtocol: 0
iInterface: 0
bEndpointAddress: 81h
bmAttributes: 03h
wMaxPacketSize: 2
bInterval: 255
bRefresh: 0
bSynchAddress: 0
002/003 058F/6387
- Manufacturer : Generic
- Product : Mass Storage
- Serial Number: 1180FF3A
wTotalLength: 32
bNumInterfaces: 1
bConfigurationValue: 1
iConfiguration: 0
bmAttributes: 80h
MaxPower: 50
bInterfaceNumber: 0
bAlternateSetting: 0
bNumEndpoints: 2
bInterfaceClass: 8
bInterfaceSubClass: 6
bInterfaceProtocol: 80
iInterface: 0
bEndpointAddress: 01h
bmAttributes: 02h
wMaxPacketSize: 512
bInterval: 0
bRefresh: 0
bSynchAddress: 0
bEndpointAddress: 82h
bmAttributes: 02h
wMaxPacketSize: 512
bInterval: 0
bRefresh: 0
bSynchAddress: 0
002/001 1D6B/0002
- Manufacturer : Linux 2.6.38.8-customc ehci_hcd
- Product : EHCI Host Controller
- Serial Number: 0000:00:1d.7
wTotalLength: 25
bNumInterfaces: 1
bConfigurationValue: 1
iConfiguration: 0
bmAttributes: e0h
MaxPower: 0
bInterfaceNumber: 0
bAlternateSetting: 0
bNumEndpoints: 1
bInterfaceClass: 9
bInterfaceSubClass: 0
bInterfaceProtocol: 0
iInterface: 0
bEndpointAddress: 81h
bmAttributes: 03h
wMaxPacketSize: 4
bInterval: 12
bRefresh: 0
bSynchAddress: 0
001/004 05CA/18A0
- Manufacturer : Ricoh co. Ltd.
- Product : Integrated Webcam
- Serial Number: CN0TX6137248789NAHC8
wTotalLength: 1144
bNumInterfaces: 2
bConfigurationValue: 1
iConfiguration: 0
bmAttributes: 80h
MaxPower: 50
bInterfaceNumber: 0
bAlternateSetting: 0
bNumEndpoints: 1
bInterfaceClass: 14
bInterfaceSubClass: 1
bInterfaceProtocol: 0
iInterface: 2
bEndpointAddress: 81h
bmAttributes: 03h
wMaxPacketSize: 64
bInterval: 16
bRefresh: 0
bSynchAddress: 0
bInterfaceNumber: 1
bAlternateSetting: 0
bNumEndpoints: 0
bInterfaceClass: 14
bInterfaceSubClass: 2
bInterfaceProtocol: 0
iInterface: 0
bInterfaceNumber: 1
bAlternateSetting: 1
bNumEndpoints: 1
bInterfaceClass: 14
bInterfaceSubClass: 2
bInterfaceProtocol: 0
iInterface: 0
bEndpointAddress: 82h
bmAttributes: 05h
wMaxPacketSize: 5076
bInterval: 1
bRefresh: 0
bSynchAddress: 0
bInterfaceNumber: 1
bAlternateSetting: 2
bNumEndpoints: 1
bInterfaceClass: 14
bInterfaceSubClass: 2
bInterfaceProtocol: 0
iInterface: 0
bEndpointAddress: 82h
bmAttributes: 05h
wMaxPacketSize: 4976
bInterval: 1
bRefresh: 0
bSynchAddress: 0
bInterfaceNumber: 1
bAlternateSetting: 3
bNumEndpoints: 1
bInterfaceClass: 14
bInterfaceSubClass: 2
bInterfaceProtocol: 0
iInterface: 0
bEndpointAddress: 82h
bmAttributes: 05h
wMaxPacketSize: 968
bInterval: 1
bRefresh: 0
bSynchAddress: 0
bInterfaceNumber: 1
bAlternateSetting: 4
bNumEndpoints: 1
bInterfaceClass: 14
bInterfaceSubClass: 2
bInterfaceProtocol: 0
iInterface: 0
bEndpointAddress: 82h
bmAttributes: 05h
wMaxPacketSize: 632
bInterval: 1
bRefresh: 0
bSynchAddress: 0
bInterfaceNumber: 1
bAlternateSetting: 5
bNumEndpoints: 1
bInterfaceClass: 14
bInterfaceSubClass: 2
bInterfaceProtocol: 0
iInterface: 0
bEndpointAddress: 82h
bmAttributes: 05h
wMaxPacketSize: 800
bInterval: 1
bRefresh: 0
bSynchAddress: 0
bInterfaceNumber: 1
bAlternateSetting: 6
bNumEndpoints: 1
bInterfaceClass: 14
bInterfaceSubClass: 2
bInterfaceProtocol: 0
iInterface: 0
bEndpointAddress: 82h
bmAttributes: 05h
wMaxPacketSize: 5100
bInterval: 1
bRefresh: 0
bSynchAddress: 0
bInterfaceNumber: 1
bAlternateSetting: 7
bNumEndpoints: 1
bInterfaceClass: 14
bInterfaceSubClass: 2
bInterfaceProtocol: 0
iInterface: 0
bEndpointAddress: 82h
bmAttributes: 05h
wMaxPacketSize: 5100
bInterval: 1
bRefresh: 0
bSynchAddress: 0
bInterfaceNumber: 1
bAlternateSetting: 8
bNumEndpoints: 1
bInterfaceClass: 14
bInterfaceSubClass: 2
bInterfaceProtocol: 0
iInterface: 0
bEndpointAddress: 82h
bmAttributes: 05h
wMaxPacketSize: 5100
bInterval: 1
bRefresh: 0
bSynchAddress: 0
bInterfaceNumber: 1
bAlternateSetting: 9
bNumEndpoints: 1
bInterfaceClass: 14
bInterfaceSubClass: 2
bInterfaceProtocol: 0
iInterface: 0
bEndpointAddress: 82h
bmAttributes: 05h
wMaxPacketSize: 5120
bInterval: 1
bRefresh: 0
bSynchAddress: 0
bInterfaceNumber: 1
bAlternateSetting: 10
bNumEndpoints: 1
bInterfaceClass: 14
bInterfaceSubClass: 2
bInterfaceProtocol: 0
iInterface: 0
bEndpointAddress: 82h
bmAttributes: 05h
wMaxPacketSize: 5052
bInterval: 1
bRefresh: 0
bSynchAddress: 0
bInterfaceNumber: 1
bAlternateSetting: 11
bNumEndpoints: 1
bInterfaceClass: 14
bInterfaceSubClass: 2
bInterfaceProtocol: 0
iInterface: 0
bEndpointAddress: 82h
bmAttributes: 05h
wMaxPacketSize: 4956
bInterval: 1
bRefresh: 0
bSynchAddress: 0
bInterfaceNumber: 1
bAlternateSetting: 12
bNumEndpoints: 1
bInterfaceClass: 14
bInterfaceSubClass: 2
bInterfaceProtocol: 0
iInterface: 0
bEndpointAddress: 82h
bmAttributes: 05h
wMaxPacketSize: 840
bInterval: 1
bRefresh: 0
bSynchAddress: 0
bInterfaceNumber: 1
bAlternateSetting: 13
bNumEndpoints: 1
bInterfaceClass: 14
bInterfaceSubClass: 2
bInterfaceProtocol: 0
iInterface: 0
bEndpointAddress: 82h
bmAttributes: 05h
wMaxPacketSize: 624
bInterval: 1
bRefresh: 0
bSynchAddress: 0
bInterfaceNumber: 1
bAlternateSetting: 14
bNumEndpoints: 1
bInterfaceClass: 14
bInterfaceSubClass: 2
bInterfaceProtocol: 0
iInterface: 0
bEndpointAddress: 82h
bmAttributes: 05h
wMaxPacketSize: 700
bInterval: 1
bRefresh: 0
bSynchAddress: 0
bInterfaceNumber: 1
bAlternateSetting: 15
bNumEndpoints: 1
bInterfaceClass: 14
bInterfaceSubClass: 2
bInterfaceProtocol: 0
iInterface: 0
bEndpointAddress: 82h
bmAttributes: 05h
wMaxPacketSize: 5120
bInterval: 1
bRefresh: 0
bSynchAddress: 0
bInterfaceNumber: 1
bAlternateSetting: 16
bNumEndpoints: 1
bInterfaceClass: 14
bInterfaceSubClass: 2
bInterfaceProtocol: 0
iInterface: 0
bEndpointAddress: 82h
bmAttributes: 05h
wMaxPacketSize: 5120
bInterval: 1
bRefresh: 0
bSynchAddress: 0
bInterfaceNumber: 1
bAlternateSetting: 17
bNumEndpoints: 1
bInterfaceClass: 14
bInterfaceSubClass: 2
bInterfaceProtocol: 0
iInterface: 0
bEndpointAddress: 82h
bmAttributes: 05h
wMaxPacketSize: 5120
bInterval: 1
bRefresh: 0
bSynchAddress: 0
bInterfaceNumber: 1
bAlternateSetting: 18
bNumEndpoints: 1
bInterfaceClass: 14
bInterfaceSubClass: 2
bInterfaceProtocol: 0
iInterface: 0
bEndpointAddress: 82h
bmAttributes: 05h
wMaxPacketSize: 5120
bInterval: 1
bRefresh: 0
bSynchAddress: 0
001/001 1D6B/0002
- Manufacturer : Linux 2.6.38.8-customc ehci_hcd
- Product : EHCI Host Controller
- Serial Number: 0000:00:1a.7
wTotalLength: 25
bNumInterfaces: 1
bConfigurationValue: 1
iConfiguration: 0
bmAttributes: e0h
MaxPower: 0
bInterfaceNumber: 0
bAlternateSetting: 0
bNumEndpoints: 1
bInterfaceClass: 9
bInterfaceSubClass: 0
bInterfaceProtocol: 0
iInterface: 0
bEndpointAddress: 81h
bmAttributes: 03h
wMaxPacketSize: 4
bInterval: 12
bRefresh: 0
bSynchAddress: 0
"

Please help !
 
Old 07-17-2012, 09:17 AM   #22
dollysingh
LQ Newbie
 
Registered: Jul 2012
Posts: 3

Rep: Reputation: Disabled
Output is same for all usb drive.

Hi,

I compiled the code.
I run it for 2 different pen drives but in both case I got the same output.
Manufacture name is not right and same output is repeated lot of times.

Output goes like this:

bus/device idVendor/idProduct
008/001 1D6B/0001
- Manufacturer : Linux 2.6.38.8-customc uhci_hcd
- Product : UHCI Host Controller
- Serial Number: 0000:00:1d.2
wTotalLength: 25
bNumInterfaces: 1
bConfigurationValue: 1
iConfiguration: 0
bmAttributes: e0h
MaxPower: 0
bInterfaceNumber: 0
bAlternateSetting: 0
bNumEndpoints: 1
bInterfaceClass: 9
bInterfaceSubClass: 0
bInterfaceProtocol: 0
iInterface: 0
bEndpointAddress: 81h
bmAttributes: 03h
wMaxPacketSize: 2
bInterval: 255
bRefresh: 0
bSynchAddress: 0
007/001 1D6B/0001
- Manufacturer : Linux 2.6.38.8-customc uhci_hcd
- Product : UHCI Host Controller
- Serial Number: 0000:00:1d.1
wTotalLength: 25
bNumInterfaces: 1
bConfigurationValue: 1
iConfiguration: 0
bmAttributes: e0h
MaxPower: 0
bInterfaceNumber: 0
bAlternateSetting: 0
bNumEndpoints: 1
bInterfaceClass: 9
bInterfaceSubClass: 0
bInterfaceProtocol: 0
iInterface: 0
bEndpointAddress: 81h
bmAttributes: 03h
wMaxPacketSize: 2
bInterval: 255
bRefresh: 0
bSynchAddress: 0
006/001 1D6B/0001
- Manufacturer : Linux 2.6.38.8-customc uhci_hcd
- Product : UHCI Host Controller
- Serial Number: 0000:00:1d.0
wTotalLength: 25
bNumInterfaces: 1
bConfigurationValue: 1
iConfiguration: 0
bmAttributes: e0h
MaxPower: 0
bInterfaceNumber: 0
bAlternateSetting: 0
bNumEndpoints: 1
bInterfaceClass: 9
bInterfaceSubClass: 0
bInterfaceProtocol: 0
iInterface: 0
bEndpointAddress: 81h
bmAttributes: 03h
wMaxPacketSize: 2
bInterval: 255
bRefresh: 0
bSynchAddress: 0
005/002 08FF/2810
- Product : Fingerprint Sensor
wTotalLength: 32
bNumInterfaces: 1
bConfigurationValue: 1
iConfiguration: 0
bmAttributes: a0h
MaxPower: 50
bInterfaceNumber: 0
bAlternateSetting: 0
bNumEndpoints: 2
bInterfaceClass: 255
bInterfaceSubClass: 255
bInterfaceProtocol: 255
iInterface: 0
bEndpointAddress: 81h
bmAttributes: 02h
wMaxPacketSize: 64
bInterval: 0
bRefresh: 0
bSynchAddress: 0
bEndpointAddress: 02h
bmAttributes: 02h
wMaxPacketSize: 8
bInterval: 0
bRefresh: 0
bSynchAddress: 0
005/001 1D6B/0001
- Manufacturer : Linux 2.6.38.8-customc uhci_hcd
- Product : UHCI Host Controller
- Serial Number: 0000:00:1a.2
wTotalLength: 25
bNumInterfaces: 1
bConfigurationValue: 1
iConfiguration: 0
bmAttributes: e0h
MaxPower: 0
bInterfaceNumber: 0
bAlternateSetting: 0
bNumEndpoints: 1
bInterfaceClass: 9
bInterfaceSubClass: 0
bInterfaceProtocol: 0
iInterface: 0
bEndpointAddress: 81h
bmAttributes: 03h
wMaxPacketSize: 2
bInterval: 255
bRefresh: 0
bSynchAddress: 0
004/001 1D6B/0001
- Manufacturer : Linux 2.6.38.8-customc uhci_hcd
- Product : UHCI Host Controller
- Serial Number: 0000:00:1a.1
wTotalLength: 25
bNumInterfaces: 1
bConfigurationValue: 1
iConfiguration: 0
bmAttributes: e0h
MaxPower: 0
bInterfaceNumber: 0
bAlternateSetting: 0
bNumEndpoints: 1
bInterfaceClass: 9
bInterfaceSubClass: 0
bInterfaceProtocol: 0
iInterface: 0
bEndpointAddress: 81h
bmAttributes: 03h
wMaxPacketSize: 2
bInterval: 255
bRefresh: 0
bSynchAddress: 0
003/006 413C/8156
- Manufacturer : Dell Computer Corp
- Product : Dell Wireless 370 Bluetooth Mini-card
wTotalLength: 216
bNumInterfaces: 4
bConfigurationValue: 1
iConfiguration: 0
bmAttributes: e0h
MaxPower: 50
bInterfaceNumber: 0
bAlternateSetting: 0
bNumEndpoints: 3
bInterfaceClass: 224
bInterfaceSubClass: 1
bInterfaceProtocol: 1
iInterface: 0
bEndpointAddress: 81h
bmAttributes: 03h
wMaxPacketSize: 16
bInterval: 1
bRefresh: 0
bSynchAddress: 0
bEndpointAddress: 82h
bmAttributes: 02h
wMaxPacketSize: 64
bInterval: 1
bRefresh: 0
bSynchAddress: 0
bEndpointAddress: 02h
bmAttributes: 02h
wMaxPacketSize: 64
bInterval: 1
bRefresh: 0
bSynchAddress: 0
bInterfaceNumber: 1
bAlternateSetting: 0
bNumEndpoints: 2
bInterfaceClass: 224
bInterfaceSubClass: 1
bInterfaceProtocol: 1
iInterface: 0
bEndpointAddress: 83h
bmAttributes: 01h
wMaxPacketSize: 0
bInterval: 1
bRefresh: 0
bSynchAddress: 0
bEndpointAddress: 03h
bmAttributes: 01h
wMaxPacketSize: 0
bInterval: 1
bRefresh: 0
bSynchAddress: 0
bInterfaceNumber: 1
bAlternateSetting: 1
bNumEndpoints: 2
bInterfaceClass: 224
bInterfaceSubClass: 1
bInterfaceProtocol: 1
iInterface: 0
bEndpointAddress: 83h
bmAttributes: 01h
wMaxPacketSize: 9
bInterval: 1
bRefresh: 0
bSynchAddress: 0
bEndpointAddress: 03h
bmAttributes: 01h
wMaxPacketSize: 9
bInterval: 1
bRefresh: 0
bSynchAddress: 0
bInterfaceNumber: 1
bAlternateSetting: 2
bNumEndpoints: 2
bInterfaceClass: 224
bInterfaceSubClass: 1
bInterfaceProtocol: 1
iInterface: 0
bEndpointAddress: 83h
bmAttributes: 01h
wMaxPacketSize: 17
bInterval: 1
bRefresh: 0
bSynchAddress: 0
bEndpointAddress: 03h
bmAttributes: 01h
wMaxPacketSize: 17
bInterval: 1
bRefresh: 0
bSynchAddress: 0
bInterfaceNumber: 1
bAlternateSetting: 3
bNumEndpoints: 2
bInterfaceClass: 224
bInterfaceSubClass: 1
bInterfaceProtocol: 1
iInterface: 0
bEndpointAddress: 83h
bmAttributes: 01h
wMaxPacketSize: 32
bInterval: 1
bRefresh: 0
bSynchAddress: 0
bEndpointAddress: 03h
bmAttributes: 01h
wMaxPacketSize: 32
bInterval: 1
bRefresh: 0
bSynchAddress: 0
bInterfaceNumber: 1
bAlternateSetting: 4
bNumEndpoints: 2
bInterfaceClass: 224
bInterfaceSubClass: 1
bInterfaceProtocol: 1
iInterface: 0
bEndpointAddress: 83h
bmAttributes: 01h
wMaxPacketSize: 64
bInterval: 1
bRefresh: 0
bSynchAddress: 0
bEndpointAddress: 03h
bmAttributes: 01h
wMaxPacketSize: 64
bInterval: 1
bRefresh: 0
bSynchAddress: 0
bInterfaceNumber: 1
bAlternateSetting: 5
bNumEndpoints: 2
bInterfaceClass: 224
bInterfaceSubClass: 1
bInterfaceProtocol: 1
iInterface: 0
bEndpointAddress: 83h
bmAttributes: 01h
wMaxPacketSize: 64
bInterval: 1
bRefresh: 0
bSynchAddress: 0
bEndpointAddress: 03h
bmAttributes: 01h
wMaxPacketSize: 64
bInterval: 1
bRefresh: 0
bSynchAddress: 0
bInterfaceNumber: 2
bAlternateSetting: 0
bNumEndpoints: 2
bInterfaceClass: 255
bInterfaceSubClass: 255
bInterfaceProtocol: 255
iInterface: 0
bEndpointAddress: 84h
bmAttributes: 02h
wMaxPacketSize: 32
bInterval: 1
bRefresh: 0
bSynchAddress: 0
bEndpointAddress: 04h
bmAttributes: 02h
wMaxPacketSize: 32
bInterval: 1
bRefresh: 0
bSynchAddress: 0
bInterfaceNumber: 3
bAlternateSetting: 0
bNumEndpoints: 0
bInterfaceClass: 254
bInterfaceSubClass: 1
bInterfaceProtocol: 0
iInterface: 0
003/004 413C/8158
wTotalLength: 62
bNumInterfaces: 1
bConfigurationValue: 1
iConfiguration: 0
bmAttributes: e0h
MaxPower: 1
bInterfaceNumber: 0
bAlternateSetting: 0
bNumEndpoints: 1
bInterfaceClass: 3
bInterfaceSubClass: 1
bInterfaceProtocol: 2
iInterface: 0
bEndpointAddress: 81h
bmAttributes: 03h
wMaxPacketSize: 4
bInterval: 10
bRefresh: 0
bSynchAddress: 0
003/003 413C/8157
wTotalLength: 34
bNumInterfaces: 1
bConfigurationValue: 1
iConfiguration: 0
bmAttributes: e0h
MaxPower: 1
bInterfaceNumber: 0
bAlternateSetting: 0
bNumEndpoints: 1
bInterfaceClass: 3
bInterfaceSubClass: 1
bInterfaceProtocol: 1
iInterface: 0
bEndpointAddress: 81h
bmAttributes: 03h
wMaxPacketSize: 8
bInterval: 10
bRefresh: 0
bSynchAddress: 0
003/002 0A5C/4500
- Manufacturer : Broadcom
- Product : BCM2046B1
wTotalLength: 25
bNumInterfaces: 1
bConfigurationValue: 1
iConfiguration: 0
bmAttributes: e0h
MaxPower: 47
bInterfaceNumber: 0
bAlternateSetting: 0
bNumEndpoints: 1
bInterfaceClass: 9
bInterfaceSubClass: 0
bInterfaceProtocol: 0
iInterface: 0
bEndpointAddress: 81h
bmAttributes: 03h
wMaxPacketSize: 1
bInterval: 255
bRefresh: 0
bSynchAddress: 0
003/001 1D6B/0001
- Manufacturer : Linux 2.6.38.8-customc uhci_hcd
- Product : UHCI Host Controller
- Serial Number: 0000:00:1a.0
wTotalLength: 25
bNumInterfaces: 1
bConfigurationValue: 1
iConfiguration: 0
bmAttributes: e0h
MaxPower: 0
bInterfaceNumber: 0
bAlternateSetting: 0
bNumEndpoints: 1
bInterfaceClass: 9
bInterfaceSubClass: 0
bInterfaceProtocol: 0
iInterface: 0
bEndpointAddress: 81h
bmAttributes: 03h
wMaxPacketSize: 2
bInterval: 255
bRefresh: 0
bSynchAddress: 0
002/003 058F/6387
- Manufacturer : Generic
- Product : Mass Storage
- Serial Number: 1180FF3A
wTotalLength: 32
bNumInterfaces: 1
bConfigurationValue: 1
iConfiguration: 0
bmAttributes: 80h
MaxPower: 50
bInterfaceNumber: 0
bAlternateSetting: 0
bNumEndpoints: 2
bInterfaceClass: 8
bInterfaceSubClass: 6
bInterfaceProtocol: 80
iInterface: 0
bEndpointAddress: 01h
bmAttributes: 02h
wMaxPacketSize: 512
bInterval: 0
bRefresh: 0
bSynchAddress: 0
bEndpointAddress: 82h
bmAttributes: 02h
wMaxPacketSize: 512
bInterval: 0
bRefresh: 0
bSynchAddress: 0
002/001 1D6B/0002
- Manufacturer : Linux 2.6.38.8-customc ehci_hcd
- Product : EHCI Host Controller
- Serial Number: 0000:00:1d.7
wTotalLength: 25
bNumInterfaces: 1
bConfigurationValue: 1
iConfiguration: 0
bmAttributes: e0h
MaxPower: 0
bInterfaceNumber: 0
bAlternateSetting: 0
bNumEndpoints: 1
bInterfaceClass: 9
bInterfaceSubClass: 0
bInterfaceProtocol: 0
iInterface: 0
bEndpointAddress: 81h
bmAttributes: 03h
wMaxPacketSize: 4
bInterval: 12
bRefresh: 0
bSynchAddress: 0
001/004 05CA/18A0
- Manufacturer : Ricoh co. Ltd.
- Product : Integrated Webcam
- Serial Number: CN0TX6137248789NAHC8
wTotalLength: 1144
bNumInterfaces: 2
bConfigurationValue: 1
iConfiguration: 0
bmAttributes: 80h
MaxPower: 50
bInterfaceNumber: 0
bAlternateSetting: 0
bNumEndpoints: 1
bInterfaceClass: 14
bInterfaceSubClass: 1
bInterfaceProtocol: 0
iInterface: 2
bEndpointAddress: 81h
bmAttributes: 03h
wMaxPacketSize: 64
bInterval: 16
bRefresh: 0
bSynchAddress: 0
bInterfaceNumber: 1
bAlternateSetting: 0
bNumEndpoints: 0
bInterfaceClass: 14
bInterfaceSubClass: 2
bInterfaceProtocol: 0
iInterface: 0
bInterfaceNumber: 1
bAlternateSetting: 1
bNumEndpoints: 1
bInterfaceClass: 14
bInterfaceSubClass: 2
bInterfaceProtocol: 0
iInterface: 0
bEndpointAddress: 82h
bmAttributes: 05h
wMaxPacketSize: 5076
bInterval: 1
bRefresh: 0
bSynchAddress: 0
bInterfaceNumber: 1
bAlternateSetting: 2
bNumEndpoints: 1
bInterfaceClass: 14
bInterfaceSubClass: 2
bInterfaceProtocol: 0
iInterface: 0
bEndpointAddress: 82h
bmAttributes: 05h
wMaxPacketSize: 4976
bInterval: 1
bRefresh: 0
bSynchAddress: 0
bInterfaceNumber: 1
bAlternateSetting: 3
bNumEndpoints: 1
bInterfaceClass: 14
bInterfaceSubClass: 2
bInterfaceProtocol: 0
iInterface: 0
bEndpointAddress: 82h
bmAttributes: 05h
wMaxPacketSize: 968
bInterval: 1
bRefresh: 0
bSynchAddress: 0
bInterfaceNumber: 1
bAlternateSetting: 4
bNumEndpoints: 1
bInterfaceClass: 14
bInterfaceSubClass: 2
bInterfaceProtocol: 0
iInterface: 0
bEndpointAddress: 82h
bmAttributes: 05h
wMaxPacketSize: 632
bInterval: 1
bRefresh: 0
bSynchAddress: 0
bInterfaceNumber: 1
bAlternateSetting: 5
bNumEndpoints: 1
bInterfaceClass: 14
bInterfaceSubClass: 2
bInterfaceProtocol: 0
iInterface: 0
bEndpointAddress: 82h
bmAttributes: 05h
wMaxPacketSize: 800
bInterval: 1
bRefresh: 0
bSynchAddress: 0
bInterfaceNumber: 1
bAlternateSetting: 6
bNumEndpoints: 1
bInterfaceClass: 14
bInterfaceSubClass: 2
bInterfaceProtocol: 0
iInterface: 0
bEndpointAddress: 82h
bmAttributes: 05h
wMaxPacketSize: 5100
bInterval: 1
bRefresh: 0
bSynchAddress: 0
bInterfaceNumber: 1
bAlternateSetting: 7
bNumEndpoints: 1
bInterfaceClass: 14
bInterfaceSubClass: 2
bInterfaceProtocol: 0
iInterface: 0
bEndpointAddress: 82h
bmAttributes: 05h
wMaxPacketSize: 5100
bInterval: 1
bRefresh: 0
bSynchAddress: 0
bInterfaceNumber: 1
bAlternateSetting: 8
bNumEndpoints: 1
bInterfaceClass: 14
bInterfaceSubClass: 2
bInterfaceProtocol: 0
iInterface: 0
bEndpointAddress: 82h
bmAttributes: 05h
wMaxPacketSize: 5100
bInterval: 1
bRefresh: 0
bSynchAddress: 0
bInterfaceNumber: 1
bAlternateSetting: 9
bNumEndpoints: 1
bInterfaceClass: 14
bInterfaceSubClass: 2
bInterfaceProtocol: 0
iInterface: 0
bEndpointAddress: 82h
bmAttributes: 05h
wMaxPacketSize: 5120
bInterval: 1
bRefresh: 0
bSynchAddress: 0
bInterfaceNumber: 1
bAlternateSetting: 10
bNumEndpoints: 1
bInterfaceClass: 14
bInterfaceSubClass: 2
bInterfaceProtocol: 0
iInterface: 0
bEndpointAddress: 82h
bmAttributes: 05h
wMaxPacketSize: 5052
bInterval: 1
bRefresh: 0
bSynchAddress: 0
bInterfaceNumber: 1
bAlternateSetting: 11
bNumEndpoints: 1
bInterfaceClass: 14
bInterfaceSubClass: 2
bInterfaceProtocol: 0
iInterface: 0
bEndpointAddress: 82h
bmAttributes: 05h
wMaxPacketSize: 4956
bInterval: 1
bRefresh: 0
bSynchAddress: 0
bInterfaceNumber: 1
bAlternateSetting: 12
bNumEndpoints: 1
bInterfaceClass: 14
bInterfaceSubClass: 2
bInterfaceProtocol: 0
iInterface: 0
bEndpointAddress: 82h
bmAttributes: 05h
wMaxPacketSize: 840
bInterval: 1
bRefresh: 0
bSynchAddress: 0
bInterfaceNumber: 1
bAlternateSetting: 13
bNumEndpoints: 1
bInterfaceClass: 14
bInterfaceSubClass: 2
bInterfaceProtocol: 0
iInterface: 0
bEndpointAddress: 82h
bmAttributes: 05h
wMaxPacketSize: 624
bInterval: 1
bRefresh: 0
bSynchAddress: 0
bInterfaceNumber: 1
bAlternateSetting: 14
bNumEndpoints: 1
bInterfaceClass: 14
bInterfaceSubClass: 2
bInterfaceProtocol: 0
iInterface: 0
bEndpointAddress: 82h
bmAttributes: 05h
wMaxPacketSize: 700
bInterval: 1
bRefresh: 0
bSynchAddress: 0
bInterfaceNumber: 1
bAlternateSetting: 15
bNumEndpoints: 1
bInterfaceClass: 14
bInterfaceSubClass: 2
bInterfaceProtocol: 0
iInterface: 0
bEndpointAddress: 82h
bmAttributes: 05h
wMaxPacketSize: 5120
bInterval: 1
bRefresh: 0
bSynchAddress: 0
bInterfaceNumber: 1
bAlternateSetting: 16
bNumEndpoints: 1
bInterfaceClass: 14
bInterfaceSubClass: 2
bInterfaceProtocol: 0
iInterface: 0
bEndpointAddress: 82h
bmAttributes: 05h
wMaxPacketSize: 5120
bInterval: 1
bRefresh: 0
bSynchAddress: 0
bInterfaceNumber: 1
bAlternateSetting: 17
bNumEndpoints: 1
bInterfaceClass: 14
bInterfaceSubClass: 2
bInterfaceProtocol: 0
iInterface: 0
bEndpointAddress: 82h
bmAttributes: 05h
wMaxPacketSize: 5120
bInterval: 1
bRefresh: 0
bSynchAddress: 0
bInterfaceNumber: 1
bAlternateSetting: 18
bNumEndpoints: 1
bInterfaceClass: 14
bInterfaceSubClass: 2
bInterfaceProtocol: 0
iInterface: 0
bEndpointAddress: 82h
bmAttributes: 05h
wMaxPacketSize: 5120
bInterval: 1
bRefresh: 0
bSynchAddress: 0
001/001 1D6B/0002
- Manufacturer : Linux 2.6.38.8-customc ehci_hcd
- Product : EHCI Host Controller
- Serial Number: 0000:00:1a.7
wTotalLength: 25
bNumInterfaces: 1
bConfigurationValue: 1
iConfiguration: 0
bmAttributes: e0h
MaxPower: 0
bInterfaceNumber: 0
bAlternateSetting: 0
bNumEndpoints: 1
bInterfaceClass: 9
bInterfaceSubClass: 0
bInterfaceProtocol: 0
iInterface: 0
bEndpointAddress: 81h
bmAttributes: 03h
wMaxPacketSize: 4
bInterval: 12
bRefresh: 0
bSynchAddress: 0
"

Please help !

Quote:
Originally Posted by alain91 View Post
Hello,

Here is the end of the article :



Important attributes of USB devices useful in device driver coding
Configuration and Endpoints are one of the two important descriptors of any USB device. These desciptors are defined using the “struct usb_config_descriptor” and “struct_usb_endpoint_descriptor” respectively .

dev->descriptor.idVendor : Reveals the Vendor-Id of the USB device connected to the system.

dev->descriptor.idProduct : Reveals the Product-Id of the USB device connected to the system.

dev->descriptor.iManufacturer : Reveals the name of the Manufacturer USB device connected to the system.

EndpointAddress:Combination of endpoint address and enpoint direction on a USB device.

InterfaceNumber : One of the several interfaces that is allocated to the connected USB device.

AlternateSetting:This is part of the a single interface allocated to the USB device.


Prerequites for Libusb programming
Linux system with Kernel 2.4 above series.
Proficiency in C language.
Good understanding of USB device internals.
Idea about USBFS.
 
Old 10-17-2019, 03:54 AM   #23
kimi_2019
LQ Newbie
 
Registered: Oct 2019
Posts: 4

Rep: Reputation: Disabled
is it possible to use libusb when your performed as an USB device?

In your case, you use libusb as a host. Is it possible to use libusb when you are an USB device?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
DISCUSSION: Installing new accelerated Nvidia Linux Drivers in 5 EASY Steps HolyLiaison LinuxAnswers Discussion 36 03-31-2010 04:41 PM
Does Linux Have Game? - a discussion of games and graphics drivers XavierP Linux - News 1 01-03-2005 09:39 AM
developing device drivers djgerbavore Linux - Hardware 1 07-30-2004 02:49 PM
device file for scanner with libusb fredgt Linux - Hardware 0 04-08-2004 11:47 AM
OSS API - opening /dev/dsp when device busy vasudevadas Programming 10 12-02-2003 01:11 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General > LinuxAnswers Discussion

All times are GMT -5. The time now is 04:12 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration