360 USB controller and nightmares
#1
After installing XBMC on Ubuntu 9.04 I was initially surprised that my USB 360 controller wasn't supported out of the box. No problem, I figured, I just have to edit keymap.xml.
Except changes to keymap.xml don't always result in changes in the program. Changing the joystick name to "Microsoft X-Box 360 pad" works for example but changing button id="1" to "0" doesn't seem to do a thing.
I am left wondering why PS3 controllers are supported by default but not 360 controllers.
My controller is under /dev/input/js0, I have tried sybiotically linking it to /dev/js0 but no luck.

More info on this thread:
http://ubuntuforums.org/showthread.php?p=7377383
Reply
#2
Let me be more specific.
I can get the controller to work by adding <altername="Microsoft X-Box 360 pad"> under the Xbox S controller part of keymap.xml . However since the button id of XBMC doesn't match the output I get from jscalibrator it's pure trial and error to configure it correctly.
How can I find out how XBMC interprets the input from my controller?
Reply
#3
There are multiple problems with the xbox360 controller on linux/xbmc.

First, the dpad by default is recognized as axis, not buttons so even if you do correctly configure your keymap, anytime you use your dpad the focus will move too fast.

What you need to do is disable xpad, use Grumbel's userspace driver instead and use the Keymap.xml file from these sites:

http://pingus.seul.org/~grumbel/xboxdrv/

http://www.stolennotebook.com/anthony/20...r-xboxdrv/

To answer your original question: there is a log file in ~/.xbmc/temp/xbmc.log
Tail this file while running xbmc and you can see what the button numbers are as you hit them unfortunately, the axis do not show in the log.

For more details about the grumbel userspace driver, search my posts... it should be in the xbmc standalone install on hardy/intrepid thread.
Reply
#4
Thank you very much for that post. Very few people have even attempted to respond to me over the past few days an forums IRC etcand you have just solved my problem perfectly in one go.

One thing I did notice was that the custom .xml can't run by itself and has to be integrated into the default file as xbmc seems to crash if it can't find a <gamepad> in there. Just some copypasting as I have done here: http://pastebin.com/f349ad79a

If this userspace driver is as superior to xpad as it seems to be I wonder why it isn't included in the kernal? Also whoever named their post-it note app Xpad as well should be shot as it made googling relevant info much more difficult

Thanks again, please make this info more readily available for the many people in my position.
Reply
#5
I just followed StolenNotebook's instructions and put my modified Keymap.xml file in ~/.xbmc/userdata (be sure to keep the capital K on Keymap)

Works like a charm, the only drawback to this method is that you lose plug'n'play ability. So, the controller has to be connected *before* xbmc starts.
Reply
#6
Well I never had that kind of plug and play even with xpad. This also fixes the issue I was having with pSX not recognising my dpad. It seems that having the dpad as 4 buttons is the default in windows and so coders all work to that standard even though it might technically be an axis in the 360's case.
Reply
#7
femngi Wrote:Well I never had that kind of plug and play even with xpad. This also fixes the issue I was having with pSX not recognising my dpad. It seems that having the dpad as 4 buttons is the default in windows and so coders all work to that standard even though it might technically be an axis in the 360's case.

Yup. If you read the linux kernel notes for xpad, they even admit to their laziness in not implementing the dpad as buttons by default. Smile

Plus, I find being able to define a deadzone a godsend, otherwise its just way too sensitive.
Reply

Logout Mark Read Team Forum Stats Members Help
360 USB controller and nightmares0