Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
HOWTO: Joystick Setup
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
Exdaix
n00b
n00b


Joined: 08 Aug 2003
Posts: 40

PostPosted: Sat Apr 10, 2004 4:47 pm    Post subject: HOWTO: Joystick Setup Reply with quote

[Changelog]
For future reference, this article has been moved to the Gentoo-Wiki (http://www.gentoo-wiki.com), and will be updated there from now on.


[Information]
I noticed in quite a few posts that a HOWTO for joysticks was needed, so I figured I would start one with what I did to get my joystick working. Feel free to post some replies with more tips and info, I will include it in the main post here.

First off, I just bought a Saitek Cyborg Evo joystick (USB), and I am running the 2.4 kernel. I will be glad to modify this post to include a 2.6 section, but I am not knowledgeable in that area, so I will not write about that yet. I could not get my old gameport joystick to work on either my sound card, or my motherboard gameport, so this will be a USB HOWTO for now.


[USB Setup]
Ok, first thing I did was emerge libjsw, so I had all the joystick tools and libraries ready, and so I would not forget later.

Code:
su
emerge libjsw


Now go into your kernel menu.

Code:
cd /usr/src/linux
make menuconfig


Turn on the following options in your kernel:

Code:
Input Core Support --->
 <*> Input Core Support
 <*> Joystick Support
 <*> Event Interface Support
USB Support -->
 <*> Support for USB
 [*] Preliminary USB device filesystem
 <*> UHCI Alternate Driver (JE) support
 <*> OHCI (Compaq, iMacs, OPTi, SiS, ALi, ...) support
 <*> USB Human Interface Device (full HID) support
 [*] HID input layer support


Then compile your kernel and copy it to /boot and run grub or lilo:

Code:
make dep && make bzImage modules modules_install
mount /boot
cp arch/i386/boot/bzImage /boot/bzImage
lilo


Reboot, then do a dmesg.

Code:
dmesg


Look for USB and Joystick information.

Code:
hub.c: new USB device 00:07.3-2, assigned address 2
input: USB HID v1.00 Joystick [06a3:0464] on usb2:2.0


If you see something like this, then your joystick is detected and should work.

Now, since I could not find out how to download/install the old jscal program and utilities, I just used the joystick calibration program included in the libjsw package.

Code:
jscalibrator


That will create a .joystick file in your ~/home directory, so now your joystick should be ready for play in gl-117 or SearchAndRescue.


[FlightGear]
I've noticed that in FlightGear, if you run jscalibrator and run FlightGear on the same boot, FlightGear won't do much except use your trigger button as the brakes. But I discovered that if you reboot and do not run jscalibrator that boot, FlightGear uses the joystick just fine, and games such as gl-117 are still calibrated and still work because of the .joystick file that was created last boot. For some reason, jscalibrator seems to do something funky that FlightGear does not like, and you have to reboot each time you run jscalibrator. It's not a big deal for me, since my joystick does not go out of calibration often.

Also, for some reason, the js_demo program that comes with FlightGear does not show axis movement unless I unplug and re-plug the joystick back in. (I have hotplug installed and setup, so the kernel just detects the joystick every time its plugged back in.) This in turn, does not let you configure your joystick with fgjs correctly, since it is not detecting the axis movement. So I discovered if you unplug and re-plug the joystick back into the USB port, js_demo and fgjs detect the axis movement.


Last edited by Exdaix on Mon Jul 05, 2004 5:18 pm; edited 1 time in total
Back to top
View user's profile Send private message
soroh6
Apprentice
Apprentice


Joined: 07 Nov 2002
Posts: 231

PostPosted: Mon Jul 05, 2004 5:14 pm    Post subject: Reply with quote

Thanks. :)
_________________
:: soroh -*~
Back to top
View user's profile Send private message
Exdaix
n00b
n00b


Joined: 08 Aug 2003
Posts: 40

PostPosted: Mon Jul 05, 2004 5:17 pm    Post subject: Gentoo-Wiki Reply with quote

For future reference, this article has been moved to the Gentoo-Wiki (http://www.gentoo-wiki.com), and will be updated there from now on.
Back to top
View user's profile Send private message
X-Drum
Advocate
Advocate


Joined: 24 Aug 2003
Posts: 2517
Location: ('Modica','Trieste','Ferrara') Italy

PostPosted: Mon Jul 05, 2004 8:43 pm    Post subject: Reply with quote

hi,
you know if this works with sidewinder usb joypads??
_________________
"...There are two sort of lies, lies and benchmarks..."
Back to top
View user's profile Send private message
Exdaix
n00b
n00b


Joined: 08 Aug 2003
Posts: 40

PostPosted: Mon Jul 05, 2004 8:48 pm    Post subject: Reply with quote

It _should_, but I make no garuntees.

I remember reading a lot of stuff about Sidewinder products while making this HOWTO.
Back to top
View user's profile Send private message
zaiyon
Apprentice
Apprentice


Joined: 19 May 2004
Posts: 219
Location: Germany

PostPosted: Sat Jul 17, 2004 8:19 pm    Post subject: Reply with quote

Hi, as you said you don't know where to find these options in 2.6er Kernels, but I would love to use my Saitek Cyborg Evo 3D Thing on a 2.6.7 Kernel, does anybody know where I can find these options:

Code:

Input Core Support --->
 <*> Input Core Support
 <*> Joystick Support
 <*> Event Interface Support
USB Support -->
 [*] Preliminary USB device filesystem


In newer menuconfigs?

I activated the following:

Code:

Input Device Support --->
 <*> Joystick interface
 <*> Event interface
 [*] Joysticks


But I didn't chose a specific Joystick, because my one was not with those listet...
_________________
What do you have when you have six lawyers buried up to their necks in sand? Not enough sand.
My Project - open Outcast
Back to top
View user's profile Send private message
Exdaix
n00b
n00b


Joined: 08 Aug 2003
Posts: 40

PostPosted: Sat Jul 17, 2004 11:26 pm    Post subject: Reply with quote

If it is USB, you don't have to select a specific joystick. The USB driver detects it for you.
Back to top
View user's profile Send private message
Gentree
Watchman
Watchman


Joined: 01 Jul 2003
Posts: 5350
Location: France, Old Europe

PostPosted: Sun Jul 03, 2005 12:01 pm    Post subject: Re: Gentoo-Wiki Reply with quote

Exdaix wrote:
For future reference, this article has been moved to the Gentoo-Wiki (http://www.gentoo-wiki.com), and will be updated there from now on.


Oh yeah? , any chance of a precise link, I see nothing from the main page.

:?
[EDIT]
One wiki: http://gentoo-wiki.com/HOWTO_Joystick_Setup#Installation


BTW if jscalibrator that is buggy not flightgear:
Code:
bash-3.00#jstest /dev/js0
Joystick (Analog 2-axis 4-button joystick) has 2 axes and 4 buttons. Driver version is 2.1.0.
Testing ... (interrupt to exit)
Axes:  0:     0  1:     0 Buttons:  0:off  1:off  2:off  3:off
bash-3.00#jscalibrator
bash-3.00#jstest /dev/js0
Joystick (Analog 2-axis 4-button joystick) has 2 axes and 4 buttons. Driver version is 2.1.0.
Testing ... (interrupt to exit)
Axes:  0:  4099  1:  3022 Buttons:  0:off  1:off  2:off  3:off
bash-3.00#


I just launched jscalibirator and closed it using the X button on the frame. I did not even touch the joystick , let alone save a calibration.

Note how it has squewed the co-ordinates !

The good news is we are not running windows here WE DONT LIKE TO REBOOT LINUX.

Code:
bash-3.00#modprobe -r snd_cmipci
bash-3.00#modprobe snd_cmipci joystick_port=1
bash-3.00#jstest /dev/js0
Joystick (Analog 2-axis 4-button joystick) has 2 axes and 4 buttons. Driver version is 2.1.0.
Testing ... (interrupt to exit)
Axes:  0:     0  1:     0 Buttons:  0:off  1:off  2:off  3:off


You may like to correct the original post that tells ppl they need to reboot.:roll:

BTW the jstest used above was grabbed as binary from SuSE 9.2. YaST sets up the joystick modules in about 2 minutes. I has taken be 2 DAYS to find all the info to do this on Gentoo. This is very dispersed untidy and undocumented.
_________________
Linux, because I'd rather own a free OS than steal one that's not worth paying for.
Gentoo because I'm a masochist
AthlonXP-M on A7N8X. Portage ~x86
Back to top
View user's profile Send private message
thomasvk
Guru
Guru


Joined: 19 Mar 2005
Posts: 597

PostPosted: Wed Mar 22, 2006 10:41 am    Post subject: Reply with quote

Code:
jstest /dev/input/js0
Driver version is 2.1.0.
Joystick (Logitech Logitech RumblePad 2 USB) has 6 axes (X, X, X, X, X, X)
Segmentation fault


I can't seem to find an answer. Anyone any ideas?

Edit:
It seems it needs =linux-headers-2.6.11-r3.
Back to top
View user's profile Send private message
Conzar
Tux's lil' helper
Tux's lil' helper


Joined: 04 Feb 2004
Posts: 89

PostPosted: Sun Apr 09, 2006 5:26 pm    Post subject: Reply with quote

I also get that seg fault too. Another problem that I haven't been able to figure out is permissions with all devices that get put in /dev/input.

Is there a way to perminatly change the group to all devices in dev/input to say the games group?
Back to top
View user's profile Send private message
zbyte64
n00b
n00b


Joined: 09 Apr 2003
Posts: 42

PostPosted: Sun Jul 09, 2006 11:07 pm    Post subject: Jtest seg faults Reply with quote

I get a seg fault as well:

Code:
zbyte16 linux # jstest --select /dev/input/js0
Driver version is 2.1.0.
Joystick (GreenAsia Electronics  4Axes 12Keys GamePad ) has 12 axes (X, X, X, X, X, X, X, X, X, X, X, X)
Segmentation fault


I know ubuntu had some similiar issues: https://launchpad.net/distros/ubuntu/+source/joystick/+bug/45930

also on the wiki someone suggested using linux-headers-2.6.11-r3: http://gentoo-wiki.com/Talk:HOWTO_Joystick_Setup

[EDIT] using linux-headers-2.6.11-r3 works for me
_________________
Im not creative enough to come up with a witty signature.
Back to top
View user's profile Send private message
Gentree
Watchman
Watchman


Joined: 01 Jul 2003
Posts: 5350
Location: France, Old Europe

PostPosted: Mon Jul 10, 2006 3:45 pm    Post subject: Reply with quote

Conzar wrote:
I also get that seg fault too. Another problem that I haven't been able to figure out is permissions with all devices that get put in /dev/input.

Is there a way to perminatly change the group to all devices in dev/input to say the games group?



yes , look into udev rules in /etc/udev/rules.d

this should be pretty well covered in handbook , wiki , forums now your know what to look for.

HTH 8)
_________________
Linux, because I'd rather own a free OS than steal one that's not worth paying for.
Gentoo because I'm a masochist
AthlonXP-M on A7N8X. Portage ~x86
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum