jung1981 / linux-track

Automatically exported from code.google.com/p/linux-track
MIT License
0 stars 0 forks source link

ltr_pipe with uinput output: ioctl(): Inappropriate ioctl for device #76

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Running 0.9.11, if I run ltr_pipe outputting to /dev/uinput, this happens:

$  ./ltr_pipe --format-uinput-abs --output-file=/dev/uinput
ltr_pipe: Initializing ltr_pipe
ltr_pipe: Initializing LinuxTrack library
ltr_pipe: Working
ltr_pipe: ioctl(): Inappropriate ioctl for device
ltr_pipe: Exiting
ltr_pipe: ioctl(): Inappropriate ioctl for device

I tried 0.9.10 and 0.9.8 and both gave the same result.

Without the --output-file portion, it outputs the binary data to STDOUT 
successfully.

Linux kernel version is 3.16.1, and /dev/uinput does exist.

Original issue reported on code.google.com by wenta...@gmail.com on 7 Nov 2014 at 4:57

GoogleCodeExporter commented 9 years ago
Hello,
may I ask you what distro are you using?

There are several things that might have gone wrong; to narrow down the 
possibilities, can you attach output of the following command?

ls -lsaF /dev/misc/uinput /dev/input/uinput /dev/uinput

Kind regards,

Michal

Original comment by f.jo...@email.cz on 7 Nov 2014 at 6:18

GoogleCodeExporter commented 9 years ago
Distro is gentoo.

$ ls -lsaF /dev/misc/uinput /dev/input/uinput /dev/uinput 
ls: cannot access /dev/misc/uinput: No such file or directory
ls: cannot access /dev/input/uinput: No such file or directory
156 -rw-rw-rw- 1 root root 157908 Nov  7 01:15 /dev/uinput

Original comment by wenta...@gmail.com on 7 Nov 2014 at 6:35

GoogleCodeExporter commented 9 years ago
Hello,
I'm affraid the file /dev/uinput is deffinitely wrong - it is supposed to be 
character device I think, but yours seem to be regular file... My guess is that 
it is a result of some experiment, where ltr_pipe just piped data to that file.

It seems you either don't have the uinput module compiled in your kernel, or 
you don't have it loaded ('sudo modprobe uinput' might do the trick, if you 
compiled it as a loadable module); http://wiki.gentoo.org/wiki/Logitech_G15 
provides some info (Kernel configuration shows what you need, the rest is 
irrelevant to linuxtrack). Also beware, that it seems that gentoo will use 
/dev/input/uinput path... Last but not least, don't forget the permissions (the 
setfacl works for me).

Kind regards,

Michal

Original comment by f.jo...@email.cz on 7 Nov 2014 at 7:35

GoogleCodeExporter commented 9 years ago
Thanks for providing support despite this being an issue on my end!

--output-file created /dev/uinput, leaving me to believe that I had uinput 
support compiled in without actually checking.

(this is resolved)

Original comment by wenta...@gmail.com on 7 Nov 2014 at 8:04

GoogleCodeExporter commented 9 years ago
It is OK, I'm glad that I could be of some help...

Please let me know whether you managed to resolve the problem, so I can 
eventually close this issue (in case you make it work, of course)...

Kind regards,

Michal

Original comment by f.jo...@email.cz on 7 Nov 2014 at 8:19

GoogleCodeExporter commented 9 years ago
Sorry, wasn't clear -- I got it working as of my previous comment.

Original comment by wenta...@gmail.com on 7 Nov 2014 at 8:30

GoogleCodeExporter commented 9 years ago
Thank you for letting me know... I'm closing this issue then.

Kind regards,

Michal

Original comment by f.jo...@email.cz on 7 Nov 2014 at 8:47