I was pretty skeptical when I looked at the patch because my drivers that
talk directly to the usb-core use bulk writes if the kernel version is
2.4.21 or 22 (because ints were broken in those versions).  But, after
applying the patch to usb-core the system works as expected and I can both
read and write to the hiddev.

Now it is time for me to overcome the "hid-core.c: output queue full" issue.

Progress is great!

John, thanks for the pointer and help!!!

Scott

> -----Original Message-----
> From: John Cheevers [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, February 17, 2004 9:49 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [linux-usb-devel] How do I write 8 bytes to a 
> HIDDEV device?
> 
> 
> 
> Scott Hiles wrote:
> 
>  > 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.
> 
> Keep going... you need 2.6.1-rc1.
> 
> The hid-core.c patch described here
>   
> http://marc.theaimsgroup.com/?l=linux-usb-> devel&m=107357664829164&w=2
> is necessary.
> 
> The reason the bug causes the HID system to stop responding 
> is described 
> here:
>   
> http://marc.theaimsgroup.com/?l=linux-usb-> devel&m=107388393607401&w=2
> That bug is still there, for the moment, but no longer gets exercised.
> 
>  > Have I oversimplified my assumption that writing is the reverse of 
> reading
>  > using the usage calls?     
> 
> The code you included is the correct way to do it.  I have 
> the same PowerLinc device working with identical code.  
> (Except check your ioctl return values for EBUSY)
> 
> Later,
> Charles Lepple wrote:
> 
>  > Given the large installed user base with the (somewhat 
> broken) hiddev  > kernel driver, I can see the appeal [to 
> using hiddev], but you may want  > to consider the 
> libhid/libusb approach.
> 
> Hiddev works for me.  Can you elaborate on what else might be 
> broken and should be looked at?
> 
> John Cheevers                     
> 
> >  
> >
> 
> 



-------------------------------------------------------
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-devel

Reply via email to