RTL8192EU driver and compiling

Hi I need to install a driver for my external wifi adapter with antenna because of local interference, resulting in a very low throughput (8 kb/s), even on 5 GHz (I would like to avoid ethernet since I am prohibited to drill through the walls and the WAN antennas are in the attic - we cannot get fiber here).

A portion of the output from lshw:
*-usb:1 UNCLAIMED
description: Generic USB device
product: 802.11ac WLAN Adapter
vendor: Realtek
physical id: 2
bus info: usb@1:2
version: 2.00
serial: 00e04c000001
capabilities: usb-2.10
configuration: maxpower=500mA speed=480Mbit/s

In Makefile, I see this line CONFIG_PLATFORM_I386_PC = y, which I assume is wrong. There are several entries for ARM, but not one that matches aarch64 or armv8. When I try to compile, I get the message
install -p -m 644 8821au.ko /lib/modules/3.14.29-25-osmc/kernel/drivers/net/wireless/
install: cannot stat ‘8821au.ko’: No such file or directory
Makefile:1557: recipe for target 'install' failed
make: *** [install] Error 1

Do I need some dependencies or do I just have to tweak the configs for the proper architecture? Better would be with a dedicated package.

Hi,

I have included RTL8812AU support for other devices in the past. I didn’t do it for the Vero 4K as it has built in WiFi, and I thought that it wouldn’t ever be requested and a user wouldn’t want to use an external adapter.

Have you tried the built in WiFi? It should give you sufficient speeds for HD (on 802.11n) and 4K (on 802.11ac). I remember you had some problem connecting to your WiFi in the past. If there’s something we can do, let me know.

Failing that – I can add support for this dongle for you in the next OSMC update, if you are happy to test it.

Sam

Hi.
Yeah I had some initial wifi problems at my parent’s house, but I screwed it even more up by resetting the software, and then that became the problem itself, which you helped me fix. Since then I have had no connectivity problems. It is the speed, that is the devil. Now I moved the device to an apartment. My problem here is that 8 kb/s on 5 Ghz is not enough to have a stable, high quality stream, while it would be clumsy to have a LAN cable across multiple rooms (drilling through the walls is not allowed), and I suspect it is due to heavy radio interference in the area and poor isolation between the apartments, as I can sense over 20 different wifi hotspots in the neighborhood, competing for the airspace, especially on the 2.4 GHz. So I hope that an adapter with an external antenna will have better success receiving the signal from my powerful signal booster 8 meters away. Before I acquired that, it wasn’t even possible to have a stable wifi connection within more than 2 meters away.

It would definitely be awesome. But maybe a little too much work for you, if no one else needs it than me. So a crash course in compiling drivers on the Vero would be sufficient for now?

Try changing the wifi channel in your router to a less congested channel. Am app such as wifi analyzer on Android can provide a view of which channels at less congested.

I have already tried this. In fact, this was the reason I moved to the 5 GHz-band in the first place. I have been spending weeks of my life trying to debug the poor wifi. The 2.4 GHz-band is out of the question. It will never get to work properly in this place, no matter what precautions you take. All the non-overlapping channels 1, 6 and 11 are basically in use.

The 5 GHz is much less crowded, but the use of it will increase in the future as people grow tired of getting thwarted by powerful equipment like my TL-RE450 AC1750 (one version below the latest on the market). I just experience a huge traffic loss the longer I move away from the receiver, so even though the connection is stable right now, you don’t get a good enough throughput because of all the interfering radio causing packet drops.

Such are the perils of wifi, all resolved by use of a copper connection.

True. Cabling is always the best.
Regarding the “channel your channel”-approach:

Please don’t change the channel

Finally, most WLAN vendors would have you believe that the best approach to dealing with Wi-Fi interference is “channel changing.” This is where a different or “cleaner” channel is automatically selected for the AP when RF interference increases.

While changing channels is a useful technique to deal with continuous interference on a given frequency, interference tends to be highly variable and intermittent. With limited channels to change to, this technique can cause more problems than it solves.

Within the 2.4GHz frequency, the most widely used Wi-Fi band, there are only three non-interfering channels. Even within the 5GHz band, only four non-overlapping 40MHz wide channels exist after eliminating Dynamic Frequency Selection (DFS), a mechanism to allow unlicensed devices to share spectrum with existing radar systems.

[…]

Channel changing by an AP requires connected clients to disassociate and re-associate, causing disruption to voice and video applications. Channel changing creates a domino effect as neighboring APs change channels to avoid co-channel interference.

Source: http://www.networkworld.com/article/2215287/tech-primers/coping-with-wi-fi-s-biggest-problem--interference.html

8Kbps is a ridiculously slow speed. Are you sure this is correct, and how have
you measured this? Using iperf if possible rather than testing Internet speeds.

The problem here would be that you’d have to recompile the driver every time OSMC is updated. I can include it, no problem, but I’d appreciate if you could try the adapter in a PC in a near proximity and report whether it helps; as well as if you wouldn’t mind us trying to help you get the internal adapter to work well. The internal adapter has a good antenna (better than you’ll get in a USB dongle), and it doesn’t go through USB (which has contention); so it should always perform better than an external adapter.

I did a command like wget http://speedtest.wdc01.softlayer.com/downloads/test500.zip and took an average from it for a while. It corresponds almost to doing a system update and looking at the speed. (I am also considering buying another wifi-repeater and placing it directly in front of the device, but right now I don’t have the money for it.)

Good to know about the antenna. I will test it on a laptop located in the same spot in a few days and make a new reply to the thread.

Some more information about my setup:
I run an LTE CPE in bridge mode (= 2.4 GHz broadcast disabled) in the attic with two directional antennas below the roof, where the traffic gets led down to the rooms below through the hatch by a slim Cat.5-patch cable (ok as long as the maximum speed is less than 100 Mbps) to a switch with a powerful ranger booster attached, broadcasting dual band (2.4 GHz and 5 Ghz simultaneously) in access point-mode. This is how I get the best signal from the outside while applying to community rules about having no antennas on the roof.

The average downstream speed is 10-15 Mbps, upstream 5. I could potentially make it faster by giving up on the portable internet and paying for the deployment of DSL or coax, but it would be pointless to spend money on soon archaic technology, while optical connections are being rolled out countrywide and steadily progressing. My connection is unlimited, which is very uncommon for LTE, but situated on a different FDD band 31 than traditional LTE, where the only ISP has market monopoly. Our average consumption is 500-800 GB per month - also exceeding most ISP data limits on the bands 3, 7 and 20.

From Denmark?

Let me know about the laptop results.
If you cannot run Ethernet you can consider powerline adapters.

Yes, Denmark.

Hmm yeah, plausible, but I don’t think I would like to expose my connection to the rest of the building. Ethernet is always a possibility, it will just create problems with door closure unless I get hold of another slim cable to go through the opening and spend a few hours mounting the two conventional cables to the edges of the walls and don’t mind the final one running across the floor for a short stretch before reaching the back of the tv.

Powerline can be encrypted.

Powerline adapters use encryption means your communication is as save as mostly anything you use over it (ssh, https, ipsec,…)

Check out www.fuba.de they are providing Ethernet over PoF adapter.

But generally I would first trouble shoot the WiFi. Interference are bad (I see 50 neighbours wifi) but they should not distroy your bandwidth that badly. More likely to be channel issue or antenna position.
Install wavemon and iperf3 to get a clear picture. Also either check your dmesg or upload it to check for issues.

Here’s som results from speedtest-cli. I had tremendous problems with timeout during the download of server list, but figured out that this parameter helped out. I connected my laptop on ethernet, got on the Vero through SSH and disabled all devices broadcasting wifi nearby, and these are some different results using that setup.

These are on 2.4 GHz, internal antenna:

root@KARMUS-MC:/home/osmc# ./speedtest.py --timeout 60 --server 4420
Retrieving speedtest.net configuration...
Testing from Net 1 (92.241.xxx.xxx)...
Retrieving speedtest.net server list...
Selecting best server based on ping...
Hosted by JenZen ApS (Middelfart) [141.14 km]: 125.978 ms
Testing download speed................................................................................
Download: 0.84 Mbit/s
Testing upload speed...............................................................................................
.Upload: 1.53 Mbit/s
root@KARMUS-MC:/home/osmc# ./speedtest.py --timeout 60
Retrieving speedtest.net configuration...
Testing from Net 1 (92.241.xxx.xxx)...
Retrieving speedtest.net server list...
Selecting best server based on ping...
Hosted by JenZen ApS (Middelfart) [141.14 km]: 83.854 ms
Testing download speed................................................................................
Download: 0.94 Mbit/s
Testing upload speed................................................................................................
Upload: 1.59 Mbit/s

This is on 5Ghz, internal antenna.

root@KARMUS-MC:/home/osmc# ./speedtest.py --timeout 60 --server 4420
Retrieving speedtest.net configuration...
Testing from Net 1 (92.241.xxx.xxx)...
Retrieving speedtest.net server list...
Selecting best server based on ping...
Hosted by JenZen ApS (Middelfart) [141.14 km]: 255.554 ms
Testing download speed...............................................................................
.Download: 0.02 Mbit/s
Testing upload speed...............................................................................................
.Upload: 2.13 Mbit/s
root@KARMUS-MC:/home/osmc# ./speedtest.py --timeout 60
Retrieving speedtest.net configuration...
Testing from Net 1 (92.241.xxx.xxx)...
Retrieving speedtest.net server list...
Cannot retrieve speedtest server list
ERROR: timed out
root@KARMUS-MC:/home/osmc# ./speedtest.py --timeout 60
Retrieving speedtest.net configuration...
Testing from Net 1 (92.241.xxx.xxx)...
Retrieving speedtest.net server list...
Cannot retrieve speedtest server list
ERROR: timed out
root@KARMUS-MC:/home/osmc# ./speedtest.py --timeout 60
Retrieving speedtest.net configuration...
Testing from Net 1 (92.241.xxx.xxx)...
Retrieving speedtest.net server list...
Selecting best server based on ping...
Hosted by Mediateknik (Varberg) [185.47 km]: 82.092 ms
Testing download speed................................................................................
Download: 0.18 Mbit/s
Testing upload speed................................................................................................
Upload: 1.83 Mbit/s

Before the timeout-problems began, these were my results on 5 GHz, internal antenna:

root@KARMUS-MC:/home/osmc# speedtest-cli
Retrieving speedtest.net configuration...
Retrieving speedtest.net server list...
Testing from Net 1 (92.241.xxx.xxx)...
Selecting best server based on latency...
Hosted by Waoo! (Skanderborg) [87.99 km]: 78.37 ms
Testing download speed........................................
Download: 0.37 Mbits/s
Testing upload speed..................................................
Upload: 2.32 Mbits/s

root@KARMUS-MC:/home/osmc# speedtest-cli
Retrieving speedtest.net configuration...
Retrieving speedtest.net server list...
Testing from Net 1 (92.241.xxx.xxx)...
Selecting best server based on latency...
Hosted by JenZen ApS (Middelfart) [141.14 km]: 85.833 ms
Testing download speed........................................
Download: 1.05 Mbits/s
Testing upload speed..................................................
Upload: 2.95 Mbits/s

I then tried the wifi-dongles RTL8821AU and RTL8892EU in a Windows-laptop and got these results in comparison:

So clearly, there is something horribly wrong with the airspace under my living conditions, judging from the extremely high ping time, when timeouts didn’t occur.

Results from iperf3 - 5 GHz, internal:

root@KARMUS-MC:/home/osmc# iperf3 -s
-----------------------------------------------------------
Server listening on 5201
-----------------------------------------------------------
Accepted connection from 192.168.0.130, port 59804
[  5] local 192.168.0.150 port 5201 connected to 192.168.0.130 port 59806
[ ID] Interval           Transfer     Bandwidth
[  5]   0.00-1.00   sec  5.66 KBytes  46.3 Kbits/sec                  
[  5]   1.00-2.00   sec  5.66 KBytes  46.3 Kbits/sec                  
[  5]   2.00-3.00   sec  14.1 KBytes   116 Kbits/sec                  
[  5]   3.00-4.00   sec  5.66 KBytes  46.3 Kbits/sec                  
[  5]   4.00-5.00   sec  7.07 KBytes  57.9 Kbits/sec                  
[  5]   5.00-6.00   sec  43.8 KBytes   359 Kbits/sec                  
[  5]   6.00-7.00   sec  19.8 KBytes   162 Kbits/sec                  
[  5]   7.00-8.00   sec  38.2 KBytes   313 Kbits/sec                  
[  5]   8.00-9.00   sec  15.6 KBytes   127 Kbits/sec                  
[  5]   9.00-10.00  sec  1.41 KBytes  11.6 Kbits/sec                  
[  5]  10.00-11.00  sec  5.66 KBytes  46.4 Kbits/sec                  
[  5]  11.00-12.00  sec  1.41 KBytes  11.6 Kbits/sec                  
[  5]  12.00-13.00  sec  33.9 KBytes   278 Kbits/sec                  
[  5]  13.00-14.00  sec  9.90 KBytes  81.1 Kbits/sec                  
[  5]  14.00-15.00  sec  12.7 KBytes   104 Kbits/sec                  
[  5]  15.00-16.00  sec  28.3 KBytes   232 Kbits/sec                  
[  5]  16.00-17.00  sec  7.07 KBytes  57.9 Kbits/sec                  
[  5]  17.00-18.00  sec  18.4 KBytes   151 Kbits/sec                  
[  5]  18.00-19.00  sec  5.66 KBytes  46.3 Kbits/sec                  
[  5]  19.00-20.00  sec  21.2 KBytes   174 Kbits/sec                  
[  5]  20.00-21.00  sec  26.9 KBytes   220 Kbits/sec                  
[  5]  21.00-22.00  sec  17.0 KBytes   139 Kbits/sec                  
[  5]  22.00-23.00  sec  19.8 KBytes   162 Kbits/sec                  
[  5]  23.00-24.00  sec  11.3 KBytes  92.7 Kbits/sec                  
[  5]  24.00-25.00  sec  7.07 KBytes  57.9 Kbits/sec                  
[  5]  25.00-26.00  sec  42.4 KBytes   348 Kbits/sec                  
[  5]  26.00-27.00  sec  39.6 KBytes   324 Kbits/sec                  
[  5]  27.00-28.00  sec  17.0 KBytes   139 Kbits/sec                  
[  5]  28.00-29.00  sec  7.07 KBytes  57.9 Kbits/sec                  
[  5]  29.00-30.00  sec  12.7 KBytes   104 Kbits/sec                  
[  5]  30.00-31.00  sec  11.3 KBytes  92.7 Kbits/sec                  
[  5]  31.00-32.00  sec  5.66 KBytes  46.3 Kbits/sec                  
[  5]  32.00-33.00  sec  19.8 KBytes   162 Kbits/sec                  
[  5]  33.00-34.00  sec  7.07 KBytes  57.9 Kbits/sec                  
[  5]  34.00-35.00  sec  17.0 KBytes   139 Kbits/sec                  
[  5]  35.00-36.00  sec  29.7 KBytes   243 Kbits/sec                  
[  5]  36.00-37.00  sec  15.6 KBytes   127 Kbits/sec                  
[  5]  37.00-38.00  sec  9.90 KBytes  81.1 Kbits/sec                  
[  5]  38.00-39.00  sec  39.6 KBytes   324 Kbits/sec                  
[  5]  39.00-40.00  sec  8.48 KBytes  69.5 Kbits/sec                  
[  5]  40.00-41.00  sec  7.07 KBytes  57.9 Kbits/sec                  
[  5]  41.00-42.00  sec  4.24 KBytes  34.7 Kbits/sec                  
[  5]  42.00-43.00  sec  15.6 KBytes   127 Kbits/sec                  
[  5]  43.00-44.00  sec  1.41 KBytes  11.6 Kbits/sec                  
[  5]  44.00-45.00  sec  2.83 KBytes  23.2 Kbits/sec                  
[  5]  45.00-46.00  sec  21.2 KBytes   174 Kbits/sec                  
[  5]  46.00-47.00  sec  36.8 KBytes   301 Kbits/sec                  
[  5]  47.00-48.00  sec  12.7 KBytes   104 Kbits/sec                  
[  5]  48.00-49.00  sec  17.0 KBytes   139 Kbits/sec                  
[  5]  49.00-50.00  sec  7.07 KBytes  57.9 Kbits/sec                  
[  5]  50.00-51.00  sec  48.1 KBytes   394 Kbits/sec                  
[  5]  51.00-52.00  sec  48.1 KBytes   394 Kbits/sec                  
[  5]  52.00-53.00  sec  12.7 KBytes   104 Kbits/sec                  
[  5]  53.00-54.00  sec  7.07 KBytes  57.9 Kbits/sec                  
[  5]  54.00-55.00  sec  8.48 KBytes  69.5 Kbits/sec                  
[  5]  55.00-56.00  sec  14.1 KBytes   116 Kbits/sec                  
[  5]  56.00-57.00  sec  18.4 KBytes   151 Kbits/sec                  
[  5]  57.00-58.00  sec  15.6 KBytes   127 Kbits/sec                  
[  5]  58.00-59.00  sec  12.7 KBytes   104 Kbits/sec                  
[  5]  59.00-60.00  sec  9.90 KBytes  81.1 Kbits/sec                  
[  5]  60.00-61.00  sec  43.8 KBytes   359 Kbits/sec                  
[  5]  61.00-61.82  sec  17.0 KBytes   169 Kbits/sec                  
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bandwidth       Retr
[  5]   0.00-61.82  sec  1.07 MBytes   145 Kbits/sec  559             sender
[  5]   0.00-61.82  sec  1.02 MBytes   139 Kbits/sec                  receiver
-----------------------------------------------------------
Server listening on 5201
-----------------------------------------------------------
^Ciperf3: interrupt - the server has terminated

wavemon did not work with the following error: wavemon: can not get range information: Bad address. According to some research, it might be because my subnet mask is non-standard as 255.255.255.128. But I don’t have anymore time now to debug before going to work, so I will leave it for tomorrow.

Thanks for iperf3 output, it’s a lot better as a metric than a speedtest due to external factors.

Even on your Windows laptop, the speeds are really low.
I am sure there are some optimisations that can be made with your router.

Nonetheless, tomorrow morning I will provide you with a test kernel with support for most 8812/8821 chipsets. I am not quite sure this will improve things however.

Sam

Hi @Karmus

Here is a test kernel which includes support for RTL8812/8821 chipsets. Most dongles are supported.

To install:

wget "https://www.dropbox.com/s/svw7up8jbyjgf3p/vero364-image-3.14.29-25-8812au.deb?dl=1" -O kernel.deb
sudo dpkg -i kernel.deb
reboot

You will need to disable the internal WiFi. This can be done by running sudo rmmod dhd after booting.

These wavemon-results are from a different device (laptop) situated in the same location.



Looking forward to test the kernel later today. Did it also work for rtl8892eu? I have two dongles with external antennas, and in case they work better than the internal one, I am aiming on bonding them together as one interface to form a connection with aggregated bandwidth.

No – but maybe I can add this driver later.

This won’t work properly with ConnMan. I think 5Ghz will give you better performance.