HOW TO: Setup Xbox 360 Controller quickly in XBMC Live

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
draggy Offline
Member
Posts: 71
Joined: May 2008
Reputation: 0
Post: #11
just use "-c /usr/share/doc/xboxdrv/examples/xbmc.xboxdrv" option when running xboxdrv and it works automatically with xbmc
find quote
teeedubb Offline
Donor
Posts: 737
Joined: Mar 2010
Reputation: 11
Location: Down Under
Post: #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.
find quote
gneville Offline
Junior Member
Posts: 13
Joined: Aug 2009
Reputation: 0
Post: #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
find quote
X3lectric Offline
Closed Account
Posts: 1,756
Joined: Feb 2006
Location: in a Dropbox
Post: #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?
find quote
draggy Offline
Member
Posts: 71
Joined: May 2008
Reputation: 0
Post: #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.
find quote
Spider Offline
Member
Posts: 70
Joined: Oct 2009
Reputation: 0
Post: #16
Hi, iam trying to get mine x360 controller to work, but running in to some trouble.
Followed this tutorial and the controller syncs after it, so the first led stays on.
But after that there is no live in the controller, so no button press does something! am i forgetting something? what coiuld be the problem?


Kind Regards
find quote
alexpigment Offline
Senior Member
Posts: 297
Joined: Jan 2009
Reputation: 8
Post: #17
Hey guys,

Thanks for the steps on getting this set up; worked in Eden easily. A few things that I'm wondering though:

In Dharma with the old instructions I used to follow, package, keymap, etc, the right bumper button would bring up a context menu in the main interface. There's a lot of other button functionality that is missing as well. After looking around, it seems like the keymap I was using before had a lot of button mapping that was dependent on where you were in XBMC. By comparison, /usr/share/doc/xboxdrv/examples/xbmc.xboxdrv is very small (I assume this is a keymap - correct me if i'm wrong). Is it possible to just point the .sh file to the old keymap, or have the variables / expected syntax changed?

Old keymap:

http://pastebin.com/6CsLKbUF

xbmc.xboxdrv (presumably the new keymap):

Code:
[xboxdrv]
ui-clear = true
extra-devices=false
extra-events=false
deadzone=4000
device-name = "Xbox 360 Wireless Receiver"

[ui-buttonmap]
A=BTN_A
B=BTN_B
X=BTN_X
Y=BTN_Y

DU=BTN_0
DD=BTN_1
DL=BTN_LEFT
DR=BTN_RIGHT

START=BTN_START
GUIDE=BTN_MODE
BACK=BTN_BACK

LB=BTN_TL
RB=BTN_TR

TL=BTN_THUMBL
TR=BTN_THUMBR

[ui-axismap]
X1=ABS_X
Y1=ABS_Y

X2=ABS_RX
Y2=ABS_RY
find quote
draggy Offline
Member
Posts: 71
Joined: May 2008
Reputation: 0
Post: #18
xbmc.xboxdrv is not a new keymap and should not be changed. It is, as I understand it, what maps the signals received from the remote to known keystrokes (or buttons).

Where your "old" keymap is what xbmc uses to determine what button does what. Basically the controller to xbmc path maps like this:

Receiver->xbmc.xboxdrv->Keyboard.xml->XBMC

I haven't looked at this as I don't use the controller to navigate XBMC, but what you need to look at is Keyboard.xml, and creating your own custom version of it, or figuring out why the current version doesn't do what you expect it to like the old one did.

http://wiki.xbmc.org/index.php?title=Keyboard.xml
Perhaps it has been changed a lot since Dharma and you're not using the new Eden xml? You should make sure you're not using the old version first.
(This post was last modified: 2012-03-26 17:46 by draggy.)
find quote
alexpigment Offline
Senior Member
Posts: 297
Joined: Jan 2009
Reputation: 8
Post: #19
Thanks for the help draggy. Through that wiki I was able to find a keymap at the following location:

/usr/share/xbmc/system/keymaps/joystick.Microsoft.Xbox.360.Controller.xml

Is this the one that's being used? If not, how do I tell the driver (or XBMC) to use this one?
find quote
alexpigment Offline
Senior Member
Posts: 297
Joined: Jan 2009
Reputation: 8
Post: #20
FYI, I just figured out (or re-figured out actually) how to enable multi-controller support so you can have 4 controllers hooked up to your wireless dongle. My xboxdrv.sh file looks like this:

Code:
#!/bin/bash
rmmod xpad
modprobe uinput
modprobe joydev
xboxdrv --wid 0 -s -c /usr/share/doc/xboxdrv/examples/xbmc.xboxdrv &
sleep1
xboxdrv --wid 1 -s -c /usr/share/doc/xboxdrv/examples/xbmc.xboxdrv &
sleep1
xboxdrv --wid 2 -s -c /usr/share/doc/xboxdrv/examples/xbmc.xboxdrv &
sleep1
xboxdrv --wid 3 -s -c /usr/share/doc/xboxdrv/examples/xbmc.xboxdrv &

Now the one thing I can't figure out is that the controller seem to remember their 'number'. In other words, one controller will always light up the top left, the other will always light up the top right, etc. In the past, it lit up the top right if it was the first controller you turned on. I think it would be preferable if it still worked that way. Maybe I'll ping grumbel and see if he knows why.

EDIT: Actually, it seems like the light situation is a little more random. I've seen one controller light up on the top left, top right, and bottom left so far. I guess I can deal with this, but it's a little odd.
(This post was last modified: 2012-03-27 05:03 by alexpigment.)
find quote