USB Joystick driver

Discuss development specific to the Pi version of ADFFS
Vanfanel
Posts: 463
Joined: Mon Sep 16, 2013 12:01 am

Re: USB Joystick driver

Post by Vanfanel » Sun Apr 15, 2018 11:49 am

@Jon: It was the disk protection, yes. Mounted the disk and everything's fine now with the installed game. Sorry.

grannyg
Posts: 17
Joined: Fri Dec 13, 2013 3:47 pm

Re: USB Joystick driver

Post by grannyg » Mon Apr 16, 2018 7:28 pm

Just to report an original PS4 Pro controller works fine. (has 8 Axes and 14 buttons)

JonAbbott
Posts: 2013
Joined: Thu Apr 11, 2013 12:13 pm
Location: Essex

Re: USB Joystick driver

Post by JonAbbott » Mon Apr 16, 2018 8:49 pm

Thanks for the confirmation.

I think the next things we need to look at are:
  • Auto-map Joystick axis/buttons
  • Add a Configure app to allow manual configurations to be saved on a per-device setting that override the auto-map, possibly also per-game overrides
  • Allow buttons to be mapped to Up/Down/Left/Right
If we're adding settings on a per game basis, ADFFS needs to inform USBJoystick of the game being run (when booted) and HD installed games would need to manually inform USBJoystick via a * command. This would be beneficial for games that don't work well with Axis control, were you'd want the D-Pad mapped to Up/Down/Left/Right or visa-versa.

We'd probably want to add an SWI (43F44?) for ADFFS to tell USBJoystick the game ID, but that would then make USBJoystick somewhat dependent on JASPP allocated game ID's. The Configure app would also need to communicate via SWI, to discover the full device capabilities.

richw
Posts: 84
Joined: Sat Sep 14, 2013 9:05 pm

Re: USB Joystick driver

Post by richw » Wed Sep 12, 2018 9:05 pm

I have just attached version 0.7 to the initial post.

I have added support for multiple buttons, which can be picked up via the Acorn SWIs (the RTFM and Serial Port ones will accept any button, but cannot tell them apart).

I have started adding support for the 16-bit Acorn SWIs, and the XBOX 360 controller (well, at least the cheap Chinese clone that I have!). I could do with more feedback on this. I am not sure if I have the axis set up in the correct directions for the Acorn APIs (8 and 16 bit) when it comes to analogue inputs.

Can anyone with an analogue (non-HAT) device please explain what happens to your axis readings when you move the sticks in the different directions? And if you run the AcornTest program in the Utils directory, what sort of values do you see in reported?

JonAbbott
Posts: 2013
Joined: Thu Apr 11, 2013 12:13 pm
Location: Essex

Re: USB Joystick driver

Post by JonAbbott » Thu Sep 13, 2018 8:03 am

richw wrote:
Wed Sep 12, 2018 9:05 pm
I have added support for multiple buttons, which can be picked up via the Acorn SWIs (the RTFM and Serial Port ones will accept any button, but cannot tell them apart).
Excellent work Richard. I was testing Drop Ship earlier in the week wondering how on earth to add support for Voltmace which requires three buttons and Joystick translation to the mouse. By adding multiple buttons, the first issue is covered so we just need to figure out how the Voltmace X/Y axis affect the mouse position.

I was planing on looking at adding Joystick configuration to ADFFS. This would include a default Joystick configuration for all games and where necessary key translation. To allow for both backward compatibility and customisation, this will be stored in a seperate database file with ADFFS notifying when a game is booted so the Jostick can be mapped.

This is going to be a fairly mammoth task as I'll need to document the keys non-Joystick games use. For Joystick supporting games they'll need the option to reconfigure the Joystick bindings. To accomplish this, I propose ADFFS stores internal button/axis bindings so every game is mapped to both a standard set and an alternate set (alternate being user configurable), eg eight directions and eight buttons and these are then mapped to the Joystick. This allows for different Joystick configurations, so for example switching from a Nintendo clone to an actual Joystick will retain the correct movements/buttons even though they may be completely different mappings within USBJoystick.

In addition to the per game Joystick configuration within ADFFS, I'll create a general Joystick configuration app for mapping bindings. This will be independent of ADFFS and bundled with USBJoystick as its just a front end to its * commands. Could you look at adding a way for it to query the following:
  1. Query the physical axis / button state so it can show them realtime independent of mapping
  2. Query the number of axis / buttons and possibly the Joystick make/model if we want to show a picture of it
  3. Configure the binding
Via SWI would be the obvious choice, perhaps use the first SWI in the Joystick SWI block with negative Joystick numbers?
richw wrote:
Wed Sep 12, 2018 9:05 pm
I have started adding support for the 16-bit Acorn SWIs, and the XBOX 360 controller (well, at least the cheap Chinese clone that I have!). I could do with more feedback on this. I am not sure if I have the axis set up in the correct directions for the Acorn APIs (8 and 16 bit) when it comes to analogue inputs.

Can anyone with an analogue (non-HAT) device please explain what happens to your axis readings when you move the sticks in the different directions? And if you run the AcornTest program in the Utils directory, what sort of values do you see in reported?
I'll need to modify ADFFS to pass though 16bit as it currently does the translation from 8bit.

I'm assuming the XBOX 360 controller is the wired version? I've been trying to get hold of one, looking in the local thrift shops over the summer without any success. I have lots of wireless here, which are a whole different ballgame. There is an open source project to support them on Mac/Linux if you're interested in adding support, but it's a proprietary interface so needs dedicated code to handle them.

richw
Posts: 84
Joined: Sat Sep 14, 2013 9:05 pm

Re: USB Joystick driver

Post by richw » Thu Sep 13, 2018 9:23 am

Thanks for your comments. Lots to consider!

I suppose that since the games are now frozen in time, adding joystick/key translations would make sense as part of ADFFS. Stuff which lowers the barrier to entry is always helpful, I think. What do you do with games which allow the keys to be redefined?! :)

The Acorn Joystick SWIs are good for multiple buttons, but it would be good to extend it slightly for adding more than two axes. I think other systems call these the Z and Rz axis. There may even be more, such as throttle, brake and steer - I'm sure I've seen those mentioned with respect to gamepad configuration on Windows. I wonder how much of this can be detecged automatically, perhaps removing the need for the manual mapping exercice?

I do want to add some SWIs for joystick information and mappings, as I had this grand plan of it all being wrapped into a Configure plug-in (much like in the Network section, where it enumerates the network controllers). I need to ponder how to extend the Acorn Joystick SWIs.

Part of me thinks that the job should be 'proper', in that there should be an abstration: a Joystick Manager, and a USBJoystick driver. In theory, we could register joysticks from sources other than USB... But back on planet earth, there are probably a handful of people, and approximately zero non-USB joysticks, so who cares?! :) About the only valid-ish use-case I can think of is physical Archies running ADFFS with joysticks attached: although if we get the spit right between ADFFS and USBJoystick, then a real SerialPort or Acorn interface should 'just work' on a real machine.

I have edited the first post with links to my hardware. The XBOX360 thing is wireless, but it's got a USB dongle. As far as the Pi (and RISC OS) knows, it's a wired device: it doesn't see the wireless at all. I wasn't going anywhere near BlueTooth!

JonAbbott
Posts: 2013
Joined: Thu Apr 11, 2013 12:13 pm
Location: Essex

Re: USB Joystick driver

Post by JonAbbott » Thu Sep 13, 2018 6:31 pm

I take my hat of to you, on the face of it, it appears to work with an official XB360 Wireless Controller. There are a few issues though.

The axis values aren't latching, so full right will return -127 and on the next call to Joystick_Read is returning 0. The X axis appears to be correct, the Y axis appears to be inverted (assuming the Joystick_Read documentation is correct).

I can't get any of the buttons to work though, but curiously they do cause spurious values to be returned for X and Y.

Do you know how to notify the Joystick what it's ID is? That will stop it flashing all four ID LED's which is going to be irritating.

Incidentally, the mapping I used was:

Code: Select all

*USBJoystick_Map 0 0 3 4 0 1 2 3 4 5 6 7

richw
Posts: 84
Joined: Sat Sep 14, 2013 9:05 pm

Re: USB Joystick driver

Post by richw » Fri Sep 14, 2018 4:46 pm

Yeah, the more I delve into the XBOX360 world, the more my head hurts! I managed to experiment a little more yesterday, and have concluded a few things:

I need to allow the user to manually control the direction of the axes (probably by using a minus sign in the Map command). My digital (HAT) controller moves the X and Y axes in a certain direction, but the XBOX360 is different, as is the old Microsoft one you mention earlier in the thread. I cannot determine the direction automatically.

I think I can get the stick to tell me the name of each axis, e.g. X, Y, Z, Rx, Ry, Rz. I would like to add this into the *commands for friendliness, perhaps even for auto-mapping.

The HAT switch doesn't work (on my Chinese XBOX360 knock-off controller, anyway). This seems to be down to the way the HID parsing code searches for axis and buttons. The XBOX360 HAT switch is described as a 'pointer', which the code doesn't understand. Hopefully, I can extend it. I tried tweaking the baked-in HID descriptor for the XBOX360 controller, but it was hard going!

When you say the 'buttons don't work', is that the HAT switch? Or all the buttons? If the axis are being corrupted, then that would suggest that my baked-in report descriptor is incorrect (although it is fine for my 'clone'). Maybe I need multiple descriptors? Can you run USBDescriptors on yours at some point, so I can see what it looks like compared to mine?

I think I do indeed need to send some sort of control message (possibly ID number) to the stick which should stop the LEDs going bananas. The various Unix drivers for the XBOX and PS controllers have varying levels of complexity for this, which is starting to scare me somewhat!

This entire thing is all made more complicated by me not having an official XBOX360 controller, but a Chinese knock-off. It seems to be identifying itself as an XBOX360 controller, but it looks awfully like an old PlayStation controller physically!

I would like to get these basics ironed out, then I can ponder the blue-sky stuff like new SWIs.

JonAbbott
Posts: 2013
Joined: Thu Apr 11, 2013 12:13 pm
Location: Essex

Re: USB Joystick driver

Post by JonAbbott » Sat Sep 15, 2018 8:08 am

richw wrote:
Fri Sep 14, 2018 4:46 pm
I need to allow the user to manually control the direction of the axes (probably by using a minus sign in the Map command).
Good idea
richw wrote:
Fri Sep 14, 2018 4:46 pm
My digital (HAT) controller moves the X and Y axes in a certain direction, but the XBOX360 is different, as is the old Microsoft one you mention earlier in the thread. I cannot determine the direction automatically.
Quite, which is part of the reason why I want to write a configuration utility. It could easily prompt the user to move to Joystick to the four corners and work out the directions.
richw wrote:
Fri Sep 14, 2018 4:46 pm
I think I can get the stick to tell me the name of each axis, e.g. X, Y, Z, Rx, Ry, Rz. I would like to add this into the *commands for friendliness, perhaps even for auto-mapping.
Windows seems to auto-map HID devices, so there must be something in the descriptors to indicate both the axis and direction.
richw wrote:
Fri Sep 14, 2018 4:46 pm
When you say the 'buttons don't work', is that the HAT switch? Or all the buttons? If the axis are being corrupted, then that would suggest that my baked-in report descriptor is incorrect (although it is fine for my 'clone'). Maybe I need multiple descriptors? Can you run USBDescriptors on yours at some point, so I can see what it looks like compared to mine?
None of the buttons work. I'll post up the descriptors later today.
richw wrote:
Fri Sep 14, 2018 4:46 pm
The various Unix drivers for the XBOX and PS controllers have varying levels of complexity for this, which is starting to scare me somewhat!
If you want scary, look at what's involved to support the keypad you can plug into the controller. I tried coding a driver many years ago and had to give up. Proprietary interfaces suck big time. HID is there for a reason!
richw wrote:
Fri Sep 14, 2018 4:46 pm
This entire thing is all made more complicated by me not having an official XBOX360 controller, but a Chinese knock-off. It seems to be identifying itself as an XBOX360 controller, but it looks awfully like an old PlayStation controller physically!
Get one off eBay along with the official wireless dongle.

JonAbbott
Posts: 2013
Joined: Thu Apr 11, 2013 12:13 pm
Location: Essex

Re: USB Joystick driver

Post by JonAbbott » Sat Sep 15, 2018 1:37 pm

X360 controller descriptor:

Code: Select all

=============================================
 Device USB5
=============================================
:  0 :  2 : total size of ServiceCall block : 373
:  2 :  2 : offset to descriptor list       : 0x20
:  4 : 20 : name                            : USB5
: 24 :  1 : bus number                      : 1
: 25 :  1 : device address                  : 5
: 26 :  1 : host address                    : 2
: 27 :  1 : host port                       : 5
: 28 :  1 : speed                           : 2 full speed
---------------------------------------------

 Standard Device Descriptor
+----+----+---------------------------+----------+------------+
:Off :Sz  :Name                       :Value hex :Value dec   :
+----+----+---------------------------+----------+------------+
:  0 :  1 : bLength                   :       12 :         18 : 
:  1 :  1 : bDescriptorType           :        1 :          1 : 
:  2 :  2 : bcdUSB                    :      200 :        512 : 
:  4 :  1 : bDeviceClass              :       ff :        255 : Vendor Specific
:  5 :  1 : bDeviceSubClass           :       ff :        255 : 
:  6 :  1 : bDeviceProtocol           :       ff :        255 : 
:  7 :  1 : bMaxPacketSize            :        8 :          8 : 
:  8 :  2 : idVendor                  :      45e :       1118 : 
: 10 :  2 : idProduct                 :      719 :       1817 : 
: 12 :  2 : bcdDevice                 :      100 :        256 : 
: 14 :  1 : iManufacturer             :        1 :          1 : 'Microsoft'
: 15 :  1 : iProduct                  :        2 :          2 : 'Xbox 360 Wireless Receiver for Windows'
: 16 :  1 : iSerialNumber             :        3 :          3 : 'FD8EAC00'
: 17 :  1 : bNumConfigurations        :        1 :          1 : 
+----+----+---------------------------+----------+------------+

 Standard Configuration Descriptor
+----+----+---------------------------+----------+------------+
:Off :Sz  :Name                       :Value hex :Value dec   :
+----+----+---------------------------+----------+------------+
:  0 :  1 : bLength                   :        9 :          9 : 
:  1 :  1 : bDescriptorType           :        2 :          2 : 
:  2 :  2 : wTotalLength              :      141 :        321 : 
:  4 :  1 : bNumInterfaces            :        8 :          8 : 
:  5 :  1 : bConfigurationValue       :        1 :          1 : 
:  6 :  1 : iConfiguration            :        0 :          0 : ''
:  7 :  1 : bmAttributes              :       a0 :        160 : (bit7) USB 1.0 bus powered (bit6) Bus powered, (bit5) Remote wakeup
:  8 :  1 : bMaxPower                 :       82 :        130 : 260mA
+----+----+---------------------------+----------+------------+

     Standard Interface Descriptor
    +----+----+---------------------------+----------+------------+
    :Off :Sz  :Name                       :Value hex :Value dec   :
    +----+----+---------------------------+----------+------------+
    :  0 :  1 : bLength                   :        9 :          9 : 
    :  1 :  1 : bDescriptorType           :        4 :          4 : 
    :  2 :  1 : bInterfaceNumber          :        0 :          0 : 
    :  3 :  1 : bAlternateSetting         :        0 :          0 : 
    :  4 :  1 : bNumEndpoints             :        2 :          2 : 
    :  5 :  1 : bInterfaceClass           :       ff :        255 : Vendor Specific
    :  6 :  1 : bInterfaceSubClass        :       5d :         93 : 
    :  7 :  1 : bInterfaceProtocol        :       81 :        129 : 
    :  8 :  1 : iInterface                :        0 :          0 : ''
    +----+----+---------------------------+----------+------------+

*** Unknown Descriptor ***
bLength:          20
bDescriptorType:  0x22 (34)
Byte   2:  0x00 (0)
Byte   3:  0x01 (1)
Byte   4:  0x13 (19)
Byte   5:  0x81 (129)
Byte   6:  0x1d (29)
Byte   7:  0x00 (0)
Byte   8:  0x17 (23)
Byte   9:  0x01 (1)
Byte  10:  0x02 (2)
Byte  11:  0x08 (8)
Byte  12:  0x13 (19)
Byte  13:  0x01 (1)
Byte  14:  0x0c (12)
Byte  15:  0x00 (0)
Byte  16:  0x0c (12)
Byte  17:  0x01 (1)
Byte  18:  0x02 (2)
Byte  19:  0x08 (8)

         Standard Endpoint Descriptor
        +----+----+---------------------------+----------+------------+
        :Off :Sz  :Name                       :Value hex :Value dec   :
        +----+----+---------------------------+----------+------------+
        :  0 :  1 : bLength                   :        7 :          7 : 
        :  1 :  1 : bDescriptorType           :        5 :          5 : 
        :  2 :  1 : bEndpointAddress          :       81 :        129 : Endpoint 1 - IN
        :  3 :  1 : bmAttributes              :        3 :          3 : Interrupt
        :  4 :  2 : wMaxPacketSize            :       20 :         32 : 1 x 32 byte max packets
        :  6 :  1 : bInterval                 :        1 :          1 : 
        +----+----+---------------------------+----------+------------+

         Standard Endpoint Descriptor
        +----+----+---------------------------+----------+------------+
        :Off :Sz  :Name                       :Value hex :Value dec   :
        +----+----+---------------------------+----------+------------+
        :  0 :  1 : bLength                   :        7 :          7 : 
        :  1 :  1 : bDescriptorType           :        5 :          5 : 
        :  2 :  1 : bEndpointAddress          :        1 :          1 : Endpoint 1 - OUT
        :  3 :  1 : bmAttributes              :        3 :          3 : Interrupt
        :  4 :  2 : wMaxPacketSize            :       20 :         32 : 1 x 32 byte max packets
        :  6 :  1 : bInterval                 :        8 :          8 : 
        +----+----+---------------------------+----------+------------+

     Standard Interface Descriptor
    +----+----+---------------------------+----------+------------+
    :Off :Sz  :Name                       :Value hex :Value dec   :
    +----+----+---------------------------+----------+------------+
    :  0 :  1 : bLength                   :        9 :          9 : 
    :  1 :  1 : bDescriptorType           :        4 :          4 : 
    :  2 :  1 : bInterfaceNumber          :        1 :          1 : 
    :  3 :  1 : bAlternateSetting         :        0 :          0 : 
    :  4 :  1 : bNumEndpoints             :        2 :          2 : 
    :  5 :  1 : bInterfaceClass           :       ff :        255 : Vendor Specific
    :  6 :  1 : bInterfaceSubClass        :       5d :         93 : 
    :  7 :  1 : bInterfaceProtocol        :       82 :        130 : 
    :  8 :  1 : iInterface                :        0 :          0 : ''
    +----+----+---------------------------+----------+------------+

*** Unknown Descriptor ***
bLength:          12
bDescriptorType:  0x22 (34)
Byte   2:  0x00 (0)
Byte   3:  0x01 (1)
Byte   4:  0x01 (1)
Byte   5:  0x82 (130)
Byte   6:  0x00 (0)
Byte   7:  0x40 (64)
Byte   8:  0x01 (1)
Byte   9:  0x02 (2)
Byte  10:  0x20 (32)
Byte  11:  0x00 (0)

         Standard Endpoint Descriptor
        +----+----+---------------------------+----------+------------+
        :Off :Sz  :Name                       :Value hex :Value dec   :
        +----+----+---------------------------+----------+------------+
        :  0 :  1 : bLength                   :        7 :          7 : 
        :  1 :  1 : bDescriptorType           :        5 :          5 : 
        :  2 :  1 : bEndpointAddress          :       82 :        130 : Endpoint 2 - IN
        :  3 :  1 : bmAttributes              :        3 :          3 : Interrupt
        :  4 :  2 : wMaxPacketSize            :       20 :         32 : 1 x 32 byte max packets
        :  6 :  1 : bInterval                 :        2 :          2 : 
        +----+----+---------------------------+----------+------------+

         Standard Endpoint Descriptor
        +----+----+---------------------------+----------+------------+
        :Off :Sz  :Name                       :Value hex :Value dec   :
        +----+----+---------------------------+----------+------------+
        :  0 :  1 : bLength                   :        7 :          7 : 
        :  1 :  1 : bDescriptorType           :        5 :          5 : 
        :  2 :  1 : bEndpointAddress          :        2 :          2 : Endpoint 2 - OUT
        :  3 :  1 : bmAttributes              :        3 :          3 : Interrupt
        :  4 :  2 : wMaxPacketSize            :       20 :         32 : 1 x 32 byte max packets
        :  6 :  1 : bInterval                 :        4 :          4 : 
        +----+----+---------------------------+----------+------------+

     Standard Interface Descriptor
    +----+----+---------------------------+----------+------------+
    :Off :Sz  :Name                       :Value hex :Value dec   :
    +----+----+---------------------------+----------+------------+
    :  0 :  1 : bLength                   :        9 :          9 : 
    :  1 :  1 : bDescriptorType           :        4 :          4 : 
    :  2 :  1 : bInterfaceNumber          :        2 :          2 : 
    :  3 :  1 : bAlternateSetting         :        0 :          0 : 
    :  4 :  1 : bNumEndpoints             :        2 :          2 : 
    :  5 :  1 : bInterfaceClass           :       ff :        255 : Vendor Specific
    :  6 :  1 : bInterfaceSubClass        :       5d :         93 : 
    :  7 :  1 : bInterfaceProtocol        :       81 :        129 : 
    :  8 :  1 : iInterface                :        0 :          0 : ''
    +----+----+---------------------------+----------+------------+

*** Unknown Descriptor ***
bLength:          20
bDescriptorType:  0x22 (34)
Byte   2:  0x00 (0)
Byte   3:  0x01 (1)
Byte   4:  0x13 (19)
Byte   5:  0x83 (131)
Byte   6:  0x1d (29)
Byte   7:  0x00 (0)
Byte   8:  0x17 (23)
Byte   9:  0x01 (1)
Byte  10:  0x02 (2)
Byte  11:  0x08 (8)
Byte  12:  0x13 (19)
Byte  13:  0x03 (3)
Byte  14:  0x0c (12)
Byte  15:  0x00 (0)
Byte  16:  0x0c (12)
Byte  17:  0x01 (1)
Byte  18:  0x02 (2)
Byte  19:  0x08 (8)

         Standard Endpoint Descriptor
        +----+----+---------------------------+----------+------------+
        :Off :Sz  :Name                       :Value hex :Value dec   :
        +----+----+---------------------------+----------+------------+
        :  0 :  1 : bLength                   :        7 :          7 : 
        :  1 :  1 : bDescriptorType           :        5 :          5 : 
        :  2 :  1 : bEndpointAddress          :       83 :        131 : Endpoint 3 - IN
        :  3 :  1 : bmAttributes              :        3 :          3 : Interrupt
        :  4 :  2 : wMaxPacketSize            :       20 :         32 : 1 x 32 byte max packets
        :  6 :  1 : bInterval                 :        1 :          1 : 
        +----+----+---------------------------+----------+------------+

         Standard Endpoint Descriptor
        +----+----+---------------------------+----------+------------+
        :Off :Sz  :Name                       :Value hex :Value dec   :
        +----+----+---------------------------+----------+------------+
        :  0 :  1 : bLength                   :        7 :          7 : 
        :  1 :  1 : bDescriptorType           :        5 :          5 : 
        :  2 :  1 : bEndpointAddress          :        3 :          3 : Endpoint 3 - OUT
        :  3 :  1 : bmAttributes              :        3 :          3 : Interrupt
        :  4 :  2 : wMaxPacketSize            :       20 :         32 : 1 x 32 byte max packets
        :  6 :  1 : bInterval                 :        8 :          8 : 
        +----+----+---------------------------+----------+------------+

     Standard Interface Descriptor
    +----+----+---------------------------+----------+------------+
    :Off :Sz  :Name                       :Value hex :Value dec   :
    +----+----+---------------------------+----------+------------+
    :  0 :  1 : bLength                   :        9 :          9 : 
    :  1 :  1 : bDescriptorType           :        4 :          4 : 
    :  2 :  1 : bInterfaceNumber          :        3 :          3 : 
    :  3 :  1 : bAlternateSetting         :        0 :          0 : 
    :  4 :  1 : bNumEndpoints             :        2 :          2 : 
    :  5 :  1 : bInterfaceClass           :       ff :        255 : Vendor Specific
    :  6 :  1 : bInterfaceSubClass        :       5d :         93 : 
    :  7 :  1 : bInterfaceProtocol        :       82 :        130 : 
    :  8 :  1 : iInterface                :        0 :          0 : ''
    +----+----+---------------------------+----------+------------+

*** Unknown Descriptor ***
bLength:          12
bDescriptorType:  0x22 (34)
Byte   2:  0x00 (0)
Byte   3:  0x01 (1)
Byte   4:  0x01 (1)
Byte   5:  0x84 (132)
Byte   6:  0x00 (0)
Byte   7:  0x40 (64)
Byte   8:  0x01 (1)
Byte   9:  0x04 (4)
Byte  10:  0x20 (32)
Byte  11:  0x00 (0)

         Standard Endpoint Descriptor
        +----+----+---------------------------+----------+------------+
        :Off :Sz  :Name                       :Value hex :Value dec   :
        +----+----+---------------------------+----------+------------+
        :  0 :  1 : bLength                   :        7 :          7 : 
        :  1 :  1 : bDescriptorType           :        5 :          5 : 
        :  2 :  1 : bEndpointAddress          :       84 :        132 : Endpoint 4 - IN
        :  3 :  1 : bmAttributes              :        3 :          3 : Interrupt
        :  4 :  2 : wMaxPacketSize            :       20 :         32 : 1 x 32 byte max packets
        :  6 :  1 : bInterval                 :        2 :          2 : 
        +----+----+---------------------------+----------+------------+

         Standard Endpoint Descriptor
        +----+----+---------------------------+----------+------------+
        :Off :Sz  :Name                       :Value hex :Value dec   :
        +----+----+---------------------------+----------+------------+
        :  0 :  1 : bLength                   :        7 :          7 : 
        :  1 :  1 : bDescriptorType           :        5 :          5 : 
        :  2 :  1 : bEndpointAddress          :        4 :          4 : Endpoint 4 - OUT
        :  3 :  1 : bmAttributes              :        3 :          3 : Interrupt
        :  4 :  2 : wMaxPacketSize            :       20 :         32 : 1 x 32 byte max packets
        :  6 :  1 : bInterval                 :        4 :          4 : 
        +----+----+---------------------------+----------+------------+

     Standard Interface Descriptor
    +----+----+---------------------------+----------+------------+
    :Off :Sz  :Name                       :Value hex :Value dec   :
    +----+----+---------------------------+----------+------------+
    :  0 :  1 : bLength                   :        9 :          9 : 
    :  1 :  1 : bDescriptorType           :        4 :          4 : 
    :  2 :  1 : bInterfaceNumber          :        4 :          4 : 
    :  3 :  1 : bAlternateSetting         :        0 :          0 : 
    :  4 :  1 : bNumEndpoints             :        2 :          2 : 
    :  5 :  1 : bInterfaceClass           :       ff :        255 : Vendor Specific
    :  6 :  1 : bInterfaceSubClass        :       5d :         93 : 
    :  7 :  1 : bInterfaceProtocol        :       81 :        129 : 
    :  8 :  1 : iInterface                :        0 :          0 : ''
    +----+----+---------------------------+----------+------------+

*** Unknown Descriptor ***
bLength:          20
bDescriptorType:  0x22 (34)
Byte   2:  0x00 (0)
Byte   3:  0x01 (1)
Byte   4:  0x13 (19)
Byte   5:  0x85 (133)
Byte   6:  0x1d (29)
Byte   7:  0x00 (0)
Byte   8:  0x17 (23)
Byte   9:  0x01 (1)
Byte  10:  0x02 (2)
Byte  11:  0x08 (8)
Byte  12:  0x13 (19)
Byte  13:  0x05 (5)
Byte  14:  0x0c (12)
Byte  15:  0x00 (0)
Byte  16:  0x0c (12)
Byte  17:  0x01 (1)
Byte  18:  0x02 (2)
Byte  19:  0x08 (8)

         Standard Endpoint Descriptor
        +----+----+---------------------------+----------+------------+
        :Off :Sz  :Name                       :Value hex :Value dec   :
        +----+----+---------------------------+----------+------------+
        :  0 :  1 : bLength                   :        7 :          7 : 
        :  1 :  1 : bDescriptorType           :        5 :          5 : 
        :  2 :  1 : bEndpointAddress          :       85 :        133 : Endpoint 5 - IN
        :  3 :  1 : bmAttributes              :        3 :          3 : Interrupt
        :  4 :  2 : wMaxPacketSize            :       20 :         32 : 1 x 32 byte max packets
        :  6 :  1 : bInterval                 :        1 :          1 : 
        +----+----+---------------------------+----------+------------+

         Standard Endpoint Descriptor
        +----+----+---------------------------+----------+------------+
        :Off :Sz  :Name                       :Value hex :Value dec   :
        +----+----+---------------------------+----------+------------+
        :  0 :  1 : bLength                   :        7 :          7 : 
        :  1 :  1 : bDescriptorType           :        5 :          5 : 
        :  2 :  1 : bEndpointAddress          :        5 :          5 : Endpoint 5 - OUT
        :  3 :  1 : bmAttributes              :        3 :          3 : Interrupt
        :  4 :  2 : wMaxPacketSize            :       20 :         32 : 1 x 32 byte max packets
        :  6 :  1 : bInterval                 :        8 :          8 : 
        +----+----+---------------------------+----------+------------+

     Standard Interface Descriptor
    +----+----+---------------------------+----------+------------+
    :Off :Sz  :Name                       :Value hex :Value dec   :
    +----+----+---------------------------+----------+------------+
    :  0 :  1 : bLength                   :        9 :          9 : 
    :  1 :  1 : bDescriptorType           :        4 :          4 : 
    :  2 :  1 : bInterfaceNumber          :        5 :          5 : 
    :  3 :  1 : bAlternateSetting         :        0 :          0 : 
    :  4 :  1 : bNumEndpoints             :        2 :          2 : 
    :  5 :  1 : bInterfaceClass           :       ff :        255 : Vendor Specific
    :  6 :  1 : bInterfaceSubClass        :       5d :         93 : 
    :  7 :  1 : bInterfaceProtocol        :       82 :        130 : 
    :  8 :  1 : iInterface                :        0 :          0 : ''
    +----+----+---------------------------+----------+------------+

*** Unknown Descriptor ***
bLength:          12
bDescriptorType:  0x22 (34)
Byte   2:  0x00 (0)
Byte   3:  0x01 (1)
Byte   4:  0x01 (1)
Byte   5:  0x86 (134)
Byte   6:  0x00 (0)
Byte   7:  0x40 (64)
Byte   8:  0x01 (1)
Byte   9:  0x06 (6)
Byte  10:  0x20 (32)
Byte  11:  0x00 (0)

         Standard Endpoint Descriptor
        +----+----+---------------------------+----------+------------+
        :Off :Sz  :Name                       :Value hex :Value dec   :
        +----+----+---------------------------+----------+------------+
        :  0 :  1 : bLength                   :        7 :          7 : 
        :  1 :  1 : bDescriptorType           :        5 :          5 : 
        :  2 :  1 : bEndpointAddress          :       86 :        134 : Endpoint 6 - IN
        :  3 :  1 : bmAttributes              :        3 :          3 : Interrupt
        :  4 :  2 : wMaxPacketSize            :       20 :         32 : 1 x 32 byte max packets
        :  6 :  1 : bInterval                 :        2 :          2 : 
        +----+----+---------------------------+----------+------------+

         Standard Endpoint Descriptor
        +----+----+---------------------------+----------+------------+
        :Off :Sz  :Name                       :Value hex :Value dec   :
        +----+----+---------------------------+----------+------------+
        :  0 :  1 : bLength                   :        7 :          7 : 
        :  1 :  1 : bDescriptorType           :        5 :          5 : 
        :  2 :  1 : bEndpointAddress          :        6 :          6 : Endpoint 6 - OUT
        :  3 :  1 : bmAttributes              :        3 :          3 : Interrupt
        :  4 :  2 : wMaxPacketSize            :       20 :         32 : 1 x 32 byte max packets
        :  6 :  1 : bInterval                 :        4 :          4 : 
        +----+----+---------------------------+----------+------------+

     Standard Interface Descriptor
    +----+----+---------------------------+----------+------------+
    :Off :Sz  :Name                       :Value hex :Value dec   :
    +----+----+---------------------------+----------+------------+
    :  0 :  1 : bLength                   :        9 :          9 : 
    :  1 :  1 : bDescriptorType           :        4 :          4 : 
    :  2 :  1 : bInterfaceNumber          :        6 :          6 : 
    :  3 :  1 : bAlternateSetting         :        0 :          0 : 
    :  4 :  1 : bNumEndpoints             :        2 :          2 : 
    :  5 :  1 : bInterfaceClass           :       ff :        255 : Vendor Specific
    :  6 :  1 : bInterfaceSubClass        :       5d :         93 : 
    :  7 :  1 : bInterfaceProtocol        :       81 :        129 : 
    :  8 :  1 : iInterface                :        0 :          0 : ''
    +----+----+---------------------------+----------+------------+

*** Unknown Descriptor ***
bLength:          20
bDescriptorType:  0x22 (34)
Byte   2:  0x00 (0)
Byte   3:  0x01 (1)
Byte   4:  0x13 (19)
Byte   5:  0x87 (135)
Byte   6:  0x1d (29)
Byte   7:  0x00 (0)
Byte   8:  0x17 (23)
Byte   9:  0x01 (1)
Byte  10:  0x02 (2)
Byte  11:  0x08 (8)
Byte  12:  0x13 (19)
Byte  13:  0x07 (7)
Byte  14:  0x0c (12)
Byte  15:  0x00 (0)
Byte  16:  0x0c (12)
Byte  17:  0x01 (1)
Byte  18:  0x02 (2)
Byte  19:  0x08 (8)

         Standard Endpoint Descriptor
        +----+----+---------------------------+----------+------------+
        :Off :Sz  :Name                       :Value hex :Value dec   :
        +----+----+---------------------------+----------+------------+
        :  0 :  1 : bLength                   :        7 :          7 : 
        :  1 :  1 : bDescriptorType           :        5 :          5 : 
        :  2 :  1 : bEndpointAddress          :       87 :        135 : Endpoint 7 - IN
        :  3 :  1 : bmAttributes              :        3 :          3 : Interrupt
        :  4 :  2 : wMaxPacketSize            :       20 :         32 : 1 x 32 byte max packets
        :  6 :  1 : bInterval                 :        1 :          1 : 
        +----+----+---------------------------+----------+------------+

         Standard Endpoint Descriptor
        +----+----+---------------------------+----------+------------+
        :Off :Sz  :Name                       :Value hex :Value dec   :
        +----+----+---------------------------+----------+------------+
        :  0 :  1 : bLength                   :        7 :          7 : 
        :  1 :  1 : bDescriptorType           :        5 :          5 : 
        :  2 :  1 : bEndpointAddress          :        7 :          7 : Endpoint 7 - OUT
        :  3 :  1 : bmAttributes              :        3 :          3 : Interrupt
        :  4 :  2 : wMaxPacketSize            :       20 :         32 : 1 x 32 byte max packets
        :  6 :  1 : bInterval                 :        8 :          8 : 
        +----+----+---------------------------+----------+------------+

     Standard Interface Descriptor
    +----+----+---------------------------+----------+------------+
    :Off :Sz  :Name                       :Value hex :Value dec   :
    +----+----+---------------------------+----------+------------+
    :  0 :  1 : bLength                   :        9 :          9 : 
    :  1 :  1 : bDescriptorType           :        4 :          4 : 
    :  2 :  1 : bInterfaceNumber          :        7 :          7 : 
    :  3 :  1 : bAlternateSetting         :        0 :          0 : 
    :  4 :  1 : bNumEndpoints             :        2 :          2 : 
    :  5 :  1 : bInterfaceClass           :       ff :        255 : Vendor Specific
    :  6 :  1 : bInterfaceSubClass        :       5d :         93 : 
    :  7 :  1 : bInterfaceProtocol        :       82 :        130 : 
    :  8 :  1 : iInterface                :        0 :          0 : ''
    +----+----+---------------------------+----------+------------+

*** Unknown Descriptor ***
bLength:          12
bDescriptorType:  0x22 (34)
Byte   2:  0x00 (0)
Byte   3:  0x01 (1)
Byte   4:  0x01 (1)
Byte   5:  0x88 (136)
Byte   6:  0x00 (0)
Byte   7:  0x40 (64)
Byte   8:  0x01 (1)
Byte   9:  0x08 (8)
Byte  10:  0x20 (32)
Byte  11:  0x00 (0)

         Standard Endpoint Descriptor
        +----+----+---------------------------+----------+------------+
        :Off :Sz  :Name                       :Value hex :Value dec   :
        +----+----+---------------------------+----------+------------+
        :  0 :  1 : bLength                   :        7 :          7 : 
        :  1 :  1 : bDescriptorType           :        5 :          5 : 
        :  2 :  1 : bEndpointAddress          :       88 :        136 : Endpoint 8 - IN
        :  3 :  1 : bmAttributes              :        3 :          3 : Interrupt
        :  4 :  2 : wMaxPacketSize            :       20 :         32 : 1 x 32 byte max packets
        :  6 :  1 : bInterval                 :        2 :          2 : 
        +----+----+---------------------------+----------+------------+

         Standard Endpoint Descriptor
        +----+----+---------------------------+----------+------------+
        :Off :Sz  :Name                       :Value hex :Value dec   :
        +----+----+---------------------------+----------+------------+
        :  0 :  1 : bLength                   :        7 :          7 : 
        :  1 :  1 : bDescriptorType           :        5 :          5 : 
        :  2 :  1 : bEndpointAddress          :        8 :          8 : Endpoint 8 - OUT
        :  3 :  1 : bmAttributes              :        3 :          3 : Interrupt
        :  4 :  2 : wMaxPacketSize            :       20 :         32 : 1 x 32 byte max packets
        :  6 :  1 : bInterval                 :        4 :          4 : 
        +----+----+---------------------------+----------+------------+

Post Reply