Skip to content

Instantly share code, notes, and snippets.

@hazcod
Last active December 11, 2020 06:34
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hazcod/e9c0e600e0c8d0f72f4f to your computer and use it in GitHub Desktop.
Save hazcod/e9c0e600e0c8d0f72f4f to your computer and use it in GitHub Desktop.
How to setup Xbox 360 (wireless) controller on xbian
ssh xbian@IP_OF_YOUR_XBIAN
sudo apt-get install xboxdrv
mkdir xbox
nano xbox/mapping
```
[xboxdrv]
silent = true
ui-clear = true
extra-devices=false
extra-events=false
deadzone=6000
device-name = "Xbox 360 Wireless Receiver"
[ui-buttonmap]
#A=BTN_A
A=KEY_ENTER
#B=BTN_B
B=KEY_BACKSPACE
X=KEY_X
Y=KEY_ESC
#Steuerkreuz Links macht A, Steuerkreuz Rechts macht B
#DU=BTN_0
DU=KEY_UP
#DD=BTN_1
DD=KEY_DOWN
#DL=BTN_LEFT
DL=KEY_LEFT
#DR=BTN_RIGHT
DR=KEY_RIGHT
START=BTN_START
GUIDE=BTN_MODE
BACK=KEY_C
LB=BTN_TL
RB=BTN_TR
#TL=BTN_THUMBL
TL=BTN_LEFT
#TR=BTN_THUMBR
TR=BTN_RIGHT
RT=KEY_EQUAL
LT=KEY_MINUS
[ui-axismap]
#x2=REL_RX:10
#y2=REL_RY:-10
x1=REL_X:10
y1=REL_Y:10
# 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 #
```
nano xbox/load.sh
```
#!/bin/bash
sudo xboxdrv --config /home/xbian/xbox/mapping --wid 0 -l 2 --silent --detach-kernel-driver &
```
chmod +x xbox/load.sh
nano /etc/rc.local
(add above exit 0)
```
/home/xbian/xbox/load.sh
```
Now reboot or run `/home/xbian/xbox/load.sh`.
(disable mouse support in Kodi to get rid of the mouse pointer)
@guysoft
Copy link

guysoft commented Dec 10, 2020

How do you pair it?

@hazcod
Copy link
Author

hazcod commented Dec 11, 2020

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment