Homepage › Forums › RetroPie Project › Controller Configuration in RetroPie › Problems with setting up two Xbox 360 wireless Controllers
- This topic has 0 replies, 1 voice, and was last updated 9 years, 4 months ago by juicebag85.
-
AuthorPosts
-
07/09/2015 at 19:16 #101731juicebag85Participant
Hi.
I’m using a wireless Xbox 360 Controller with that official Microsoft remote connector for my Retropie 3.0 beta2 on a Raspberry Pi 2 which works perfect for me.
Now I bought a second one but can’t get both to work.
If I activate the first one it registers as usual and also activates the first light around the Xbox Button.
If I activate the second one, this one also registers himself as the first controller so that I have two Player 1 Controllers at the same time.
I tried to reconnect them with the remote connecter but that didn’t help.
I also thought that this could be an issue with the new controller, so I connected both to my PC. But there everything works just fine. Player 1 is player 1 and player 2 is player 2.
It also happens when I activate the second controller that the lights flash twince and then deactivate themself. If I deactivate the first controller now, the second controller actives himself automaticly like if it was in standby and becomes player 1.I also checked the /dev/input Folder (where you do the jstest) and there’s only js0 and no js1 or so.
I’m quite confused now how I should solve this problem. I tried to google it but I only find guides to setup just one Xbox 360 Controller.
I installed and configured my Xbox Controller with the following guide by using step 3 – init script:
https://github.com/RetroPie/RetroPie-Setup/wiki/Setting-up-the-XBox360-controllerIt uses this code:
In the /etc/init.d/xboxdrv:
#! /bin/bash ### BEGIN INIT INFO # Provides: xbox-controller # Required-Start: $remote_fs $syslog # Required-Stop: $remote_fs $syslog # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: Start XBOX Controller Service # Description: Start the xboxdrv daemon with several options # support up to 4 Controllers ### END INIT INFO # Author: MasteRehm PATH=/sbin:/usr/sbin:/bin:/usr/bin DESC="XBOX Controller Service" NAME=xboxdrv DAEMON=/usr/bin/$NAME DAEMON_ARGS="-D -d --deadzone 4000 --dbus disabled --detach" PIDFILE=/var/run/$NAME.pid SCRIPTNAME=/etc/init.d/$NAME # Exit if the package is not installed [ -x "$DAEMON" ] || exit 0 # Read configuration variable file if it is present [ -r /etc/default/$NAME ] && . /etc/default/$NAME # Load the VERBOSE setting and other rcS variables . /lib/init/vars.sh # Define LSB log_* functions. # Depend on lsb-base (>= 3.2-14) to ensure that this file is present # and status_of_proc is working. . /lib/lsb/init-functions do_start() { if [ $CONTROLLER_NUM -gt 4 ]; then echo -e "\n$CONTROLLER"; exit 1; fi start-stop-daemon -S -q -x $DAEMON -- $DAEMON_ARGS $CONTROLLER # -- This workaround only works with 4 controllers connected. It also is creating a name that # does not match the minor device node. # # Workaround: xboxdrv daemon creates /dev/input/js[4-7] device files, if /dev/input/js[0-3] created on startup. # if [ -x /usr/bin/rename ]; then # sleep 1 # if [[ <code>ls /dev/input/js*</code> =~ /dev/input/js[4-7] ]]; then rename 's/js4/js0/;s/js5/js1/;s/js6/js2/;s/js7/js3/' /dev/input/js*; fi # fi # Rather than renaming files, it's better to clear the existing ones by stopping the driver # and then when you start it again, everything will be correct. sleep 3 do_stop sleep 3 start-stop-daemon -S -q -x $DAEMON -- $DAEMON_ARGS $CONTROLLER } do_stop() { start-stop-daemon -K -o -q -x $DAEMON sleep 1 } case "$1" in start) log_daemon_msg "Starting $DESC" "$NAME" do_start status=$? log_end_msg $status ;; stop) log_daemon_msg "Stopping $DESC" "$NAME" do_stop status=$? log_end_msg $status ;; status) status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $? ;; restart) log_daemon_msg "Restarting $DESC" "$NAME" do_stop case "$?" in 0|1) do_start case "$?" in 0) log_end_msg 0 ;; 1) log_end_msg 1 ;; # Old process is still running *) log_end_msg 1 ;; # Failed to start esac ;; *) # Failed to stop log_end_msg 1 ;; esac ;; *) echo "Usage: $SCRIPTNAME {start|stop|status|restart}" >&2 exit 3 ;; esac
And in the /etc/default/xboxdrv:
# How many Controllers? (support up to 4 Controllers) CONTROLLER_NUM=2 case $CONTROLLER_NUM in 1) CONTROLLER="-w 0 -l 2 --trigger-as-button --dpad-as-button" ;; 2) CONTROLLER="-w 0 -l 2 --trigger-as-button --dpad-as-button --next-controller -w 1 -l 3 --trigger-as-button --dpad-as-button" ;; 3) CONTROLLER="-w 0 -l 2 --trigger-as-button --dpad-as-button --next-controller -w 1 -l 3 --trigger-as-button --dpad-as-button --next-controller -w 2 -l 4 --trigger-as-button --dpad-as-button" ;; 4) CONTROLLER="-w 0 -l 2 --trigger-as-button --dpad-as-button --next-controller -w 1 -l 3 --trigger-as-button --dpad-as-button --next-controller -w 2 -l 4 --trigger-as-button --dpad-as-button --next-controller -w 3 -l 5 --trigger-as-button --dpad-as-button" ;; *) CONTROLLER="incorrect amount of controller specified" ;; esac
Of yourse I’ve entered CONTROLLER_NUM=2.
Has anyone any idea how I can fix this and get it to work? :(
Thank you! -
AuthorPosts
- The forum ‘Controller Configuration in RetroPie’ is closed to new topics and replies.