HOW TO: Setup Xbox 360 Controller quickly in XBMC Live
#1
I have been a long time fan of XBMC since the Xbox days and have never been able to let go of the Xbox controller, I know there is a couple threads on here already with documentation on how to get things working on older versions of XBMC.

I have followed these other posts on several installations and it has always taken me a couple days to get things working properly.

Here is how to use the latest Versions of Grumbel's Userspace driver on Tested on a fresh install XBMC Live Dharma, all buttons and Triggers are also working 100% with this method.


Add Grumbel PPA
Code:
sudo add-apt-repository ppa:grumbel/ppa
sudo apt-get update
sudo apt-get install xboxdrv

Create a bash script that will start on system startup in a few steps
Code:
touch ~xbmc/xboxdrv.sh

and open for editing


Code:
nano ~xbmc/xboxdrv.sh


Paste this into the newsly created xboxdrv.sh


Code:
#!/bin/bash
rmmod xpad
modprobe uinput
modprobe joydev
xboxdrv -c /usr/share/doc/xboxdrv/examples/xbmc.xboxdrv

make xboxdrv.sh executable
Code:
chmod +x xboxdrv.sh


Open rc.local so we can add a line to start the xboxdrv.sh script
Code:
nano /etc/rc.local

Add this above exit 0

Code:
/home/xbmc/xboxdrv.sh


Thanks to , alexpigment, awef previous posts for pointing me in the right direction and of course grumbel
Reply
#2
Thank you very much for the updated information josephdyland. I was able to get my controllers working with xbmc's interface easily.

I wanted to add my two cents and provide an init.d startup script that I wrote. It could probably be cleaner, and it should probably use xboxdrv's daemon mode. But since daemon mode is broken in xboxdrv v0.7.3 screen sessions work just as well.

Just edit the wireless and wired variables to indicate how many controllers you have. I have 2 wireless controller dongles so my setup looks like:
WIRELESS=(0 1)

http://pastebin.com/pKAeVnnQ


Note:
Of course if you use my startup script, you don't need josephdyland's xboxdrv.sh or the addition to rc.local
Reply
#3
Are you guys able to resume from suspend without issues with xboxdrv? I've had problems in the past with this on 0.6.x.
Reply
#4
I've never had a problem with it.
Reply
#5
draggy Wrote:I've never had a problem with it.

Are you shure ? I can't use it either after coming back from suspend.
But it works right away again if I reboot.
Reply
#6
You are correct, I also have issues coming out of suspend now. What I did was just set it up to restart my xboxdrv sessions after the computer resumes. This of course also means that it doesn't work in xbmc until it is restarted. This isn't an issue for me as I don't use the controllers to control xbmc.

I don't think this is a bug. I think it's just how the driver works because it has to re-init the usb ports when the computer resumes....I could be wrong though.

I can't remember if older versions has resume issues....
Reply
#7
draggy Wrote:Thank you very much for the updated information josephdyland. I was able to get my controllers working with xbmc's interface easily.

I wanted to add my two cents and provide an init.d startup script that I wrote. It could probably be cleaner, and it should probably use xboxdrv's daemon mode. But since daemon mode is broken in xboxdrv v0.7.3 screen sessions work just as well.

Just edit the wireless and wired variables to indicate how many controllers you have. I have 2 wireless controller dongles so my setup looks like:
WIRELESS=(0 1)

http://pastebin.com/pKAeVnnQ


Note:
Of course if you use my startup script, you don't need josephdyland's xboxdrv.sh or the addition to rc.local

Love your startup script and if i execute manually everything is fine and it works perfectly (although doesn't seem to work in xbmc ?)

How are you executing it to run at startup ? I popped it in /etc/init.d/xbmdrv (making sure it was executable) and then updated the startup with

sudo update-rc.d xbmdrv defaults

But it doesnt start up as expected. What am i doing wrong ?
-= My Media Centre =-
ACER Revo R3610 | x2 1.5TB WD Caviar Green SATA Hard Drives (WD15EADS) | x2 2.0TB WD Caviar Green SATA Hard Drive ( WD15EARS ) | 3.5in Black eSATA USB Trayless SATA External Hard Drive Enclosure | Emprex 3009URF Wireless MCE Remote Control | XBMCLive Dharma Beta1
Reply
#8
Ah figured it out

Removed my previous startups

Quote:sudo update-rc.d -f xboxdrv remove

The set the highest priority for the driver to run

Quote:sudo update-rc.d -f xboxdrv start 1 2 3 4 5 .

Now it gets loaded before xbmc and works as expected Smile Excellent and thanks draggy Smile
-= My Media Centre =-
ACER Revo R3610 | x2 1.5TB WD Caviar Green SATA Hard Drives (WD15EADS) | x2 2.0TB WD Caviar Green SATA Hard Drive ( WD15EARS ) | 3.5in Black eSATA USB Trayless SATA External Hard Drive Enclosure | Emprex 3009URF Wireless MCE Remote Control | XBMCLive Dharma Beta1
Reply
#9
When I try to run it manually I get

Quote:xbmc@HTPC:/etc/init.d$ sudo xboxdrv start
xboxdrv 0.6.6 - http://pingus.seul.org/~grumbel/xboxdrv/
Copyright © 2008-2010 Ingo Ruhnke <[email protected]>
Licensed under GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This program comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to redistribute it under certain conditions; see the file COPYING for details.

USB Device: 003:002
Controller: "Microsoft Xbox 360 Wireless Controller (PC)" (idVendor: 0x045e, idProduct: 0x0719)
Wireless Port: 0
Controller Type: Xbox360 (wireless)
Deadzone: 0
Trigger Deadzone: 0
Rumble Debug: off
Rumble Speed: left: -1 right: -1
LED Status: auto
Square Axis: no
4-Way Restrictor: no
Dpad Rotation: 0 degree
ButtonMap: none
AxisMap: none
RelativeAxisMap: none
AutoFireMap: none
RumbleGain: 255
ForceFeedback: disabled

Starting with uinput
Creating uinput device: device_id: 0, dev_name: Xbox Gamepad (userspace driver)

Your Xbox/Xbox360 controller should now be available as:
/dev/input/js0
/dev/input/event3

Press Ctrl-c to quit, use '--silent' to suppress the event output

Unknown: len: 29 data: 0x00 0xf8 0x02 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
Unknown: len: 29 data: 0x00 0xf8 0x01 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
Connection status: nothing
start: missing job name
Try `start --help' for more information.
error: child program has stopped with exit status 1
Shutdown complete


UPDATE:

I had the old version installed and every time I upgraded to the new version it was not overwriting the xboxdrv file. I deleted the files then reinstalled and now its working. 7.3 is what I have now and not 6.6
Image
Reply
#10
What keymap file do you guys use to make it work with xbmc?
Reply
#11
just use "-c /usr/share/doc/xboxdrv/examples/xbmc.xboxdrv" option when running xboxdrv and it works automatically with xbmc
Reply
#12
Thanks, I fixed up my config and it works with xbmc and emulators.

Quick question, do all the buttons work within xbmc for you guys? My Y + X buttons dont seem to do anything? wasnt Y was used to bring up the context menu on the xbox 1 (while browsing the library etc).

Im using version 0.8.0 using the instructions from the 1st page.
Reply
#13
draggy Wrote:Thank you very much for the updated information josephdyland. I was able to get my controllers working with xbmc's interface easily.

I wanted to add my two cents and provide an init.d startup script that I wrote. It could probably be cleaner, and it should probably use xboxdrv's daemon mode. But since daemon mode is broken in xboxdrv v0.7.3 screen sessions work just as well.

Just edit the wireless and wired variables to indicate how many controllers you have. I have 2 wireless controller dongles so my setup looks like:
WIRELESS=(0 1)

http://pastebin.com/pKAeVnnQ


Note:
Of course if you use my startup script, you don't need josephdyland's xboxdrv.sh or the addition to rc.local


Draggy - can you explain how I implement your script? I followed the post at the start of this thread and now my wireless 360 pad doesn't work at all. .!

Thanks! Big Grin
Reply
#14
draggy Wrote:Thank you very much for the updated information josephdyland. I was able to get my controllers working with xbmc's interface easily.

I wanted to add my two cents and provide an init.d startup script that I wrote. It could probably be cleaner, and it should probably use xboxdrv's daemon mode. But since daemon mode is broken in xboxdrv v0.7.3 screen sessions work just as well.

Just edit the wireless and wired variables to indicate how many controllers you have. I have 2 wireless controller dongles so my setup looks like:
WIRELESS=(0 1)

http://pastebin.com/pKAeVnnQ


Note:
Of course if you use my startup script, you don't need josephdyland's xboxdrv.sh or the addition to rc.local

and that goes where?
Reply
#15
You need to follow josephdyland's first step to install the driver, then you can use the script I created to run the controller drivers at startup.

It's just an init.d script. See http://embraceubuntu.com/2005/09/07/addi...at-bootup/ for instructions on how to install startup scripts for ubuntu.

Don't forget to edit the parameters to match your setup.
Reply

Logout Mark Read Team Forum Stats Members Help
HOW TO: Setup Xbox 360 Controller quickly in XBMC Live0