Author Topic: Repeating Get Descriptor request windows  (Read 8121 times)

tallman

  • Member
  • ***
  • Posts: 25
Repeating Get Descriptor request windows
« on: November 08, 2016, 10:38:20 pm »
Hello,
I have a endpoint with mouse and consumer devices (for volume control).  Both function fine, but when i include the consumer devices, I get a repeating request for Get Descriptor over and over again.   Taking up resources for response and I'm thinking it's a clue to the device stopping every once in a while.  If I remove the consumer device it doesnt do this.  Can anyone give advice on how to debug this or if it's normal? 

I've attached a copy of the message from usblyzer.
Brent
Code: [Select]
Type Seq Time Elapsed Duration Request Request Details Raw Data I/O C:I:E Device Object Device Name Driver Name IRP Status
START 1 51:32.2
URB 2 51:55.8 23.673707 s Get Descriptor from Device Str ind:1 in FFFFE0008A63F050h 129 AndroidAFD FFFFE0008A930010h
URB 3 51:55.8 23.673722 s Get Descriptor from Device Str ind:1 in FFFFE00085A01060h 125 usbccgp FFFFE0008A930010h
URB 0004-0003 51:55.8 23.673920 s 198 us Control Transfer Get Descriptor (Str ind:1) 10 03 54 00 4C 00 61 00... in --:--:00 FFFFE00085A01060h 125 usbccgp FFFFE0008A930010h Success (Success)
URB 0005-0002 51:55.8 23.673936 s 229 us Control Transfer Get Descriptor (Str ind:1) 10 03 54 00 4C 00 61 00... in --:--:00 FFFFE0008A63F050h 129 AndroidAFD FFFFE0008A930010h Success (Success)
URB 6 51:55.8 23.673988 s Get Descriptor from Device Str ind:2 in FFFFE0008A63F050h 129 AndroidAFD FFFFE0008A437820h
URB 7 51:55.8 23.673999 s Get Descriptor from Device Str ind:2 in FFFFE00085A01060h 125 usbccgp FFFFE0008A437820h
URB 0008-0007 51:55.8 23.674181 s 182 us Control Transfer Get Descriptor (Str ind:2) 0C 03 4D 00 6F 00 74 00... in --:--:00 FFFFE00085A01060h 125 usbccgp FFFFE0008A437820h Success (Success)
URB 0009-0006 51:55.8 23.674193 s 206 us Control Transfer Get Descriptor (Str ind:2) 0C 03 4D 00 6F 00 74 00... in --:--:00 FFFFE0008A63F050h 129 AndroidAFD FFFFE0008A437820h Success (Success)
URB 10 51:57.2 25.011314 s Get Descriptor from Device Str ind:1 in FFFFE0008A63F050h 129 AndroidAFD FFFFE0008AAED010h
URB 11 51:57.2 25.011323 s Get Descriptor from Device Str ind:1 in FFFFE00085A01060h 125 usbccgp FFFFE0008AAED010h
URB 0012-0011 51:57.2 25.011506 s 183 us Control Transfer Get Descriptor (Str ind:1) 10 03 54 00 4C 00 61 00... in --:--:00 FFFFE00085A01060h 125 usbccgp FFFFE0008AAED010h Success (Success)
URB 0013-0010 51:57.2 25.011516 s 202 us Control Transfer Get Descriptor (Str ind:1) 10 03 54 00 4C 00 61 00... in --:--:00 FFFFE0008A63F050h 129 AndroidAFD FFFFE0008AAED010h Success (Success)
URB 14 51:57.2 25.011551 s Get Descriptor from Device Str ind:2 in FFFFE0008A63F050h 129 AndroidAFD FFFFE00088530820h
URB 15 51:57.2 25.011559 s Get Descriptor from Device Str ind:2 in FFFFE00085A01060h 125 usbccgp FFFFE00088530820h
URB 0016-0015 51:57.2 25.011731 s 172 us Control Transfer Get Descriptor (Str ind:2) 0C 03 4D 00 6F 00 74 00... in --:--:00 FFFFE00085A01060h 125 usbccgp FFFFE00088530820h Success (Success)




Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 3033
    • Lakeview Research
Re: Repeating Get Descriptor request windows
« Reply #1 on: November 09, 2016, 09:56:56 am »
Show your descriptors.

tallman

  • Member
  • ***
  • Posts: 25
Re: Repeating Get Descriptor request windows
« Reply #2 on: November 09, 2016, 10:40:20 am »
Oh, right.  Here it is.  The top portion is the suspect, as the mouse Usage doesn't cause the repeating get desciptor if I comment the top.

  Thanks.
Code: [Select]
0x05, 0x0C, // Usage Page (Consumer Devices)
0x09, 0x01, // Usage (Consumer Control)
0xA1, 0x01, // Collection (Application)
0xA1, 0x00, /*  Collection (Physical),     20        */
0x85, 0x04, /*     Report Id (4)                   */
0x19, 0x00, // Usage Minimum (0)
0x2A,0xFF,0x03, // Usage Maximum (1)
0x95, 0x01, // Report Count (1)
0x75, 0x10, // Report Size (16)
0x15, 0x00, // Logical Minimum (0)
0x27, 0xFF, 0x03, 0x00, 0x00,  // Logical Maximum (1023)
0x81, 0x00, // Input (Data, Ary, Absolute)
0xC0, // End Collection
0xC0, // End Collection
0x05, 0x01, /* Usage Page (Generic Desktop),    8 */
0x09, 0x02, /* Usage (Mouse),                      */
0xA1, 0x01, /*  Collection (Application),          */
0x09, 0x01, /*   Usage (Pointer),                  */

0xA1, 0x00, /*  Collection (Physical),     20        */
0x85, 0x01, /*     Report Id (1)                   */
0x05, 0x09, /*     Usage Page (Buttons),           */
0x19, 0x01, /*     Usage Minimum (01),             */
0x29, 0x03, /*     Usage Maximum (03),             */
0x15, 0x00, /*     Logical Minimum (0),            */
0x25, 0x01, /*     Logical Maximum (1),            */
0x75, 0x01, /*     Report Size (1),                */
0x95, 0x03, /*     Report Count (3),             3 bits for buttons  */
0x81, 0x02, /*     Input (Data, Variable, Absolute) */

0x75, 0x05, /*     Report Size (5),           24    5 useless bits to make up even bytes  */   
0x95, 0x01, /*     Report Count (1),               */
0x81, 0x01, /*     Input (Constant),               */
0x05, 0x01, /*     Usage Page (Generic Desktop),   */
0x09, 0x30, /*     Usage (X),                      */
0x09, 0x31, /*     Usage (Y),                      */
0x09, 0x38, /*     Usage (Scroll),                 */
0x15, 0x81, /*     Logical Minimum (-127),         */
0x25, 0x7F, /*     Logical Maximum (127),          */
0x75, 0x08, /*     Report Size (8),                */
0x95, 0x03, /*     Report Count (3),               each is a byte so its 3 separate bytes */
0x81, 0x06, /*     Input (Data, Variable, Relative) */

0x05, 0x0c,        //         USAGE_PAGE (Consumer Devices) 15   
0x0a, 0x38, 0x02,  //         USAGE (AC Pan)     
0x15, 0x81,        //         LOGICAL_MINIMUM (-127)     
0x25, 0x7f,        //         LOGICAL_MAXIMUM (127)     
0x75, 0x08,        //         REPORT_SIZE (8)     
0x95, 0x01, /*     Report Count (1),               */
0x81, 0x06,        //         INPUT (Data,Var,Rel)


0xC0, /*  End Collection,             2       */
0xC0, /* End Collection                      */

0x05, 0x01, /* Usage Page (Generic Desktop),    12 */
0x09, 0x02, /* Usage (Mouse),                      */
0xA1, 0x01, /*  Collection (Application),          */
0x09, 0x01, /*   Usage (Pointer),                  */
0xA1, 0x00, /*  Collection (Physical),             */
0x85, 0x02, /*     Report Id (2)                   */

0x05, 0x01, /*     Usage Page (Generic Desktop),40 */
0x09, 0x30, /*     Usage (X),                      */
0x35, 0x00,     /*     PHYSICAL_MINIMUM (0)            */
0x46, 0x10, 0x27,//    PHYSICAL_MAXIMUM (10000)
0x15, 0x00, //     Logical Minimum (0),         
0x26, 0x10, 0x27,//    Logical Maximum (10000),         
0x75, 0x10, /*     Report Size (16),               */
0x95, 0x01, /*     Report Count (1),               */
0x81, 0x02, /*     Input (Data, Variable, Absolute)*/
0x09, 0x31, /*     Usage (Y),                      */
0x35, 0x00,     /*     PHYSICAL_MINIMUM (0)            */
0x46, 0x10, 0x27,//    PHYSICAL_MAXIMUM (10000)
0x15, 0x00, //     Logical Minimum (0),         
0x26, 0x10, 0x27,//    Logical Maximum (10000),         
0x75, 0x10, /*     Report Size (16),               */
0x95, 0x01, /*     Report Count (1),               */
0x81, 0x02, /*     Input (Data, Variable, Absolute)*/
0x05, 0x01, /*     Usage Page (Generic Desktop),   */

0xC0, /*  End Collection,                  2  */
0xC0, /* End Collection                      */
//
}
};

Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 3033
    • Lakeview Research
Re: Repeating Get Descriptor request windows
« Reply #3 on: November 09, 2016, 11:10:13 am »
I'm wondering if there is something wrong with the string descriptors even though the analyzer shows success. What does the code for those look like?

tallman

  • Member
  • ***
  • Posts: 25
Re: Repeating Get Descriptor request windows
« Reply #4 on: November 09, 2016, 01:14:46 pm »
Which code do you mean.  The programming code, or a different code?
Brent

Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 3033
    • Lakeview Research
Re: Repeating Get Descriptor request windows
« Reply #5 on: November 09, 2016, 04:28:18 pm »
As I understand it, even after enumeration succeeds and the device is functioning, Windows continues to request string descriptors 1 and 2, correct?

If you post the full set of descriptors for the device, someone might see something.

tallman

  • Member
  • ***
  • Posts: 25
Re: Repeating Get Descriptor request windows
« Reply #6 on: November 09, 2016, 05:02:57 pm »
Yes thats correct.  Your responses have helped me to at least seek and understand whats happening. So thank you.

  I have found some additional information that is probably causing the repeat.  When I turned on analyze for other endpoints (composite device), I found that I'm getting these requests over and over.  Then right after these, it reissues the get descriptor.

So I'm researching what causes these.  My guess is somehow Windows things I'm idle.  Although the device is not set to suspend, so it shouldn't go into idle mode.

Brent


Code: [Select]
KmIO 18 15:07.0 10.555345 s Internal USB Submit Idle Notification FFFFE0013F470050h 000000c2 AndroidAFD FFFFE0013F472790h 90 2B F8 1D 01 F8 FF FF F0 57 D9 3F 01 E0 FF FF
KmIO 19 15:07.0 10.555352 s Internal USB Submit Idle Notification FFFFE0013FD948D0h 000000bd usbccgp FFFFE0013F472790h 90 2B F8 1D 01 F8 FF FF F0 57 D9 3F 01 E0 FF FF
KmIO 0020-0019 15:07.0 10.581714 s 26.362 ms Internal USB Submit Idle Notification FFFFE0013FD948D0h 000000bd usbccgp FFFFE0013F472790h Cancelled
KmIO 0021-0018 15:07.0 10.581720 s 26.375 ms Internal USB Submit Idle Notification FFFFE0013F470050h 000000c2 AndroidAFD FFFFE0013F472790h Cancelled

Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 3033
    • Lakeview Research
Re: Repeating Get Descriptor request windows
« Reply #7 on: November 09, 2016, 09:28:45 pm »
The mouse has two report IDs. It should have one.

See the example in E.10 here:

www.usb.org/developers/hidpage/HID1_11.pdf

After changing a descriptor, to force Windows to forget the previous descriptors, with the device attached, open Windows Device Manager and uninstall the device (under Driver). Then reattach.

tallman

  • Member
  • ***
  • Posts: 25
Re: Repeating Get Descriptor request windows
« Reply #8 on: November 10, 2016, 11:51:17 am »
Jan,
I have two report id's for mouse, as one is for absolute positioning and one is for relative.  If there is a way to accomplish this with only one repid I can change, but my device needs both.

My real issue that started this is USB port will stop functioning.  Meaning I see my commands go into it through the analyzer, but windows doesn't do the mouse scrolls/etc.  I unplug, and plug and it seems like either over time, or restart of system it will work again, but I can't find anything to make it start working again, nor figure out why it stops in the first place.

Any advice on my real problem would be a life saver.  I've read about stalls and port resets, but don't know that's the issue and see how to tell.
Thanks.
Brent

Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 3033
    • Lakeview Research
Re: Repeating Get Descriptor request windows
« Reply #9 on: November 10, 2016, 09:21:26 pm »
A hardware-based analyzer will show what is actually happening on the bus, for example, if an endpoint isn't responding (even with NAK) occasionally.

I don't know of any requirement that report IDs must be sequential in the descriptor, but you could try using report IDs 1-3 in sequence instead of what you have (4, 1, 2).




mind_prepared

  • Member
  • ***
  • Posts: 1
Re: Repeating Get Descriptor request windows
« Reply #10 on: August 29, 2019, 01:17:07 pm »
Hi, I am experiencing the same issue, anyone ever figure out a solution?

Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 3033
    • Lakeview Research
Re: Repeating Get Descriptor request windows
« Reply #11 on: August 29, 2019, 08:58:29 pm »
Same advice, use a protocol analyzer to monitor what is happening during enumeration, especially all responses to communications from the host.