dkulinski
Posts: 2
Joined: Sun Mar 08, 2015 2:07 pm

Re: Multi-console gamepad driver for GPIO

Sun Mar 08, 2015 2:12 pm

I received my Rapsberry Pi 2 yesterday and installed RetroPie. I ran rpi-update, updated the RetroPie setup script and attempted to install the gamecon driver. I have kernel version 3.18.9-v7+ installed. I get the dreaded

ERROR: could not insert 'gamecon_gpio_rpi': Exec format error

The last line of dmesg looks like the following:

[43252.572918] gamecon_gpio_rpi: disagrees about version of symbol module_layout

I then grabbed marqs header package with no change. Am I missing a step here? I have a single NES controller and am using the following modprobe command:

sudo modprobe -f gamecon_gpio_rpi map=0,0,2,0,0,0

Thank,
Dan

marqs
Posts: 212
Joined: Sat Jun 09, 2012 11:34 am

Re: Multi-console gamepad driver for GPIO

Sun Mar 08, 2015 5:55 pm

dkulinski wrote:I received my Rapsberry Pi 2 yesterday and installed RetroPie. I ran rpi-update, updated the RetroPie setup script and attempted to install the gamecon driver. I have kernel version 3.18.9-v7+ installed. I get the dreaded

ERROR: could not insert 'gamecon_gpio_rpi': Exec format error

The last line of dmesg looks like the following:

[43252.572918] gamecon_gpio_rpi: disagrees about version of symbol module_layout

I then grabbed marqs header package with no change. Am I missing a step here? I have a single NES controller and am using the following modprobe command:

sudo modprobe -f gamecon_gpio_rpi map=0,0,2,0,0,0

Thank,
Dan
It seems that the firmware git branch (from where Module.symvers is automatically extracted) got updated to 3.18.9 after the headers were generated, so that old data was included in that package. I just triggered the update manually, so try to download and install the headers again - that should make the drivers rebuild correctly. Also, try using modprobe without "-f" -flag, that has caused some issues in the past.

dkulinski
Posts: 2
Joined: Sun Mar 08, 2015 2:07 pm

Re: Multi-console gamepad driver for GPIO

Sun Mar 08, 2015 6:48 pm

marqs wrote: It seems that the firmware git branch (from where Module.symvers is automatically extracted) got updated to 3.18.9 after the headers were generated, so that old data was included in that package. I just triggered the update manually, so try to download and install the headers again - that should make the drivers rebuild correctly. Also, try using modprobe without "-f" -flag, that has caused some issues in the past.
Perfect, loaded with no issues!

mgoulart
Posts: 126
Joined: Mon Feb 10, 2014 8:56 am
Location: Rio de Janeiro - Brazil

Re: Multi-console gamepad driver for GPIO

Mon Mar 09, 2015 3:47 pm

Is it possible to use Intellivision 2 controllers (They are db9!) with db9_gpio_rpi? If it is there is any diagram teaching how to plug it on GPIO?

marqs
Posts: 212
Joined: Sat Jun 09, 2012 11:34 am

Re: Multi-console gamepad driver for GPIO

Mon Mar 09, 2015 4:33 pm

mgoulart wrote:Is it possible to use Intellivision 2 controllers (They are db9!) with db9_gpio_rpi? If it is there is any diagram teaching how to plug it on GPIO?
They use completely different encoding scheme than the usual multisystem joysticks, so they are currently not supported. However, the driver comes with source code so it's fairly easy for anyone to add support for special db9 controllers like those.

driftking96
Posts: 20
Joined: Sun Mar 10, 2013 8:48 pm
Location: Scarborough, Ontario, Canada

Re: Multi-console gamepad driver for GPIO

Tue Mar 10, 2015 12:59 am

marqs wrote:
driftking96 wrote:Hey guys,
Sorry if this is a really basic question but is there a clear step-by-step guide to install a PS2 steering wheel on the Raspberry Pi 2 and does the PS2 steering wheel act the same way as a PSx or even PS2 controller? And is there anyway to connect the PS2 steering wheel to the RPi 2 and use C++ to control the actions like accelerate, brake, reverse and turning etc.?

Thank you very much and really appreciate your help
There is no step-by-step guide, but the setup is same as connecting a normal PS2 controller to GPIO. A PS2 wheel should also act the same way PS2 controller. The connection diagram is following (psx pinout):

Code: Select all

Rpi pin				PSX controller pin

P1-01 (3.3V)  ====      5 (power/3.3V)
GPIO14        --->      2 (command)
GPIO15        --->      6 (select)
GPIO18        --->      7 (clock)
GPIOXX        <---      1 (data)
P1-06 (GND)   ====      4 (ground)
If you connect the data pin to GPIO4, use the following command to load the driver (as root):

Code: Select all

modprobe gamecon_gpio_rpi map=0,0,7 psx_delay=25
I didn't understand your last question. You'd want to connect the wheel simultaneously to a PS2 and control it via RPi2?

Hey marqs, thanks for the reply, i will follow up on your instructions right now. What i meant by the last question was, can i connect the PS2 steering wheel to the Raspberry Pi 2, then use C++ to accept data from the PSX controller, in this case the steering wheel, via the GPIO pins, and produce an output that is dependent on the PSx input?

driftking96
Posts: 20
Joined: Sun Mar 10, 2013 8:48 pm
Location: Scarborough, Ontario, Canada

Re: Multi-console gamepad driver for GPIO

Tue Mar 10, 2015 3:15 am

I got this when i hooked the PS2 controller and tried installing drivers as root.

Code: Select all

sudo modprobe gamecon_gpio_rpi map=0,0,7 psx_delay=25
FATAL: Module gamecon_gpio_rpi not found.
Does me using the Raspberry Pi B 2 with the latest version of Raspian OS affect the way i connect my pins based on the Raspberry Pi Model B+ GPIO layout? Because I followed the exact same steps given above and I didn't even see the steering wheel turn on or show me any signs of power in it, eg: LEDs on.

marqs
Posts: 212
Joined: Sat Jun 09, 2012 11:34 am

Re: Multi-console gamepad driver for GPIO

Tue Mar 10, 2015 4:17 pm

driftking96 wrote:Hey marqs, thanks for the reply, i will follow up on your instructions right now. What i meant by the last question was, can i connect the PS2 steering wheel to the Raspberry Pi 2, then use C++ to accept data from the PSX controller, in this case the steering wheel, via the GPIO pins, and produce an output that is dependent on the PSx input?
Yes, you can use joystick / libevdev APIs, or some higher-level APIs such as SDL.

marqs
Posts: 212
Joined: Sat Jun 09, 2012 11:34 am

Re: Multi-console gamepad driver for GPIO

Tue Mar 10, 2015 4:20 pm

driftking96 wrote:I got this when i hooked the PS2 controller and tried installing drivers as root.

Code: Select all

sudo modprobe gamecon_gpio_rpi map=0,0,7 psx_delay=25
FATAL: Module gamecon_gpio_rpi not found.
Does me using the Raspberry Pi B 2 with the latest version of Raspian OS affect the way i connect my pins based on the Raspberry Pi Model B+ GPIO layout? Because I followed the exact same steps given above and I didn't even see the steering wheel turn on or show me any signs of power in it, eg: LEDs on.
It seems the driver module was not built correctly. Did you use RetroPie to install the drivers, and did you check the log for details? Perhaps you have the same issue with kernel headers as kevinfol (check a few posts back).

esbiete
Posts: 6
Joined: Wed Mar 11, 2015 7:19 am

Re: Multi-console gamepad driver for GPIO

Wed Mar 11, 2015 7:23 am

To marqs:

1st, thanks for your gamecon work!

2nd, I'm trying to install directly from RetroPie script but it keeps failing due to not finding the kernel headers. From retropie script it tries to find linux-headers-3.18.6-v7i-aufs_3.18.6-v7i-aufs-2_armhf.deb as my uname -r is 3.18.6-v7i-aufs.

Can I assume removing '-v7i-aufs' will work?

Tx in advance

ulao
Posts: 16
Joined: Tue Mar 10, 2015 11:59 am

Re: Multi-console gamepad driver for GPIO

Wed Mar 11, 2015 3:51 pm

Good cable idea for this project.

get one of these:
Image

and then buy the cables on this KS, https://www.kickstarter.com/projects/54 ... trollers-0

The KS is for a universal USB adapter but the cables can be used for anything.

marqs
Posts: 212
Joined: Sat Jun 09, 2012 11:34 am

Re: Multi-console gamepad driver for GPIO

Wed Mar 11, 2015 8:35 pm

esbiete wrote:To marqs:

1st, thanks for your gamecon work!

2nd, I'm trying to install directly from RetroPie script but it keeps failing due to not finding the kernel headers. From retropie script it tries to find linux-headers-3.18.6-v7i-aufs_3.18.6-v7i-aufs-2_armhf.deb as my uname -r is 3.18.6-v7i-aufs.

Can I assume removing '-v7i-aufs' will work?

Tx in advance
Is that a standard Raspbian installation? I haven't seen a kernel named as such before.

Did you try to update the firmware with rpi-update?

marqs
Posts: 212
Joined: Sat Jun 09, 2012 11:34 am

Re: Multi-console gamepad driver for GPIO

Wed Mar 11, 2015 8:59 pm

ulao wrote:Good cable idea for this project.

get one of these:
Image

and then buy the cables on this KS, https://www.kickstarter.com/projects/54 ... trollers-0

The KS is for a universal USB adapter but the cables can be used for anything.
Nice! Inexpensive adapter cables are certainly appreciated, and the 4-Play module also looks good. Let's hope the project gets funded.

ulao
Posts: 16
Joined: Tue Mar 10, 2015 11:59 am

Re: Multi-console gamepad driver for GPIO

Thu Mar 12, 2015 2:50 am

Ever better is that the KS offer cable only rewards.

esbiete
Posts: 6
Joined: Wed Mar 11, 2015 7:19 am

Re: Multi-console gamepad driver for GPIO

Thu Mar 12, 2015 5:38 am

marqs wrote:
esbiete wrote:To marqs:

1st, thanks for your gamecon work!

2nd, I'm trying to install directly from RetroPie script but it keeps failing due to not finding the kernel headers. From retropie script it tries to find linux-headers-3.18.6-v7i-aufs_3.18.6-v7i-aufs-2_armhf.deb as my uname -r is 3.18.6-v7i-aufs.

Can I assume removing '-v7i-aufs' will work?

Tx in advance
Is that a standard Raspbian installation? I haven't seen a kernel named as such before.

Did you try to update the firmware with rpi-update?
Yes, I don't remember doing anything special: downloaded RetroPie, added to BerryBoot and typical update+upgrade and so. I suspect it's something related to BerryBoot, as all different distros report the same kernel, may be when I did I grabbed a test version or something similar :)

Full uname -a is: Linux raspberry 3.18.6-v71-aufs #1 SMP PREEMPT Tue Feb 10 22:35:34 CET 2015 armv7l GNU/Linux

It's a Rapsberry Pi 2, but this shouldn't be a difference, right?

I'll try to do some research. I downloaded BerryBoot v2 from website, so I assume everybody using that version has the same issue.

BTW: I did not do a rpi-update, but I'm doing now and everything went well. I really think I'm on kernel 3.18.9 ...
Last edited by esbiete on Thu Mar 12, 2015 7:25 am, edited 1 time in total.

driftking96
Posts: 20
Joined: Sun Mar 10, 2013 8:48 pm
Location: Scarborough, Ontario, Canada

Re: Multi-console gamepad driver for GPIO

Thu Mar 12, 2015 6:45 am

marqs wrote:
driftking96 wrote:I got this when i hooked the PS2 controller and tried installing drivers as root.

Code: Select all

sudo modprobe gamecon_gpio_rpi map=0,0,7 psx_delay=25
FATAL: Module gamecon_gpio_rpi not found.
Does me using the Raspberry Pi B 2 with the latest version of Raspian OS affect the way i connect my pins based on the Raspberry Pi Model B+ GPIO layout? Because I followed the exact same steps given above and I didn't even see the steering wheel turn on or show me any signs of power in it, eg: LEDs on.
It seems the driver module was not built correctly. Did you use RetroPie to install the drivers, and did you check the log for details? Perhaps you have the same issue with kernel headers as kevinfol (check a few posts back).

Just installed RetroPie on Raspbian and when i tried to use modprobe as root i still get the same FATAL error message.

marqs
Posts: 212
Joined: Sat Jun 09, 2012 11:34 am

Re: Multi-console gamepad driver for GPIO

Thu Mar 12, 2015 10:14 pm

driftking96 wrote:Just installed RetroPie on Raspbian and when i tried to use modprobe as root i still get the same FATAL error message.
Can you post the details from the RetroPie installation log?

driftking96
Posts: 20
Joined: Sun Mar 10, 2013 8:48 pm
Location: Scarborough, Ontario, Canada

Re: Multi-console gamepad driver for GPIO

Thu Mar 12, 2015 10:24 pm

How do I get the installation log? Sorry if this is a really basic question. I'm completely new to this.

marqs
Posts: 212
Joined: Sat Jun 09, 2012 11:34 am

Re: Multi-console gamepad driver for GPIO

Fri Mar 13, 2015 12:40 am

driftking96 wrote:How do I get the installation log? Sorry if this is a really basic question. I'm completely new to this.
It should reside in the same directory as RetroPie installation.

driftking96
Posts: 20
Joined: Sun Mar 10, 2013 8:48 pm
Location: Scarborough, Ontario, Canada

Re: Multi-console gamepad driver for GPIO

Fri Mar 13, 2015 1:59 am

Here is my log file after installing RetroPie. I had to install several times since my my pi's ethernet connection kept on going on and off making me use

Code: Select all

sudo ifdown eth0
and

Code: Select all

sudo ifup eth0
This is the last log file from my final and successful installation. I had to use pastebin since i exceeded the number of characters for a paste when i tried to paste it here.

http://pastebin.com/9XhwTrET

esbiete
Posts: 6
Joined: Wed Mar 11, 2015 7:19 am

Re: Multi-console gamepad driver for GPIO

Fri Mar 13, 2015 6:47 am

esbiete wrote:
marqs wrote:
esbiete wrote:To marqs:

1st, thanks for your gamecon work!

2nd, I'm trying to install directly from RetroPie script but it keeps failing due to not finding the kernel headers. From retropie script it tries to find linux-headers-3.18.6-v7i-aufs_3.18.6-v7i-aufs-2_armhf.deb as my uname -r is 3.18.6-v7i-aufs.

Can I assume removing '-v7i-aufs' will work?

Tx in advance
Is that a standard Raspbian installation? I haven't seen a kernel named as such before.

Did you try to update the firmware with rpi-update?
Yes, I don't remember doing anything special: downloaded RetroPie, added to BerryBoot and typical update+upgrade and so. I suspect it's something related to BerryBoot, as all different distros report the same kernel, may be when I did I grabbed a test version or something similar :)

Full uname -a is: Linux raspberry 3.18.6-v71-aufs #1 SMP PREEMPT Tue Feb 10 22:35:34 CET 2015 armv7l GNU/Linux

It's a Rapsberry Pi 2, but this shouldn't be a difference, right?

I'll try to do some research. I downloaded BerryBoot v2 from website, so I assume everybody using that version has the same issue.

BTW: I did not do a rpi-update, but I'm doing now and everything went well. I really think I'm on kernel 3.18.9 ...
Definitively it's the last BerryBoot version, which has the -v7i-aufs kernel and it's being used cross-wide in all the OS's that you add to boot. I see no other option than wait for a new version of BerryBoot that includes a new kernel. I will try to see if I can get another solution. Anyway, do you have any link/how-to build for a specific kernel and getting the headers?

Thanks in advance.

marqs
Posts: 212
Joined: Sat Jun 09, 2012 11:34 am

Re: Multi-console gamepad driver for GPIO

Fri Mar 13, 2015 7:47 am

driftking96 wrote:This is the last log file from my final and successful installation. I had to use pastebin since i exceeded the number of characters for a paste when i tried to paste it here.

http://pastebin.com/9XhwTrET
There's no mention on gamecon/db9 drivers in that log (unless they got chopped off). Did you select "Install multi-console gamepad drivers for GPIO" in the RetroPie menus? The drivers are an optional component of RetroPie, so you need to navigate to one of the sub-menus and select that option.

driftking96
Posts: 20
Joined: Sun Mar 10, 2013 8:48 pm
Location: Scarborough, Ontario, Canada

Re: Multi-console gamepad driver for GPIO

Fri Mar 13, 2015 3:57 pm

Where do I find and select the "Install multi-console gamepad drivers for GPIO" ? I did not see such option while installing.

marqs
Posts: 212
Joined: Sat Jun 09, 2012 11:34 am

Re: Multi-console gamepad driver for GPIO

Sat Mar 14, 2015 9:07 am

driftking96 wrote:Where do I find and select the "Install multi-console gamepad drivers for GPIO" ? I did not see such option while installing.
The option is found under "Main menu" -> "SETUP (only if you already have run one of the installations above)".

marqs
Posts: 212
Joined: Sat Jun 09, 2012 11:34 am

Re: Multi-console gamepad driver for GPIO

Sat Mar 14, 2015 9:48 am

esbiete wrote:Definitively it's the last BerryBoot version, which has the -v7i-aufs kernel and it's being used cross-wide in all the OS's that you add to boot. I see no other option than wait for a new version of BerryBoot that includes a new kernel. I will try to see if I can get another solution. Anyway, do you have any link/how-to build for a specific kernel and getting the headers?

Thanks in advance.
Yes, it seems that BerryBoot uses a single patched kernel for all OS. However, apparently Raspbian team kernels support AUFS (although only as a loadable module), so perhaps you could try installing one of those (using apt-get) and selecting it as the active kernel in BerryBoot (by modifying config.txt). Raspbian team kernels come with headers (also installable with apt-get), so that's also a solution for those who have issues with the generated headers for the standard Raspberry Pi foundation kernels.

I tried to quickly find out how BerryBoot patches its kernel, but I only found an old patch which may or may not work if headers were built for contemporary kernels.

Return to “Gaming”