Discussion:
[libhid-discuss] Trying to repair a program using libhid to configure an Ultimarc Joystick
Andrew Silverman
2015-03-25 03:10:15 UTC
Permalink
Hi folks - question from newbie.

There is a piece of software that was written several years ago to allow Linux users to configure a USB joystick from Ultimarc. The company has Windows specific tools but no formal support for Linux.
The tool relies on libhid and the libusb-compat libraries. A recent firmware change for this joystick seems to have broken the current version of the Linux configuration tool and I am trying to get some help modifying it to work with this latest FW update.

The joystick is VID/PID d209:0511. It exposes three separate endpoints, EP 2 IN (0x82) which is the two-axis joystick, EP 1 IN which allows the joystick to sometimes behave as a mouse, and then there is EP 3 IN (0x83) which is evidently the endpoint that needs to be written to in order to configure the stick.

The present version of the application is successful at finding and force_opening the device, but I have a suspicion that it may not be writing to the correct endpoint with this latest firmware release. The stick manufacturer confirms that they used to use libusb under Windows, but with this latest release they use native Windows functionality to write to the HID device. They also confirm that EP3 is where the data's supposed to go. However, they haven't been entirely forthcoming with complete documentation of the vendor-specific protocol, but they claim no changes have been made in the actual data that needs to be transmitted to the device.

The existing version of the utility seems to rely on making calls to usb_control_msg() to actually send the data, but the behavior I see now with the latest firmware is that the line I've marked below with an arrow always fails with EPIPE, saying that the endpoint is stalled. (I added some debug prints to my copy of the code to inspect the return values, which the original author was ignoring.) Unfortunately I'm a little new to USB programming (at least at this level of detail) and am having a little difficulty in translating the calls the original author of the application (now unresponsive) is making into the commands in the USB spec, and therefore, what I would need to change in order to make a hopefully simple change to direct the traffic to endpoint EP 3, (if indeed that is the problem.)

I've included a snippet of the app below, please let me know if there's something reasonably obvious I can change to ensure that the data goes to the correct endpoint, or whether there is potentially some other avenue of investigation I should be looking at. I can always email the entire single source file (it's not very long) if you need to see more, but I think this is really the relevant piece. I don't want to rewrite the whole app, I just want to get it basically functional again. Thanks for any/all help!

// *********************Send Map Transfer*******************************
// This is only for Map Size = 9
//
// 3 "Data Write" Transfers of 32 Bytes
// -First Transfer-
// Byte[0] = 0x50 (Header)
// Byte[1] = 0x09 (Map Size?)
// Byte[2] = Restrictor (RestrictorOn = 0x09, RestrictorOff = 0x10)
// Byte[3]-Byte[10] = Map Border Location
// Byte[11]-Byte[31] = Mapping of Block Location. starting from topleft and read left to right.
//
// -Second Transfer-
// 32 Bytes - Continue Mapping of Block Location
//
// -Third Transfer-
// Byte[0]-Byte[27] - Continue Mapping of Block Location
// Byte[28]-Byte[30] - 0x00
// Byte[31] - (Write to Flash 0x00) (Write to RAM 0xFF, supported in Firmware 2.2)
//
//
// ****************************************************
// USB Mapping
// 0x00 = Analog (-)
// 0x01 = Center (C)
// 0x02 = Up (N)
// 0x03 = UPRight (NE)
// 0x04 = Right (E)
// 0x05 = DownRight (SE)
// 0x06 = Down (S)
// 0x07 = DownLeft (SW)
// 0x08 = Left (W)
// 0x09 = UPLeft (NW)
// 0x0A = Sticky (*)

// MapFileFormatVersion=1.0

// MapSize=9
// MapBorderLocations=30,58,86,114,142,170,198,226
// MapRow1=W,W,W,C,C,C,E,E,E
// MapRow2=W,W,W,C,C,C,E,E,E
// MapRow3=W,W,W,C,C,C,E,E,E
// MapRow4=W,W,W,C,C,C,E,E,E
// MapRow5=W,W,W,C,C,C,E,E,E
// MapRow6=W,W,W,C,C,C,E,E,E
// MapRow7=W,W,W,C,C,C,E,E,E
// MapRow8=W,W,W,C,C,C,E,E,E
// MapRow9=W,W,W,C,C,C,E,E,E

if(arguments.rowcount == 9){

int usbret = usb_control_msg(hid->dev_handle,0x43,0xE9,0x0001, 0 , NULL, 0,1000);
char data[32*3]; // 9*9 + 3 + 8 + 1 round up to nearest 32 block.
memset(data,0,sizeof(data));

data[0] = 0x50; // Byte[0] = 0x50 (Header)
data[1] = 0x09; // Byte[1] = 0x09 (Map Size?)
data[2] = ( arguments.restrictor ? 0x09 : 0x10 ); // Byte[2] = Restrictor (RestrictorOn = 0x09, RestrictorOff = 0x10)
data[95] = ( arguments.flash ? 0x00 : 0xFF ); // Byte[31] - (Write to Flash 0x00) (Write to RAM 0xFF, supported in Firmware 2.2)

if(arguments.border_set){
// Byte[3]-Byte[10] = Map Border Location
memcpy(&data[3],arguments.border,sizeof(arguments.border));
}

memcpy(&data[11],arguments.matrix,9*9);

for(int i=0;i<3;i++){
usbret = usb_control_msg(hid->dev_handle,0x43,0xEB,0x0000, 0 , data+(32*i), sizeof(data)/3,1000);

This fails----------------> usbret = usb_control_msg(hid->dev_handle,0xC3,0xEA,0x0000, 0 , NULL, 0 ,1000);

}

usbret = usb_control_msg(hid->dev_handle,0x43,0xE9,0x0000, 0 , NULL, 0,1000);
}
}
Charles Lepple
2015-03-25 03:32:49 UTC
Permalink
Hi folks – question from newbie.
There is a piece of software that was written several years ago to allow Linux users to configure a USB joystick from Ultimarc. The company has Windows specific tools but no formal support for Linux.
The tool relies on libhid and the libusb-compat libraries. A recent firmware change for this joystick seems to have broken the current version of the Linux configuration tool and I am trying to get some help modifying it to work with this latest FW update.
An aside: libhid is not under active development anymore. There is another project called HIDAPI (http://www.signal11.us/oss/hidapi/) which is even more cross-platform than libhid. Also, if you only need the force_open call, that is pretty easy to pull out of libhid so that you only need libusb.
The joystick is VID/PID d209:0511. It exposes three separate endpoints, EP 2 IN (0x82) which is the two-axis joystick, EP 1 IN which allows the joystick to sometimes behave as a mouse, and then there is EP 3 IN (0x83) which is evidently the endpoint that needs to be written to in order to configure the stick.
The IN/OUT nomenclature is relative to the host. So your application can only write to OUT endpoints (and EP0, which is bidirectional, and uses usb_control_msg())
The present version of the application is successful at finding and force_opening the device, but I have a suspicion that it may not be writing to the correct endpoint with this latest firmware release. The stick manufacturer confirms that they used to use libusb under Windows, but with this latest release they use native Windows functionality to write to the HID device. They also confirm that EP3 is where the data’s supposed to go. However, they haven’t been entirely forthcoming with complete documentation of the vendor-specific protocol, but they claim no changes have been made in the actual data that needs to be transmitted to the device.
Is there an EP3 OUT (0x03) endpoint? The output of 'lsusb -vvv -d d209:0511' can help here.
The existing version of the utility seems to rely on making calls to usb_control_msg() to actually send the data, but the behavior I see now with the latest firmware is that the line I’ve marked below with an arrow always fails with EPIPE, saying that the endpoint is stalled. (I added some debug prints to my copy of the code to inspect the return values, which the original author was ignoring.) Unfortunately I’m a little new to USB programming (at least at this level of detail) and am having a little difficulty in translating the calls the original author of the application (now unresponsive) is making into the commands in the USB spec, and therefore, what I would need to change in order to make a hopefully simple change to direct the traffic to endpoint EP 3, (if indeed that is the problem.)
I’ve included a snippet of the app below, please let me know if there’s something reasonably obvious I can change to ensure that the data goes to the correct endpoint, or whether there is potentially some other avenue of investigation I should be looking at. I can always email the entire single source file (it’s not very long) if you need to see more, but I think this is really the relevant piece. I don’t want to rewrite the whole app, I just want to get it basically functional again. Thanks for any/all help!
In the following excerpt, it looks like the data buffer is being broken up into three chunks. Although you are getting the EPIPE error on the second call, the previous line is sending the 32-byte data blocks. If there is an EP3OUT endpoint, the first usb_control_msg() probably needs to be changed to usb_interrupt_write(). The second one might still be needed for synchronization.

If there is no EP3OUT, another possibility is that the destination bits in requesttype and request might be wrong.
for(int i=0;i<3;i++){
usbret = usb_control_msg(hid->dev_handle,0x43,0xEB,0x0000, 0 , data+(32*i), sizeof(data)/3,1000);
This fails----------------> usbret = usb_control_msg(hid->dev_handle,0xC3,0xEA,0x0000, 0 , NULL, 0 ,1000);
}
usbret = usb_control_msg(hid->dev_handle,0x43,0xE9,0x0000, 0 , NULL, 0,1000);
--
- Charles Lepple
http://ghz.cc/charles/
Andrew Silverman
2015-03-25 03:43:15 UTC
Permalink
Thank you Charles - if I REALLY have to I may try to rewrite it, but I'd love to just get this version working with a quick fix rather than undertaking that (if possible. :))

Some answers to your questions:

1) Interestingly, after unbinding all three of the HID instances and doing lsusb -vvv as you describe, there are NO EP OUTs. All three are listed as EP x IN, Interrupt, Sync None, Usage Data. I find this a little mystifying myself, I'm not sure if the descriptors in the stick's firmware are incorrect, or what, but obviously their Windows utility is able to program the thing correctly. :-/

2) Per your comment "If there is no EP3OUT, another possibility is that the destination bits in requesttype and request might be wrong." Well, yeah, there is none. I'm having some trouble understanding how to set up the destination bits correctly for requesttype/request - When I looked at the USB 2 spec tables that describe these, they just don't seem to correspond in a sensible way to the values the original author was using, and so I'm a bit lost.
Again, thanks very much.

Andy

From: Charles Lepple [mailto:***@ghz.cc]
Sent: Tuesday, March 24, 2015 8:33 PM
To: Andrew Silverman
Cc: libhid-***@lists.alioth.debian.org
Subject: Re: [libhid-discuss] Trying to repair a program using libhid to configure an Ultimarc Joystick

On Mar 24, 2015, at 11:10 PM, Andrew Silverman <***@microsoft.com<mailto:***@microsoft.com>> wrote:


Hi folks - question from newbie.

There is a piece of software that was written several years ago to allow Linux users to configure a USB joystick from Ultimarc. The company has Windows specific tools but no formal support for Linux.
The tool relies on libhid and the libusb-compat libraries. A recent firmware change for this joystick seems to have broken the current version of the Linux configuration tool and I am trying to get some help modifying it to work with this latest FW update.


An aside: libhid is not under active development anymore. There is another project called HIDAPI (http://www.signal11.us/oss/hidapi/) which is even more cross-platform than libhid. Also, if you only need the force_open call, that is pretty easy to pull out of libhid so that you only need libusb.

The joystick is VID/PID d209:0511. It exposes three separate endpoints, EP 2 IN (0x82) which is the two-axis joystick, EP 1 IN which allows the joystick to sometimes behave as a mouse, and then there is EP 3 IN (0x83) which is evidently the endpoint that needs to be written to in order to configure the stick.

The IN/OUT nomenclature is relative to the host. So your application can only write to OUT endpoints (and EP0, which is bidirectional, and uses usb_control_msg())


The present version of the application is successful at finding and force_opening the device, but I have a suspicion that it may not be writing to the correct endpoint with this latest firmware release. The stick manufacturer confirms that they used to use libusb under Windows, but with this latest release they use native Windows functionality to write to the HID device. They also confirm that EP3 is where the data's supposed to go. However, they haven't been entirely forthcoming with complete documentation of the vendor-specific protocol, but they claim no changes have been made in the actual data that needs to be transmitted to the device.

Is there an EP3 OUT (0x03) endpoint? The output of 'lsusb -vvv -d d209:0511' can help here.

The existing version of the utility seems to rely on making calls to usb_control_msg() to actually send the data, but the behavior I see now with the latest firmware is that the line I've marked below with an arrow always fails with EPIPE, saying that the endpoint is stalled. (I added some debug prints to my copy of the code to inspect the return values, which the original author was ignoring.) Unfortunately I'm a little new to USB programming (at least at this level of detail) and am having a little difficulty in translating the calls the original author of the application (now unresponsive) is making into the commands in the USB spec, and therefore, what I would need to change in order to make a hopefully simple change to direct the traffic to endpoint EP 3, (if indeed that is the problem.)

I've included a snippet of the app below, please let me know if there's something reasonably obvious I can change to ensure that the data goes to the correct endpoint, or whether there is potentially some other avenue of investigation I should be looking at. I can always email the entire single source file (it's not very long) if you need to see more, but I think this is really the relevant piece. I don't want to rewrite the whole app, I just want to get it basically functional again. Thanks for any/all help!


In the following excerpt, it looks like the data buffer is being broken up into three chunks. Although you are getting the EPIPE error on the second call, the previous line is sending the 32-byte data blocks. If there is an EP3OUT endpoint, the first usb_control_msg() probably needs to be changed to usb_interrupt_write(). The second one might still be needed for synchronization.

If there is no EP3OUT, another possibility is that the destination bits in requesttype and request might be wrong.


for(int i=0;i<3;i++){
usbret = usb_control_msg(hid->dev_handle,0x43,0xEB,0x0000, 0 , data+(32*i), sizeof(data)/3,1000);

This fails----------------> usbret = usb_control_msg(hid->dev_handle,0xC3,0xEA,0x0000, 0 , NULL, 0 ,1000);

}

usbret = usb_control_msg(hid->dev_handle,0x43,0xE9,0x0000, 0 , NULL, 0,1000);


--
- Charles Lepple
http://ghz.cc/charles/
Xiaofan Chen
2015-03-25 03:57:26 UTC
Permalink
On Wed, Mar 25, 2015 at 11:43 AM, Andrew Silverman
I’m having some trouble understanding how to set up the
destination bits correctly for requesttype/request – When I looked at the
USB 2 spec tables that describe these, they just don’t seem to correspond in
a sensible way to the values the original author was using, and so I’m a bit
lost.
Ref: Ch7 of the HID spec should be good for you.
http://www.usb.org/developers/hidpage/HID1_11.pdf

Some cheat codes for you, from Linux USB developer
Alan Stern. It might help you to translate HID report
read/write to control IN/OUT transfer.

Standard device requests

RQtype Req Value Index Length
----------------------------------------------
0 1 dev-feat 0 0 Clear device feature
0 3 dev-feat 0 0 Set device feature
0 5 address 0 0 Set device address
0 9 config-value 0 0 Set configuration
1 b altsetting intf 0 Set interface
1 1 intf-feat intf 0 Clear interface feature
1 3 intf-feat intf 0 Set interface feature
2 1 ep-feat ep 0 Clear endpoint feature
2 3 ep-feat ep 0 Set endpoint feature
80 0 0 0 2 Get device status
80 6 descr-type/ 0/ len Get descriptor
index lang-ID
80 8 0 0 1 Get configuration
81 0 0 intf 2 Get interface status
81 a 0 intf 1 Get interface (altsetting)
82 0 0 ep 2 Get endpoint status

Device features: 0 = self-powered, 1 = remote wakeup
Interface features: None
Endpoint features: 0 = halt
Descriptor types: 1 = device, 2 = config, 3 = string, (4 = interface,
5 = endpoint), 6 = device qualifier, 7 = other-speed config

HID class requests

RQtype Req Value Index Length
----------------------------------------------
21 9 report-type/ID intf len Set report
21 a duration/ID intf 0 Set idle
21 b proto intf 0 Set protocol
81 6 descr-type/set intf len Get class descriptor
a1 1 report-type/ID intf len Get report
a1 2 0/ID intf 1 Get idle
a1 3 0 intf 1 Get protocol

Report type: 1 = input, 2 = output, 3 = feature
Descriptor type: 21 = HID, 22 = Report, 23 = Physical
Protocol: 0 = boot, 1 = report
--
Xiaofan
Andrew Silverman
2015-03-25 04:12:18 UTC
Permalink
What I don't really understand is the 0x43/0xC3 bytes for requesttype and the E9/EA/EB values in request. (Assuming that I am correctly understanding those param mappings in the existing calls to usb_control_msg, anyway.) I can't seem to find anything in the description of USB control messages that makes those values make sense.

-----Original Message-----
From: Xiaofan Chen [mailto:***@gmail.com]
Sent: Tuesday, March 24, 2015 8:57 PM
To: Andrew Silverman
Cc: libhid-***@lists.alioth.debian.org
Subject: Re: [libhid-discuss] Trying to repair a program using libhid to configure an Ultimarc Joystick
I’m having some trouble understanding how to set up the destination
bits correctly for requesttype/request – When I looked at the USB 2
spec tables that describe these, they just don’t seem to correspond in
a sensible way to the values the original author was using, and so I’m
a bit lost.
Ref: Ch7 of the HID spec should be good for you.
http://www.usb.org/developers/hidpage/HID1_11.pdf

Some cheat codes for you, from Linux USB developer Alan Stern. It might help you to translate HID report read/write to control IN/OUT transfer.

Standard device requests

RQtype Req Value Index Length
----------------------------------------------
0 1 dev-feat 0 0 Clear device feature
0 3 dev-feat 0 0 Set device feature
0 5 address 0 0 Set device address
0 9 config-value 0 0 Set configuration
1 b altsetting intf 0 Set interface
1 1 intf-feat intf 0 Clear interface feature
1 3 intf-feat intf 0 Set interface feature
2 1 ep-feat ep 0 Clear endpoint feature
2 3 ep-feat ep 0 Set endpoint feature
80 0 0 0 2 Get device status
80 6 descr-type/ 0/ len Get descriptor
index lang-ID
80 8 0 0 1 Get configuration
81 0 0 intf 2 Get interface status
81 a 0 intf 1 Get interface (altsetting)
82 0 0 ep 2 Get endpoint status

Device features: 0 = self-powered, 1 = remote wakeup Interface features: None Endpoint features: 0 = halt Descriptor types: 1 = device, 2 = config, 3 = string, (4 = interface,
5 = endpoint), 6 = device qualifier, 7 = other-speed config

HID class requests

RQtype Req Value Index Length
----------------------------------------------
21 9 report-type/ID intf len Set report
21 a duration/ID intf 0 Set idle
21 b proto intf 0 Set protocol
81 6 descr-type/set intf len Get class descriptor
a1 1 report-type/ID intf len Get report
a1 2 0/ID intf 1 Get idle
a1 3 0 intf 1 Get protocol

Report type: 1 = input, 2 = output, 3 = feature Descriptor type: 21 = HID, 22 = Report, 23 = Physical
Protocol: 0 = boot, 1 = report
--
Xiaofan
Xiaofan Chen
2015-03-25 04:58:50 UTC
Permalink
On Wed, Mar 25, 2015 at 12:12 PM, Andrew Silverman
Post by Andrew Silverman
What I don't really understand is the 0x43/0xC3 bytes for requesttype
and the E9/EA/EB values in request. (Assuming that I am correctly understanding
those param mappings in the existing calls to usb_control_msg, anyway.)
I can't seem to find anything in the description of USB control messages that
makes those values make sense.
The requests from 0x40 to 0x43 (and 0x80 to 0x83) are specifically defined
as "vendor" messages, where the vendor can assign any meaning they want.

So you have to carry out reverse engineering to try to understand.

Ref: USB 2.0 Specification Chapter 9.
http://www.usb.org/developers/docs/usb20_docs/


9.3 USB Device Requests

All USB devices respond to requests from the host on the device’s Default
Control Pipe. These requests are made using control transfers. The request
and the request’s parameters are sent to the device in the Setup packet.
The host is responsible for establishing the values passed in the fields
listed in Table 9-2. EverySetup packet has eight bytes.

Table 9-2. Format of Setup Data

Offset: 0
Field: bmRequestType
Size: 1
Value: Bitmap

Characteristics of request:
D7: Data transfer direction
0 = Host-to-device
1 = Device-to-host
D6...5: Type
0 = Standard
1 = Class
2 = Vendor
3 = Reserved
D4...0: Recipient
0 = Device
1 = Interface
2 = Endpoint
3 = Other
4...31 = Reserved
--
Xiaofan
Andrew Silverman
2015-03-25 05:54:01 UTC
Permalink
Interesting. I just captured some USB traffic of the manufacturer's tool uploading the data on Windows and the traffic looks pretty straightforward.

Everything is sent as a control setup packet, so I don't know where this idea came from that it needs to be written to endpoint 3 like the manufacturer was telling me :-/. In each setup packet, the request type is 21 (Class_Interface, if I'm not mistaken), and the request is always 9 (Configure), but then the Value and Index don't make a lot of sense (0x200 and 0x2, respectively?)

Each control setup packet seems to also send 4 bytes of actual data, matching the format shown in the comments of the Linux application (Starts with 0x50, 0x09, and goes on from there.)

Now I just need to figure out how to match that USB traffic from the Linux app. Given what I see here, it still seems like sending control messages (albeit perhaps shorter ones, i.e. 4 bytes at a time rather than 32?) might be the right way to go.

-----Original Message-----
From: Xiaofan Chen [mailto:***@gmail.com]
Sent: Tuesday, March 24, 2015 9:59 PM
To: Andrew Silverman
Cc: libhid-***@lists.alioth.debian.org
Subject: Re: [libhid-discuss] Trying to repair a program using libhid to configure an Ultimarc Joystick
Post by Andrew Silverman
What I don't really understand is the 0x43/0xC3 bytes for requesttype
and the E9/EA/EB values in request. (Assuming that I am correctly
understanding those param mappings in the existing calls to
usb_control_msg, anyway.) I can't seem to find anything in the
description of USB control messages that makes those values make sense.
The requests from 0x40 to 0x43 (and 0x80 to 0x83) are specifically defined as "vendor" messages, where the vendor can assign any meaning they want.

So you have to carry out reverse engineering to try to understand.

Ref: USB 2.0 Specification Chapter 9.
http://www.usb.org/developers/docs/usb20_docs/


9.3 USB Device Requests

All USB devices respond to requests from the host on the device’s Default Control Pipe. These requests are made using control transfers. The request and the request’s parameters are sent to the device in the Setup packet.
The host is responsible for establishing the values passed in the fields listed in Table 9-2. EverySetup packet has eight bytes.

Table 9-2. Format of Setup Data

Offset: 0
Field: bmRequestType
Size: 1
Value: Bitmap

Characteristics of request:
D7: Data transfer direction
0 = Host-to-device
1 = Device-to-host
D6...5: Type
0 = Standard
1 = Class
2 = Vendor
3 = Reserved
D4...0: Recipient
0 = Device
1 = Interface
2 = Endpoint
3 = Other
4...31 = Reserved
--
Xiaofan
Charles Lepple
2015-03-25 11:42:32 UTC
Permalink
Post by Andrew Silverman
Now I just need to figure out how to match that USB traffic from the Linux app. Given what I see here, it still seems like sending control messages (albeit perhaps shorter ones, i.e. 4 bytes at a time rather than 32?) might be the right way to go.
There is a maximum packet size in the lsusb output, but I wouldn't expect an EPIPE error if that did not match. Still something to try, though - EP0 is a little different than the other endpoints.
--
- Charles Lepple
http://ghz.cc/charles/
Andrew Silverman
2015-03-25 19:26:59 UTC
Permalink
One more question: Is there a way when doing the HIDInterfaceMatcher (via custom matching function or otherwise?) to pick a different endpoint? I'm experimenting with altering the code altogether to use the one visible HID Output Report instead of the control endpoint, but the one defining the output report is the third HID interface in the lsusb output. (Associated with endpoint 3, I think). Maybe I have the terminology wrong, but when matching just by VID/PID, the libhid code always takes the first HID interface (I can see it in hid_prepare_parser() debug output), and I need to get it to ignore the first two and pick up the third instead.

_____________________________
Andy Silverman
Andrew Silverman
2015-03-25 19:48:04 UTC
Permalink
Answered my own question. Found the interface selection parameter on the force_open call. It's writing successful output reports now! Now I just have to wait till I get home to see whether it has the intended effect on the stick behavior.

_____________________________
Andy Silverman
Principal Program Manager, Microsoft Manufacturing Test Engineering
"Another day with no plans to use calculus."

-----Original Message-----
From: Andrew Silverman
Sent: Wednesday, March 25, 2015 12:26 PM
To: libhid-***@lists.alioth.debian.org
Subject: RE: [libhid-discuss] Trying to repair a program using libhid to configure an Ultimarc Joystick

One more question: Is there a way when doing the HIDInterfaceMatcher (via custom matching function or otherwise?) to pick a different endpoint? I'm experimenting with altering the code altogether to use the one visible HID Output Report instead of the control endpoint, but the one defining the output report is the third HID interface in the lsusb output. (Associated with endpoint 3, I think). Maybe I have the terminology wrong, but when matching just by VID/PID, the libhid code always takes the first HID interface (I can see it in hid_prepare_parser() debug output), and I need to get it to ignore the first two and pick up the third instead.

_____________________________
Andy Silverman

Loading...