udm-telus icon indicating copy to clipboard operation
udm-telus copied to clipboard

Got to linux-router is working but hostapd failed...

Open zorq opened this issue 3 years ago • 47 comments

== Setting up completed, now linux-router is working == Error occured

ERROR: hostapd failed

Error occured

Doing cleanup.. Terminated Killed 9127 lnxrouter Killed 9155 bash iptables: unallow DNS Exiting: This is the only running instance Cleaning up done

zorq avatar Sep 29 '21 01:09 zorq

Hi @zorq,

Can you show me the entire log before this? What error did hostapd give?

peacey avatar Sep 29 '21 01:09 peacey

sudo ./lnxrouter --ap wlp4s0 xxx -p yyy --mac 6a:d7:9a:1a:9a:f4 --ieee80211ac --freq-band 5 --no-dnsmasq -n

WARN: Since you're using in this mode, make sure you've read Notice 1

linux-router 0.6.3 (https://github.com/garywill/linux-router) PID: 7856 Target interface is wlp4s0 (84:1b:77:df:3f:d6) Use random LAN IPv4 address 192.168.174.1 Creating a virtual WiFi interface... x0wlp4s0 created Error occured

ERROR: Your adapter can not transmit to channel 36, frequency band 5GHz.

Doing cleanup.. iptables: unallow DNS Exiting: This is the only running instance Cleaning up done

zorq avatar Sep 30 '21 00:09 zorq

sudo ./lnxrouter --ap wlp4s0 xxx -p yyy --mac 6a:d7:9a:1a:9a:f4 --ieee80211ac --freq-band 5 --no-dnsmasq -n -c 161

WARN: Since you're using in this mode, make sure you've read Notice 1

linux-router 0.6.3 (https://github.com/garywill/linux-router) PID: 8090 Target interface is wlp4s0 (84:1b:77:df:3f:d6) Use random LAN IPv4 address 192.168.173.1 Creating a virtual WiFi interface... x0wlp4s0 created Set x0wlp4s0 unmanaged by NetworkManager Setting x0wlp4s0 new MAC address 6a:d7:9a:1a:9a:f4 ...

haveged_watchdog PID: 8208

Starting hostapd hostapd PID: 8213 Configuration file: /dev/shm/lnxrouter_tmp/lnxrouter.wlp4s0.conf.ZCY78U/hostapd.conf Channel 161 (primary) not allowed for AP mode, flags: 0x20073 NO-IR x0wlp4s0: IEEE 802.11 Configured channel (161) not found from the channel list of current mode (2) IEEE 802.11a x0wlp4s0: IEEE 802.11 Hardware does not support configured channel Could not select hw_mode and channel. (-3) x0wlp4s0: interface state UNINITIALIZED->DISABLED x0wlp4s0: AP-DISABLED x0wlp4s0: Unable to setup interface. x0wlp4s0: interface state DISABLED->DISABLED x0wlp4s0: AP-DISABLED x0wlp4s0: CTRL-EVENT-TERMINATING hostapd_free_hapd_data: Interface x0wlp4s0 wasn't started nl80211: deinit ifname=x0wlp4s0 disabled_11b_rates=0

iptables v1.8.7 (nf_tables) No Internet sharing

iptables: allow DNS ACCEPT tcp opt -- in x0wlp4s0 out * 192.168.173.0/24 -> 192.168.173.1 tcp dpt:53 /* lnxrouter-8090-x0wlp4s0 / ACCEPT udp opt -- in x0wlp4s0 out * 192.168.173.0/24 -> 192.168.173.1 udp dpt:53 / lnxrouter-8090-x0wlp4s0 */

== Setting up completed, now linux-router is working == Error occured

ERROR: hostapd failed

Error occured

Doing cleanup.. Terminated Killed 8208 lnxrouter Killed 8238 bash iptables: unallow DNS Exiting: This is the only running instance Cleaning up done

zorq avatar Sep 30 '21 00:09 zorq

Can you please try running lnxrouter with the --no-virt option? Maybe your card does not have good support for virtual interfaces. Also make sure you're not connected to WiFi or it's disabled before you try.

peacey avatar Sep 30 '21 00:09 peacey

udo ./lnxrouter --ap wlp4s0 xxx -p yyy --mac 6a:d7:9a:1a:9a:f4 --ieee80211ac --freq-band 5 --no-dnsmasq -n --no-virt

WARN: Since you're using in this mode, make sure you've read Notice 1

linux-router 0.6.3 (https://github.com/garywill/linux-router) PID: 8784 Target interface is wlp4s0 (84:1b:77:df:3f:d6) Use random LAN IPv4 address 192.168.59.1 Error occured

ERROR: Your adapter can not transmit to channel 36, frequency band 5GHz.

Doing cleanup.. iptables: unallow DNS Exiting: This is the only running instance Cleaning up done


I turned off wifi before attempting and I've tried forgetting the network and leaving wifi enabled, both did not work. Thanks so much for your help!

zorq avatar Sep 30 '21 00:09 zorq

Can you show me the output of iw list? If it's very long you can put it in a text file but make sure to get all of it. Thanks

peacey avatar Sep 30 '21 00:09 peacey

a.txt

zorq avatar Sep 30 '21 00:09 zorq

Thank you! It says most of your 5 GHz channels are disabled except a few? Can you try with no virtual and channel 165?

Also, what about --freq-band 2.4, does that work?

peacey avatar Sep 30 '21 00:09 peacey

I'm not sure why my 5 GHz channels are disabled, I'm booting from "try ubuntu", I have tried this on 2 different Lenovo laptop models and the results are similar where a lot of the 5g channels are disabled. I tried to boot this off of a Asus mobo desktop but I can't get that wifi card to work either... I thought Telus IP TV must work on 5g hence --freq-band 5 is a requirement?

sudo ./lnxrouter --ap wlp4s0 TELUS4979 -p 76mnzyqzv3Jt --mac 6a:d7:9a:1a:9a:f4 --ieee80211ac --freq-band 5 --no-dnsmasq -n -c 165 --no-virt

WARN: Since you're using in this mode, make sure you've read Notice 1

linux-router 0.6.3 (https://github.com/garywill/linux-router) PID: 9633 Target interface is wlp4s0 (84:1b:77:df:3f:d6) Use random LAN IPv4 address 192.168.228.1 Set wlp4s0 unmanaged by NetworkManager Setting wlp4s0 new MAC address 6a:d7:9a:1a:9a:f4 ...

haveged_watchdog PID: 9747

Starting hostapd hostapd PID: 9752 Configuration file: /dev/shm/lnxrouter_tmp/lnxrouter.wlp4s0.conf.kPrhTO/hostapd.conf Channel 165 (primary) not allowed for AP mode, flags: 0x20003 NO-IR wlp4s0: IEEE 802.11 Configured channel (165) not found from the channel list of current mode (2) IEEE 802.11a wlp4s0: IEEE 802.11 Hardware does not support configured channel Could not select hw_mode and channel. (-3) wlp4s0: interface state UNINITIALIZED->DISABLED wlp4s0: AP-DISABLED wlp4s0: Unable to setup interface. wlp4s0: interface state DISABLED->DISABLED wlp4s0: AP-DISABLED wlp4s0: CTRL-EVENT-TERMINATING hostapd_free_hapd_data: Interface wlp4s0 wasn't started nl80211: deinit ifname=wlp4s0 disabled_11b_rates=0

iptables v1.8.7 (nf_tables) No Internet sharing

iptables: allow DNS ACCEPT tcp opt -- in wlp4s0 out * 192.168.228.0/24 -> 192.168.228.1 tcp dpt:53 /* lnxrouter-9633-wlp4s0 / ACCEPT udp opt -- in wlp4s0 out * 192.168.228.0/24 -> 192.168.228.1 udp dpt:53 / lnxrouter-9633-wlp4s0 */

== Setting up completed, now linux-router is working == Error occured

ERROR: hostapd failed

Error occured

Doing cleanup.. Killed 9747 lnxrouter Killed 9771 bash iptables: unallow DNS Restoring wlp4s0 to old MAC address 84:1b:77:df:3f:d6 ... Restore wlp4s0 managed by NetworkManager Exiting: This is the only running instance Cleaning up done

zorq avatar Sep 30 '21 00:09 zorq

Very odd, I booted Ubuntu off my MacBook laptop and it worked fine for 5G.

Maybe the card doesn't have the right regulatory country set on it. Can you show me the output of iw reg get?

Can you also run iw reg set CA and then run the iw list again and show me the output?

peacey avatar Sep 30 '21 00:09 peacey

b.txt

zorq avatar Sep 30 '21 01:09 zorq

Hmm, no change. It still doesn't work when you try with channel 153 for example?

Can you also try with --freq-band 2.4? This is only used for registering the network so I think you'll be able to use 5G fine afterwards. And at least we can see whether your WiFi card doesn't work on 2.4G either.

Also, do you have any USB WiFi adapters lying around that you could use instead of the built-in WiFi?

Btw, what WiFi card do you have?

peacey avatar Sep 30 '21 01:09 peacey

I tried 2.4 but the tv box doesn't detect the signal. It's a integrated wifi card on lenovo laptops. I have tried this on two lenovo laptops of different model and the results are same, i believe they are running intel wifi. I don't have any USB wifi adapters lying around. The only other option I have is the desktop but I can't get the wifi to work on that. It's a Asus ROG Strix x570-e gaming mobo.

zorq avatar Sep 30 '21 01:09 zorq

Let me run it on my other laptop tonight that I believe has Intel WiFi and I'll get back to you.

peacey avatar Sep 30 '21 01:09 peacey

After doing some research, it seems Intel WiFi adapters do not support 5 GHz AP mode. It's disabled by Intel in the hardware/driver (see here or here. All 3 of your devices seem to be using Intel cards.

So that means you will need to find another device that has another WiFi card, or you will need to buy a USB WiFi adapter that supports 5GHz AP mode ($15-$25 on Amazon).

Do you have any other device you could try?

peacey avatar Sep 30 '21 07:09 peacey

Let me try one from amazon: https://www.amazon.ca/gp/product/B07P6N2TZH/ref=ppx_yo_dt_b_asin_title_o00_s00?ie=UTF8&psc=1

I'll report back after. Thank you for your help!

zorq avatar Sep 30 '21 09:09 zorq

I will also buy a couple adapters and test out which ones work and report back. It's not so straightforward because driver support is all over the place with different features for different chipsets and it's difficult to figure out which would work. Looks like I was very lucky that my laptop worked the first time without any issues!

peacey avatar Sep 30 '21 16:09 peacey

FYI, the TP-Link Archer T3U you linked uses a Realtek RTL8812BU chipset, and I found this driver for it that claims to support 5GHz AP mode. So we definitely should be able to get it to work with that driver if not the native one, hopefully. I'll get mine on Saturday and will test it then.

peacey avatar Sep 30 '21 23:09 peacey

Thanks for the help! I ended up buying this as it claims to work with Linux out of box

BrosTrend 650Mbps Long Range Linux WiFi Adapter for Desktop, Laptop of Ubuntu, Mint, Kali, Debian, Raspbian, Lubuntu, Xubuntu, Zorin, Raspberry Pi, Windows 10/8.1/8/7/XP, 5GHz / 2.4GHz, 5dBi Antenna https://www.amazon.ca/dp/B01GC8XH0S/ref=cm_sw_r_apan_glt_i_WQ8WA6F3PFS1S023SJ62

zorq avatar Sep 30 '21 23:09 zorq

I believe that one uses the Realtek RTL8821CU chipset. There is also a driver for that in case the built-in driver doesn't work. Tell me how that goes!

peacey avatar Sep 30 '21 23:09 peacey

So I got my usb adapter, can't seem to get it to function. I tried following the link you provided but it isn't working... I see the device under lsusb, but i don't see the device when checking with ip link. Thanks...

zorq avatar Oct 02 '21 02:10 zorq

Some good news! I got my Archer T3U earlier than expected today and was able to get it working easily with the driver I linked. 5G AP mode worked without any extra options needed and the TELUS box was able to connect to it via WPS. So at least we know that works!

Your device should hopefully be just as straight forward if it uses that other driver I linked. I actually ordered yours today and will be receiving it tomorrow. I'll tell you how to do it if it's successful.

FYI, you need to install and load the driver. Not sure if you did that. Anyways I'll figure out the process tomorrow.

Cheers!

peacey avatar Oct 02 '21 05:10 peacey

Can you explain the process of installing and loading the driver? I'm not savvy in the Linux world unfortunately lol. Thanks!

Ian


From: peacey @.> Sent: Friday, October 1, 2021 10:52:00 PM To: peacey/udm-telus @.> Cc: zorq @.>; Mention @.> Subject: Re: [peacey/udm-telus] Got to linux-router is working but hostapd failed... (#1)

Some good news! I got my Archer T3U earlier than expected today and was able to get it working easily with the driver I linked. 5G AP mode worked without any extra options needed and the TELUS box was able to connect to it via WPS. So at least we know that works!

Your device should hopefully be just as straight forward if it uses that other driver I linked. I actually ordered yours today and will be receiving it tomorrow. I'll tell you how to do it if it's successful.

FYI, you need to install and load the driver. Not sure if you did that. Anyways I'll figure out the process tomorrow.

Cheers!

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/peacey/udm-telus/issues/1#issuecomment-932688382, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ADUY2EHR4JLWWFDQTZNXWKLUE2MYBANCNFSM5E6V2RFA. Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

zorq avatar Oct 02 '21 06:10 zorq

So I received the BrosTrend today and was able to get it working quite easily with the driver I linked. 5G AP mode also worked fine. Here are some rough instructions for how to install the driver for it.

Install the module first:

sudo apt update
sudo apt install git bc dkms
cd ~
git clone https://github.com/brektrou/rtl8821CU.git
cd rtl8821CU
sudo ./dkms-install.sh
cd ~

The install will take 5 minutes or so. Afterwards, load the module:

sudo modprobe 8821cu

You should get no errors. Then, unplug and replug the usb wifi adapter. Now the light on the adapter should come on, and if you check under ip link you'll find it's interface name is something like wlxXXXXXXXXXX, where XXXX... is the MAC address of it. Use that interface name in the rest of the instructions.

You don't need any extra options like specifying the channel, just use the instructions normally and it should work.

See how it goes!

peacey avatar Oct 03 '21 00:10 peacey

This issue has just saved me after hours of troubleshooting; by chance I had the exact same wireless adapter lying around but only realized it after I wanted to give up and buy the one you recommended here Peacey, The images on amazon looked awfully similar to the one I had that was not recognized in ubuntu... After installing the driver it totally worked like a charm <3. I think all the resets might have messed up the configuration on the iptv box since all it does is initializing after the steps... but I have yet to try again.

gilliangoud avatar Oct 03 '21 00:10 gilliangoud

So I received the BrosTrend today and was able to get it working quite easily with the driver I linked. 5G AP mode also worked fine. Here are some rough instructions for how to install the driver for it.

Install the module first:

sudo apt update
sudo apt install git bc dkms
cd ~
git clone https://github.com/brektrou/rtl8821CU.git
cd rtl8821CU
sudo ./dkms-install.sh
cd ~

The install will take 5 minutes or so. Afterwards, load the module:

sudo modprobe 8821cu

You should get no errors. Then, unplug and replug the usb wifi adapter. Now the light on the adapter should come on, and if you check under ip link you'll find it's interface name is something like wlxXXXXXXXXXX, where XXXX... is the MAC address of it. Use that interface name in the rest of the instructions.

You don't need any extra options like specifying the channel, just use the instructions normally and it should work.

See how it goes!

sudo apt update Ign:1 cdrom://Ubuntu 21.04 Hirsute Hippo - Release amd64 (20210420) hirsute InRelease Hit:2 cdrom://Ubuntu 21.04 Hirsute Hippo - Release amd64 (20210420) hirsute Release Get:4 http://security.ubuntu.com/ubuntu hirsute-security InRelease [110 kB]
Get:5 http://archive.ubuntu.com/ubuntu hirsute InRelease [269 kB]
Get:6 http://security.ubuntu.com/ubuntu hirsute-security/main amd64 Packages [256 kB] Get:7 http://security.ubuntu.com/ubuntu hirsute-security/main Translation-en [65.8 kB] Get:8 http://security.ubuntu.com/ubuntu hirsute-security/main amd64 DEP-11 Metadata [9,696 B] Get:9 http://security.ubuntu.com/ubuntu hirsute-security/main DEP-11 48x48 Icons [7,781 B] Get:10 http://security.ubuntu.com/ubuntu hirsute-security/main DEP-11 64x64 Icons [19.5 kB] Get:11 http://security.ubuntu.com/ubuntu hirsute-security/main DEP-11 64x64@2 Icons [29 B] Get:12 http://security.ubuntu.com/ubuntu hirsute-security/main amd64 c-n-f Metadata [4,364 B] Get:13 http://security.ubuntu.com/ubuntu hirsute-security/restricted amd64 Packages [193 kB] Get:14 http://security.ubuntu.com/ubuntu hirsute-security/restricted Translation-en [27.1 kB] Get:15 http://security.ubuntu.com/ubuntu hirsute-security/restricted amd64 c-n-f Metadata [484 B] Get:16 http://archive.ubuntu.com/ubuntu hirsute-updates InRelease [115 kB] Get:17 http://archive.ubuntu.com/ubuntu hirsute/main amd64 Packages [1,394 kB] Get:18 http://archive.ubuntu.com/ubuntu hirsute/main amd64 DEP-11 Metadata [469 kB] Get:19 http://archive.ubuntu.com/ubuntu hirsute/main amd64 c-n-f Metadata [29.5 kB] Get:20 http://archive.ubuntu.com/ubuntu hirsute-updates/main amd64 Packages [387 kB] Get:21 http://archive.ubuntu.com/ubuntu hirsute-updates/main Translation-en [102 kB] Get:22 http://archive.ubuntu.com/ubuntu hirsute-updates/main amd64 DEP-11 Metadata [95.0 kB] Get:23 http://archive.ubuntu.com/ubuntu hirsute-updates/main DEP-11 48x48 Icons [24.4 kB] Get:24 http://archive.ubuntu.com/ubuntu hirsute-updates/main DEP-11 64x64 Icons [48.9 kB] Get:25 http://archive.ubuntu.com/ubuntu hirsute-updates/main DEP-11 64x64@2 Icons [29 B] Get:26 http://archive.ubuntu.com/ubuntu hirsute-updates/main amd64 c-n-f Metadata [7,436 B] Get:27 http://archive.ubuntu.com/ubuntu hirsute-updates/restricted amd64 Packages [195 kB] Get:28 http://archive.ubuntu.com/ubuntu hirsute-updates/restricted Translation-en [27.5 kB] Get:29 http://archive.ubuntu.com/ubuntu hirsute-updates/restricted amd64 c-n-f Metadata [480 B] Fetched 3,857 kB in 3s (1,518 kB/s)
Reading package lists... Done Building dependency tree... Done Reading state information... Done 322 packages can be upgraded. Run 'apt list --upgradable' to see them. ubuntu@ubuntu:~$ sudo apt install git bc dkms Reading package lists... Done Building dependency tree... Done Reading state information... Done bc is already the newest version (1.07.1-2build2). bc set to manually installed. The following additional packages will be installed: binutils binutils-common binutils-x86-64-linux-gnu build-essential dpkg-dev fakeroot g++ g++-10 gcc gcc-10 gcc-11-base git-man libalgorithm-diff-perl libalgorithm-diff-xs-perl libalgorithm-merge-perl libasan6 libatomic1 libbinutils libc-dev-bin libc-devtools libc6-dev libcc1-0 libcrypt-dev libctf-nobfd0 libctf0 liberror-perl libfakeroot libgcc-10-dev libgcc-s1 libgomp1 libitm1 liblsan0 libnsl-dev libquadmath0 libstdc++-10-dev libstdc++6 libtirpc-dev libtsan0 libubsan1 linux-libc-dev lto-disabled-list make manpages-dev rpcsvc-proto Suggested packages: binutils-doc menu debian-keyring g++-multilib g++-10-multilib gcc-10-doc gcc-multilib autoconf automake libtool flex bison gcc-doc gcc-10-multilib gcc-10-locales git-daemon-run | git-daemon-sysvinit git-doc git-el git-email git-gui gitk gitweb git-cvs git-mediawiki git-svn glibc-doc libstdc++-10-doc make-doc The following NEW packages will be installed: binutils binutils-common binutils-x86-64-linux-gnu build-essential dkms dpkg-dev fakeroot g++ g++-10 gcc gcc-10 git git-man libalgorithm-diff-perl libalgorithm-diff-xs-perl libalgorithm-merge-perl libasan6 libbinutils libc-dev-bin libc-devtools libc6-dev libcc1-0 libcrypt-dev libctf-nobfd0 libctf0 liberror-perl libfakeroot libgcc-10-dev libitm1 liblsan0 libnsl-dev libquadmath0 libstdc++-10-dev libtirpc-dev libtsan0 libubsan1 linux-libc-dev lto-disabled-list make manpages-dev rpcsvc-proto The following packages will be upgraded: gcc-11-base libatomic1 libgcc-s1 libgomp1 libstdc++6 5 upgraded, 41 newly installed, 0 to remove and 317 not upgraded. Need to get 14.9 MB/53.1 MB of archives. After this operation, 216 MB of additional disk space will be used. Do you want to continue? [Y/n] y Get:1 cdrom://Ubuntu 21.04 Hirsute Hippo - Release amd64 (20210420) hirsute/main amd64 binutils-common amd64 2.36.1-6ubuntu1 [217 kB] Get:2 cdrom://Ubuntu 21.04 Hirsute Hippo - Release amd64 (20210420) hirsute/main amd64 libbinutils amd64 2.36.1-6ubuntu1 [584 kB] Get:3 cdrom://Ubuntu 21.04 Hirsute Hippo - Release amd64 (20210420) hirsute/main amd64 libctf-nobfd0 amd64 2.36.1-6ubuntu1 [97.8 kB] Get:4 cdrom://Ubuntu 21.04 Hirsute Hippo - Release amd64 (20210420) hirsute/main amd64 libctf0 amd64 2.36.1-6ubuntu1 [95.0 kB] Get:5 cdrom://Ubuntu 21.04 Hirsute Hippo - Release amd64 (20210420) hirsute/main amd64 binutils-x86-64-linux-gnu amd64 2.36.1-6ubuntu1 [1,830 kB] Get:6 cdrom://Ubuntu 21.04 Hirsute Hippo - Release amd64 (20210420) hirsute/main amd64 binutils amd64 2.36.1-6ubuntu1 [3,388 B] Get:7 cdrom://Ubuntu 21.04 Hirsute Hippo - Release amd64 (20210420) hirsute/main amd64 libgcc-10-dev amd64 10.3.0-1ubuntu1 [2,337 kB] Get:8 cdrom://Ubuntu 21.04 Hirsute Hippo - Release amd64 (20210420) hirsute/main amd64 gcc-10 amd64 10.3.0-1ubuntu1 [17.5 MB] Get:9 http://archive.ubuntu.com/ubuntu hirsute/main amd64 liberror-perl all 0.17029-1 [26.5 kB] Get:10 http://security.ubuntu.com/ubuntu hirsute-security/main amd64 gcc-11-base amd64 11.1.0-1ubuntu1~21.04 [19.0 kB] Get:11 cdrom://Ubuntu 21.04 Hirsute Hippo - Release amd64 (20210420) hirsute/main amd64 gcc amd64 4:10.3.0-1ubuntu1 [5,212 B] Get:12 cdrom://Ubuntu 21.04 Hirsute Hippo - Release amd64 (20210420) hirsute/main amd64 make amd64 4.3-4ubuntu1 [167 kB] Get:13 cdrom://Ubuntu 21.04 Hirsute Hippo - Release amd64 (20210420) hirsute/main amd64 lto-disabled-list all 7 [11.9 kB] Get:14 cdrom://Ubuntu 21.04 Hirsute Hippo - Release amd64 (20210420) hirsute/main amd64 dpkg-dev all 1.20.9ubuntu1 [937 kB] Get:15 cdrom://Ubuntu 21.04 Hirsute Hippo - Release amd64 (20210420) hirsute/main amd64 libc-dev-bin amd64 2.33-0ubuntu5 [19.3 kB] Get:16 cdrom://Ubuntu 21.04 Hirsute Hippo - Release amd64 (20210420) hirsute/main amd64 libcrypt-dev amd64 1:4.4.17-1ubuntu3 [104 kB] Get:17 cdrom://Ubuntu 21.04 Hirsute Hippo - Release amd64 (20210420) hirsute/main amd64 rpcsvc-proto amd64 1.4.2-0ubuntu4 [62.8 kB] Get:18 cdrom://Ubuntu 21.04 Hirsute Hippo - Release amd64 (20210420) hirsute/main amd64 libtirpc-dev amd64 1.3.1-1build1 [183 kB] Get:19 cdrom://Ubuntu 21.04 Hirsute Hippo - Release amd64 (20210420) hirsute/main amd64 libnsl-dev amd64 1.3.0-0ubuntu3 [66.4 kB] Get:20 cdrom://Ubuntu 21.04 Hirsute Hippo - Release amd64 (20210420) hirsute/main amd64 libc6-dev amd64 2.33-0ubuntu5 [2,143 kB] Get:21 cdrom://Ubuntu 21.04 Hirsute Hippo - Release amd64 (20210420) hirsute/main amd64 libstdc++-10-dev amd64 10.3.0-1ubuntu1 [1,754 kB] Get:22 cdrom://Ubuntu 21.04 Hirsute Hippo - Release amd64 (20210420) hirsute/main amd64 g++-10 amd64 10.3.0-1ubuntu1 [9,803 kB] Get:23 http://security.ubuntu.com/ubuntu hirsute-security/main amd64 libstdc++6 amd64 11.1.0-1ubuntu1~21.04 [583 kB] Get:24 cdrom://Ubuntu 21.04 Hirsute Hippo - Release amd64 (20210420) hirsute/main amd64 g++ amd64 4:10.3.0-1ubuntu1 [1,608 B] Get:25 cdrom://Ubuntu 21.04 Hirsute Hippo - Release amd64 (20210420) hirsute/main amd64 build-essential amd64 12.8ubuntu3 [4,640 B] Get:26 cdrom://Ubuntu 21.04 Hirsute Hippo - Release amd64 (20210420) hirsute/main amd64 dkms all 2.8.4-4 [68.3 kB] Get:27 cdrom://Ubuntu 21.04 Hirsute Hippo - Release amd64 (20210420) hirsute/main amd64 libfakeroot amd64 1.25.3-1.1ubuntu2 [28.1 kB] Get:28 cdrom://Ubuntu 21.04 Hirsute Hippo - Release amd64 (20210420) hirsute/main amd64 fakeroot amd64 1.25.3-1.1ubuntu2 [62.9 kB] Get:29 cdrom://Ubuntu 21.04 Hirsute Hippo - Release amd64 (20210420) hirsute/main amd64 libalgorithm-diff-perl all 1.201-1 [41.8 kB] Get:30 cdrom://Ubuntu 21.04 Hirsute Hippo - Release amd64 (20210420) hirsute/main amd64 libalgorithm-diff-xs-perl amd64 0.04-6build1 [11.4 kB] Get:31 cdrom://Ubuntu 21.04 Hirsute Hippo - Release amd64 (20210420) hirsute/main amd64 libalgorithm-merge-perl all 0.08-3 [12.0 kB] Get:32 cdrom://Ubuntu 21.04 Hirsute Hippo - Release amd64 (20210420) hirsute/main amd64 libc-devtools amd64 2.33-0ubuntu5 [27.2 kB] Get:33 http://archive.ubuntu.com/ubuntu hirsute/main amd64 git-man all 1:2.30.2-1ubuntu1 [931 kB] Get:34 http://security.ubuntu.com/ubuntu hirsute-security/main amd64 libgomp1 amd64 11.1.0-1ubuntu1~21.04 [107 kB] Get:35 http://security.ubuntu.com/ubuntu hirsute-security/main amd64 libatomic1 amd64 11.1.0-1ubuntu1~21.04 [9,236 B] Get:36 http://security.ubuntu.com/ubuntu hirsute-security/main amd64 libgcc-s1 amd64 11.1.0-1ubuntu1~21.04 [42.2 kB] Get:37 http://security.ubuntu.com/ubuntu hirsute-security/main amd64 libcc1-0 amd64 11.1.0-1ubuntu1~21.04 [48.8 kB] Get:38 http://security.ubuntu.com/ubuntu hirsute-security/main amd64 libitm1 amd64 11.1.0-1ubuntu1~21.04 [26.4 kB] Get:39 http://security.ubuntu.com/ubuntu hirsute-security/main amd64 libasan6 amd64 11.1.0-1ubuntu1~21.04 [2,139 kB] Get:40 http://security.ubuntu.com/ubuntu hirsute-security/main amd64 liblsan0 amd64 11.1.0-1ubuntu1~21.04 [893 kB] Get:41 http://security.ubuntu.com/ubuntu hirsute-security/main amd64 libtsan0 amd64 11.1.0-1ubuntu1~21.04 [2,090 kB] Get:42 http://security.ubuntu.com/ubuntu hirsute-security/main amd64 libubsan1 amd64 11.1.0-1ubuntu1~21.04 [844 kB] Get:43 http://security.ubuntu.com/ubuntu hirsute-security/main amd64 libquadmath0 amd64 11.1.0-1ubuntu1~21.04 [146 kB] Get:44 http://security.ubuntu.com/ubuntu hirsute-security/main amd64 linux-libc-dev amd64 5.11.0-37.41 [1,231 kB] Get:45 http://archive.ubuntu.com/ubuntu hirsute/main amd64 git amd64 1:2.30.2-1ubuntu1 [3,457 kB] Get:46 http://archive.ubuntu.com/ubuntu hirsute-updates/main amd64 manpages-dev all 5.10-1ubuntu0.1 [2,309 kB] Fetched 14.9 MB in 2s (7,639 kB/s)
Extracting templates from packages: 100% (Reading database ... 194560 files and directories currently installed.) Preparing to unpack .../gcc-11-base_11.1.0-1ubuntu1~21.04_amd64.deb ... Unpacking gcc-11-base:amd64 (11.1.0-1ubuntu1~21.04) over (11-20210417-1ubuntu1) ... Setting up gcc-11-base:amd64 (11.1.0-1ubuntu1~21.04) ... (Reading database ... 194560 files and directories currently installed.) Preparing to unpack .../libstdc++6_11.1.0-1ubuntu1~21.04_amd64.deb ... Unpacking libstdc++6:amd64 (11.1.0-1ubuntu1~21.04) over (11-20210417-1ubuntu1) . .. Setting up libstdc++6:amd64 (11.1.0-1ubuntu1~21.04) ... (Reading database ... 194560 files and directories currently installed.) Preparing to unpack .../libgomp1_11.1.0-1ubuntu1~21.04_amd64.deb ... Unpacking libgomp1:amd64 (11.1.0-1ubuntu1~21.04) over (11-20210417-1ubuntu1) ... Preparing to unpack .../libatomic1_11.1.0-1ubuntu1~21.04_amd64.deb ... Unpacking libatomic1:amd64 (11.1.0-1ubuntu1~21.04) over (11-20210417-1ubuntu1) . .. Preparing to unpack .../libgcc-s1_11.1.0-1ubuntu1~21.04_amd64.deb ... Unpacking libgcc-s1:amd64 (11.1.0-1ubuntu1~21.04) over (11-20210417-1ubuntu1) .. . Setting up libgcc-s1:amd64 (11.1.0-1ubuntu1~21.04) ... Selecting previously unselected package libcc1-0:amd64. (Reading database ... 194560 files and directories currently installed.) Preparing to unpack .../00-libcc1-0_11.1.0-1ubuntu1~21.04_amd64.deb ... Unpacking libcc1-0:amd64 (11.1.0-1ubuntu1~21.04) ... Selecting previously unselected package binutils-common:amd64. Preparing to unpack .../01-binutils-common_2.36.1-6ubuntu1_amd64.deb ... Unpacking binutils-common:amd64 (2.36.1-6ubuntu1) ... Selecting previously unselected package libbinutils:amd64. Preparing to unpack .../02-libbinutils_2.36.1-6ubuntu1_amd64.deb ... Unpacking libbinutils:amd64 (2.36.1-6ubuntu1) ... Selecting previously unselected package libctf-nobfd0:amd64. Preparing to unpack .../03-libctf-nobfd0_2.36.1-6ubuntu1_amd64.deb ... Unpacking libctf-nobfd0:amd64 (2.36.1-6ubuntu1) ... Selecting previously unselected package libctf0:amd64. Preparing to unpack .../04-libctf0_2.36.1-6ubuntu1_amd64.deb ... Unpacking libctf0:amd64 (2.36.1-6ubuntu1) ... Selecting previously unselected package binutils-x86-64-linux-gnu. Preparing to unpack .../05-binutils-x86-64-linux-gnu_2.36.1-6ubuntu1_amd64.deb . .. Unpacking binutils-x86-64-linux-gnu (2.36.1-6ubuntu1) ... Selecting previously unselected package binutils. Preparing to unpack .../06-binutils_2.36.1-6ubuntu1_amd64.deb ... Unpacking binutils (2.36.1-6ubuntu1) ... Selecting previously unselected package libitm1:amd64. Preparing to unpack .../07-libitm1_11.1.0-1ubuntu1~21.04_amd64.deb ... Unpacking libitm1:amd64 (11.1.0-1ubuntu1~21.04) ... Selecting previously unselected package libasan6:amd64. Preparing to unpack .../08-libasan6_11.1.0-1ubuntu1~21.04_amd64.deb ... Unpacking libasan6:amd64 (11.1.0-1ubuntu1~21.04) ... Selecting previously unselected package liblsan0:amd64. Preparing to unpack .../09-liblsan0_11.1.0-1ubuntu1~21.04_amd64.deb ... Unpacking liblsan0:amd64 (11.1.0-1ubuntu1~21.04) ... Selecting previously unselected package libtsan0:amd64. Preparing to unpack .../10-libtsan0_11.1.0-1ubuntu1~21.04_amd64.deb ... Unpacking libtsan0:amd64 (11.1.0-1ubuntu1~21.04) ... Selecting previously unselected package libubsan1:amd64. Preparing to unpack .../11-libubsan1_11.1.0-1ubuntu1~21.04_amd64.deb ... Unpacking libubsan1:amd64 (11.1.0-1ubuntu1~21.04) ... Selecting previously unselected package libquadmath0:amd64. Preparing to unpack .../12-libquadmath0_11.1.0-1ubuntu1~21.04_amd64.deb ... Unpacking libquadmath0:amd64 (11.1.0-1ubuntu1~21.04) ... Selecting previously unselected package libgcc-10-dev:amd64. Preparing to unpack .../13-libgcc-10-dev_10.3.0-1ubuntu1_amd64.deb ... Unpacking libgcc-10-dev:amd64 (10.3.0-1ubuntu1) ... Selecting previously unselected package gcc-10. Preparing to unpack .../14-gcc-10_10.3.0-1ubuntu1_amd64.deb ... Unpacking gcc-10 (10.3.0-1ubuntu1) ... Selecting previously unselected package gcc. Preparing to unpack .../15-gcc_10.3.0-1ubuntu1_amd64.deb ... Unpacking gcc (4:10.3.0-1ubuntu1) ... Selecting previously unselected package make. Preparing to unpack .../16-make_4.3-4ubuntu1_amd64.deb ... Unpacking make (4.3-4ubuntu1) ... Selecting previously unselected package lto-disabled-list. Preparing to unpack .../17-lto-disabled-list_7_all.deb ... Unpacking lto-disabled-list (7) ... Selecting previously unselected package dpkg-dev. Preparing to unpack .../18-dpkg-dev_1.20.9ubuntu1_all.deb ... Unpacking dpkg-dev (1.20.9ubuntu1) ... Selecting previously unselected package libc-dev-bin. Preparing to unpack .../19-libc-dev-bin_2.33-0ubuntu5_amd64.deb ... Unpacking libc-dev-bin (2.33-0ubuntu5) ... Selecting previously unselected package linux-libc-dev:amd64. Preparing to unpack .../20-linux-libc-dev_5.11.0-37.41_amd64.deb ... Unpacking linux-libc-dev:amd64 (5.11.0-37.41) ... Selecting previously unselected package libcrypt-dev:amd64. Preparing to unpack .../21-libcrypt-dev_4.4.17-1ubuntu3_amd64.deb ... Unpacking libcrypt-dev:amd64 (1:4.4.17-1ubuntu3) ... Selecting previously unselected package rpcsvc-proto. Preparing to unpack .../22-rpcsvc-proto_1.4.2-0ubuntu4_amd64.deb ... Unpacking rpcsvc-proto (1.4.2-0ubuntu4) ... Selecting previously unselected package libtirpc-dev:amd64. Preparing to unpack .../23-libtirpc-dev_1.3.1-1build1_amd64.deb ... Unpacking libtirpc-dev:amd64 (1.3.1-1build1) ... Selecting previously unselected package libnsl-dev:amd64. Preparing to unpack .../24-libnsl-dev_1.3.0-0ubuntu3_amd64.deb ... Unpacking libnsl-dev:amd64 (1.3.0-0ubuntu3) ... Selecting previously unselected package libc6-dev:amd64. Preparing to unpack .../25-libc6-dev_2.33-0ubuntu5_amd64.deb ... Unpacking libc6-dev:amd64 (2.33-0ubuntu5) ... Selecting previously unselected package libstdc++-10-dev:amd64. Preparing to unpack .../26-libstdc++-10-dev_10.3.0-1ubuntu1_amd64.deb ... Unpacking libstdc++-10-dev:amd64 (10.3.0-1ubuntu1) ... Selecting previously unselected package g++-10. Preparing to unpack .../27-g++-10_10.3.0-1ubuntu1_amd64.deb ... Unpacking g++-10 (10.3.0-1ubuntu1) ... Selecting previously unselected package g++. Preparing to unpack .../28-g++_10.3.0-1ubuntu1_amd64.deb ... Unpacking g++ (4:10.3.0-1ubuntu1) ... Selecting previously unselected package build-essential. Preparing to unpack .../29-build-essential_12.8ubuntu3_amd64.deb ... Unpacking build-essential (12.8ubuntu3) ... Selecting previously unselected package dkms. Preparing to unpack .../30-dkms_2.8.4-4_all.deb ... Unpacking dkms (2.8.4-4) ... Selecting previously unselected package libfakeroot:amd64. Preparing to unpack .../31-libfakeroot_1.25.3-1.1ubuntu2_amd64.deb ... Unpacking libfakeroot:amd64 (1.25.3-1.1ubuntu2) ... Selecting previously unselected package fakeroot. Preparing to unpack .../32-fakeroot_1.25.3-1.1ubuntu2_amd64.deb ... Unpacking fakeroot (1.25.3-1.1ubuntu2) ... Selecting previously unselected package liberror-perl. Preparing to unpack .../33-liberror-perl_0.17029-1_all.deb ... Unpacking liberror-perl (0.17029-1) ... Selecting previously unselected package git-man. Preparing to unpack .../34-git-man_1%3a2.30.2-1ubuntu1_all.deb ... Unpacking git-man (1:2.30.2-1ubuntu1) ... Selecting previously unselected package git. Preparing to unpack .../35-git_1%3a2.30.2-1ubuntu1_amd64.deb ... Unpacking git (1:2.30.2-1ubuntu1) ... Selecting previously unselected package libalgorithm-diff-perl. Preparing to unpack .../36-libalgorithm-diff-perl_1.201-1_all.deb ... Unpacking libalgorithm-diff-perl (1.201-1) ... Selecting previously unselected package libalgorithm-diff-xs-perl. Preparing to unpack .../37-libalgorithm-diff-xs-perl_0.04-6build1_amd64.deb ... Unpacking libalgorithm-diff-xs-perl (0.04-6build1) ... Selecting previously unselected package libalgorithm-merge-perl. Preparing to unpack .../38-libalgorithm-merge-perl_0.08-3_all.deb ... Unpacking libalgorithm-merge-perl (0.08-3) ... Selecting previously unselected package libc-devtools. Preparing to unpack .../39-libc-devtools_2.33-0ubuntu5_amd64.deb ... Unpacking libc-devtools (2.33-0ubuntu5) ... Selecting previously unselected package manpages-dev. Preparing to unpack .../40-manpages-dev_5.10-1ubuntu0.1_all.deb ... Unpacking manpages-dev (5.10-1ubuntu0.1) ... Setting up manpages-dev (5.10-1ubuntu0.1) ... Setting up lto-disabled-list (7) ... Setting up libalgorithm-diff-perl (1.201-1) ... Setting up binutils-common:amd64 (2.36.1-6ubuntu1) ... Setting up linux-libc-dev:amd64 (5.11.0-37.41) ... Setting up libctf-nobfd0:amd64 (2.36.1-6ubuntu1) ... Setting up libgomp1:amd64 (11.1.0-1ubuntu1~21.04) ... Setting up libfakeroot:amd64 (1.25.3-1.1ubuntu2) ... Setting up libasan6:amd64 (11.1.0-1ubuntu1~21.04) ... Setting up fakeroot (1.25.3-1.1ubuntu2) ... update-alternatives: using /usr/bin/fakeroot-sysv to provide /usr/bin/fakeroot ( fakeroot) in auto mode Setting up liberror-perl (0.17029-1) ... Setting up libtirpc-dev:amd64 (1.3.1-1build1) ... Setting up rpcsvc-proto (1.4.2-0ubuntu4) ... Setting up make (4.3-4ubuntu1) ... Setting up libquadmath0:amd64 (11.1.0-1ubuntu1~21.04) ... Setting up libatomic1:amd64 (11.1.0-1ubuntu1~21.04) ... Setting up libubsan1:amd64 (11.1.0-1ubuntu1~21.04) ... Setting up libnsl-dev:amd64 (1.3.0-0ubuntu3) ... Setting up libcrypt-dev:amd64 (1:4.4.17-1ubuntu3) ... Setting up git-man (1:2.30.2-1ubuntu1) ... Setting up libbinutils:amd64 (2.36.1-6ubuntu1) ... Setting up libc-dev-bin (2.33-0ubuntu5) ... Setting up libalgorithm-diff-xs-perl (0.04-6build1) ... Setting up libcc1-0:amd64 (11.1.0-1ubuntu1~21.04) ... Setting up liblsan0:amd64 (11.1.0-1ubuntu1~21.04) ... Setting up libitm1:amd64 (11.1.0-1ubuntu1~21.04) ... Setting up libc-devtools (2.33-0ubuntu5) ... Setting up libalgorithm-merge-perl (0.08-3) ... Setting up libtsan0:amd64 (11.1.0-1ubuntu1~21.04) ... Setting up libctf0:amd64 (2.36.1-6ubuntu1) ... Setting up libgcc-10-dev:amd64 (10.3.0-1ubuntu1) ... Setting up git (1:2.30.2-1ubuntu1) ... Setting up libc6-dev:amd64 (2.33-0ubuntu5) ... Setting up binutils-x86-64-linux-gnu (2.36.1-6ubuntu1) ... Setting up libstdc++-10-dev:amd64 (10.3.0-1ubuntu1) ... Setting up binutils (2.36.1-6ubuntu1) ... Setting up dpkg-dev (1.20.9ubuntu1) ... Setting up gcc-10 (10.3.0-1ubuntu1) ... Setting up g++-10 (10.3.0-1ubuntu1) ... Setting up gcc (4:10.3.0-1ubuntu1) ... Setting up dkms (2.8.4-4) ... Setting up g++ (4:10.3.0-1ubuntu1) ... update-alternatives: using /usr/bin/g++ to provide /usr/bin/c++ (c++) in auto mo de Setting up build-essential (12.8ubuntu3) ... Processing triggers for man-db (2.9.4-2) ... Processing triggers for libc-bin (2.33-0ubuntu5) ... ubuntu@ubuntu:~$ cd ~ ubuntu@ubuntu:~$ git clone https://github.com/brektrou/rt18821CU.git Cloning into 'rt18821CU'... Username for 'https://github.com': Password for 'https://github.com': remote: Repository not found. fatal: Authentication failed for 'https://github.com/brektrou/rt18821CU.git/' ubuntu@ubuntu:~$ git clone https://github.com/brektrou/rtl8821CU.git Cloning into 'rtl8821CU'... remote: Enumerating objects: 1655, done. remote: Counting objects: 100% (14/14), done. remote: Compressing objects: 100% (11/11), done. remote: Total 1655 (delta 2), reused 6 (delta 2), pack-reused 1641 Receiving objects: 100% (1655/1655), 7.69 MiB | 9.62 MiB/s, done. Resolving deltas: 100% (656/656), done. ubuntu@ubuntu:~$ cd rtl8221cu bash: cd: rtl8221cu: No such file or directory ubuntu@ubuntu:~$ ls Desktop Downloads Pictures rtl8821CU Videos Documents Music Public Templates ubuntu@ubuntu:~$ cd ~/rtl8821cu bash: cd: /home/ubuntu/rtl8821cu: No such file or directory ubuntu@ubuntu:~$ cd ~/rtl8821CU ubuntu@ubuntu:~/rtl8821CU$ sudo ./dkms-install.sh About to run dkms install steps...

Creating symlink /var/lib/dkms/rtl8821CU/5.4.1/source -> /usr/src/rtl8821CU-5.4.1

DKMS: add completed.

Kernel preparation unnecessary for this kernel. Skipping...

Building module: cleaning build area... 'make' KVER=5.11.0-16-generic...................................... Signing module: Generating a new Secure Boot signing key: Can't load /var/lib/shim-signed/mok/.rnd into RNG 140708600194432:error:2406F079:random number generator:RAND_load_file:Cannot open file:../crypto/rand/randfile.c:98:Filename=/var/lib/shim-signed/mok/.rnd Generating a RSA private key .................................................................+++++ ..............+++++ writing new private key to '/var/lib/shim-signed/mok/MOK.priv'

  • /var/lib/dkms/rtl8821CU/5.4.1/5.11.0-16-generic/x86_64/module/8821cu.ko Adding '/var/lib/shim-signed/mok/MOK.der' to shim: cleaning build area...

DKMS: build completed.

8821cu.ko: Running module version sanity check.

  • Original module
    • No original module exists within this kernel
  • Installation
    • Installing to /lib/modules/5.11.0-16-generic/updates/dkms/

depmod....

DKMS: install completed. Finished running dkms install steps. ubuntu@ubuntu:~/rtl8821CU$ cd ~ ubuntu@ubuntu:~$ sudo modprobe 8821cu modprobe: ERROR: could not insert '8821cu': Operation not permitted


Failed at modprobe. Thanks for your help!

zorq avatar Oct 03 '21 06:10 zorq

modprobe: ERROR: could not insert '8821cu': Operation not permitted

This looks like a Secure Boot issue (the driver has to be signed properly to be loadable if Secure Boot is enabled). Can you please disable Secure Boot in your computer's UEFI/BIOS and try again, or try a different computer that doesn't use Secure Boot?

peacey avatar Oct 03 '21 06:10 peacey

sudo modprobe 8211cu modprobe: FATAL: Module 8211cu not found in directory /lib/modules/5.11.0-16-generic

zorq avatar Oct 03 '21 07:10 zorq

@zorq, you need to re-run all the commands to install it first then load it again. Linux booted from the USB is not persistent.

peacey avatar Oct 03 '21 07:10 peacey

So I received the BrosTrend today and was able to get it working quite easily with the driver I linked. 5G AP mode also worked fine. Here are some rough instructions for how to install the driver for it.

Install the module first:

sudo apt update
sudo apt install git bc dkms
cd ~
git clone https://github.com/brektrou/rtl8821CU.git
cd rtl8821CU
sudo ./dkms-install.sh
cd ~

The install will take 5 minutes or so. Afterwards, load the module:

sudo modprobe 8821cu

You should get no errors. Then, unplug and replug the usb wifi adapter. Now the light on the adapter should come on, and if you check under ip link you'll find it's interface name is something like wlxXXXXXXXXXX, where XXXX... is the MAC address of it. Use that interface name in the rest of the instructions.

You don't need any extra options like specifying the channel, just use the instructions normally and it should work.

See how it goes!

I ran exactly these commands, with secure boot disabled.

zorq avatar Oct 03 '21 07:10 zorq