You can subscribe to this list here.
| 2000 |
Jan
|
Feb
|
Mar
(2) |
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(4) |
Nov
|
Dec
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2001 |
Jan
(4) |
Feb
(19) |
Mar
(5) |
Apr
(5) |
May
|
Jun
(3) |
Jul
(21) |
Aug
(27) |
Sep
|
Oct
(5) |
Nov
(4) |
Dec
(3) |
| 2002 |
Jan
(27) |
Feb
(33) |
Mar
(25) |
Apr
(40) |
May
(58) |
Jun
(25) |
Jul
(39) |
Aug
(23) |
Sep
(15) |
Oct
(26) |
Nov
(75) |
Dec
(35) |
| 2003 |
Jan
(29) |
Feb
(13) |
Mar
(24) |
Apr
(58) |
May
(27) |
Jun
(21) |
Jul
(11) |
Aug
(24) |
Sep
(6) |
Oct
(6) |
Nov
(30) |
Dec
(71) |
| 2004 |
Jan
(125) |
Feb
(47) |
Mar
(31) |
Apr
(29) |
May
(53) |
Jun
(29) |
Jul
(43) |
Aug
(19) |
Sep
(69) |
Oct
(38) |
Nov
(38) |
Dec
(37) |
| 2005 |
Jan
(59) |
Feb
(92) |
Mar
(32) |
Apr
(54) |
May
(29) |
Jun
(27) |
Jul
(34) |
Aug
(46) |
Sep
(47) |
Oct
(43) |
Nov
(63) |
Dec
(112) |
| 2006 |
Jan
(99) |
Feb
(117) |
Mar
(68) |
Apr
(59) |
May
(66) |
Jun
(32) |
Jul
(65) |
Aug
(85) |
Sep
(44) |
Oct
(113) |
Nov
(334) |
Dec
(42) |
| 2007 |
Jan
(64) |
Feb
(147) |
Mar
(245) |
Apr
(427) |
May
(229) |
Jun
(66) |
Jul
(56) |
Aug
(58) |
Sep
(82) |
Oct
(109) |
Nov
(196) |
Dec
(78) |
| 2008 |
Jan
(143) |
Feb
(79) |
Mar
(85) |
Apr
(126) |
May
(405) |
Jun
(259) |
Jul
(218) |
Aug
(118) |
Sep
(116) |
Oct
(135) |
Nov
(105) |
Dec
(79) |
| 2009 |
Jan
(196) |
Feb
(146) |
Mar
(60) |
Apr
(180) |
May
(229) |
Jun
(206) |
Jul
(126) |
Aug
(155) |
Sep
(276) |
Oct
(160) |
Nov
(120) |
Dec
(185) |
| 2010 |
Jan
(685) |
Feb
(581) |
Mar
(460) |
Apr
(650) |
May
(495) |
Jun
(567) |
Jul
(375) |
Aug
(518) |
Sep
(531) |
Oct
(487) |
Nov
(269) |
Dec
(461) |
| 2011 |
Jan
(524) |
Feb
(457) |
Mar
(385) |
Apr
(316) |
May
(229) |
Jun
(480) |
Jul
(302) |
Aug
(243) |
Sep
(411) |
Oct
(158) |
Nov
(171) |
Dec
(269) |
| 2012 |
Jan
(117) |
Feb
(177) |
Mar
(225) |
Apr
(251) |
May
(150) |
Jun
(228) |
Jul
(127) |
Aug
(74) |
Sep
(128) |
Oct
(106) |
Nov
(47) |
Dec
(73) |
| 2013 |
Jan
(83) |
Feb
(224) |
Mar
(69) |
Apr
(182) |
May
(118) |
Jun
(52) |
Jul
(180) |
Aug
(43) |
Sep
(43) |
Oct
(54) |
Nov
(18) |
Dec
(43) |
| 2014 |
Jan
(40) |
Feb
(78) |
Mar
(138) |
Apr
(85) |
May
(65) |
Jun
(81) |
Jul
(56) |
Aug
(116) |
Sep
(123) |
Oct
(60) |
Nov
(74) |
Dec
(99) |
| 2015 |
Jan
(120) |
Feb
(126) |
Mar
(176) |
Apr
(133) |
May
(124) |
Jun
(60) |
Jul
(54) |
Aug
(92) |
Sep
(134) |
Oct
(75) |
Nov
(48) |
Dec
(78) |
| 2016 |
Jan
(94) |
Feb
(89) |
Mar
(109) |
Apr
(33) |
May
(25) |
Jun
(64) |
Jul
(54) |
Aug
(26) |
Sep
(59) |
Oct
(30) |
Nov
(77) |
Dec
(16) |
| 2017 |
Jan
(37) |
Feb
(22) |
Mar
(25) |
Apr
(7) |
May
(36) |
Jun
(10) |
Jul
(64) |
Aug
(39) |
Sep
(22) |
Oct
(26) |
Nov
(27) |
Dec
(14) |
| 2018 |
Jan
(10) |
Feb
(31) |
Mar
(15) |
Apr
(35) |
May
(20) |
Jun
(13) |
Jul
(10) |
Aug
(6) |
Sep
(22) |
Oct
(13) |
Nov
(52) |
Dec
(23) |
| 2019 |
Jan
(25) |
Feb
(17) |
Mar
(30) |
Apr
(34) |
May
(12) |
Jun
(10) |
Jul
(26) |
Aug
(13) |
Sep
(24) |
Oct
(12) |
Nov
(9) |
Dec
(5) |
| 2020 |
Jan
(24) |
Feb
(12) |
Mar
(40) |
Apr
(20) |
May
(12) |
Jun
(10) |
Jul
(41) |
Aug
(20) |
Sep
(24) |
Oct
(4) |
Nov
(6) |
Dec
(38) |
| 2021 |
Jan
(34) |
Feb
(33) |
Mar
(10) |
Apr
(12) |
May
(10) |
Jun
(49) |
Jul
(49) |
Aug
(17) |
Sep
(43) |
Oct
(11) |
Nov
(2) |
Dec
(13) |
| 2022 |
Jan
(14) |
Feb
(14) |
Mar
(1) |
Apr
(6) |
May
(6) |
Jun
(10) |
Jul
|
Aug
(3) |
Sep
(6) |
Oct
(19) |
Nov
(9) |
Dec
(5) |
| 2023 |
Jan
(4) |
Feb
(9) |
Mar
(30) |
Apr
(17) |
May
(5) |
Jun
|
Jul
(39) |
Aug
(7) |
Sep
(3) |
Oct
(6) |
Nov
|
Dec
(3) |
| 2024 |
Jan
(2) |
Feb
|
Mar
(17) |
Apr
(16) |
May
(14) |
Jun
(13) |
Jul
(7) |
Aug
(3) |
Sep
(8) |
Oct
(19) |
Nov
(1) |
Dec
|
| 2025 |
Jan
|
Feb
|
Mar
(2) |
Apr
(1) |
May
(1) |
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
|
|
|
|
1
(3) |
2
|
3
(1) |
4
(1) |
|
5
(3) |
6
|
7
(4) |
8
|
9
|
10
|
11
|
|
12
|
13
|
14
|
15
|
16
|
17
(1) |
18
(2) |
|
19
|
20
|
21
|
22
|
23
|
24
(1) |
25
|
|
26
|
27
(2) |
28
(2) |
29
|
30
|
|
|
|
From: Chris E <sp...@gm...> - 2020-04-28 15:22:31
|
Have you tried running your code on a different platform? I have issues with my product on RPi4, but it uses Isochronous. Have you tried analyzing the USB packets with Wireshark? I know on both Windows and macOS this can be done - I'd be surprised if Linux couldn't do it too. At the very least, those two things with give you some sanity. :) -Chris On Wed., 29 Apr. 2020, 1:14 am Thomas Demeillers, <ata...@li...> wrote: > Hello everyone, > > I am new to USB and I am working on a project in which I need to receive > data from a PIC micro-controller to a Raspberry Pi 4 with USB. The code on > the micro-controller is already done and cannot be modified. I can’t access > the source, but I know the basics. The device provided me with two > endpoints. > > I am supposed to receive USB binary frames of 512bit / 64bytes every 10th > or 100th of a second. > > The goal is first to receive one frame and then to try with a higher > number of frames. > > Everything goes well until the bulk transfer which returns no error. The > received size is matching the predicted one, but the data buffer remains > empty. > > I have been trying to bypass this bug for the past week. > > I have tried every modification I can think of, can somebody help me find > mistakes in my code? > > Thank you in advance ! > > > Thomas > > > > > > > Here is the pastebin of my code in case file attachment doesn't work > https://pastebin.com/xQdX1Xjj > > Configuration: > > Hardware: Raspberry Pi 4 > > OS: Raspbian Lite kernel 4.19 > > Libusb-1.0.23 > > > > > The output running the program is the following: > > > > The module has been detected! (id = 19780 = 4D44) > > Dev (bus 1, device 8): 4747 - 4D44 > > Reset successful! > > Kernel driver already disconnected OK > > Success > > Data received: > > Lengh of data received: 64 > > Value of the firsts characters received: , , , > > > > > > Here is the output from sudo lsusb -v -d 4747:4D44 where 4747:4D44 are the > manufacturer and product id : > > > Bus 001 Device 007: ID 4747:4d44 > > Device Descriptor: > > bLength 18 > > bDescriptorType 1 > > bcdUSB 2.00 > > bDeviceClass 0 > > bDeviceSubClass 0 > > bDeviceProtocol 0 > > bMaxPacketSize0 8 > > idVendor 0x4747 > > idProduct 0x4d44 > > bcdDevice 0.01 > > iManufacturer 1 TopSecretManufacturer > > iProduct 2 TopSecretProduct > > iSerial 0 > > bNumConfigurations 1 > > Configuration Descriptor: > > bLength 9 > > bDescriptorType 2 > > wTotalLength 0x0020 > > bNumInterfaces 1 > > bConfigurationValue 1 > > iConfiguration 0 > > bmAttributes 0xc0 > > Self Powered > > MaxPower 100mA > > Interface Descriptor: > > bLength 9 > > bDescriptorType 4 > > bInterfaceNumber 0 > > bAlternateSetting 0 > > bNumEndpoints 2 > > bInterfaceClass 255 Vendor Specific Class > > bInterfaceSubClass 255 Vendor Specific Subclass > > bInterfaceProtocol 255 Vendor Specific Protocol > > iInterface 0 > > Endpoint Descriptor: > > bLength 7 > > bDescriptorType 5 > > bEndpointAddress 0x01 EP 1 OUT > > bmAttributes 2 > > Transfer Type Bulk > > Synch Type None > > Usage Type Data > > wMaxPacketSize 0x0040 1x 64 bytes > > bInterval 1 > > Endpoint Descriptor: > > bLength 7 > > bDescriptorType 5 > > bEndpointAddress 0x81 EP 1 IN > > bmAttributes 2 > > Transfer Type Bulk > > Synch Type None > > Usage Type Data > > wMaxPacketSize 0x0040 1x 64 bytes > > bInterval 1 > > Device Status: 0x0001 > > Self Powered > _______________________________________________ > libusb-devel mailing list > lib...@li... > https://lists.sourceforge.net/lists/listinfo/libusb-devel > |
|
From: Thomas D. <ata...@li...> - 2020-04-28 15:12:21
|
Hello everyone, I am new to USB and I am working on a project in which I need to receive data from a PIC micro-controller to a Raspberry Pi 4 with USB. The code on the micro-controller is already done and cannot be modified. I can’t access the source, but I know the basics. The device provided me with two endpoints. I am supposed to receive USB binary frames of 512bit / 64bytes every 10th or 100th of a second. The goal is first to receive one frame and then to try with a higher number of frames. Everything goes well until the bulk transfer which returns no error. The received size is matching the predicted one, but the data buffer remains empty. I have been trying to bypass this bug for the past week. I have tried every modification I can think of, can somebody help me find mistakes in my code? Thank you in advance ! Thomas Here is the pastebin of my code in case file attachment doesn't work https://pastebin.com/xQdX1Xjj Configuration: Hardware: Raspberry Pi 4 OS: Raspbian Lite kernel 4.19 Libusb-1.0.23 The output running the program is the following: The module has been detected! (id = 19780 = 4D44) Dev (bus 1, device 8): 4747 - 4D44 Reset successful! Kernel driver already disconnected OK Success Data received: Lengh of data received: 64 Value of the firsts characters received: , , , Here is the output from sudo lsusb -v -d 4747:4D44 where 4747:4D44 are the manufacturer and product id : Bus 001 Device 007: ID 4747:4d44 Device Descriptor: bLength 18 bDescriptorType 1 bcdUSB 2.00 bDeviceClass 0 bDeviceSubClass 0 bDeviceProtocol 0 bMaxPacketSize0 8 idVendor 0x4747 idProduct 0x4d44 bcdDevice 0.01 iManufacturer 1 TopSecretManufacturer iProduct 2 TopSecretProduct iSerial 0 bNumConfigurations 1 Configuration Descriptor: bLength 9 bDescriptorType 2 wTotalLength 0x0020 bNumInterfaces 1 bConfigurationValue 1 iConfiguration 0 bmAttributes 0xc0 Self Powered MaxPower 100mA Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 0 bAlternateSetting 0 bNumEndpoints 2 bInterfaceClass 255 Vendor Specific Class bInterfaceSubClass 255 Vendor Specific Subclass bInterfaceProtocol 255 Vendor Specific Protocol iInterface 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x01 EP 1 OUT bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0040 1x 64 bytes bInterval 1 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x81 EP 1 IN bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0040 1x 64 bytes bInterval 1 Device Status: 0x0001 Self Powered |
|
From: Tim R. <ti...@pr...> - 2020-04-27 19:00:42
|
Praveen R wrote: > > Could you please let me know if suerspeed steams are supported on > windows and if its not Is it possible to add this support and is there > any plan to support it in the near future. This doesn't help answer your question, but I'm curious to know why you would want this. What's the use case? SuperSpeed streams are a hack that was added for the USB Mass Storage folks, and it's really hard to think of any other good uses for it that can't be done a lot easier in another way. -- Tim Roberts, ti...@pr... Providenza & Boekelheide, Inc. |
|
From: Praveen R <pra...@ou...> - 2020-04-27 15:42:11
|
Hi Team, Than you for the continuous support of Libusb library. Could you please let me know if suerspeed steams are supported on windows and if its not Is it possible to add this support and is there any plan to support it in the near future. Best Regards Praveen |
|
From: Mateusz M. <m.m...@gm...> - 2020-04-24 20:48:45
|
I'm struggling with libusb_get_device_list(NULL, &devs)which crashes mine application. So it's my question, is it possible to run this library on Android 9? Please let me know. |
|
From: Robert R. <R.R...@Qu...> - 2020-04-18 20:30:13
|
Turned out to be all my fault. Adding the serial number caused it to try and totally re-enumerate. Without the serial number it was using an old, successful enumeration. Fixed the extended descriptors stuff and it worked. Thanks for the hints. >Date: Fri, 17 Apr 2020 22:10:09 -0700 >From: Tim Roberts <ti...@pr...> >To: Libusb Mailing List <lib...@li...> >Subject: Re: [libusb] Serial Number Messes Up Enumeration >Message-ID: <36D...@pr...> >Content-Type: text/plain; charset=utf-8 > >On Apr 17, 2020, at 1:26 PM, Robert Ritchey ><R.R...@Qu...> wrote: > > > > Hi, this is a bit off topic for this list but I was hoping > someone might have some idea about my problem. > > I am using libusb with my device and its been working great but I > decided to add a serial number to my board now that I am getting > closer to production. I am using the Microsoft compatible ID > descriptors to use WinUSB. > > This has been working fine but when I added the serial number > string Windows goes looking for a driver and fails. When I check > the registry it seems that Windows is no longer trying to match me to WinUSB. > > I don't know why just adding the serial number string messes > things up. Any thoughts? > >As I?m sure you know, that shouldn?t make any difference. Have you >double-checked that you didn?t mess something up when you added the >string descriptor? You?re sure it?s still responding to the >Microsoft extended descriptors? Those are also string descriptors, >and could have interfered. >? >Tim Roberts, ti...@pr... >Providenza & Boekelheide, Inc. -Bob -------------------------------------------------------------------- Robert Ritchey Quest Engineering & Development, Inc. Suite B-8 6125 South Ash Avenue Tempe, AZ 85283 Tel: (480) 460-2652 E-Mail: R.R...@Sm... E-Mail: R.R...@Qu... E-Mail: R.R...@AC... WWW: www.QuestEngDev.com/ WWW: www.Smart-Fly.com/ -------------------------------------------------------------------- |
|
From: Tim R. <ti...@pr...> - 2020-04-18 05:10:22
|
On Apr 17, 2020, at 1:26 PM, Robert Ritchey <R.R...@Qu...> wrote: > > Hi, this is a bit off topic for this list but I was hoping someone might have some idea about my problem. > I am using libusb with my device and its been working great but I decided to add a serial number to my board now that I am getting closer to production. I am using the Microsoft compatible ID descriptors to use WinUSB. > This has been working fine but when I added the serial number string Windows goes looking for a driver and fails. When I check the registry it seems that Windows is no longer trying to match me to WinUSB. > I don't know why just adding the serial number string messes things up. Any thoughts? As I’m sure you know, that shouldn’t make any difference. Have you double-checked that you didn’t mess something up when you added the string descriptor? You’re sure it’s still responding to the Microsoft extended descriptors? Those are also string descriptors, and could have interfered. — Tim Roberts, ti...@pr... Providenza & Boekelheide, Inc. |
|
From: Robert R. <R.R...@Qu...> - 2020-04-17 20:46:52
|
Hi, this is a bit off topic for this list but I was hoping someone might have some idea about my problem. I am using libusb with my device and its been working great but I decided to add a serial number to my board now that I am getting closer to production. I am using the Microsoft compatible ID descriptors to use WinUSB. This has been working fine but when I added the serial number string Windows goes looking for a driver and fails. When I check the registry it seems that Windows is no longer trying to match me to WinUSB. I don't know why just adding the serial number string messes things up. Any thoughts? Thank you, -Bob -------------------------------------------------------------------- Robert Ritchey Quest Engineering & Development, Inc. Suite B-8 6125 South Ash Avenue Tempe, AZ 85283 Tel: (480) 460-2652 E-Mail: R.R...@Sm... E-Mail: R.R...@Qu... E-Mail: R.R...@AC... WWW: www.QuestEngDev.com/ WWW: www.Smart-Fly.com/ -------------------------------------------------------------------- |
|
From: <li...@su...> - 2020-04-07 07:11:19
|
On Apr 5, 2020, at 1:38 AM, li...@su... wrote:
>
> Now I can get my touch screen report descriptor, but it doesn't work with usb mouse or usb keyboard when I use "libusb_get_descriptor(handle,LIBUSB_DT_REPORT,0,buff,sizeof(buff))" with -9 (LIBUSB_ERROR_PIPE) returned (also, I don't know how to get the desc_index so I always set it 0).
>
> But I can get all the HID devices' HID descriptor in 'configuration descriptor -> interface configurator-> extra' (e.g. 09 21 1101 00 01 22 3b00 ,it should have 003b -> 59 byte of report descriptor )
>
> What's the problem with them.Should I re-configure them so that the default pipe can be used?
As it turns out, you can’t use libusb_get_descriptor to fetch a report descriptor. Report descriptors have to be fetched using a GET_DESCRIPTOR request aimed at the interface, and libusb always sends descriptor requests aimed at the device. This kind of thing should work:
libusb_control_transfer (handle,
LIBUSB_ENDPOINT_IN |
LIBUSB_REQUEST_TYPE_STANDARD |
LIBUSB_RECIPIENT_INTERFACE,
LIBUSB_REQUEST_GET_DESCRIPTOR,
(LIBUSB_DT_REPORT << 8),
0,
buf, 2014,
5000);
—
Tim Roberts, ti...@pr...
Providenza & Boekelheide, Inc.
|
|
From: <li...@su...> - 2020-04-07 05:22:45
|
On Apr 5, 2020, at 1:38 AM, li...@su... wrote:
>
> Now I can get my touch screen report descriptor, but it doesn't work with usb mouse or usb keyboard when I use "libusb_get_descriptor(handle,LIBUSB_DT_REPORT,0,buff,sizeof(buff))" with -9 (LIBUSB_ERROR_PIPE) returned (also, I don't know how to get the desc_index so I always set it 0).
>
> But I can get all the HID devices' HID descriptor in 'configuration descriptor -> interface configurator-> extra' (e.g. 09 21 1101 00 01 22 3b00 ,it should have 003b -> 59 byte of report descriptor )
>
> What's the problem with them.Should I re-configure them so that the default pipe can be used?
As it turns out, you can’t use libusb_get_descriptor to fetch a report descriptor. Report descriptors have to be fetched using a GET_DESCRIPTOR request aimed at the interface, and libusb always sends descriptor requests aimed at the device. This kind of thing should work:
libusb_control_transfer (handle,
LIBUSB_ENDPOINT_IN |
LIBUSB_REQUEST_TYPE_STANDARD |
LIBUSB_RECIPIENT_INTERFACE,
LIBUSB_REQUEST_GET_DESCRIPTOR,
(LIBUSB_DT_REPORT << 8),
0,
buf, 2014,
5000);
—
Tim Roberts, ti...@pr...
Providenza & Boekelheide, Inc.
|
|
From: Tim R. <ti...@pr...> - 2020-04-07 04:00:12
|
On Apr 5, 2020, at 1:38 AM, li...@su... wrote:
>
> Now I can get my touch screen report descriptor, but it doesn't work with usb mouse or usb keyboard when I use "libusb_get_descriptor(handle,LIBUSB_DT_REPORT,0,buff,sizeof(buff))" with -9 (LIBUSB_ERROR_PIPE) returned (also, I don't know how to get the desc_index so I always set it 0).
>
> But I can get all the HID devices' HID descriptor in 'configuration descriptor -> interface configurator-> extra' (e.g. 09 21 1101 00 01 22 3b00 ,it should have 003b -> 59 byte of report descriptor )
>
> What's the problem with them.Should I re-configure them so that the default pipe can be used?
As it turns out, you can’t use libusb_get_descriptor to fetch a report descriptor. Report descriptors have to be fetched using a GET_DESCRIPTOR request aimed at the interface, and libusb always sends descriptor requests aimed at the device. This kind of thing should work:
libusb_control_transfer (handle,
LIBUSB_ENDPOINT_IN |
LIBUSB_REQUEST_TYPE_STANDARD |
LIBUSB_RECIPIENT_INTERFACE,
LIBUSB_REQUEST_GET_DESCRIPTOR,
(LIBUSB_DT_REPORT << 8),
0,
buf, 2014,
5000);
—
Tim Roberts, ti...@pr...
Providenza & Boekelheide, Inc.
|
|
From: <li...@su...> - 2020-04-07 01:49:14
|
On Apr 5, 2020, at 2:00 AM, li...@su... wrote: > > Must I use claim an interfece? Descriptor access all happens over the control pipe, so you shouldn’t need to claim an interface. Windows’ rules are slightly different, but I think you’re running on on Linux. — Tim Roberts, ti...@pr... Providenza & Boekelheide, Inc. |
|
From: Tim R. <ti...@pr...> - 2020-04-05 21:16:17
|
On Apr 5, 2020, at 2:00 AM, li...@su... wrote: > > Must I use claim an interfece? Descriptor access all happens over the control pipe, so you shouldn’t need to claim an interface. Windows’ rules are slightly different, but I think you’re running on on Linux. — Tim Roberts, ti...@pr... Providenza & Boekelheide, Inc. |
|
From: <li...@su...> - 2020-04-05 09:21:54
|
li...@su... wrote: > Sorry I'm late. > (I study it when I'm free) > I just want to analyze usb devices(including HID device and so on) on > linux. > e.g. > 1) a mouse plugged in. > 2) use libusb check out this plug-in event > 3) analyze it by libusb -> it's HID > 4) analyze it by hidapi -> it's a mouse > > If it doesn't get usage & usage page on linux,how can I > get hidraw_report_descriptor to analyze devices. > 1. devices will not add the device file in /dev/, rigth? So I can't > use 'open()'. Well, you can open the device in libusb, and once you have done that you can fetch the report descriptors yourself. The HID descriptor (part of the configuration descriptor) tells you how many report descriptors there are, and libusb_get_descriptor can fetch the report descriptors. > 2. I have read hidapi > on https://www.kernel.org/doc/Documentation/hid/hidraw.txt, it > says Hidraw supports the following ioctls. but I don't know what's the > target( ioctl( ?, HIDIOCGREPORT, hidraw_report_descriptor&) ). The HIDAPI library talks to the hidraw driver. The driver handle is internal to the library. A suitably motivated person could figure out pretty easily how to get the driver handle from the hid_device structure. -- Tim Roberts, ti...@pr... Providenza & Boekelheide, Inc. |
|
From: <li...@su...> - 2020-04-05 08:39:17
|
li...@su... wrote: > Sorry I'm late. > (I study it when I'm free) > I just want to analyze usb devices(including HID device and so on) on > linux. > e.g. > 1) a mouse plugged in. > 2) use libusb check out this plug-in event > 3) analyze it by libusb -> it's HID > 4) analyze it by hidapi -> it's a mouse > > If it doesn't get usage & usage page on linux,how can I > get hidraw_report_descriptor to analyze devices. > 1. devices will not add the device file in /dev/, rigth? So I can't > use 'open()'. Well, you can open the device in libusb, and once you have done that you can fetch the report descriptors yourself. The HID descriptor (part of the configuration descriptor) tells you how many report descriptors there are, and libusb_get_descriptor can fetch the report descriptors. > 2. I have read hidapi > on https://www.kernel.org/doc/Documentation/hid/hidraw.txt, it > says Hidraw supports the following ioctls. but I don't know what's the > target( ioctl( ?, HIDIOCGREPORT, hidraw_report_descriptor&) ). The HIDAPI library talks to the hidraw driver. The driver handle is internal to the library. A suitably motivated person could figure out pretty easily how to get the driver handle from the hid_device structure. -- Tim Roberts, ti...@pr... Providenza & Boekelheide, Inc. |
|
From: Kustaa N. <Kus...@pl...> - 2020-04-04 07:22:58
|
OT as this is not libusb but if you allow me that would be great: My problem is that USB on PIC18F45K50 stops working on some chips after some time. The USB firmware is something I botched together closer to 10 years ago from various sources. The code does not look pretty at all but it has worked for me all that time so I have not bothered to do anything with having been otherwise engaged as they say. But now I have all of a suddenly on some PIC chips the USB stops working in anything from minutes to tens of minutes. With some chips the identical code runs as long as I have the patience, I just completed a 7 day and night run without problems. All the working chips have manufacturing code 1321VYE and all the failing chips have manufacturing code 1718D51. So sounds like a hardware problem right. OTH I see no errata or reporting on problems that correspond to my problems so could I be the only people with bad chips? Also the bootloader code (which uses USB HID and was not written by me) seems to work no problem as long as I test it. So this suggest to me that the problem is with the man on the mirror and his code. I have access to Beagle 480 analyzer and I can easily capture the situation when it fails. Here is what the beagle shows when things are running fine: # Level Sp Index m:s.ms.us Dur Len Err Dev Ep Record Summary 0 FS 536639 0:58.793.206 2.183 us [1 SOF] [Frame: 1980] 0 FS 536640 0:58.793.221 50.166 us 64 B 6 2 IN txn 00 00 00 00 80 00 00 00 00 00 00 00 80 00 00 00 00 00 00 00 80 00 00 00… 0 FS 536644 0:58.794.206 2.083 us [1 SOF] [Frame: 1981] 0 FS 536645 0:58.794.212 50.000 us 64 B 6 2 OUT txn 00 01 00 00 00 00 00 00 00 02 00 00 00 00 00 00 00 13 01 00 20 00 00 00… 0 FS 536649 0:58.794.263 50.083 us 64 B 6 2 IN txn 00 00 00 00 80 00 00 00 00 00 00 00 80 00 00 00 00 00 00 00 80 00 00 00… 0 FS 536653 0:58.795.206 2.083 us [1 SOF] [Frame: 1982] 0 FS 536654 0:58.795.212 50.166 us 64 B 6 2 IN txn 00 00 00 00 80 00 00 00 00 00 00 00 80 00 00 00 00 00 00 00 80 00 00 00… 0 FS 536658 0:58.796.206 2.250 us [1 SOF] [Frame: 1983] 0 FS 536659 0:58.796.211 50.166 us 64 B 6 2 IN txn 00 00 00 00 80 00 00 00 00 00 00 00 80 00 00 00 00 00 00 00 80 00 00 00… 0 FS 536663 0:58.797.206 2.083 us [1 SOF] [Frame: 1984] 0 FS 536664 0:58.797.211 50.166 us 64 B 6 2 IN txn 00 00 00 00 80 00 00 00 00 00 00 00 80 00 00 00 00 00 00 00 80 00 00 00… 0 FS 536668 0:58.798.206 2.183 us [1 SOF] [Frame: 1985] 0 FS 536669 0:58.798.211 50.083 us 64 B 6 2 IN txn 00 00 00 00 80 00 00 00 00 00 00 00 80 00 00 00 00 00 00 00 80 00 00 00… 0 FS 536673 0:58.799.206 2.183 us [1 SOF] [Frame: 1986] 0 FS 536674 0:58.799.211 50.166 us 64 B 6 2 IN txn 00 00 00 00 80 00 00 00 00 00 00 00 80 00 00 00 00 00 00 00 80 00 00 00… 0 FS 536678 0:58.800.206 2.083 us [1 SOF] [Frame: 1987] 0 FS 536679 0:58.800.211 50.166 us 64 B 6 2 IN txn 00 00 00 00 80 00 00 00 00 00 00 00 80 00 00 00 00 00 00 00 80 00 00 00… 0 FS 536683 0:58.801.207 2.183 us [1 SOF] [Frame: 1988] repeats unti it fails. This is what it looks like when the communication stops fail: # Level Sp Index m:s.ms.us Dur Len Err Dev Ep Record Summary 0 FS 592699 1:10.520.254 1.999.172.416 s 6 2 [2000 IN-NAK] [Periodic Timeout] 0 FS 592700 1:10.521.214 1.999.206.916 s 6 2 [2000 OUT-DATA-NAK] [Periodic Timeout] 0 FS 600701 1:12.520.366 1.999.171.083 s [2000 SOF] [Frames: 1370 - 1321] [Periodic Timeout] 0 FS 600702 1:12.520.422 1.999.183.750 s 6 2 [2000 IN-NAK] [Periodic Timeout] 0 FS 600703 1:12.521.371 1.999.219.750 s 6 2 [2000 OUT-DATA-NAK] [Periodic Timeout] 0 FS 608704 1:14.520.535 1.999.171.083 s [2000 SOF] [Frames: 1322 - 1273] [Periodic Timeout] 0 FS 608705 1:14.520.592 1.999.172.250 s 6 2 [2000 IN-NAK] [Periodic Timeout] 0 FS 608706 1:14.521.552 1.999.206.916 s 6 2 [2000 OUT-DATA-NAK] [Periodic Timeout] Now my question: AFAIU what happens is that the host tries to do alternatively an IN and OUT transaction which are both NAKed by the SIE in the PIC. Is that correct interpretation? What is the periodic timeout? Ok, so assuming my interpretation is right, there is very little software interaction involved here on the device side: the SIE simply NAKs if the firmware has not processed the data received (OUT dir) or prepared more data to send (IN dir). The way this happens in PIC is that the firmware does what it does with USB memory and signals the SIE that the the data in the buffer has been processed or prepared by setting the UOWN bit in the STAT register of the EP in question. So basically above Beagle log tells me that the firmware has not set UOWN for neither in or out EP, right? My main loop (the data processing happens at main program, not in USB interrupt) looks like this: while (1) { if (!(ep2_o.STAT & UOWN)) { // new data from host, so process it <snip> ep2_o.CNT = 64; if (ep2_o.STAT & DTS) // toggle DATA0/DATA1 ep2_o.STAT = DTSEN; else ep2_o.STAT = DTS | DTSEN; ep2_o.STAT |= UOWN; } if (!(ep2_i.STAT & UOWN)) { // we own the USB buffer, so update data going to the host <snip> // turn the buffer over to the SIE so the host will pick it up ep2_i.CNT = 64; if (ep2_i.STAT & DTS) // toggle DATA0/DATA1 ep2_i.STAT = DTSEN; else ep2_i.STAT = DTS | DTSEN; ep2_i.STAT |= UOWN; } blink_led(); } From the LED blinking I know this loops gets executed so it looks like the SIE never clears the UOWN bit because if it would then my firmware would set it in short order. Does that look like a sensical description of the situation? Any idea how to debug this further? I've shown the main loop, the USB interrupt of course has a lot of code but AFAIU none of that should get involved or do nothing unless there is some setup packet on the USB bus and I see no evidence of that on Beagle log. So the actual code involved is just what I've show above, right? For completeness: this is a HID device with two 64 byte endpoints and the higher level protocol is simply asking the host USB stack to write and read 64 bytes at a time. wbr Kusti |
|
From: Tim R. <ti...@pr...> - 2020-04-03 18:24:18
|
li...@su... wrote: > Sorry I'm late. > (I study it when I'm free) > I just want to analyze usb devices(including HID device and so on) on > linux. > e.g. > 1) a mouse plugged in. > 2) use libusb check out this plug-in event > 3) analyze it by libusb -> it's HID > 4) analyze it by hidapi -> it's a mouse > > If it doesn't get usage & usage page on linux,how can I > get hidraw_report_descriptor to analyze devices. > 1. devices will not add the device file in /dev/, rigth? So I can't > use 'open()'. Well, you can open the device in libusb, and once you have done that you can fetch the report descriptors yourself. The HID descriptor (part of the configuration descriptor) tells you how many report descriptors there are, and libusb_get_descriptor can fetch the report descriptors. > 2. I have read hidapi > on https://www.kernel.org/doc/Documentation/hid/hidraw.txt, it > says Hidraw supports the following ioctls. but I don't know what's the > target( ioctl( ?, HIDIOCGREPORT, hidraw_report_descriptor&) ). The HIDAPI library talks to the hidraw driver. The driver handle is internal to the library. A suitably motivated person could figure out pretty easily how to get the driver handle from the hid_device structure. -- Tim Roberts, ti...@pr... Providenza & Boekelheide, Inc. |
|
From: Tim R. <ti...@pr...> - 2020-04-01 07:30:09
|
On Mar 31, 2020, at 11:07 PM, li...@su... wrote: > > Now, I make a simple test to use it, but I always get 0 when I plug in a mouse or keyboard and get their 'usage' nad 'usage page' > I'm using ubuntu 14.04 (linux) and imx6 device(4.1.15). > ... > Here is output of a mouse device on linux: > It's a hid device Well, sort of. It’s fake device created by VMWare. > what's the problem? Did you read the documentation, where it says that “usage_page” and “usage” are available on Windows and Mac only? > OTOH, I can't get list by hid_enumerate() on ARM but it return success when hid_init(). Also I found the program linking to 'libhidapi-hidraw.so' not 'libhidapi-libusb.so' on ARM, why and what's the 'libhidapi-hidraw.so’? Google. is much faster than this mailing list. “libhidapi-libusb” accesses the device using the libusb driver. “libhidapi-hidraw” accesses the device using the Linux raw HID device. > BTW, could somebody give me Definition file of Miscellaneous, because it doesn't in libusb but I also have a wifi & BT module. The class is 0xEF (USB-IF : https://www.usb.org/defined-class-codes#anchor_BaseClassEFh). <https://www.usb.org/defined-class-codes#anchor_BaseClassEFh).> > I hope you also can give me a table as it says "Wire Adapter Multifunction Peripheral programming interface. Definition can be found in the Wireless USB Specification in Chapter 8." I can't find this file. I’m really wondering how hard you looked. I Googled for “wireless USB specification”, and it was the second hit. That’s a device for crossing between wired USB and wireless USB. What on earth are you trying to do? Because what you have looks like a very large waste of time. — Tim Roberts, ti...@pr... Providenza & Boekelheide, Inc. |
|
From: <li...@su...> - 2020-04-01 06:07:48
|
Hi everyone A few days ago, I initiated a discussion about how to use hidapi. Now, I make a simple test to use it, but I always get 0 when I plug in a mouse or keyboard and get their 'usage' nad 'usage page' I'm using ubuntu 14.04 (linux) and imx6 device(4.1.15). Here is output of a mouse device on linux: It's a hid device libusb: VID: 3599 PID: 3 device: PID:3 VID:3599 usage:0 usage page:0 release: 258 interface: 0 path: 0002:0002:00 device: PID:3 VID:3599 usage:0 usage page:0 release: 258 interface: 1 path: 0002:0002:01 Manufacturer: VMware Product: VMware Virtual USB Mouse what's the problem? OTOH, I can't get list by hid_enumerate() on ARM but it return success when hid_init(). Also I found the program linking to 'libhidapi-hidraw.so' not 'libhidapi-libusb.so' on ARM, why and what's the 'libhidapi-hidraw.so'? BTW, could somebody give me Definition file of Miscellaneous, because it doesn't in libusb but I also have a wifi & BT module. The class is 0xEF (USB-IF : https://www.usb.org/defined-class-codes#anchor_BaseClassEFh). I hope you also can give me a table as it says "Wire Adapter Multifunction Peripheral programming interface. Definition can be found in the Wireless USB Specification in Chapter 8." I can't find this file. PS:Here is my test program of libusb and hidapi Regards Mihan |
|
From: Tim R. <ti...@pr...> - 2020-04-01 05:48:02
|
On Mar 31, 2020, at 6:13 AM, Jim Flanagan <jrf...@fr...> wrote: > > So, either we set up a Win 7 system for calibrating, etc. or I thought I would write my own calibration routine for Win 10. In order to initiate a communication link to the device, I was going to use a filter-driver. At the moment I am using libusb-win32 under Win 10 setup as a filter and it works just fine. Since libusb-win32 is a bit old, I thought it might be better to use Libusb-1.0 but I need the filtering capability. Thus my questioning. If you have any suggestions, I would appreciate any advice. It’s hard to argue with success. If libusb_win32 works, why would you switch away from it? — Tim Roberts, ti...@pr... Providenza & Boekelheide, Inc. |