LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   Joystick connection troubles (https://www.linuxquestions.org/questions/linux-hardware-18/joystick-connection-troubles-522154/)

ma1069 01-23-2007 04:54 PM

Joystick connection troubles
 
Hello,

I'm trying to connect a joystick to a particular embedded Linux system (FOX board) that hasn't got the majority of the tools you can currently use in a normal distribution: expecially, it hasn't got commands like "lspci", "hwinfo" and so on.
The strange thing is that I can't find the position where the device node is placed: I've searched onto the /dev/ folder, but there isn't anything like jsXXX or input/jsXXX...

I've read the /var/log/messages, but honestly I haven't understood it so much:

Quote:

Jan 1 00:02:43 axis kernel: usb 1-2: new low speed USB device using hc-crisv10 and address 4
Jan 1 00:02:43 axis kernel: input: Padix Co. Ltd. QZ 501 PREDATOR as /class/input/input0
Jan 1 00:02:43 axis kernel: input: USB HID v1.00 Joystick [Padix Co. Ltd. QZ 501 PREDATOR ] on usb-hc-crisv10.0-2
What do you think it is /class/input/input0 ??? I really have no clue about it... and unfortunately I can't do further investigations because I don't have many other tools


I hope that someone could help me
Thank You

ma1069

ma1069 01-25-2007 12:42 PM

Update...

Already solved :)

Thnxs anyway

Vitalie Ciubotaru 06-02-2007 02:35 PM

You can tell other people how you solved it. You know, there are lot of guys, searching old posts instead of asking the same question.

ma1069 06-03-2007 04:05 AM

Ok ;)

I've discovered that the device doesn't create the node by himself! YOU have to create it, with this simple instruction:

Code:

cd /dev/
exec mknod js0 c 13 0

And, if you have more than a single joystick,

Code:

exec mknod js0 c 13 0
exec mknod js1 c 13 1
exec mknod js2 c 13 2
exec mknod js3 c 13 3

To try if it works, I've downloaded the code of the tool jstest, i've recompiled for my embedded platform and... everything works perfectly! Even with nonstandard joysticks like the xbox360 gamepad ;)

[edit: I'm sorry, i haven't posted the solution before because i've found it in a similar old post of this same site... but when I've posted my question I didn't know what to search exactly! It was my first try with joysticks in linux... I didn't even know what a Node is, exactly]


All times are GMT -5. The time now is 08:42 AM.