Homepage › Forums › RetroPie Project › Ideas for Further Enhancements › Kodi controller support
- This topic has 26 replies, 4 voices, and was last updated 8 years, 9 months ago by Anonymous.
-
AuthorPosts
-
02/16/2016 at 08:28 #117143AnonymousInactive
Will it ever be possible for basic controller support in Kodi? There is a hack job method to get the 360 pad working in Kodi but then it stops working in emulators. All it needs is mouse to move on right analogue still, a select button and a back button?
If there is a way then please let me know, someone on this forum once told me that when kodi 14 was stable it might be implemented, its now 2 more whole revisions in :-(
Thanks all
02/16/2016 at 09:38 #117144herbfargusMemberProblem is gamepad support has to be compiled in and it isn’t by default and we don’t maintain the upstream builds. We’ll look into implementing a hack for xbox 360 controllers at some point but that’s about all we can do at the moment.
There are many other options to control kodi though: cec utils (using your TV remote) which should be enabled by default. Smartphone apps like yatse or the kodi remote, wireless keyboard and mouse, etc.
02/16/2016 at 15:51 #117154labelwhoreParticipantThere already is a hack for the xbox360 controller. Use mouse emulation. If it breaks the other emulators, you haven’t set it up correctly. Use the xbox button as a controller mode change button. (That’s actually it’s default behavior in linux, but most people aren’t using it.)
I have this set up on my end, while it works, an actual mouse and keyboard work better. Kodi seems to block some of the keybinds done through xboxdrv. You’ll notice that in that mouse.cfg file, I have added a mapping for the dpad to act like the arrow keys. It works for me in every app that needs it on the retropie except kodi. The actual mouse emulation though, works great.
02/16/2016 at 22:43 #117222AnonymousInactiveCan i just follow those instructions but just use the mouse.cfg ? everything else about my retropie set up is working perfectly. I just want the mouse/controller in Kodi.
02/16/2016 at 22:53 #117223AnonymousInactiveIn my rc.local i dont seem to have any of the lines from the page you linked for me.
I have…
“/opt/retropie/supplementary/xboxdrv/bin/xboxdrv” –daemon –id 0 –led 2 –deadzone 4000 –silent –trigger-as-button –next-controller –id 1 –led 3 –deadzone 4000 –silent –trigger-as-button –dbus disabled –detach-kernel-driver &
exit 002/16/2016 at 22:55 #117224labelwhoreParticipantYep, there’s no reason why not.
So with your setup, you’ll just need the
--alt-config /path/to/mouse.cfg
for the 1st player controller.so like this:
/opt/retropie/supplementary/xboxdrv/bin/xboxdrv” –daemon –id 0 –led 2 –deadzone 4000 –silent –trigger-as-button --alt-config /usr/local/mouse.cfg –next-controller –id 1 –led 3 –deadzone 4000 –silent –trigger-as-button –dbus disabled –detach-kernel-driver & exit 0
02/16/2016 at 23:12 #117231AnonymousInactiveThat didnt seem to work, it left me with a green flashing ring on the pad (usually segment one lights up) and i had to redefine the controller as if it was a new set up.
02/16/2016 at 23:19 #117232AnonymousInactiveThats weird, i copied the text back to my file exactly how it was and it still flashing. The pad works in the UI ok though.
02/17/2016 at 18:38 #117325labelwhoreParticipantDid you simply copy the file that was linked to in the wiki? or did you create a new one with the same content? if you created a new file, did you edit it in windows? If that’s the case, double check that you saved the file as a UNIX file, and not PC.
As long as the mouse.cfg file is in the right place (ie., the same path that’s called out in the edit you just made.) and is a UNIX file, then it should work.
One thing you might try is changing permissions on the mouse.cfg file.
Try running this:
sudo chmod +x /usr/local/mouse.cfg
That will ensure that the mouse.cfg file is executable.
02/17/2016 at 18:46 #117327AnonymousInactiveim unsure, because i use flashFXP to download the files then a program called TEXTPAD which usually saves in whatever format it was in (so long as you dont select to save) just trying the permissions setting now.
What i dont understand is why segment 1 on the pad is no longer solid and all my emulators arent configured for it now.
02/17/2016 at 18:48 #117329labelwhoreParticipantI use textpad too. save the file, on the save as dialog, towards the bottom, there’s a drop down that says File Format. Make sure that is set to UNIX then save. That’s most likely the issue, IMO.
02/17/2016 at 19:00 #117335AnonymousInactiveTried that still didnt work, im just going to back up my roms and re install a backed up image i made when it was all working and try again. Something has messed up the driver somehow because even though the pad is working fine in the UI and configuring, the green ring is flashing all 4 segments which in itself isnt right, i dont know how editing one line in a file can cause it to do that but it has :-D
I shall report back in a few hours.
02/17/2016 at 19:11 #117342labelwhoreParticipantThe behavior you’re describing makes it sound like maybe xpad is picking up the xbox controller instead of xboxdrv starting correctly, which points to an issue in the line we’re editing. Meaning xboxdrv isn’t starting correctly, hence the flashing lights.
I would double check that the mouse.cfg file is in the location specified so if you followed the wiki to a “T” it should be in
/usr/local/
.If all else fails, it looks like there might be another way to do this. I just looked over the xboxdrv manual real quick. It looks like
--mouse
might do almost the same thing we’re trying to achieve here. In that case, the line would look like this:/opt/retropie/supplementary/xboxdrv/bin/xboxdrv” –daemon –id 0 –led 2 –deadzone 4000 –silent –trigger-as-button --alt-config --mouse –next-controller –id 1 –led 3 –deadzone 4000 –silent –trigger-as-button –dbus disabled –detach-kernel-driver & exit 0
Another possibility is to try replacing
--alt-config
with--next-config
. I’m not completely sure what the difference is between the two tags.02/17/2016 at 20:04 #117372labelwhoreParticipantI just ran home for lunch to check on a couple things. It looks like I missed a step in the wiki. I believe the cfg files need to be owned by the pi user. So to fix that, try this:
sudo chown pi:pi /usr/local/mouse.cfg
02/17/2016 at 22:37 #117402AnonymousInactiveThe mouse config is in exactly the same place i notice my line has a quote at the start where as yours dont, do i need the quote or not ?
02/17/2016 at 22:39 #117403AnonymousInactiveOk so here is what i did, copy mouse.cfg to /usr/local
in putty, run > sudo chown pi:pi /usr/local/mouse.cfg
edit rc.local in texpad and pasted /opt/retropie/supplementary/xboxdrv/bin/xboxdrv” –daemon –id 0 –led 2 –deadzone 4000 –silent –trigger-as-button –alt-config –mouse –next-controller –id 1 –led 3 –deadzone 4000 –silent –trigger-as-button –dbus disabled –detach-kernel-driver &
exit 0without the ” at the start.
will give that a go now, just waiting on a reboot
02/17/2016 at 22:59 #117404AnonymousInactiveIt didnt work and the all 4 LED are flashing :-(
Im starting to with i hadnt bothered now, its worse than when i started haha.. going to have to wipe the SD and put it back to when it was working.
02/17/2016 at 23:03 #117406AnonymousInactiveIm running the current version of RPi maybe its incompatible with the cfg’s your using ?
I think i might quickly test a fresh image before i restore my old one :-)
02/17/2016 at 23:14 #117407labelwhoreParticipantYou’ve still got a double quote in there right after xboxdrv. If you’ve removed the first one, make sure to remove the 2nd one as well.
Functionally, the quotes shouldn’t make a difference unless there was a space in the file path. The quotes basically just tell linux to ignore formatting so that special characters can be passed between the quotes.
02/18/2016 at 00:36 #117413AnonymousInactiveI have it working! fantastic :-)
Because i rebuilt a new 3.5 i was able to start with a clean rc.local file mine had lots of “stuff” in it.
removed, copied and pasted into the old one removing the weird garbage add the –alt lines and works.
02/18/2016 at 00:38 #117415AnonymousInactivejust one thing now, the left analogue controls mouse and the A button selects, none of the other buttons seem to do anything, is that normal?
I looked inside mouse.cfg and it looks like most of buttons should do something.
02/18/2016 at 15:38 #117445labelwhoreParticipantUsing
--mouse
or the first way with--alt-config /usr/local/mouse.cfg
? The--mouse
is a default mouse mode that’s built into the drivers and doesn’t actually use the .cfg file. Maybe try the same thing but using the cfg file.I added mappings for all of the buttons on the controller but only the mouse related mappings seem to work in kodi. I never figured out why, but I believe it has to do with how kodi handles joysticks. I think kodi needs to be rebuilt for everything to work 100%. I’m not sure I’m up for that task.
02/18/2016 at 18:03 #117459AnonymousInactiveI used the .CFG way :-)
02/20/2016 at 13:38 #117583efraimsangilParticipantHi!
I am trying to use Xbox controller with Kodi but it’s doesn’t work… for now :)
This is my rc.local:
#!/bin/sh -e # # rc.local # # This script is executed at the end of each multiuser runlevel. # Make sure that the script will "exit 0" on success or any other # value on error. # # In order to enable or disable this script just change the execution # bits. # # By default this script does nothing. # xboxdrv -D i 0 --alt-config /usr/local/xboxdrv_player1.cfg --alt-config /usr/local/mouse.cfg --next-controller -i 1 --alt-config /usr/local/xboxdrv_player2.cfg --next-controller -i 2 --next-controller -i 3 --deadzone 4000 --dbus disabled & /opt/retropie/supplementary/xboxdrv/bin/xboxdrv –daemon –id 0 –led 2 –deadzone 4000 –silent –trigger-as-button –alt-config –mouse –next-controller –id 1 –led 3 –deadzone 4000 –silent –trigger-as-button –dbus disabled –detach-kernel-driver & exit 0
And I have this files in /usr/local
pi@retropie:/usr/local $ ls -la total 52 drwxrwsr-x 10 root staff 4096 Feb 20 12:23 . drwxr-xr-x 10 root root 4096 Nov 21 18:50 .. drwxrwsr-x 2 root staff 4096 Nov 21 18:50 bin drwxrwsr-x 2 root staff 4096 Nov 21 18:50 etc drwxrwsr-x 2 root staff 4096 Nov 21 18:50 games drwxrwsr-x 2 root staff 4096 Nov 21 18:50 include drwxrwsr-x 4 root staff 4096 Feb 5 11:41 lib lrwxrwxrwx 1 root staff 9 Nov 21 18:50 man -> share/man -rwxr-xr-- 1 pi pi 470 Feb 20 12:23 mouse.cfg drwxrwsr-x 2 root staff 4096 Nov 21 18:50 sbin drwxrwsr-x 7 root staff 4096 Dec 16 01:16 share drwxrwsr-x 2 root staff 4096 Nov 21 18:50 src -rwxr-xr-- 1 pi pi 364 Feb 20 12:22 xboxdrv_player1.cfg -rwxr-xr-- 1 pi pi 397 Feb 20 12:23 xboxdrv_player2.cfg
What’s I’m doing wrong?
Regards
02/20/2016 at 20:33 #117607AnonymousInactiveI’m not an expert but isn’t part of your RC.local command #’d out which means it get skipped.
Take out the # before the Xboxdrv bit?
02/20/2016 at 21:04 #117608efraimsangilParticipant[quote=117607]I’m not an expert but isn’t part of your RC.local command #’d out which means it get skipped.
Take out the # before the Xboxdrv bit?
[/quote]
I have two lines :) One’s commented :) Thanks, a7mag3ddon
02/20/2016 at 21:45 #117611AnonymousInactiveYour line looks the same as mine so I would use the same one did.
-
AuthorPosts
- The forum ‘Ideas for Further Enhancements’ is closed to new topics and replies.