Viewing 27 posts - 1 through 27 (of 27 total)
  • Author
    Posts
  • a7mag3ddon
    Participant
    Post count: 38

    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

    herbfargus
    Member
    Post count: 1858

    Problem 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.

    labelwhore
    Participant
    Post count: 526

    There 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.)

    https://github.com/retropie/RetroPie-Setup/wiki/Setting-up-the-XBox360-controller#alternate-controller-configurations

    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.

    a7mag3ddon
    Participant
    Post count: 38

    Can 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.

    a7mag3ddon
    Participant
    Post count: 38

    In 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 0

    labelwhore
    Participant
    Post count: 526

    Yep, 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
    a7mag3ddon
    Participant
    Post count: 38

    That 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.

    a7mag3ddon
    Participant
    Post count: 38

    Thats 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.

    labelwhore
    Participant
    Post count: 526

    Did 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.

    a7mag3ddon
    Participant
    Post count: 38

    im 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.

    labelwhore
    Participant
    Post count: 526

    I 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.

    a7mag3ddon
    Participant
    Post count: 38

    Tried 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.

    labelwhore
    Participant
    Post count: 526

    The 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.

    labelwhore
    Participant
    Post count: 526

    I 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

    a7mag3ddon
    Participant
    Post count: 38

    The 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 ?

    a7mag3ddon
    Participant
    Post count: 38

    Ok 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 0

    without the ” at the start.

    will give that a go now, just waiting on a reboot

    a7mag3ddon
    Participant
    Post count: 38

    It 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.

    a7mag3ddon
    Participant
    Post count: 38

    Im 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 :-)

    labelwhore
    Participant
    Post count: 526

    You’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.

    a7mag3ddon
    Participant
    Post count: 38

    I 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.

    a7mag3ddon
    Participant
    Post count: 38

    just 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.

    labelwhore
    Participant
    Post count: 526

    Using --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.

    a7mag3ddon
    Participant
    Post count: 38

    I used the .CFG way :-)

    efraimsangil
    Participant
    Post count: 51

    Hi!

    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

    a7mag3ddon
    Participant
    Post count: 38

    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?

    efraimsangil
    Participant
    Post count: 51

    [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

    a7mag3ddon
    Participant
    Post count: 38

    Your line looks the same as mine so I would use the same one did.

Viewing 27 posts - 1 through 27 (of 27 total)
  • The forum ‘Ideas for Further Enhancements’ is closed to new topics and replies.