Last active
December 11, 2020 06:34
-
-
Save hazcod/e9c0e600e0c8d0f72f4f to your computer and use it in GitHub Desktop.
How to setup Xbox 360 (wireless) controller on xbian
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
How do you pair it?