HOW TO: Setup Xbox 360 Controller quickly in XBMC Live

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
Spider Offline
Member
Posts: 69
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
Fan
Posts: 302
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
Fan
Posts: 302
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
Fan
Posts: 302
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
waituna Offline
Junior Member
Posts: 11
Joined: Feb 2010
Reputation: 0
Post: #21
Had a few issues getting the above instructions to work, basically josephdyland's xboxdrv.sh when added to /etc/rc.local didn't appear to start soon enough for me - would only work if I restarted XBMC once my system had booted.

Next I tried draggy's init script, which initially didn't work either. Turns out that the script requires the screen command and my XBMCbuntu install didn't have the screen command installed, so

apt-get install screen

resolved my issue.
find quote
joeranjensen Offline
Senior Member
Posts: 255
Joined: Aug 2010
Reputation: 0
Location: Norway
Post: #22
Hi Im trying to follow this guide to set up my xbox 360 wireless controller. Im at the step where im supposed to Create a bash script that will start on system startup in a few steps.

Code:
touch ~xbmc/xboxdrv.sh

This is not working, I get "can not touch `~xbmc/xboxdrv.sh : No such file or directory..

Would the code be different since Im on xbmcbuntu and this guide is ment for xbmc live? Or, what else do I do wrong?

Thanks
find quote
draggy Offline
Member
Posts: 71
Joined: May 2008
Reputation: 0
Post: #23
~xbmc/xboxdrv.sh assumes that xbmc is the user that you use to run xbmc with. If you use a different user, change it to "~<user>/xboxdrv.sh" This also effects the last step "/home/xbmc/xboxdrv.sh" should be "/home/<user>/xboxdrv.sh"
(This post was last modified: 2012-05-03 22:21 by draggy.)
find quote
joeranjensen Offline
Senior Member
Posts: 255
Joined: Aug 2010
Reputation: 0
Location: Norway
Post: #24
(2012-05-03 22:01)draggy Wrote:  ~xbmc/xboxdrv.sh assumes that xbmc is the user that you use to run xbmc with. If you use a different user, change it to "~<user>/xboxdrv.sh" This also effects the last step "/home/xbmc/xboxdrv.sh" should be "/home/<user>/xboxdrv.sh"

thanksSmile That makes sense... Il try tomorrow, to drunk now.....
find quote
Samba123 Offline
Junior Member
Posts: 7
Joined: Mar 2011
Reputation: 0
Post: #25
Just a quick question on this.

If I wanted to just use my wired xbox360 controller to control emulators using advanced launcher and not xbmc at all do I just follow the install instructions installing the driver and start up but remove the step to map to the keymap?

So my xboxdrv.sh script would look like this?

Code:
#!/bin/bash
rmmod xpad
modprobe uinput
modprobe joydev
find quote
alexpigment Offline
Fan
Posts: 302
Joined: Jan 2009
Reputation: 8
Post: #26
(2012-05-10 18:24)Samba123 Wrote:  Just a quick question on this.

If I wanted to just use my wired xbox360 controller to control emulators using advanced launcher and not xbmc at all do I just follow the install instructions installing the driver and start up but remove the step to map to the keymap?

So my xboxdrv.sh script would look like this?

Code:
#!/bin/bash
rmmod xpad
modprobe uinput
modprobe joydev

No, you want to keep your script the same. You'll need to remove your keymap (joystick.Microsoft.Xbox.360.Controller.xml) IF you want to go down that route. Still, I think you might find that navigating around XBMC with the controller is nice, especially in large folders. If I recall, advanced launcher has a specific option for automatically suspending XBMC while in an emulator. Other tutorials I've seen make a script for killing XBMC and resuming it seemless when entering/exiting an emulator.
find quote
JaniSan Offline
Junior Member
Posts: 2
Joined: Apr 2011
Reputation: 0
Post: #27
Hi.

Could somebody tell me what button is ok/enter in dvd/bluray menu in eden.
In dharma i enable dvd-menu, make my selection and press A-button
In eden a-button enable pause.

press by press tutorial and/or issue fixing Keymap would be awesome Smile
find quote
alexpigment Offline
Fan
Posts: 302
Joined: Jan 2009
Reputation: 8
Post: #28
(2012-05-13 16:03)JaniSan Wrote:  Hi.

Could somebody tell me what button is ok/enter in dvd/bluray menu in eden.
In dharma i enable dvd-menu, make my selection and press A-button
In eden a-button enable pause.

Actually, this has been a problem with XBOX360 controllers since at least Dharma:

"PPS - KNOWN BUG : DVD Menus do not appear to work properly with this setup, UNLESS you hit left shoulder button first to bring up the "now playing" on screen display. LEAVE THE DISPLAY UP and you can navigate through menus, but if you drop the display you appear to lose control again."
- from this old thread: http://forum.xbmc.org/showthread.php?tid=57304

Not sure if that workaround works anymore, but it's proof that it's a long-standing issue. For what it's worth, it does make sense why this issue happens. There's probably no special keymapping for DVD menus when compared to DVD playback.
find quote
haywire Offline
Junior Member
Posts: 13
Joined: Sep 2010
Reputation: 0
Post: #29
I'm using this xboxdrv method with xbox 360 wireless controller and following fresh install of
http://xbmcfreak.binkey.nl/xbmcbuntu-12....a01-v1.iso

Everything seems to work perfectly with the provided instructions with one exception.

The triggers don't work properly
1. they don't work at all when scrolling through menus
2. Trying to fast forward/rewind in movies and music. Once the left or right trigger pressed never goes back to play and stays stuck on FF/RW (if i pull it hard it goes to 32x, upon release it drops down to 8x. - but never back to play. Pressing the trigger in the opposite direction does the same thing, but in reverse and never goes back to play)



i suspect i need to alter either the deadzone or the filter settings. (is this correct?)


at the bottom of the /usr/share/doc/xboxdrv/examples/xbmc.xboxdrv file i noticed the below code

# 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

I suspect modifying these may be able to resolve my trigger issues?
the manual reads

resp, response:VALUES:...
The response curve filter allows you to completely change the
way an axis reacts. The filter takes a list of VALUES that are
then linearly interpolated and spread across the full range of
the axis. An example would look like this:

xboxdrv \
--ui-axismap x1^resp:-32768:-4000:0:4000:32767

Here the X1 axis is manipulated so that it will have a lower
sensitivity in the center and a higher one on the outside.
(This post was last modified: 2012-11-13 07:21 by haywire.)
find quote
Firas.AlShafei Offline
Junior Member
Posts: 34
Joined: Apr 2011
Reputation: 2
Post: #30
@Draggy - there's an error in your init script

if [ -z "$(lsmod | grep uinputl)" ]; then

It's looking for uinputl not uinput - this causes that if statement to always be true

Smile

Like my post? please up my reputation, it faced the wrath of X3lectric over this post
[HOW-TO][FRODO] Configure XBOX 360 Wireless Controller
[HOW-TO][Frodo] XBOX DVD Remote/Dongle
find quote
Post Reply