Realtek rtl8811cu linux driver

Realtek rtl8811cu linux driver

Realtek RTL8811CU/RTL8821CU USB wifi adapter driver version 5.4.1 for Linux 4.4.x up to 5.x

Before build this driver make sure make , gcc , linux-header / kernel-devel , bc and git have been installed.

First, clone this repository

Check the name of the interface

Check the interface name of your wifi adapter using ifconfig . Usually, it will be wlan0 by default, but it may vary depends on the kernel and your device. On Ubuntu, for example, it may be named as wlx + MAC address. (https://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames/)

If this is the case, you can either disable the feature following the link above, or replace the name used in the driver by

Build and install with DKMS

DKMS is a system which will automatically recompile and install a kernel module when a new kernel gets installed or updated. To make use of DKMS, install the dkms package.

To make use of the DKMS feature with this project, just run:

If you later on want to remove it, run:

Plug your USB-wifi-adapter into your PC

If wifi can be detected, congratulations. If not, maybe you need to switch your device usb mode by the following steps in terminal:

  1. find your usb-wifi-adapter device ID, like «0bda:1a2b», by type:
  1. switch the mode by type: (the device ID must be yours.)

Need install usb_modeswitch (Archlinux: sudo pacman -S usb_modeswitch )

Make it permanent

If steps above worked fine and in order to avoid periodically having to make usb_modeswitch you can make it permanent (Working in Ubuntu 18.04 LTS):

Edit usb_modeswitch rules:

Append before the end line LABEL=»modeswitch_rules_end» the following:

Make sure to set your ATTR and the -v argument to the left portion of the output of lsusb device ID, and your ATTR and -p argument to the right portion of the lsusb device ID. For example (for the Cudy AC600 usb wifi adapter) the output from lsusb command looks like this:

then your configuration in /lib/udev/rules.d/40-usb_modeswitch.rules should be

Build and install without DKMS

Use following commands:

If you later on want to remove it, do the following:

Checking installed driver

If you successfully install the driver, the driver is installed on /lib/modules/
/kernel/drivers/net/wireless/realtek/rtl8821cu . Check the driver with the ls command:

Make sure 8821cu.ko file present on that directory

Читайте также:  Антивирусник доктор веб для windows 10

Check with DKMS (if installing via DKMS):

sudo dkms status

ARM architecture tweak for this driver (this solves compilation problem of this driver):

Use the tool ‘iw’, please don’t use other tools like ‘airmon-ng’

About

Realtek RTL8811CU/RTL8821CU USB Wi-Fi adapter driver for Linux

Источник

MX Linux Forum

Support for MX and antiX Linux distros

Forum users

  • Please read this before asking for help, and don’t forget to add Quick System Info to help requests!
  • Please follow the Forum Rules

Current releases
— MX-19.4 release info here
— Migration information to MX-19.4 here
— antiX-19.4 (Grup Yorum) release info here

News
— MX Linux on social media: here
— New Forum Features, Marking Solved and Referencing a User: here

[Solved] Realtek 8811CU Wireless LAN 802.11ac USB NIC

[Solved] Realtek 8811CU Wireless LAN 802.11ac USB NIC

#1 Post by srmg » Tue Jan 28, 2020 3:25 pm

[Solved] Goodafternoon from Mariagrazia,
I’m from Italy and I’m sorry for my poor english. I had a very old laptop. HP Compaq6720 with cpu Intel Celeron (R) 550 @200GHz freq. -64bit, Bios date 1/10/2008. I installed mx linux 4.19.0-6 amd 64 (x86-64) because my laptop has a very small memory and I can’t install windows 10 so I decided to try with a linux os and I really like mx linux but I have a problem: I bought a wifi adapter to have a better signal. Till I had Windows vista I can use it but now The usb adapter doesn’t have a driver for linux but onli for windows and mac. The adapter is the one I wrote in the subject:Realtek 8811CU Wireless LAN 802.11ac USB NIC. Someone can suggest me how can I write a program to use my adapter or can you suggest me another one not so expensive that I can buy on Amazon. I saw varous model that promise to be right for linux but I’ m not so sure that they are right for the last version of mx linux. Can you help me? Thank you in advance for what you can do. Mariagrazia

Note: Thank you to all of us and in a special way to gsm

mod note: edited text formatting, please use only standard text, thank you

Re: Realtek 8811CU Wireless LAN 802.11ac USB NIC

#2 Post by Head_on_a_Stick » Tue Jan 28, 2020 3:33 pm

Re: Realtek 8811CU Wireless LAN 802.11ac USB NIC

#3 Post by srmg » Fri Jan 31, 2020 5:29 pm

$ sudo usb_modeswitch -KW -v 0bda:1a2b
Take all parameters from the command line

* usb_modeswitch: handle USB devices with multiple modes
* Version 2.5.2 (C) Josua Dietze 2017
* Based on libusb1/libusbx

! PLEASE REPORT NEW CONFIGURATIONS !

No default vendor/product ID given. Abort

Re: Realtek 8811CU Wireless LAN 802.11ac USB NIC

#4 Post by gsm » Sat Feb 08, 2020 11:48 am

/build/rtl8821CU/dkms-install.sh. The description e.g. does not mention the correct path ./dkms-install.sh should perhaps be ./rtl8821CU/dkms-install.sh
It is to bad that you need to carry out all these steps before the adapter can be used.
In my opinion this driver should have been included in the Linux kernel. In W10 it just works out of the box.

Читайте также:  Клавиатура отключается при запуске windows

Re: Realtek 8811CU Wireless LAN 802.11ac USB NIC

#5 Post by gsm » Mon Feb 17, 2020 5:47 pm

Re: Realtek 8811CU Wireless LAN 802.11ac USB NIC

#6 Post by gsm » Sat Feb 22, 2020 6:18 pm

I did the installation of the RTL8811CU WiFi adapter allover again.

I used the command lsusb first without the USB adapter plugged in.
Next i plugged the adapter into the USB port.
Then a second time lsusb gave me an extra line, showing that my adapter ID is: 0bda:c811
So in my case the next command is:

Take all parameters from the command line

* usb_modeswitch: handle USB devices with multiple modes
* Version 2.5.2 (C) Josua Dietze 2017
* Based on libusb1/libusbx

! PLEASE REPORT NEW CONFIGURATIONS !

DefaultVendor= 0x0bda
DefaultProduct= 0xc811

Look for default devices .
found USB ID 0bda:0111
vendor ID matched
found USB ID 0bda:c811
vendor ID matched
product ID matched
found USB ID 1d6b:0002
found USB ID 0a12:0001
found USB ID 1d6b:0001
found USB ID 1d6b:0001
found USB ID 1d6b:0001
found USB ID 1d6b:0001
found USB ID 1d6b:0002
found USB ID 046d:c52f
found USB ID 1d6b:0001
found USB ID 1d6b:0001
Found devices in default mode (1)
Access device 004 on bus 003
Get the current device configuration .
Current configuration number is 1
Use interface number 0
with class 255
Error: can’t use storage command in MessageContent with interface 0; interface class is 255, expected 8. Abort

So then i tried the build and install without dkms.
Use following commands (the make takes some time ;-):

Re: Realtek 8811CU Wireless LAN 802.11ac USB NIC

#7 Post by gsm » Tue Feb 25, 2020 8:57 am

/build/rtl8821CU folder with the required driver files:

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=4.19.0-6-686-pae.
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/4.19.0-6-686-pae/kernel/drivers/net/wireless/realtek/rtl8821cu/

depmod.
System has not been booted with systemd as init system (PID 1). Can’t operate.
Failed to connect to bus: Host is inactief

DKMS: install completed.
Finished running dkms install steps.

Re: Realtek 8811CU Wireless LAN 802.11ac USB NIC

#8 Post by srmg » Fri Mar 06, 2020 5:44 am

/build/rtl8821CU folder with the required driver files:
CODE: SELECT ALL

Dear Gsm thank you again. I make every action as you said and my terminal give me the same result you had but when I put my usb adapter it is still unusable . What can I do. Now I’ll try also your other suggestion but I’m a bit
However thanks for your help. Mariagrazia

Читайте также:  Долго загружается windows с ssd диска

Resolved. Realtek 8811CU Wireless LAN 802.11ac USB NIC

#9 Post by srmg » Fri Mar 06, 2020 6:11 am

Gsm thank you very much finally my usb adapter is alive.

I tried to execute other suggestion con lsusb and this is the result of the terminal:

$ sudo usb_modeswitch -KW -v 0bda -p 1a2b
[sudo] password di srmg:
Take all parameters from the command line

* usb_modeswitch: handle USB devices with multiple modes
* Version 2.5.2 (C) Josua Dietze 2017
* Based on libusb1/libusbx

! PLEASE REPORT NEW CONFIGURATIONS !

DefaultVendor= 0x0bda
DefaultProduct= 0x1a2b

Look for default devices .
found USB ID 0bda:1a2b
vendor ID matched
product ID matched
found USB ID 1d6b:0002
found USB ID 1d6b:0001
found USB ID 1d6b:0001
found USB ID 046d:c05a
found USB ID 1a40:0101
found USB ID 1d6b:0001
found USB ID 1d6b:0002
found USB ID 1d6b:0001
Found devices in default mode (1)
Access device 005 on bus 004
Get the current device configuration .
Current configuration number is 1
Use interface number 0
with class 8
Use endpoints 0x0b (out) and 0x8a (in)

USB description data (for identification)
————————-
Manufacturer: Realtek
Product: DISK
Serial No.: not provided
————————-
Sending standard EJECT sequence
Looking for active drivers .
OK, driver detached
Set up interface 0
Use endpoint 0x0b for message sending .
Trying to send message 1 to endpoint 0x0b .
OK, message successfully sent
Read the response to message 1 (CSW) .
Response successfully read (13 bytes), status 1
Trying to send message 2 to endpoint 0x0b .
OK, message successfully sent
Read the response to message 2 (CSW) .
Response successfully read (13 bytes), status 0
Trying to send message 3 to endpoint 0x0b .
Device seems to have vanished right after sending. Good.
Device is gone, skip any further commands
-> Run lsusb to note any changes. Bye!

$ lsusb
Bus 004 Device 006: ID 0bda:c811 Realtek Semiconductor Corp.
Bus 004 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 003: ID 046d:c05a Logitech, Inc. M90/M100 Optical Mouse
Bus 003 Device 002: ID 1a40:0101 Terminus Technology Inc. Hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
srmg@mxlinux19.1x64mg:

And now the adapter go on in doing its work. Thank you very much from srmg Gsm you are

mod note: removed text formatting. Use the code button located next to the quotes for terminal output text.

Источник

Оцените статью