Posts by basilean

    Hello guys,
    First at all, I love LibreELEC, best mmc ever, thank you very much!
    I tried to reply back soon but looked some issue on registration so I'm not sure if xpadneo support was already addressed.

    If not, I wrote this recipe to get it working.

    At your PC

    As root install compilation tools needed

    apt install gcc make git unzip wget xz-utils wget bash bc gcc sed patch patchutils tar bzip2 gzip perl gawk gperf zip unzip diffutils lzop libc6-dev libncurses5-dev libjson-perl

    Clone repo

    git clone https://github.com/LibreELEC/LibreELEC.tv.git

    cd LibreELEC.tv/

    Create a new package

    mkdir packages/linux-drivers/xpadneo

    vi packages/linux-drivers/xpadneo/package.mk

    Build package
    PROJECT=RPi DEVICE=RPi2 ARCH=arm scripts/build xpadneo

    If all goes well, new module should be there, you need to match running image with kernel version.

    /sbin/modinfo build.LibreELEC-RPi2.arm-9.1-devel/xpadneo-master/hid-xpadneo/src/hid-xpadneo.ko

    Quote from modinfo output

    ...

    vermagic: 5.0.13 SMP mod_unload ARMv7 p2v8

    ...

    #0507, 07-May-2019: RPi / RPi2 -- Release post (New 5.0.13 kernel; drop omxplayer)

    Copy module

    scp build.LibreELEC-RPi2.arm-9.1-devel/xpadneo-master/hid-xpadneo/src/hid-xpadneo.ko root@PI:/storage/.config/

    At your MMC

    Disable conflicting bt options

    vi /storage/.config/modprobe.d/xpadneo.conf

    Code
    options bluetooth disable_ertm=y

    Nasty hardcore to make it "permanent"

    vi /storage/.config/autostart.sh

    Code
    (
    cp -v /storage/.config/hid-xpadneo.ko /lib/modules/5.0.13/kernel/drivers/hid/
    depmod
    ) &

    chmod 755 /storage/.config/autostart.sh

    Add udev rule

    vi /storage/.config/udev.rules.d/99-xpadneo.rules

    Code
    ACTION=="bind", KERNEL=="0005:045E:02FD.*|0005:045E:02E0.*", SUBSYSTEM=="hid", DRIVER=="microsoft", \
    RUN+="/bin/sh -c 'echo $kernel > /sys/bus/hid/drivers/microsoft/unbind; echo $kernel > /sys/bus/hid/drivers/xpadneo/bind'"

    Reboot to confirm that all works as expected and that should be all.
    Keep press X button few seconds until it starts to blink and try pair it, probably you will need to remap keys, so keep a keyboard close.

    Hope you find it useful.
    Andres.-