Tutorial: Compiling a working kernel driver for rtl8192eu

Cover it with a piece of black tape ? :wink:

Nearly all wifi adaptors blink with activity, and there is always activity even when you are not sending user data.

Cover it with black tape is a poor solution. I know that exists a way to turn off the led through re build the module from source, comment the CONFIG_LED section in the autoconf.h of the driver source. The problem is that I don’t know how to rebuild the module.

I’m not 100% sure about this, but I think you can follow my tutorial with the following refinements and make it work:

  1. Configure the driver package for 8192cu instead of 8192eu - Either edit the Makefile from my repository (Look at lines 27 and 33), or find different sources already configured for 8192cu.
  2. Make sure your usb device id appears in os_dep/linux/usb_initf.c under 8192c.
  3. Obviously, apply the patch you provided for disabling the activity led.
    After you apply all the changes, you should just compile normally.
    Good luck!

If you do this, you will need to update the driver every time we update OSMC to avoid a kernel module mismatch.

Either that or use DKMS, but don’t blame us if you see regressions

S

OP reports an RTL8188CUS. The RTL8192CU is not an appropriate module for this.

S

After quick search regarding this, I concluded this should work. But as said, I’m not 100% sure, and you can be right as well. He may try and see for himself :wink:

This will not work

Sam

Oh well… OP is invited to find 8188cus sources then :slight_smile:

Same method worked on rbp2-4.3.1-2-osmc and rtl8192cu from https://github.com/osmc/rtl8192cu-osmc.
Thanks.

RTL8192eu is included in the latest version of OSMC already

Sam

@v0yAgEr Thanks a lot for your instruction! I’d been struggling to get TL-WN725N V2 to work on latest osmc (4.3.3.3). Finally, no more packets dropped, no more ssh disconnections!

@sam_nazarko TL-WN725N V2 or rtl8188eu wasn’t present in latest OSMC (4.3.3.3) despite working partially out of the box. I’m not sure if OSMC project could use the 8188eu.ko file I’d compiled, Any case, the compiled *.ko file could be found at https://dl.dropboxusercontent.com/u/22713204/rtl8188eu_4.3.0-10-osmc%2B.tgz Anyone else struggling with TL-WN725N V2 on rbp2 could also download this and give it a try.

I’d slightly tweaked the install.sh follow examples from (UPDATE) Drivers for TL-WN725N V2 - 3.6.11+ -> 4.xx.xx+ - Raspberry Pi Forums

*.ko file is compiled in 4.3.0.10-osmc-rbp2, and tested working on 4.3.3.3-osmc-rbp2 and 4.3.0.10-osmc-rbp2

similar code/instruction below if you want to compile yourself, I find the apt-get task extremely long due to slow sd-card write speed, it’s a bit of pain if you want to compile yourself. However, code below is shortcut’d in some way, nevertheless the instruction from v0yAgEr should be referenced.

uname -r
sudo apt-get update
sudo apt-get install build-essential git rbp2-headers-4.3.0-10-osmc rbp2-source-4.3.0-10-osmc
cd /usr/src/
sudo tar xjf rbp2-source-4.3.0-10-osmc.tar.bz2
sudo cp -r rbp2-source-4.3.0-10-osmc/arch/arm/mach-bcm2709/include/mach rbp2-headers-4.3.0-10-osmc/arch/arm/include/
cd
git clone https://github.com/lwfinger/rtl8188eu
cd rtl8188eu
make ARCH=arm KVER=4.3.0-10-osmc KSRC=/usr/src/rbp2-headers-4.3.0-10-osmc
sudo make ARCH=arm KVER=4.3.0-10-osmc KSRC=/usr/src/rbp2-headers-4.3.0-10-osmc install
sudo bash -c 'echo "options 8188eu rtw_power_mgnt=0 rtw_enusbss=0">/etc/modprobe.d/8188eu.conf'

Hello,

8188EU is supported and distributed in OSMC. We use the in-tree module for this as it is quite mature and stable. My guess would be you have a dongle which the driver isn’t yet aware of (VID/PID). If you get me the output of lsusb, I can add it to our driver.

Our kernel is a moving target, and I have just rebased Pi to 4.4. Your compiled module will only match the kernel it was built for (this is by design to prevent issues).

Sam

Hi Sam, below my lsusb. The problem i’m facing is intermittent connection, ifconfig shows quite a bit of packets dropped, which leads me to this thread. :slight_smile: thanks for this great software btw.

$ lsusb
Bus 001 Device 006: ID 0bc2:3312 Seagate RSS LLC
Bus 001 Device 007: ID 0bc2:3320 Seagate RSS LLC SRD00F2 [Expansion Desktop Drive]
Bus 001 Device 004: ID 0bda:8179 Realtek Semiconductor Corp.
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp. SMSC9512/9514 Fast Ethernet Adapter
Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Did OSMC detect and load the driver before you compiled your own? Checking lsmod should verify this

yes OSMC detected and load the driver, I’m able to connection to my local network. The problem is intermittent connections, ssh into osmc becomes problematic because packets are dropped intermittently, which is abnormal afaik.

Did you try disabling power management with sudo iwconfg wlan0 power off to see if this resolved the issue?

sorry Sam, i didn’t try that, i’m not that knowledgeable in solving wifi adapter related problems. But I did plugin another older wifi adapter and it’s working fine without any abnormal ssh disconnections. So i quickly guessed it’s a driver issue. I’d tried with raspbian, similar packet drop issue with tl-wn725n v2, until i update the driver from (UPDATE) Drivers for TL-WN725N V2 - 3.6.11+ -> 4.xx.xx+ - Raspberry Pi Forums matching the kernel version of course. and it’s working fine on raspbian after the driver update.

i understand your concern with version control, which is why I’d to disable auto-update at my end, because I really had no idea why the intermittent wifi connection with the built-in driver, I’d bought this tl-wn725n wifi adapter because it’s small size and read somewhere that it’s supported in raspberry pi, sigh~

Have you enabled max_usb_current in PiConfig from MyOSMC?

I’m not sure, i didn’t modify/enabled max_usb_current or anything besides going into MyOSMC to enable the wireless adapter and input ssid and password (besides the initial settings like language/timezone etc, which is automatic after each fresh install). All my trials are from fresh OSMC install. So the default for max_usb_current is as per OSMC initial setup.