Thread Rating:
  • 0 Vote(s) - 0 Average
Xboxdrv on Kodi 17 Raspbian lite
#1
Hello,

I'm really close to get the custom distribution of my dreams for an almost fully automated with Kodi+Plex+Sonaar+radaar+transmission+rpi-monitor+Moonlight on my raspberry pi. I made the choice to start from a raspbian lite for different reasons (control, learning...), instead of pre-made distributions like retropie or OSMC.

I made it bootable from USB Everything works great, Kodi for the local screen, Plex to serve my medias all over the house on every type of devices, and rpimonitor whit custom plugin to manage all the processes from webservices.

And now i'm getting to make little thing work, like different type of interfaces.
Now i'm trying to make my Xbox 360 controller work on Kodi 17 Krypton, in order to get Moonlight to boot from Kodi througt the Luna plugin who looks awesome.

I tried to find walkthrougt on the internet, but none of them seems the same or even applicable in Raspbian lite. A lot of them are made for Retropie, OSMC and other... And I don't think things work the same and i'm afraid to make a mistake. And after hours of research, I can't find someone who tried the same crazy stunt.

So I tried i manually, installed the xboxdrv driver from raspbian repo, and run an evtest and the controller is recognized by the pi. I made it bootable with an init.d script, I tried everything I saw in different walkthrougt, but Kodi don't seem to see there is a controller plugged to it.

And I seem to be a little stuck now i try to make the controller to work with Kodi. Nothing respond, when i try to manage the controller in settings>system>input>manage controller, when I press a button to map it, no response. I even tried to make a custom xml mapping, but no response even.

When i try to run :
Code:
sudo xboxdrv --silent --detach-kernel-driver --mimic-xpad

I get this has a response:
Code:
xboxdrv 0.8.5 - http://pingus.seul.org/~grumbel/xboxdrv/
Copyright 2008-2011 Ingo Ruhnke <[email protected]>
Licensed under GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This program comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to redistribute it under certain conditions; see the file COPYING for details.

Controller:        Microsoft Xbox 360 Wireless Controller (PC)
Vendor/Product:    045e:0719
USB Path:          001:006
Wireless Port:     0
Controller Type:   Xbox360 (wireless)

-- [ ERROR ] ------------------------------------------------------
Error couldn't claim the USB interface: LIBUSB_ERROR_NOT_FOUND
Try to run 'rmmod xpad' and then xboxdrv again or start xboxdrv with the option --detach-kernel-driver.

Then, naturally as he tells me, i run rmmod xpad

Code:
rmmod: ERROR: Module xpad is not currently loaded


So I said to myself, maybe xpad is not in raspbian lite package so I apt-getted it. Same response, xpad is not loaded. And even if I wanted to use xpad instead of xboxdrv, I can't get any hint on the internet to make it work. I don't know if it has any incidence on Kodi, but I really what to do next.

I'm relatively not used to Linux, it's one of the reasons why I rely a lot on walkthrought, forum reasearch and I learned a lot from this, how things work in Debian... and I love it. And I try not to bother anyone with my problems on the forum. But i'm really stuck here so maybe someone here would have an answer to my problem ?
Reply
#2
Xboxdrv as problems with the latests kernel versions, it wont work good in Kodi, use xpad instead.
https://github.com/RetroPie/RetroPie-Set...Controller
Reply
#3
(2017-06-18, 15:16)rascas Wrote: Xboxdrv as problems with the latests kernel versions, it wont work good in Kodi, use xpad instead.
https://github.com/RetroPie/RetroPie-Set...Controller

It's something that I heard but I can't find a good alternative walktrought for Raspbian lite. I apt-getted xpad but the system doesn't load it.

Event the one you gave me work with Retropie but I don't use this distribution, and they don't say how I can get the xpad drivers work manually. that's what I'm looking for.
Reply
#4
RetroPie is basically Raspbian Lite + RetroPie setup-scripts installed, so it is pretty much the same to what you got.
You have an option to install xpad driver in the RetroPie setup scripts, it is explained in the link above.

PS: Maybe i am mistaken, but I think Xbox 360 controllers work OOTB in Raspbian with Kodi from the repos, you don't have to install drivers, at least via USB. If not, remove xboxdrv and install xpad. With xboxdrv installed, it won't work in Kodi.
Also, did you installed the package kodi-peripheral-joystick ? It is needed for joystick support.
Reply
#5
I tried to get the Xpad drivers from the github and follow their README.
A first it didn't work because I didn't have dkms, but I fixed that and now I have this error when I try to dkms the drivers:

Your kernel headers for kernel 4.9.33-v7+ cannot be found at
/lib/modules/4.9.33-v7+/build or /lib/modules/4.9.33-v7+/source.
Reply
#6
You need to install kernel headers before installing the driver.
Here is what is done in RetroPie:
https://github.com/RetroPie/RetroPie-Set...ry/xpad.sh
Reply
#7
(2017-06-18, 15:59)rascas Wrote: Also, did you installed the package kodi-peripheral-joystick ? It is needed for joystick support.

I didn't saw this edit at first, and no, it wasn't installed. I did but no improvement. I think it may be because of the header problem I have with dkms. I'm trying to get a fix on that.

EDIT: We are crossing messages Smile I've found a way to install the headers. I take a good look at this bash, it seem very instructive ! Thank you very much for your help ! I'll try that and come back with results !
Reply
#8
So i tried to install the headers but I seem to have a bit of a problem:

Code:
Dépaquetage de raspberrypi-kernel-headers (1.20170427-1) ...
Paramétrage de raspberrypi-kernel-headers (1.20170427-1) ...
run-parts: executing /etc/kernel/header_postinst.d/dkms 4.9.24+
run-parts: executing /etc/kernel/header_postinst.d/dkms 4.9.24-v7+
[email protected]:~ $ sudo dkms install -m xpad -v 0.4
Error! echo
Your kernel headers for kernel 4.9.33-v7+ cannot be found at
/lib/modules/4.9.33-v7+/build or /lib/modules/4.9.33-v7+/source.

The headers installed seems to be different than my kernel version. I'm trying to find a way. I've downloaded them with package rapsberrypi-kernel-headers and tried raspbian-kernel-headers as well but no packages match.

My kernel version seems not even to be on this list... https://www.niksula.hut.fi/~mhiienka/Rpi...aders-rpi/
Reply
#9
Dont use the kernel from rpi-update, otherwise you have to get the headers for that kernel, the ones in thr repo are the kernel also on the repo. Also it is much easier to install retropie scripts and install xpad from there.
Reply
#10
(2017-06-18, 17:32)rascas Wrote: Dont use the kernel from rpi-update, otherwise you have to get the headers for that kernel, the ones in thr repo are the kernel also on the repo. Also it is much easier to install retropie scripts and install xpad from there.

It's not easier in my case because I will have to install again all the other program like Plex, sonarr... and the library for these scan can take a while.
And i'm learning things too. And I won't even use emulators on the RPI, my objectif is to stream steam from Moonlight.

And I have finally got to the headers with rpi-source. The drivers are installed now, but no improvment.
Reply
#11
You just needed to install the retropi scripts wich is basically clone its github, and run tje script ro install xpad.In Retropie xbox 360 gamepads work ootb in either Emulation Station, games and Kodi because xpad is already installed. You just need to map buttons on the interface.
On raspbian lite I see no reason for its not working if you are running the repos kernel, and installed xpad corretly. You. might need to reboot, go to Kodi, and configure buttons.
Your Kodi log might say if it is detected and configured.
Reply
#12
Oh ! So I don't need to make an other drive from an other distribution ? My mistake. That can be a solution in that way.
So you tell me i just have to download retropie script from git, run it to install xpad and then I can get rid of it to run with the drivers ?

Because now that the drivers seems to be installed manually with dkms, I have nothing in /dev/input and the circle on the Xbox360 controller is still blinking. And yes I basically reboot and try to configure buttons on kodi at every step. Smile

I've also started to backup all my databases from kodi and plex, so soon i will be more flexible to test other thing, even from scratch (cause the scan and configuring of both this apps can take like 24h).

I'll give it a try with this Retropie workaround as soon as i've finished my backups ! Thank you again for your patience, still got a lot to learn.
Reply
#13
You teased me to much and I've done a new disk with Retopie. and of course it worked OOTB. That's great but now I have electric problems when I plug my disks and USB hub, and I have a 3A electric plug.

I remember now why I don't have the repo version of the kernel, it is because I changed branch on my first distribution in order to install USB boot on my RPI3. I think that's why Xpad didn't worked.

I'll keep exploring, thanks again for your help !
Reply
#14
Like I said in my previous post you didn't need to make a new install of RetroPie, just download the RetroPie-setup scripts to make it easier to install to the xpad driver. Then remove RetroPie setup scripts.
The latest kernel available at Raspbian repo (which is the same used in RetroPie) has USB boot support. You don't need to use rpi-update to get a newer kernel and it's use is not recommend, unless you know what you are doing or really needed.

The electric problems doesn't have to do with the OS or software, it is an hardware issue on your side.
Reply
 
Thread Rating:
  • 0 Vote(s) - 0 Average



Logout Mark Read Team Forum Stats Members Help
Xboxdrv on Kodi 17 Raspbian lite00