Hi, I am trying to set leds on sixaxis now, and the code I have works OK with libusb, but the equivalent for hidraw does not. The procedure to set leds is to send an output report 0x01 with the correct data. After looking at drivers/usbhid/hid-core.c in usbhid_output_raw_report() I see that output reports are sent over the interrupt endpoint when hid->urbout is defined (that is when the device has an interrupt out ep, right?), but it looks like this particular device is accepting output reports only on the _control_ endpoint; this is exactly what the working libusb version does btw. Just for the record, this dumb hack makes setting leds work on sixaxis with hidraw: diff --git a/drivers/hid/usbhid/hid-core.c b/drivers/hid/usbhid/hid-core.c index df80532..731c08c 100644 --- a/drivers/hid/usbhid/hid-core.c +++ b/drivers/hid/usbhid/hid-core.c @@ -841,7 +841,7 @@ static int usbhid_output_raw_report(struct hid_device *hid, __u8 *buf, size_t co struct usb_host_interface *interface = intf->cur_altsetting; int ret; - if (usbhid->urbout && report_type != HID_FEATURE_REPORT) { + if (0 && usbhid->urbout && report_type != HID_FEATURE_REPORT) { int actual_length; int skipped_report_id = 0; if (buf[0] == 0x0) { If you are interested in the userspace programs, just ping me. What can I do to handle this properly? Add another quirk? Something like HID_QUIRK_NO_INTERRUPT_OUT_EP or HID_QUIRK_FORCE_CONTROL_OUT_EP? Thanks, Antonio -- Antonio Ospite http://ao2.it PGP public key ID: 0x4553B001 A: Because it messes up the order in which people normally read text. See http://en.wikipedia.org/wiki/Posting_style Q: Why is top-posting such a bad thing?
Attachment:
pgpwFv1x0IuLA.pgp
Description: PGP signature