0bda:b812 rtl88x2bu kernel module

  • hey there, hi everybody this is my first post.
    I'm struggling try to make a realtek with code 0bda:b812.

    I've read many threads suggesting not to use such a device but that is what I have and I have no money at the moment to buy something else (and this device works very well indeed, apart from the bad support for linux drivers).


    I would like to understand how to cross compile its kernel module (on osx or linux) or even on a raspbian installation, I'm really confused from all the infos I fount here and elsewhere.

    Is there a guide I can follow step by step?

    Is there any module already compiled I can use straight away?


    my libreelec is 9.2.6 on RPI3


    Thanks for any hint I will receive

  • You can add the rtl88x2bu driver to the LE build system and compile an image.

    e.g.:

    Code
    cd ~
    git clone https://github.com/LibreELEC/LibreELEC.tv
    cd LibreELEC.tv/packages/linux-drivers
    mkdir RTL88x2BU
    cd RTL88x2BU
    touch package.mk


    add this to package.mk:


    Edit distributions/LibreELEC/options file, add RTL88x2BU to "ADDITIONAL_DRIVERS=" :

    ADDITIONAL_DRIVERS="RTL8192CU RTL8192DU RTL8192EU RTL8188EU RTL8812AU RTL88x2BU"


    Build an image:


    cd ~/LibreELEC.tv

    PROJECT=RPi ARCH=arm DEVICE=RPi2 make image

  • Yes.

    I forgot to mention that if you want to compile a custom 9.2.6 (stable) build run

    "git checkout libreelec-9.2" before making changes.

    Otherwise it will compile from a master branch (kodi 19).

  • I know nothing about osx but I doubt it will work natively. You can use a VM with a Linux as a guest OS.

  • the whole build failed but I was able to take out the module and insert it into my installation thank U!

  • last question! sorry about that! what are the best practices to load a module after reboot?
    I suppose the better way would be triggering modprobe on device id.. but how should I get this result?

  • The build system will not work on OSX. Oracle VirtualBox is $0 if you need something to run a VM with.

  • last question! sorry about that! what are the best practices to load a module after reboot?
    I suppose the better way would be triggering modprobe on device id.. but how should I get this result?

    any hint abt this?

  • Perhaps you could edit or create the /storage/.config/autostart.sh file and put there something like this: insmod /PathToFile/RTL88x2BU.ko ?

  • Perhaps you could edit or create the /storage/.config/autostart.sh file and put there something like this: insmod /PathToFile/RTL88x2BU.ko ?

    reading other posts I have already tried this approach but wasn't successful..

    I've also read something about device ids to add somewhere but I can't figure out where exactly

  • Well, as it's really hard to discover what issue are you facing to without any description (or without at least the command error output ),

    I am afraid anybody can hardly help you...

    Usually - AFAIK - you need to load the appropriate driver module without device ID parameter. If it loads OK (it could depend on other modules which needs to be loaded before), it should recognize the device.
    lsmod

    dmesg

    modinfo RTL88x2BU.ko

    command outputs could perhaps give a hint to you.

  • never forget to give execution rights to a script......


    this is the file /storage/.config/autostart.sh

    Bash
    #!/bin/bash
    # autostart.sh
    insmod /storage/88x2bu.ko #to insert the module
    echo 0bda b812 > /sys/bus/usb/drivers/rtl88x2bu/new_id #to trigger the driver if unplugged
    ~

    then chmod 755 autostart.sh