Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Mon 28 Jul 2014, 13:01
All times are UTC - 4
 Forum index » Advanced Topics » Hardware
Saitek P380 Dual Analog PC Gamepad USB not fully operational
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [4 Posts]  
Author Message
thunor


Joined: 14 Oct 2010
Posts: 350
Location: Minas Tirith, in the Pelennor Fields fighting the Easterlings

PostPosted: Wed 27 Apr 2011, 17:52    Post subject:  Saitek P380 Dual Analog PC Gamepad USB not fully operational
Subject description: Jess Tech Dual Analog Pad Vendor=0f30 Product=0112
 

I recently purchased the Saitek P380 Dual Analog PC Gamepad USB and it's not fully operational with my Puppy 5.20. BTW if anybody else has bought this or is intending to: the D-Pad doesn't work by default because it's not free enough; it requires opening up and having some plastic filed off, but that's another story (I can explain the process if required).

I've spent the day attempting to understand why it's fully operational in my Ubuntu 10.10 kernel 2.6.35-28 installation, but not in my Puppy 5.20 kernel 2.6.33.2 installation. I've documented everything here in this code section with the top part being Ubuntu and the bottom half Puppy:

Code:

Ubuntu 10.10
------------
SDL 1.2.14

$ uname -a
Linux ese 2.6.35-28-generic #50-Ubuntu SMP Fri Mar 18 19:00:26 UTC 2011 i686 GNU/Linux

$ tail -f /var/log/messages
Apr 27 16:32:14 ese kernel: [ 1932.048061] usb 2-2: new low speed USB device using uhci_hcd and address 3
Apr 27 16:32:14 ese kernel: [ 1932.256581] input: Jess Tech Dual Analog Pad as /devices/pci0000:00/0000:00:1f.2/usb2/2-2/2-2:1.0/input/input5
Apr 27 16:32:14 ese kernel: [ 1932.257409] generic-usb 0003:0F30:0112.0002: input,hidraw0: USB HID v1.10 Joystick [Jess Tech Dual Analog Pad] on usb-0000:00:1f.2-2/input0

$ cat /proc/bus/input/devices
I: Bus=0003 Vendor=0f30 Product=0112 Version=0110
N: Name="Jess Tech Dual Analog Pad"
P: Phys=usb-0000:00:1f.2-2/input0
S: Sysfs=/devices/pci0000:00/0000:00:1f.2/usb2/2-2/2-2:1.0/input/input5
U: Uniq=
H: Handlers=event3 js0
B: EV=1b
B: KEY=fff 0 0 0 0 0 0 0 0 0
B: ABS=30027
B: MSC=10

$ ./testjoystick 0
There are 1 joysticks attached
Joystick 0: Jess Tech Dual Analog Pad
       axes: 4
      balls: 0
       hats: 1
    buttons: 12
Watching joystick 0: (Jess Tech Dual Analog Pad)
Joystick has 4 axes, 1 hats, 0 balls, and 12 buttons

$ ls /lib/modules/2.6.35-28-generic/kernel/drivers/input/joystick
a3d.ko     gamecon.ko    iforce         spaceball.ko   twidjoy.ko
adi.ko     gf2k.ko       interact.ko    spaceorb.ko    walkera0701.ko
analog.ko  grip.ko       joydump.ko     stinger.ko     warrior.ko
cobra.ko   grip_mp.ko    magellan.ko    tmdc.ko        xpad.ko
db9.ko     guillemot.ko  sidewinder.ko  turbografx.ko  zhenhua.ko

$ lsmod > prejoy.txt
[Plugged in joystick here and waited for a moment]
$ lsmod > postjoy.txt
$ diff prejoy.txt postjoy.txt
1a2,4
> joydev                  8767  0
> usbhid                 36882  0
> hid                    67742  1 usbhid


Puppy 5.20
----------
SDL 1.2.14

# uname -a
Linux ese 2.6.33.2 #1 SMP Thu May 27 10:56:32 EST 2010 i686 GNU/Linux

# tail -f /var/log/messages
Apr 28 14:48:36 ese user.info kernel: usb 2-2: new low speed USB device using uhci_hcd and address 3
Apr 28 14:48:37 ese user.info kernel: input: Jess Tech Dual Analog Pad as /devices/pci0000:00/0000:00:1f.2/usb2/2-2/2-2:1.0/input/input6
Apr 28 14:48:37 ese user.info kernel: generic-usb 0003:0F30:0112.0002: input: USB HID v1.10 Joystick [Jess Tech Dual Analog Pad] on usb-0000:00:1f.2-2/input0

# cat /proc/bus/input/devices
I: Bus=0003 Vendor=0f30 Product=0112 Version=0110
N: Name="Jess Tech Dual Analog Pad"
P: Phys=usb-0000:00:1f.2-2/input0
S: Sysfs=/devices/pci0000:00/0000:00:1f.2/usb2/2-2/2-2:1.0/input/input6
U: Uniq=
H: Handlers=event2 js0
B: EV=1b
B: KEY=fff 0 0 0 0 0 0 0 0 0
B: ABS=30027
B: MSC=10

# ./testjoystick 0
There are 1 joysticks attached
Joystick 0: Jess Tech Dual Analog Pad
       axes: 1
      balls: 0
       hats: 0
    buttons: 12
Watching joystick 0: (Jess Tech Dual Analog Pad)
Joystick has 1 axes, 0 hats, 0 balls, and 12 buttons

# ls /lib/modules/2.6.33.2/kernel/drivers/input/joystick
a3d.ko     gamecon.ko    iforce         spaceball.ko   twidjoy.ko
adi.ko     gf2k.ko       interact.ko    spaceorb.ko    warrior.ko
analog.ko  grip.ko       joydump.ko     stinger.ko     xpad.ko
cobra.ko   grip_mp.ko    magellan.ko    tmdc.ko
db9.ko     guillemot.ko  sidewinder.ko  turbografx.ko

# lsmod > prejoy.txt
[Plugged in joystick here and waited for a moment]
# lsmod > postjoy.txt
# diff prejoy.txt postjoy.txt
1a2
> joydev                  6492  0


The joystick name is "Jess Tech Dual Analog Pad", vendor=0f30 and product=0112. Both Linux distros are using SDL 1.2.14 and the SDL source comes with many test programs, one of them called testjoystick which can be compiled independently of the SDL library. Ubuntu reports 4 axes, 1 hat and 12 buttons which is correct, but on Puppy it only finds 1 axis, and pressing the D-Pad (hat) causes the test program to segfault. In fact this SDL reporting of a single axis and application segfaulting appears to be the norm for joysticks that aren't supported (google reports lots of these incidents).

There's one difference I should note about Ubuntu and Puppy: if the joystick is plugged in already when Ubuntu boots then it's available at /dev/input/js0 (this can be tested using "cat /dev/input/js0" and pressing all the controls) but on Puppy it only appears at /dev/input/js0 if it's [re]plugged in later.

I've dumped the joystick modules in /lib/modules/2.6.xx.xx/kernel/drivers/input/joystick but I don't think these apply do they? The extra ones with Ubuntu are walkera0701 and zhenhua and I found these to be something to do with radio-controllers.

I think that as this is handled by usbhid then perhaps it requires supporting there. As it works in Ubuntu with kernel 2.6.35-28 I imagine that somebody has officially updated the kernel source to support this device. I'm guessing that using a newer kernel in Puppy will solve this problem.

Any thoughts and suggestions would be most welcome.
Back to top
View user's profile Send private message Visit poster's website 
8-bit


Joined: 03 Apr 2007
Posts: 3357
Location: Oregon

PostPosted: Thu 28 Apr 2011, 18:48    Post subject:  

I jumped through a few hoops getting my sidewinder usb stick set up and also got hold of a deb file called "jstest-gtk_0.1.0-1.deb".
It is a graphical joystick tester that worked for me.
But I also had to load some modules for my joystick to work and since they did not get retained on a reboot, I made a small script file and placed it in /root/startup/.

Does ubuntu show what module is being loaded specifically for the joystick? And does it match the one loaded in Lupu 520?
In my case, the script I loaded at startup is

Code:

#!/bin/bash

modprobe joydev
modprobe ns558
modprobe analog
modprobe sidewinder
Back to top
View user's profile Send private message 
thunor


Joined: 14 Oct 2010
Posts: 350
Location: Minas Tirith, in the Pelennor Fields fighting the Easterlings

PostPosted: Sat 30 Apr 2011, 09:34    Post subject:  

8-bit wrote:
I jumped through a few hoops getting my sidewinder usb stick set up and also got hold of a deb file called "jstest-gtk_0.1.0-1.deb".
It is a graphical joystick tester that worked for me.
But I also had to load some modules for my joystick to work and since they did not get retained on a reboot, I made a small script file and placed it in /root/startup/.

Does ubuntu show what module is being loaded specifically for the joystick? And does it match the one loaded in Lupu 520?
In my case, the script I loaded at startup is

Code:

#!/bin/bash

modprobe joydev
modprobe ns558
modprobe analog
modprobe sidewinder

I've shown in my code section above that when plugging-in the joystick Ubuntu loads modules joydev, usbhid and hid, and Puppy 520 loads module joydev because usbhid is already loaded, so they both have the same modules loaded. This is why I am guessing that the newer Ubuntu kernel has been updated to support these new Saitek/Jess Tech joysticks.

USB joysticks should be designed to a standard specification which means they don't require drivers and should simply work when plugged in, but some USB devices have quirks and these quirks require supporting somewhere, maybe in usbhid. So likely mine has some quirks.

Quote:

USB Joysticks

You need to get USB working, and then modprobe your joystick driver, which is usbhid, as well as joydev. If you use a usb mouse or keyboard, usbhid will be loaded already and you just have to load the joydev module.

https://wiki.archlinux.org/index.php/Joystick


Quote:

Game controllers

Modern game controllers and joysticks are often USB HID class devices. Unlike legacy game port devices, USB HID class game devices do not normally require proprietary drivers to function. Nearly all game devices will function using onboard drivers as long as the device is designed around the drivers and the USB HID class specifications.

http://en.wikipedia.org/wiki/USB_human_interface_device_class


So I find it interesting that you require all those modules to get your USB MS Sidewinder joystick to function.

I need to do some more research and I've gotta go out now Smile Thanks for your reply as it helps me to understand a bit more what's going on.
Back to top
View user's profile Send private message Visit poster's website 
thunor


Joined: 14 Oct 2010
Posts: 350
Location: Minas Tirith, in the Pelennor Fields fighting the Easterlings

PostPosted: Sat 30 Apr 2011, 18:02    Post subject:  

Success! I did some more testing and so I unplugged the joystick, rebooted into Puppy and then plugged the joystick in and it worked, all 4 axes present and the SDL testjoystick app works Smile Only joydev is loaded because usbhid is already loaded.

If I boot into Puppy with the joystick already plugged in I can't get the joystick to be recognised properly, I only get 1 axis. If I unplug it and plug it back in it makes no difference. So what would be the cause of that? At least I can use it now Smile
Back to top
View user's profile Send private message Visit poster's website 
Display posts from previous:   Sort by:   
Page 1 of 1 [4 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Hardware
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
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0724s ][ Queries: 11 (0.0036s) ][ GZIP on ]