hid2usb error
Subsystems (2)
Hi there,
I've the Logitech diNovo Bluetooth kit, and try to use it as BT device. So, i've bluez-libs2 & bluez-utils2 to use the hid2hci tool to pass my Logitech USB HUB to an Bluetooth HUB.
Kernel 2.6.2-mh
hid module loaded.
Running the hid2usb give :
Invalid argument ...
After some investigations, it appear that the following line return the error (around line 240) :
err = send_report(fd, rep1, sizeof(rep1))
at the 2nd byte send (0xff 0x80)
Anyone can help me, plz ?
Regards
--Alexandre
-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps & Web services for Linux with a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
_______________________________________________
Bluez-users mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users
Marcel Holtmann
maintainerHi Alexandre,
Quoted 10 lines
I've the Logitech diNovo Bluetooth kit, and try to use it as BT device. So, i've bluez-libs2 & bluez-utils2 to use the hid2hci tool to pass my Logitech USB HUB to an Bluetooth HUB.
Kernel 2.6.2-mh
hid module loaded.Running the hid2usb give :
Invalid argument ...
Quoted 6 lines
After some investigations, it appear that the following line return the error (around line 240) :
err =
send_report(fd, rep1, sizeof(rep1))at the 2nd byte send (
0xff0x80)
you need a patch for the USB HID driver to send multiple bytes. I think it is not included so far. Must be pending in Greg's list.
Regards
Marcel
-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps & Web services for Linux with a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
_______________________________________________
Bluez-users mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users
Hi Marcel,
Can I find this patch somewhere ?
Thanks for your time
..Alexandre
Quoted 26 lines · Marcel Holtmann
Hi Alexandre,
Quoted 10 lines
I've the Logitech diNovo Bluetooth kit, and try to use it as BT device. So, i've bluez-libs2 & bluez-utils2 to use the hid2hci tool to pass my Logitech USB HUB to an Bluetooth HUB.
Kernel 2.6.2-mh
hid module loaded.Running the hid2usb give :
Invalid argument ...Quoted 6 lines
After some investigations, it appear that the following line return the error (around line 240) :
err =
send_report(fd, rep1, sizeof(rep1))at the 2nd byte send (
0xff0x80)you need a patch for the USB HID driver to send multiple bytes. I think it is not included so far. Must be pending in Greg's list.
Regards
Marcel
Marcel Holtmann
maintainerHi Alexandre,
Quoted 1 line
Can I find this patch somewhere ?
in the Linux USB development mailing list archive. I searched for you and attached it.
Regards
Marcel
drivers/usb/input/hid-core.c +9 -2
@@ -224,6 +224,9 @@ offset = report->size; report->size += parser->global.report_size * parser->global.report_count; +if (usages < parser->global.report_count) + usages = parser->global.report_count; +if (usages ==0 )return 0 ;/* ignore padding fields */
@@ -235,9 +238,13 @@ field->application =hid_lookup_collection (parser,HID_COLLECTION_APPLICATION );for (i =0 ; i < usages; i++) { - field->usage[i].hid = parser->local.usage[i]; +int j = i; +/* Duplicate the last usage we parsed if we have excess values */ +if (i >= parser->local.usage_index) + j = parser->local.usage_index -1 ; + field->usage[i].hid = parser->local.usage[j]; field->usage[i].collection_index = - parser->local.collection_index[i]; + parser->local.collection_index[j]; } field->maxusage = usages;
Hum,
Many thanks, it's working now !!
Regards
--Alexandre
Quoted 11 lines · Marcel Holtmann
Hi Alexandre,
Quoted 1 line
Can I find this patch somewhere ?
in the Linux USB development mailing list archive. I searched for you and attached it.
Regards
Marcel