# XBMC Configuration
# ==================
#
# This configuration file that with XBMC by emulating a wireless
# Xbox360 controller connected to the xpad kernel driver. It uses the
# configuration files that come with XBMC, so it should work out of
# the box without any further configuration of XBMC.
#
#
[xboxdrv]
ui-clear = true
extra-devices=false
extra-events=false
deadzone=6000
device-name = "Microsoft Xbox 360 Wireless Controller (PC)"

# The resp filter moves the neutral position to zero to work around a
# bug in XBMC, that causes bogus events when neutral position is
# elsewhere. It loses a bit of precision in the trigger as result, but
# that isn't noticable.
LT^resp:127:255=ABS_Z
RT^resp:127:255=ABS_RZ

# EOF #

Next Step modify rc.local:

nano /etc/rc.local
Above exit 0, paste: sh /home/pi/xbox/loadxbox.sh

Create a file named keyboard.xml and put in /usr/local/share/xbmc/system/keymaps:

<!-- This file contains the mapping of keys (gamepad, remote, and keyboard) to actions within XBMC -->
<!-- The <global> section is a fall through - they will only be used if the button is not -->
<!-- used in the current window's section. Note that there is only handling -->
<!-- for a single action per button at this stage. -->
<!-- For joystick/gamepad configuration under linux/win32, see below as it differs from xbox -->
<!-- gamepads. -->

<!-- To map keys from other remotes using the RCA protocol, you may add <universalremote> blocks -->
<!-- In this case, the tags used are <obc#> where # is the original button code (OBC) of the key -->
<!-- You set it up by adding a <universalremote> block to the window or <global> section: -->
<!-- <universalremote> -->
<!-- <obc45>Stop</obc45> -->
<!-- </universalremote> -->

<!-- Note that the action can be a built-in function. -->
<!-- eg <B>XBMC.ActivateWindow(MyMusic)</B> -->
<!-- would automatically go to My Music on the press of the B button. -->

Thanks for the help. I've tried numerous ways to get my Xbox 360 Wireless controller connected to xbian but they don't work. The controller connects when loading xbian but when xbian has loaded the green lights start spinning and controller doesn't work. Can anyone help?

I have written a small script (see attachment) to add Xbox-Controller-support for xbian.

Instructions:1: connect the Xbox USB-Adapter to your Pi and sync it with your Controller2: copy extracted folder ("xbox") to xbians home folder,
so you have this structure "/home/xbian/xbox" 3: make sure you have an internet-connection
(no need for that, if you have already installed "xboxdrv")4: execute this command: "sudo chmod u+x ~/xbox/install && sudo ~/xbox/install"5: enter your password
--> xbian is going to restart --> now you can use your controller as a remote

If you don't like the Controller mapping, just edit the file "/home/xbian/xbox/mapping_xbox" and restart your Pi.

I have written a small script (see attachment) to add Xbox-Controller-support for xbian.

Instructions:1: connect the Xbox USB-Adapter to your Pi and sync it with your Controller2: copy extracted folder ("xbox") to xbians home folder,
so you have this structure "/home/xbian/xbox" 3: make sure you have an internet-connection
(no need for that, if you have already installed "xboxdrv")4: execute this command: "sudo chmod u+x ~/xbox/install && sudo ~/xbox/install"5: enter your password
--> xbian is going to restart --> now you can use your controller as a remote

If you don't like the Controller mapping, just edit the file "/home/xbian/xbox/mapping_xbox" and restart your Pi.

I realise that this thread is a bit old but I have come into a little bit of a problem. Whenever I plug in my controller after the pi has already been powered on, it doesn't seem to work. If I SSH into it and run the start.sh script it starts working again. Does anyone have any idea how I would go about designing a script to run start.sh whenever a USB is plugged in or the controller itself?

Can you be more precise, im a bit of a noob with linux/xbianmc.
I got it to work using your tutorial. However my controller only works after 2 or 3 min, when the 'screensaver' starts running (when the screen turns a bit darker). Any idea why?

Hi, I tried following the steps in this guide, but actually, I think I'm missing something at the very beginning.

The guide starts by 1. connect the Xbox USB-Adapter to your Pi and sync it with your Controller.
When I plug my USB receiver and try to sync it with my controller, it's not working, the green ring continues blinking.
When I plug my receiver to a Windows computer, it syncs automatically and the first "quarter" of the ring lights up (up left quarter)

When I stop the service lirc and run mode2 (as I saw in different threads/forums), I get nothing at all.

By running sudo xboxdrv --wid 0 -s -l 2 --dpad-as-button --deadzone 12000, ( I had ro run sudo rmmod xpad first, I was able to get the flashing green circle to stop blinking and it's synched with the receiver.

I rerun the steps in this guide, but I still don't see any reaction on my kodi from the controller, and nothing shows up with the mode2 command

(16th May, 2016 02:03 AM)Imad Safieddine Wrote: Hi, I tried following the steps in this guide, but actually, I think I'm missing something at the very beginning.

The guide starts by 1. connect the Xbox USB-Adapter to your Pi and sync it with your Controller.
When I plug my USB receiver and try to sync it with my controller, it's not working, the green ring continues blinking.
When I plug my receiver to a Windows computer, it syncs automatically and the first "quarter" of the ring lights up (up left quarter)

When I stop the service lirc and run mode2 (as I saw in different threads/forums), I get nothing at all.

I have written a small script (see attachment) to add Xbox-Controller-support for xbian.

Instructions:1: connect the Xbox USB-Adapter to your Pi and sync it with your Controller2: copy extracted folder ("xbox") to xbians home folder,
so you have this structure "/home/xbian/xbox" 3: make sure you have an internet-connection
(no need for that, if you have already installed "xboxdrv")4: execute this command: "sudo chmod u+x ~/xbox/install && sudo ~/xbox/install"5: enter your password
--> xbian is going to restart --> now you can use your controller as a remote

If you don't like the Controller mapping, just edit the file "/home/xbian/xbox/mapping_xbox" and restart your Pi.

I hope this helps.

This works awesome! Thanks

Perfect!!! this works like charm (took a while before I found this post, but this did it for me). I used with my logitech F710 gamepad on xbian with kodi 17.4