Android Problem with Mocute Game Pad in Kodi
#1
Question 
Welcome everybody,

I tried to solve my problem myself using this forum, but unfortunately I need help. Let me describe my issue:

I heve bought the Mocute BT controler for my Android device with Kodi onboard.
Image

Device works fine and has a lot of functions. It controls apps and Android desktop very well, but I have problem with Kodi. When navigating menu it skips each one menu item (horizontaly and verticaly). Becouse I have some programing skills the first thought was to check commands this controller sends to Android. I found proper app and i realized that joystick sends two commands at the same time: analog movement value and DPad button pressed command for the same direction.

Looking on this forum i found information about localization of Kodi’s xml configuration files and C++ code with gamepad parameters listed inside, and tried to modify the configuration of Kodi controller. I was thinking it will be easy to disable one of the commands (f.e. DPad conntrol buttons) but I was wrong. I tried to modify gen.xml, joystick. xml and gamepad.xml to globally turn off reaction for DPad but there is no effect .

This controller is very cheap and very popular so I’m sure that my experience will be very helpfull for other users of Kodi. I wiil share my solution of coruse, so I’ll be very greatfull if somebody gives me a hand to solve this problem.
Reply
#2
They've got different modes available on them (from memory pressing the start button plus one of the 4 lower buttons switches the mode). Have a play with the different ones and see if that makes any difference.

I have one of them (I use it for work for PowerPoint stuff) and managed to get it to also pair with my Kodi Pi and also my Samsung tablet. In both cases it was simulating a mouse rather than by direct navigation, so you may want to try that as an alternative perhaps. The little switch on the left-hand side also needs to be set correctly, as it switches it between mouse and game controller modes.
|Banned add-ons (wiki)|Forum rules (wiki)|VPN policy (wiki)|First time user (wiki)|FAQs (wiki) Troubleshooting (wiki)|Add-ons (wiki)|Free content (wiki)|Debug Log (wiki)|

Kodi Blog Posts
Reply
#3
Yes, I know this switch and I used a mouse mode but navigating by joystick is more comfortable. I would like to use this controller in game mode, becouse in key mode two of buttons are still assigned to controling of Android's sound volume. In game mode I have more button to use. Do You have any idea how to modify Kodi's configuration?
Reply
#4
You could maybe use a custom keymap for it, but I've never tried as personally I prefer the mouse control.

If I get time I'll have a play with it on my Pi and see if I can get something working in gamepad mode. Maybe someone else who uses gamepads with their Kodi may be able to give more input too (normally I use CEC and my TV remote for controlling Kodi on my Pi).

If you enable debug mode, then keypresses etc are stored in the debug log (wiki) which may help in seeing exactly what is being received by Kodi, to understand more if it's not getting some actions, or if it's getting some multiple times or something like that.

I'm also going to move this to the hardware section, as it's not specifically an Android related question and there may be more people who can give inputs in that section.
|Banned add-ons (wiki)|Forum rules (wiki)|VPN policy (wiki)|First time user (wiki)|FAQs (wiki) Troubleshooting (wiki)|Add-ons (wiki)|Free content (wiki)|Debug Log (wiki)|

Kodi Blog Posts
Reply
#5
I know this link with custom keymap (I found it here) and tried to do the mapping myself, but I failed, so I decided to ask for help here.

I do really like to operate this pad in game mode, because it's more comfortable for me when watching video in SBS mode with VR gogles on the head I can operate this remote by both hands. Especially when key assignment are similar to PS3 controller functions. I have one and tried with my Adnroid and it works fine and intuitive, but works on BT only with Sony Xperia smartfones. With other devices it's not possible without root rights, so I had to by this small one.
Reply
#6
It's not possible to make my own keymap, becouse i can't create folder ".kodi" to place my mapping, so I have no idea what else can I do to solve my problem. I tried ro change settings folder location, but my device is not rooted, so I can't create file with this folder location. I don't know what can I do?
Reply
#7
The folder should already be there, but it is hidden (that's what the . means in the folder name).

On your file manager have a look for an option to show hidden files/folders and enable that.
|Banned add-ons (wiki)|Forum rules (wiki)|VPN policy (wiki)|First time user (wiki)|FAQs (wiki) Troubleshooting (wiki)|Add-ons (wiki)|Free content (wiki)|Debug Log (wiki)|

Kodi Blog Posts
Reply
#8
You were right. Showing hidden files was disable. I took this file:

https://github.com/xbmc/xbmc/blob/master...amepad.xml

And modified some lines like this:

<dpadleft>noop</dpadleft>
<dpadright>noop</dpadright>
<dpadup>noop</dpadup>
<dpaddown>noop</dpaddown>

I thought it should disable dpad action and leave left analog joystick active, but I was wrong Sad . Kodi sill skips one item during menu navigation so I have two questions:

how can I check is this gamepad visible as gamepad or joystick?
how can I detect any values of pressed buttons etc. ?
Reply
#9
Turn on logging and look in the debug log (wiki).

Information on detected controllers will be listed near the start, and key presses should also show up in there.
|Banned add-ons (wiki)|Forum rules (wiki)|VPN policy (wiki)|First time user (wiki)|FAQs (wiki) Troubleshooting (wiki)|Add-ons (wiki)|Free content (wiki)|Debug Log (wiki)|

Kodi Blog Posts
Reply
#10
Thx Smile I turned on logging and removed my mapings, just for sure. I found that this controller is recognized as joystick, and there is some error in default mapping:

"ERROR mapping joystick action. Joystick MOCUTE-032_B50-71C9 - 1048575"
"Previous line repeats 3 times."

Those lines listed above repeated few times and the second line containing couter told that error repeats 6 times, 7 times and now only 3. I did not find scan codes of this controller and any information pointing exact place in the mapping generating error.
Reply
#11
Had the same problem, managed to fix this with a bit of trial and error by creating the following joystick.xml
You may need to replace "MOCUTE-032_B50-0252" by your device name

Code:
<keymap>
  <global>
    <joystick name="MOCUTE-032_B50-0252">
      <hat id="1" position="left">noop</hat>
    </joystick>
  </global>
</keymap>

This disables one of the analog axis, which apparently disables all of them.
I haven't tested this in depth, but it seems to work fine.

Hope that works for you aswell Smile
Reply
#12
Thanks a lot! Smile
It works Smile
Meanwhile I've bought another one BT controller that works correctly with Kodi without any additional configuration, but I'm happy that I can use this small one also Smile
Reply
#13
Coval_pl

Which BT controller did you buy? (The one that works)
I'm having the same double skip problem but don't have the programing skills you guys have.
Reply
#14
My game pad it's Kruger&Matz model KM0351
See this link

Image
Reply

Logout Mark Read Team Forum Stats Members Help
Problem with Mocute Game Pad in Kodi0