Xiaomi bluetooth gamepad not working, possible to manally define button map for it?
#1
It's Kodi 18.0-BETA1 on an Amlogic S905D device, running Sx05RE if you might ask. The wired Xbox 360 controller works out of the box.
I also have a Xiaomi bluetooth gamepad, which can be recognized in Kodi settings->System->Input->Peripherals. However, when I try to "Configure attached controllers", none of the button works.
In kodi.log, I see the following:  (Note: 小米蓝牙手柄 is the Chinese name for Xiaomi bluetooth gamepad)

DEBUG: Failed to load button map for "小米蓝牙手柄"
DEBUG: Initialise - initialised peripheral on 'peripheral.joystick/0' with 1 features and 0 sub devices
NOTICE: Register - new joystick device registered on addon->peripheral.joystick/0: 小米蓝牙手柄

I guess this is the reason why it doesn't work, cannot load button map? I'm wondering if it's possible for me to manually create some kind of xml files to fix it? If yes, is there any guide I can follow? I've checked https://kodi.wiki/view/Game_controllers but it doesn't help.
Reply
#2
Kodi registers the controller so you are able to use it. First thing you have to do is to remap the controller, so Kodi knows which buttons are in which position, as described here.

If you want to change the default controller bidings then you have to create a custom joystick.xml and place it in USERDATA/keymaps directory. Note that Kodi Leia 18.0 ships with a bug and your joystick.xml will not be recognised unless you delete the default joystick.xml in the Kodi installation directory. You have more info about the bug here.
Reply
#3
Those screenshots were for Kodi v17, the items in v18 are a bit different. Anyway, I can get to the same setting via "Configure attached controllers".

However, no matter what button I push on Xiaomi bluetooth gamepad, Kodi just cannot detect it. Xbox 360 controller works properly here, I have been able to successfully swap A and B.

Did I miss anything?
Reply
#4
The problem with the Xiaomi BT Gamepad is, that it is recognized as joystick AND as keyboard and thus libinput has difficulties to handle it (debounce errors). I described here how to make libinput ignore the keyboard. After that it can be configured as any other gamepad (no keymap editing needed).
Reply

Logout Mark Read Team Forum Stats Members Help
Xiaomi bluetooth gamepad not working, possible to manally define button map for it?0