2013-04-16, 21:23
I have XBox 360 Wireless Controller (xpad) with appropriate dongle connected via USB. Unfortunately it isn't work properly on my TV Box (MK808)
TVBox configuration:
1. MK808
2. Firmware: MK808 Hybryd FW 2.1.3 720p (xpad.ko included)
3. dmesg controller log:
4. XBox Controller works on "pure" Android. Game Keyboard app shows, that D-Pad, buttons are recognized correctly.
5. Accordingly to http://forum.xbmc.org/showthread.php?tid=135871 topic I tried to recognize, what is the name of device in XBMC. No phrase "Enable joystick" detected in XBMC log.
6. XBox Controller works randomly on standard configuration: D-Pad doesn't work, Y button is ok, A button is back, ...
7. Attempts to put proper name: Xbox 360 Wireless Receiver (XBOX) or even Generic X-Box pad (as a name detected in dmesg) in mapping file won't work
Ubuntu 13.04 configuration:
1. The same dongle is recognized as:
2. Standard approach with downloading mapping file and put it with changed name (Xbox 360 Wireless Receiver (XBOX)) works perfectly.
Any suggestions what can be wrong and how can I fix it? How to enforce XBMC to recognize device?
Regards
EDIT:
After short investigation I realized, that 045e:0291 device is not properly tagged in xpad.ko driver for 3.0.8+ kernel (see http://lxr.free-electrons.com/source/dri...=3.0;a=arm vs. http://lxr.free-electrons.com/source/dri...ad.c?a=arm)
In 3.0.8+ version device is recognized as:
(no 045e:0291 phrase).
So, I understand dmesg messages. However I still have no idea, why XBMC cannot recognize it (mapping files have Generic X-Box pad as an alt names).
What should I put into mapping file
to give XBMC chance to recognize my dongle?
Why have I no phrase: "Enabled joystick:" in XBMC log?
EDIT2:
I downloaded XBMC source code and I found two files with "Enabled joystick:" pattern:
- <main_dir>/xbmc/input/SDLJoystick.cpp
- <main_dir>/xbmc/input/windows/WINJoystick.cpp (not applicable, I think so )
In file SDLJoystick method:
It means, that structures (joy) are not filled properly and not only name is the problem.
I will be very grateful to receive from the community answers for the following questions:
1. Is XBox pad working on XBMC Android, or it works only on "full" Linuxes and Windows? Any success story?
2. As I see code and XBMC and native Android behavior this is not kernel and Android problem:
- xbox pad is properly detected as generic one,
- D-Pad is properly working i.e. in MXPlayer
- some xbox pad keys are working on XBMC, however with wrong mapping (due to problem with mapping id string).
Should I call bug in XBMC?
TVBox configuration:
1. MK808
2. Firmware: MK808 Hybryd FW 2.1.3 720p (xpad.ko included)
3. dmesg controller log:
Code:
[ 1240.012047] usb 2-1.2: new full speed USB device number 10 using usb20_host
[ 1240.119688] usb 2-1.2: New USB device found, idVendor=045e, idProduct=0291
[ 1240.126587] usb 2-1.2: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[ 1240.137952] input: Generic X-Box pad as /devices/platform/usb20_host/usb2/2-1/2-1.2/2-1.2:1.0/input/input8
[ 1240.153618] input: Generic X-Box pad as /devices/platform/usb20_host/usb2/2-1/2-1.2/2-1.2:1.2/input/input9
[ 1240.170441] input: Generic X-Box pad as /devices/platform/usb20_host/usb2/2-1/2-1.2/2-1.2:1.4/input/input10
[ 1240.182774] input: Generic X-Box pad as /devices/platform/usb20_host/usb2/2-1/2-1.2/2-1.2:1.6/input/input11
5. Accordingly to http://forum.xbmc.org/showthread.php?tid=135871 topic I tried to recognize, what is the name of device in XBMC. No phrase "Enable joystick" detected in XBMC log.
6. XBox Controller works randomly on standard configuration: D-Pad doesn't work, Y button is ok, A button is back, ...
7. Attempts to put proper name: Xbox 360 Wireless Receiver (XBOX) or even Generic X-Box pad (as a name detected in dmesg) in mapping file won't work
Ubuntu 13.04 configuration:
1. The same dongle is recognized as:
Code:
[ 9389.433278] usb 4-3: New USB device found, idVendor=045e, idProduct=0291
[ 9389.433286] usb 4-3: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[ 9389.435440] input: Xbox 360 Wireless Receiver (XBOX) as /devices/pci0000:00/0000:00:12.1/usb4/4-3/4-3:1.0/input/input24
[ 9389.435751] input: Xbox 360 Wireless Receiver (XBOX) as /devices/pci0000:00/0000:00:12.1/usb4/4-3/4-3:1.2/input/input25
[ 9389.436068] input: Xbox 360 Wireless Receiver (XBOX) as /devices/pci0000:00/0000:00:12.1/usb4/4-3/4-3:1.4/input/input26
[ 9389.436662] input: Xbox 360 Wireless Receiver (XBOX) as /devices/pci0000:00/0000:00:12.1/usb4/4-3/4-3:1.6/input/input27
Any suggestions what can be wrong and how can I fix it? How to enforce XBMC to recognize device?
Regards
EDIT:
After short investigation I realized, that 045e:0291 device is not properly tagged in xpad.ko driver for 3.0.8+ kernel (see http://lxr.free-electrons.com/source/dri...=3.0;a=arm vs. http://lxr.free-electrons.com/source/dri...ad.c?a=arm)
Code:
125 { 0x045e, 0x0291, "Xbox 360 Wireless Receiver (XBOX)", MAP_DPAD_TO_BUTTONS, XTYPE_XBOX360W },
Code:
165 { 0x0000, 0x0000, "Generic X-Box pad", 0, XTYPE_UNKNOWN }
So, I understand dmesg messages. However I still have no idea, why XBMC cannot recognize it (mapping files have Generic X-Box pad as an alt names).
What should I put into mapping file
Code:
<joystick name="Xbox 360 Wireless Receiver (XBOX)">
<altname>BigBen Interactive XBOX 360 Controller</altname>
<altname>Generic X-Box pad</altname>
<altname>Logitech Chillstream Controller</altname>
<altname>Mad Catz Wired Xbox 360 Controller</altname>
<altname>Mad Catz Wired Xbox 360 Controller (SFIV)</altname>
<altname>Pelican 'TSZ' Wired Xbox 360 Controller</altname>
<altname>Pelican PL-3601 'TSZ' Wired Xbox 360 Controller</altname>
<altname>Xbox 360 Wireless Receiver</altname>
<button id="6">Highlight</button>
</joystick>
Why have I no phrase: "Enabled joystick:" in XBMC log?
EDIT2:
I downloaded XBMC source code and I found two files with "Enabled joystick:" pattern:
- <main_dir>/xbmc/input/SDLJoystick.cpp
- <main_dir>/xbmc/input/windows/WINJoystick.cpp (not applicable, I think so )
In file SDLJoystick method:
Code:
void CJoystick::Initialize()
{
...
// any joysticks connected?
if (SDL_NumJoysticks()>0)
{
// load joystick names and open all connected joysticks
for (int i = 0 ; i<SDL_NumJoysticks() ; i++)
{
SDL_Joystick *joy = SDL_JoystickOpen(i);
#if defined(TARGET_DARWIN)
// On OS X, the 360 controllers are handled externally, since the SDL code is
// really buggy and doesn't handle disconnects.
//
if (std::string(SDL_JoystickName(i)).find("360") != std::string::npos)
{
CLog::Log(LOGNOTICE, "Ignoring joystick: %s", SDL_JoystickName(i));
continue;
}
#endif
m_Joysticks.push_back(joy);
if (joy)
{
m_JoystickNames.push_back(string(SDL_JoystickName(i)));
CLog::Log(LOGNOTICE, "Enabled Joystick: %s", SDL_JoystickName(i));
CLog::Log(LOGNOTICE, "Details: Total Axis: %d Total Hats: %d Total Buttons: %d",
SDL_JoystickNumAxes(joy), SDL_JoystickNumHats(joy), SDL_JoystickNumButtons(joy));
}
else
{
m_JoystickNames.push_back(string(""));
}
}
}
...
}
It means, that structures (joy) are not filled properly and not only name is the problem.
I will be very grateful to receive from the community answers for the following questions:
1. Is XBox pad working on XBMC Android, or it works only on "full" Linuxes and Windows? Any success story?
2. As I see code and XBMC and native Android behavior this is not kernel and Android problem:
- xbox pad is properly detected as generic one,
- D-Pad is properly working i.e. in MXPlayer
- some xbox pad keys are working on XBMC, however with wrong mapping (due to problem with mapping id string).
Should I call bug in XBMC?