Pilote Linux pour le joypad Saitek P2500

goffi 15 years ago GNU-Linux projet ancien site info_site

For english readers, you can directly download the Saitek P2500 Linux driver here.

J'ai profité de l'été pour faire un petit pilote pour le joypad Saitek P2500, qui n'était pas entièrement géré par le noyau. Ce pilote ajoute la gestion du bouton pour switcher entre le stick analogique et le stick numérique, ainsi que la gestion des vibrations.

Voilà, je vais maintenant pouvoir me mettre à plein temps sur Tales & Legends.

PS: J'ai récemment eu des attaques de SPAM, qui m'ont forcé à désactiver les commentaires pendant un moment. Pour le moment je fais un filtrage ultra basique qui a l'air de fonctionner, mais si des bots plus perfectionnés s'attaquent au site je vais devoir m'occuper de ça plus sérieusement.

MAJ: Il y avait une petite erreur de parenthèses qui est désormais corrigée. Un projet a été ouvert sur la forge du GCN, vous y trouverez les dernières corrections.

lightness1024 17 years ago

waii un vrai geek qui fait des pilotes, ca c'est la classe :)

me 17 years ago

I cant get this to compile I get the following error.
make
make -C /lib/modules/2.6.17-gentoo-r8/build M=/files/games/SP2500 modules
make[1]: Entering directory `/usr/src/linux-2.6.17-gentoo-r8'
  CC [M]  /files/games/SP2500/saitek_p2500.o
/files/games/SP2500/saitek_p2500.c:754: error: unknown field 'owner' specified in initializer
/files/games/SP2500/saitek_p2500.c:754: warning: initialization from incompatible pointer type
make[2]: *** [/files/games/SP2500/saitek_p2500.o] Error 1
make[1]: *** [_module_/files/games/SP2500] Error 2
make[1]: Leaving directory `/usr/src/linux-2.6.17-gentoo-r8'
make: *** [modules] Error 2

Goffi 17 years ago

The kernel API has changed in the 2.6.16 kernel: the .owner field is not needed anymore. You can delete the line 754 (.owner = THIS_MODULE,); it should then compile without error.


author website

me 17 years ago

Thanks!(or merci beaucoup) compiles without an issue now.

me 17 years ago

Ok, now that is compiles, and the modules load before usbhid, it will not run fftest.

fftest /dev/input/js1
Force feedback test program.
HOLD FIRMLY YOUR WHEEL OR JOYSTICK TO PREVENT DAMAGES

Device /dev/input/js1 opened
Ioctl query: Invalid argument
This was after I did a chmod 777 on /dev/input/js1

jstest works without an issue

Goffi 17 years ago

You have to run fftest on eventx:
fftest /dev/input/eventx (usually event0, check the permissions).


author website

krato 17 years ago

Je viens de passer un temps fou à configurer cette manette qui fonctionnait bien sauf le pad qui ne réagissait pas du tout !
Ce pilote ( compilé en supprimant la ligne 754 comme conseillé plus haut ) a tout résolu. Merci Goffi !
Testé et approuvé sur Debian etch !

vinz 17 years ago

Bonjour, après un passage sous Feisty, je nepeux plus compiler le driver (me en supprimant la ligne 754). J'obtiens ce message après le make :
make -C /lib/modules/2.6.20-15-generic/build M=/home/vinz/SP2500/SP2500 modules
make[1]: entrant dans le répertoire « /usr/src/linux-headers-2.6.20-15-generic »
  CC [M]  /home/vinz/SP2500/SP2500/saitek_p2500.o
/home/vinz/SP2500/SP2500/saitek_p2500.c:38:26: erreur: linux/config.h : Aucun fichier ou répertoire de ce type
/home/vinz/SP2500/SP2500/saitek_p2500.c: In function ‘SP2500_input_event’:
/home/vinz/SP2500/SP2500/saitek_p2500.c:241: attention : passing argument 6 of ‘usb_fill_int_urb’ from incompatible pointer type
/home/vinz/SP2500/SP2500/saitek_p2500.c: In function ‘SP2500_upload_effect’:
/home/vinz/SP2500/SP2500/saitek_p2500.c:291: erreur: ‘struct input_dev’ has no member named ‘ff_effects_max’
/home/vinz/SP2500/SP2500/saitek_p2500.c:395: attention : passing argument 6 of ‘usb_fill_int_urb’ from incompatible pointer type
/home/vinz/SP2500/SP2500/saitek_p2500.c:396: attention : passing argument 6 of ‘usb_fill_int_urb’ from incompatible pointer type
/home/vinz/SP2500/SP2500/saitek_p2500.c:397: attention : passing argument 6 of ‘usb_fill_int_urb’ from incompatible pointer type
/home/vinz/SP2500/SP2500/saitek_p2500.c: In function ‘SP2500_close’:
/home/vinz/SP2500/SP2500/saitek_p2500.c:467: erreur: ‘struct input_dev’ has no member named ‘ff_effects_max’
/home/vinz/SP2500/SP2500/saitek_p2500.c:471: erreur: ‘struct input_dev’ has no member named ‘ff_effects_max’
/home/vinz/SP2500/SP2500/saitek_p2500.c: In function ‘SP2500_flush’:
/home/vinz/SP2500/SP2500/saitek_p2500.c:485: erreur: ‘struct input_dev’ has no member named ‘ff_effects_max’
/home/vinz/SP2500/SP2500/saitek_p2500.c: In function ‘SP2500_process_packet’:
/home/vinz/SP2500/SP2500/saitek_p2500.c:509: attention : implicit declaration of function ‘input_regs’
/home/vinz/SP2500/SP2500/saitek_p2500.c: In function ‘SP2500_probe’:
/home/vinz/SP2500/SP2500/saitek_p2500.c:660: attention : passing argument 6 of ‘usb_fill_int_urb’ from incompatible pointer type
/home/vinz/SP2500/SP2500/saitek_p2500.c:667: erreur: ‘struct input_dev’ has no member named ‘dev’
/home/vinz/SP2500/SP2500/saitek_p2500.c:677: erreur: ‘struct input_dev’ has no member named ‘upload_effect’
/home/vinz/SP2500/SP2500/saitek_p2500.c:682: erreur: ‘struct input_dev’ has no member named ‘ff_effects_max’
make[2]: *** [/home/vinz/SP2500/SP2500/saitek_p2500.o] Erreur 1
make[1]: *** [_module_/home/vinz/SP2500/SP2500] Erreur 2
make[1]: quittant le répertoire « /usr/src/linux-headers-2.6.20-15-generic »
make: *** [modules] Erreur 2
J'ai vu que le config.h n'était plus utilisé depuis le kernel 2.6.19, mais je ne sais pas trop quoi faire (et je ne sais même pas si l'erreur vient de là !)

Goffi 16 years ago

J'ai été extrémement occupé ces derniers mois (entrée dans la vie active, déménagement and co), désolé de n'avoir pu m'occuper des MAJ ni d'avoir répondu à tout le monde...


author website

datacompboy 15 years ago

Sir, please contact me by e-mail provided.

I have updated driver to latest kernel (2.6.30), but have problem with periodic -- need to know how to set up waveform.

Can you provide manual on that gamepad protocol, or just describe how to encode waveforms?

4 maximum feedbacks at time -- is that limit of pad, you you get that number from ceil? :)

Also -- where to send you updated driver, so it can be shared.


author website

datacompboy 15 years ago

I have published 0.9.0 driver, compatible with latest kernel at mine blog :)

If someone need it still


author website

Пещера отшельного фердопердозника 15 years ago

Saitek P2500 driver 0.9.0 — обновление linux драйвера для

Linux friver for Saitek P2500 gamepad supporting force feedback. Original (v.0.8.1) found at goffi.org, but it too old, and can’t be build with latest kernel. I have updated driver, now it compiles and work against 2.6.30 kernel, supporting FF_PE......


author website