I have a device (PowerLinc USB) that sends and receives 8 bytes of data. For reading, upon receiving an event I read the report, then the field, and then read the usage 8 times with the usage_index incremented for each read. It works perfectly.
Now, when I try to reverse that process with the following code, the system gives an error "usb_submit_urb(out)" and the HID system stops responding. This is all under kernel 2.6.0 and 2.6.1. for (i = 0; i < hidout.field_info.maxusage; i++) { hidout.usage_ref.report_type = hidout.rep_info.report_type; hidout.usage_ref.report_id = 0; hidout.usage_ref.field_index = 0; hidout.usage_ref.usage_index = i; hidout.usage_ref.value = c[i]; ioctl(fd,HIDIOCSUSAGE,&hidout.usage_ref); } hidout.rep_info.report_type = HID_REPORT_TYPE_OUTPUT; hidout.rep_info.report_id = 0; hidout.rep_info.num_fields = 1; ret = ioctl(fd,HIDIOCSREPORT,&hidout.rep_info); I have a module that is written to talk directly to the usb core that works by sending the 8 bytes in a urb exactly the same way that the 8 bytes are read from the device through a urb. The code for that is in the project wish.sourceforge.net and works just fine but has other side effects such as conflicting with HID and having to change with every kernel release. I want to convert to HID so that I stop chasing the changes in the kernel. Have I oversimplified my assumption that writing is the reverse of reading using the usage calls? I have seen multiple requests for information on how to write multiple bytes but I cannot find any direction or indication that someone has figured out how to actually do it. Any help is greatly appreciated. Scott ------------------------------------------------------- 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_id56&alloc_id438&op=click _______________________________________________ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-users