-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Sun, 9 Feb 2003 05:46, John Homppi wrote: > The HID device interface would appear to be the answer except > the hiddev.c source code for 2.4.20 and 2.5.59 reads: > static ssize_t hiddev_write(...... > { > return -EINVAL; > } You don't understand. This means that the write() call doesn't work, rather than you cannot write to the device.
> If this actually wrote the buffer to the device then I would have > used the hiddev exclusively...... (I know there are problems with > implementing hiddev_write, but Microsoft has overcome similar > problems with Windows). You can write a buffer to device. But what? > WARNING: BRAIN ENGAGED.... thoughts are processing...... > Hey, maybe I could implement hiddev_write myself and submit > the code for inclusion in hiddev.c...... Naw, any implementation > would have to make numerous assumptions about the > characteristics of the USB device to the point of not being a > generic solution. Non-generic solutions are not acceptable for > inclusion in core kernel processing. This is the problem. It is difficult to make a sensible write() call, so we don't. We use a couple of ioctl() calls instead - HIDIOCSUSAGE and HIDIOCSREPORT http://www.frogmouth.net/hid-doco/examples/hiddev-misc/write-events.c is a really rough example that modifies the LEDs on a keyboard, sending hiddev events. I knocked it up at linux.conf.au 2002, and never got back to it. It is the only example I'm aware of though, so it might help. Look at the code at the bottom of the file, after the comment block. HTH Brad -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE+RjU+W6pHgIdAuOMRAu62AJ9LjgzIlko8dsYbCSriwxS/BbXGDQCdHV5B pUKmga/sjIgw2d2yvJccsAI= =mils -----END PGP SIGNATURE----- ------------------------------------------------------- This SF.NET email is sponsored by: SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See! http://www.vasoftware.com _______________________________________________ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel