On Thu, 26 Aug 2004 17:28 pm, bastgiraud wrote:
> Hi,
>
> I work on linux 2.4.20-8
Get a newer kernel.

> My project consist in sending and receiving data from device via USB.
>        Reading from device: NO problem
>        Writing to device: never successful on linux but works properly on
> windows So, I have already used 2 ways:
>
> 1) Hiddev
>
> The write fonction always returns me -1 with errno 22. And the hiddev_write
> fonction is like: /*
> * "write" file op
> */
> static ssize_t hiddev_write(struct file * file, const char __user * buffer,
> size_t count, loff_t *ppos) {
>        return -EINVAL;
> }
So you aren't meant to write. You are meant to use a pattern of ioctl() calls, 
as shown in the header file.

> 2) Evdev
>
> The write fonction always returns me 16 but my device receices nothing. It
> seems that the data was written is "/dev/input/event0" because when I do in
> this order an open, a write, a close, an open, a read, a close. All in the
> same file event0.
What is the Application set to in your device descriptor? Is it going to the 
input layer or to the hiddev?

IMPORTANT: As I've said before, if you want help, show me the code. Next time 
you do this, you go into my blacklist.

Brad

Attachment: pgpdoX0UAjV1o.pgp
Description: PGP signature

Reply via email to