yetiFox
Posts: 3
Joined: Wed Jan 23, 2013 6:49 pm

Help with Xbox controllers for RetroPie

Wed Jan 23, 2013 7:14 pm

I've been able to get NES and SNES games running on RetroPie with a keyboard but I keep running into problems when trying to add Xbox 360 controllers. I've been searching for days to find a solution but I can't seem to find a solution. I hit a wall and can't seem to figure out how to get RetroArch to recognize the controller. I feel like there is an easy solution that I'm just missing. Any help is greatly appreciated.

I should start by saying I have the Model B pi and a wireless Xbox 360 adapter with a controller. This https://github.com/petrockblog/RetroPie ... controller is the guide I used most recently to set up the controller although I've tried many others.

The problem I'm having is when I try to run "retroarch-joyconfig" I get the error: "Couldn't open joystick #0." This is after installing "xboxdrv" and running "xboxdrv" to pick up the controller.

Here's a link to the images for what I did:
<iframe class="imgur-album" width="100%" height="550" frameborder="0" src="http://imgur.com/a/kpslC/embed"></iframe>

yetiFox
Posts: 3
Joined: Wed Jan 23, 2013 6:49 pm

Re: Help with Xbox controllers for RetroPie

Wed Jan 23, 2013 8:15 pm

Oops messed up the link at the bottom, here it is: http://imgur.com/a/kpslC
And I should say that while messing with the Pi I corrupted the SD card twice and had to reformat it. I hope that's not causing the problem.

yetiFox
Posts: 3
Joined: Wed Jan 23, 2013 6:49 pm

Re: Help with Xbox controllers for RetroPie

Thu Jan 24, 2013 4:43 am

Fixed it thanks to Kabbone in this thread!!!: http://www.raspberrypi.org/phpBB3/viewt ... 8&start=25
Try putting a "&" behind your command.
I needed to add a "&" behind

Code: Select all

sudo xboxdrv --trigger-as-button --wid 0 --led 2 --deadzone 4000 --silent
so it would become:

Code: Select all

sudo xboxdrv --trigger-as-button --wid 0 --led 2 --deadzone 4000 --silent &
Hopefully this helps anyone having the same issue. Cheers

heiNey
Posts: 9
Joined: Thu Apr 11, 2013 5:05 am

Re: Help with Xbox controllers for RetroPie

Thu Apr 11, 2013 5:16 am

im getting the same issue, and i have the & at the end of the line

do i need to buy some sort of adapter to attach the xbox controller to the rpi or something? or is it supposed to automatically pair?

output when trying to do the configuration

Code: Select all

heiney@raspipie:~/RetroPie/emulators/RetroArch/tools$ sudo ./retroarch-joyconfig -o p1.cfg -p 1 -j 0
Couldn't open joystick #0.
contents of rc.local file:

Code: Select all

sudo xboxdrv --trigger-as-button --wid 0 --led 2 --deadzone 4000 --silent &
sleep 1
exit 0

FLemonjello
Posts: 1
Joined: Mon Jun 10, 2013 3:04 am

Re: Help with Xbox controllers for RetroPie

Mon Jun 10, 2013 3:25 am

The issue may be caused by the addition in rc.local. Exit emulationstation and look at the startup log that displays in the terminal. If there is an error 20-to-25 lines from the bottom stating the system can't find the xboxdrv, it will cause the "Couldn't open joystick" issue (since xboxdrv didn't pick it up during startup).

I had this issue and resolved it by adding #!/bin/bash to the top of rc.local. #!/bin/sh was there, but without #!/bin/bash it doesn't know to run xboxdrv as a bash script. Adding that to top and rebooting worked for me.

mattie47
Posts: 9
Joined: Sun Jun 02, 2013 12:23 pm

Re: Help with Xbox controllers for RetroPie

Mon Jun 10, 2013 10:33 am

heiNey wrote:im getting the same issue, and i have the & at the end of the line

do i need to buy some sort of adapter to attach the xbox controller to the rpi or something? or is it supposed to automatically pair?
Yes, you need one of these

Return to “Gaming”