Homepage › Forums › RetroPie Project › Peoples Projects › Two DB9 connectors inside › Reply To: Two DB9 connectors inside
The common problem is a mismatch of the installed debian version and the header files of the driver.
First you have to check your installed raspbian version with uname -r
Then you need to download the right headers.
You can use your browser to check which versions are available here:
http://www.niksula.hut.fi/~mhiienka/Rpi/linux-headers-rpi/
Use putty to connect to your pi.
Copy/Paste the link with your version from the browser to Putty wget [pasted link]
Example:
wget http://www.niksula.hut.fi/~mhiienka/Rpi/linux-headers-rpi/linux-headers-3.18.10-v7%2b_3.18.10-v7%2b-2_armhf.deb
Now download the drivers:
wget http://www.niksula.hut.fi/~mhiienka/Rpi/gamecon-gpio-rpi-dkms_1.0_all.deb
wget http://www.niksula.hut.fi/~mhiienka/Rpi/db9-gpio-rpi-dkms_1.0_all.deb
Then we have to install everything:
First the headers with sudo dpkg -i [your downloaded header file]
Example: sudo dpkg -i linux-headers-3.18.10-v7+_3.18.10-v7+-2_armhf.deb
And then the drivers:
sudo dpkg -i gamecon-gpio-rpi-dkms_1.0_all.deb
sudo dpkg -i db9-gpio-rpi-dkms_1.0_all.deb
If you want to test it:
sudo modprobe db9-gpio-rpi map=1,1
“1,1” loads two joysticks with one button. “1,0” loads one joystick. Check documentation if you have different joysticks.
You can check if everything is ok with jstest.
To check the first joystick jstest /dev/input/js0. If you have already other controllers hooked up, the new joysticks can be js1, js2, js3…
If this works, you can load the driver automatically every bootup:
sudo nano /etc/modules
and put the line db9-gpio-rpi map=1,1 there.
Put it on first place, if you want to load it before other game controllers like an xbox pad. This is important in emulators like UAE4ALL2, that choose the first available joysticks as default. This not necessary with other emulators.