Project blog‎ > ‎

Kodi Controller Support on Retropie

posted May 3, 2015, 5:40 PM by Nicholas Leesam
I'm in the process of putting together a few retropies as gifts. I installed kodi and setup menu art just as described here. I then installed Plexbmc following this guide. If you're going the manual route, be sure to grab the latest zips off GitHub. They're available here and here.

The video was great, i caused a bit of a headache a couple times while copy pasting by inserting carriage returns where they didn't belong. dos2unix cleared that up. I don't remember 100% because it's been about a week since i completed this, but i also had an issue with conflicting xboxdrv startups.

The retropie setup script places a line in rc.local to load the service on boot. The video has you setup a full initscript so the service can be cleanly killed and restarted later on. I had to comment out that line in rc.local to let the video's initscript to run cleanly.

After that was sorted out, i was still left with only two options for controlling kodi. One was a random XBMC remote app, the other was an xbox controller which the video left kodi configured to use. I bought five of these usb snes gamepads to use with the gift retropies and i didn't want to have to instruct a bunch of people on how to get the xbmc remote apps connected and working, so i went looking for more options.

In the arch wiki, i found this. That provides some basic instructions on how to setup xboxdrv to mimic a 360 gamepad with any input device. Firing up evtest, i wrote down the events created with each button press and changed the kodi.ini file from the video above to mimic an 360 pad, so the driver could then emulate keyboard presses for kodi. I've attached my kodi.ini to this post. I also made an edit to the kodi.sh script to select an input source for the mimic to get it's button presses from. Below is the whole line, i only added " --evdev /dev/input/event0":

sudo /usr/bin/xboxdrv --evdev /dev/input/event0 --config /home/pi/kodi.ini --silent --autofire RT=25 --autofire LT=25 --autofire du=200 --autofire dd=200 --autofire dl=500 --autofire dr=500 &


ċ
kodi.ini
(1k)
Nicholas Leesam,
May 3, 2015, 5:40 PM
Comments