Fix Xbox 360 controller support

  Thread Rating:
  • 4 Votes - 4.75 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
maboivin Offline
Junior Member
Posts: 3
Joined: Dec 2012
Reputation: 0
Post: #91
shiretoko212: I'm using:
Starting XBMC (12.0-BETA2 Git:Unknown), Platform: Linux (Debian GNU/Linux testing/unstable, 3.6.7 armv6l). Built on Dec 3 2012

with OS:
Linux raspbmc 3.6.7 #1 PREEMPT Tue Nov 20 23:18:55 UTC 2012 armv6l GNU/Linux

on hardware:
Raspberry Pi Model B.
find quote
haywire Offline
Junior Member
Posts: 13
Joined: Sep 2010
Reputation: 0
Post: #92
I installed the latest xbmc freak image
http://www.xbmcfreak.nl/en/xbmcbuntu-12-...-are-here/
Installed xboxdrv and have the exact same issues you described shiretoko.

In the past I was able to get the xboxdrv working perfectly with 9.04 - triggers and all, I'm not to sure what has all changed.
I still have my 9.04 box working fully with xbmclive and xboxdrv

i do remember having to use a custom keymap
find quote
shiretoko212 Offline
Team-Kodi Member
Posts: 155
Joined: Jul 2012
Reputation: 1
Post: #93
Thank you for confirming the behavior I described. Hopefully, a dev will know why. I'll polish the incomplete xpad/xboxdrv keymaps I made once we know.
find quote
haywire Offline
Junior Member
Posts: 13
Joined: Sep 2010
Reputation: 0
Post: #94
I contacted Grumbel and here is what he said

"Just a few quick thoughts on the general issues:

Xbox360 wireless controller and Xbox360 USB controllers are handled different in the xpad Linux kernel (i.e. the dpad is handled as two axes in one and as 4 button in the other), thus mappings for a wireless controller won't work for a wired one or vice versa. The old Xbox1 controller is probably also different.

xboxdrv itself employs yet another mapping (triggers are mapped to gas/break, not Z/RZ), so it won't work with any of the configurations for the other.

However, as xboxdrv is configurable, that's easy to fix, it has the options --mimic-xpad and --mimic-xpad-wireless to mimic the name and mappings of the xpad kernel driver.

So you can either just require users to use the --mimic-xpad options or you need to ship extra configuration files for xboxdrv.

Generally speaking I would recommend against using xboxdrv with XMBC, as there is simply no need for it, the kernel driver should handle all the basic use fine. xboxdrv should only be used for cases where there is additional configuration needed."
(This post was last modified: 2012-12-05 16:59 by haywire.)
find quote
shiretoko212 Offline
Team-Kodi Member
Posts: 155
Joined: Jul 2012
Reputation: 1
Post: #95
I don't think it would be a problem using a separate keymap for wired and wireless 360 controllers on xpad, given that they use different device names in most cases. I own both a wired and wireless one, so I could probably work on that later. I've only been using my wired controller up til now.

Since xboxdrv uses a specific device name, including a specific keymap for it shouldn't be a problem, no? My second pastebin reveals the minor differences. While it might be unrecommended, if it's just a matter of adding another xml file, why not?

None of those things address the unmappable start button and trigger issues we experience though. This happens with both xpad and xboxdrv.
(This post was last modified: 2012-12-05 17:14 by shiretoko212.)
find quote
shiretoko212 Offline
Team-Kodi Member
Posts: 155
Joined: Jul 2012
Reputation: 1
Post: #96
I went back into Linux and fixed all the rest of the sections for xpad and xboxdrv. I also tried out my wireless controller with xpad. The only difference for wireless that I found is the dpad uses buttons 12-15, instead of the hat, which doesn't require a separate keymap (unless hat interferes with the 15 button config somehow, in which case a second keymap for wireless only would be easy to make). Still can't figure out how to fix the triggers or map/use them without breaking the thumbsticks and still can't find a fix for the start button. It's a problem for wired and wireless, and xpad and xboxdrv, at least from what I've tried. Maybe someone else will have more luck. I'm putting the updated pastebins in the parent post in The Keymaps section now that I adjusted all sections.
(This post was last modified: 2012-12-05 20:05 by shiretoko212.)
find quote
haywire Offline
Junior Member
Posts: 13
Joined: Sep 2010
Reputation: 0
Post: #97
I noticed a couple things
With xpad and your latest v.2 xpad xml-
I do get repsonse from using the start button- whenever i press it it takes me back to the home screen regardless of whatever menu im in or watching a movie.

the analog joysticks dont work. however if i press and hold both triggers. the joysticks can be used to seek and adjust volume
on the
right analog joy stick (with both triggers being held) left -> lowers volume, right -> does nothing, up -> raises volume, down -> does nothing
Left analog joy stick (with both triggers being held) left -> seeks rewind, right -> seeks fast forward, up -> (intermittent) seeks fast forward. down -> (intermittent) seeks rewind

with xboxdrv and .2 xml
right analog joy stick - move left -> lowers volume, right -> raises volume, up -> raises volume, down -> lowers volume
left analog joy stick - move left -> seeks rewind, right -> seeks fast forward, up -> seeks fast forward, down -> seeks rewind

left trigger - when in menus scrolling works with triggers (moves up), when in movies or music allows you to rewind. however does not always move back to play. if you press the trigger hard and let it snap back, it will usually go back to play (not perfect)

Right trigger - does nothing

start button - takes me back to home menu



Also i remember from the past that clone microsoft wireless recievers operate slightly differently then authentic ones
find quote
shiretoko212 Offline
Team-Kodi Member
Posts: 155
Joined: Jul 2012
Reputation: 1
Post: #98
haywire: which device name shows up when you use xpad with that behavior? For mine, start doesn't work, and the thumbsticks are properly mapped for both "Xbox 360 Wireless Receiver" and "Microsoft X-Box 360 pad", my wireless and wired controllers respectively. Since I only own an official wired and official wireless controller, there's little I can do to test it.
(This post was last modified: 2012-12-06 13:34 by shiretoko212.)
find quote
hudri Offline
Junior Member
Posts: 3
Joined: Jan 2011
Reputation: 0
Post: #99
EDIT: As suggested, this post on text input by using XBox 360 controller (Steam Big Picture "daisy wheel") has been moved to a separate Thread

http://forum.xbmc.org/showthread.php?tid=147370
(This post was last modified: 2012-12-06 16:40 by hudri.)
find quote
shiretoko212 Offline
Team-Kodi Member
Posts: 155
Joined: Jul 2012
Reputation: 1
Post: #100
hudri, can you move that to a new thread in this Feature Suggestions forum? People won't be able to find your suggestion in this large thread only tangentially related to it. This thread is about fixing keymap files and device names.

edit: Thanks, hudri. I like the idea. I hope it gets more notice.
(This post was last modified: 2012-12-06 17:40 by shiretoko212.)
find quote
haywire Offline
Junior Member
Posts: 13
Joined: Sep 2010
Reputation: 0
Post: #101
For xboxdrv
it shows the receiver but not the controller (should it show this in the xbmc.log?)

19:17:20 T:3007842112 NOTICE: Enabled Joystick: Xbox 360 Wireless Receiver
19:17:20 T:3007842112 NOTICE: Details: Total Axis: 6 Total Hats: 0 Total Buttons: 15

for xpad ill have to check once i get home
find quote
shiretoko212 Offline
Team-Kodi Member
Posts: 155
Joined: Jul 2012
Reputation: 1
Post: #102
You must have changed a setting of xboxdrv. As far as I know, xboxdrv defaults to "Xbox Gamepad (userspace driver)" (correct me if I'm wrong; that would be useful information). If you overrode that to an xpad device name, it isn't going to use the xboxdrv specific keymap. I think we need others to try out my xpad and xboxdrv keymaps to confirm your conflicting descriptions.
(This post was last modified: 2012-12-06 19:09 by shiretoko212.)
find quote
haywire Offline
Junior Member
Posts: 13
Joined: Sep 2010
Reputation: 0
Post: #103
no i haven't changed anything, its a fresh install from scratch for both my instances of xpad and xboxdrv
find quote
shiretoko212 Offline
Team-Kodi Member
Posts: 155
Joined: Jul 2012
Reputation: 1
Post: #104
I tested it again. My official Xbox 360 wireless controller still shows up as "Xbox Gamepad (userspace driver)" just like my wired controller when using xboxdrv as a driver. As well, this is a note to everyone testing this on linux, don't touch the triggers until you've confirmed the behavior of the thumbsticks. I hope others chime in soon to help test this and fix Linux support.
find quote
DDDamian Offline
Team-XBMC Developer
Posts: 3,030
Joined: Sep 2011
Reputation: 254
Location: Canada
Post: #105
Gotta say - on a Windows system the combined work here of shiretoko212 and da-anda has made this controller my first choice again for a remote. Fantastic work!

Having the analog sticks respond as button presses would be about the only other magic I can think of, but I haven't looked at what code changes are required.

System: XBMC HTPC with HDMI WASAPI & AudioEngine - Denon AVR-3808CI - Denon DVD-5900 Universal Player - Denon DCM-27 CD-Changer
- Sony BDP-S580 Blu-Ray - X-Box 360 - Android tablet wireless remote - 7.1 Streem/Axiom/Velodyne Surround System
If I have been able to help feel free to add to my reputation +/- below - thanks!
find quote
Post Reply