💾 Archived View for alaskalinuxuser.ddns.net › 2021-07-23_8.gmi captured on 2024-09-29 at 00:10:13. Gemini links have been rewritten to link to archived content

View Raw

More Information

-=-=-=-=-=-=-

When the Ubuntu Repositories don’t work for your WiFi Device….

">

62w, https://alaskalinuxuser3.ddns.net/wp-content/uploads/2021/04/cerevo-

300x201.png 300w" sizes="(max-width: 562px) 100vw, 562px" />

It is always interesting to me, how few WiFi devices seem to work with Ubuntu

out of the box, yet so many are supposedly supported. Don’t get me wrong, I’m

not knocking Ubuntu, it is just that I typically purchase WiFi cards or USB

sticks that are listed as supported, only to find that they don’t work when you

plug them in. Today was no exception. The interesting part is that I didn’t

specifically purchase this WiFi USB stick, but that it came with another device

from Cerevo.

I actually bought a new Cerevo LiveShell X to help out at the church I attend.

We plan to use it for live streaming, and the unit can take Ethernet, or this

WiFi dongle. We are using the Ethernet, so I decided to use the USB WiFi stick

on something else. As it turns out, this WiFi USB stick is available for sale

independently (Not an affiliate link) :

https://www.bhphotovideo.com/c/product/1475725-REG/

cerevo_cdp_wf02a_wi_fi_dongle_for_liveshell.html/

?msclkid=d72e6ea7008613c14d560e2f2e7c462a

But, back to the problem at hand. When I decided to repurpose it, I checked to

see if it would work with Linux, and if not, there are some other Windows

machines that it could be put in. It was supported in Ubuntu, through the

repository, so it looked like a good candidate for a Ubuntu Linux machine we

use.

Of course, it should just be as easy as downloading the right repository. When

I pulled up lsusb, here’s what I saw:

Bus 002 Device 025: ID 0bda:0811 Realtek Semiconductor Corp.

A quick search revealed that I could simply install the drivers from the Ubuntu

repository, like this:

sudo apt-get install rtl8812au-dkms

But unfortunately, it didn’t work when I tried it. It didn’t recognize it as a

supported device, and so I had to do a little more research. A_quick_perusal_of

AskUbuntu_lead_me_to_a_great_post_where_yuikleb pointed out the git

repositories you should download when using the 5.x kernels with this device.

alaskalinuxuser@alaskalinuxuser-X9DBL-3F-X9DBL-iF:~/installed$ git clone https:

//github.com/gnab/rtl8812au.git\nCloning into 'rtl8812au'...\nremote:

Enumerating objects: 851, done.\nremote: Counting objects: 100% (42/42),

done.\nremote: Compressing objects: 100% (36/36), done.\nremote: Total 851

(delta 15), reused 13 (delta 6), pack-reused 809\nReceiving objects: 100% (851/

851), 1.98 MiB | 2.27 MiB/s, done.\nResolving deltas: 100% (374/374), done.

Then it was just a matter of entering the directory and building from the

source material:

alaskalinuxuser@alaskalinuxuser-X9DBL-3F-X9DBL-iF:~/installed/rtl8812au$

make\nmake ARCH=x86_64 CROSS_COMPILE= -C /lib/modules/5.4.0-67-generic/build

M=/home/alaskalinuxuser/installed/rtl8812au modules\nmake[1]: Entering

directory '/usr/src/linux-headers-5.4.0-67-generic'\n CC [M] /home/

alaskalinuxuser/installed/rtl8812au/core/rtw_cmd.o\n <<<EDITED FOR

SPACE>>>\n LD [M] /home/alaskalinuxuser/installed/rtl8812au/8812au.o\n

Building modules, stage 2.\n MODPOST 1 modules\n CC [M] /home/

alaskalinuxuser/installed/rtl8812au/8812au.mod.o\n LD [M] /home/

alaskalinuxuser/installed/rtl8812au/8812au.ko\nmake[1]: Leaving directory '/

usr/src/linux-headers-5.4.0-67-generic'

And a quick test, as he suggested proved it worked great, so I installed it:

alaskalinuxuser@alaskalinuxuser-X9DBL-3F-X9DBL-iF:~/installed/rtl8812au$ sudo

insmod 8812au.ko\nalaskalinuxuser@alaskalinuxuser-X9DBL-3F-X9DBL-iF:~/

installed/rtl8812au$ sudo cp 8812au.ko /lib/modules/$(uname -r)/kernel/drivers/

net/wireless\nalaskalinuxuser@alaskalinuxuser-X9DBL-3F-X9DBL-iF:~/installed/

rtl8812au$ sudo depmod

The only problem with his answer was that it would not be automatically built

if you ever upgrade the kernel. So, I took a look at the makefile, and it

specified that you could run make dkms_install under sudo to make that heppen,

like this:

alaskalinuxuser@alaskalinuxuser-X9DBL-3F-X9DBL-iF:~/installed/rtl8812au$ sudo

make dkms_install\n[sudo] password for alaskalinuxuser: \nmkdir -p /usr/src/

8812au-4.2.3\ncp -r * /usr/src/8812au-4.2.3\ndkms add -m 8812au -

v 4.2.3\n\nCreating symlink /var/lib/dkms/8812au/4.2.3/source ->\n

/usr/src/8812au-4.2.3\n\nDKMS: add completed.\ndkms build -m 8812au -

v 4.2.3\n\nKernel preparation unnecessary for this kernel.

Skipping...\n\nBuilding module:\ncleaning build area...\n'make' all KVER=5.4.0-

67-generic......................\ncleaning build area...\n\nDKMS: build

completed.\ndkms install -m 8812au -v 4.2.3\n\n8812au:\nRunning module version

sanity check.\n\nGood news! Module version v4.2.3 for 8812au.ko\nexactly

matches what is already found in kernel 5.4.0-67-generic.\nDKMS will not

replace this module.\nYou may override by specifying --

force.\n\ndepmod...\n\nDKMS: install completed.\ndkms status\n8812au, 4.2.3,

5.4.0-67-generic, x86_64: installed (WARNING! Diff between built and installed

module!)\nvirtualbox, 5.2.42, 5.4.0-67-generic, x86_64: installed\nvirtualbox,

5.2.42, 5.4.0-71-generic, x86_64: installed\nvirtualbox, 5.2.42, 5.4.0-72-

generic, x86_64: installed

Of course if you already built it you will get the warning about not replacing

a module unless you specify to –force it, and that there is a difference

between the built and installed module. So I recommend you remove the old

module if you are going to install it with dkms.

Overall, it wasn’t that hard to do, and the Linux support for this chip seems

good. It just is cumbersome for the end user when a WiFi USB device doesn’t

just work out of the box.

Linux – keep it simple.