0

I am trying to make a Wi-Fi USB adapter working, to no avail. The dongle is a TP-Link WN821N, which has a Realtek rtl8192eu chip. I cannot change it and will soon loose my wired connection due to choices of my employer.

When inserted, I get the following output from dmesg:

[12881.857485] usb 1-1.6: new high-speed USB device number 7 using ehci-pci
[12881.970614] usb 1-1.6: New USB device found, idVendor=2357, idProduct=0107, bcdDevice= 2.00
[12881.970617] usb 1-1.6: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[12881.970618] usb 1-1.6: Product: 802.11n NIC
[12881.970619] usb 1-1.6: Manufacturer: Realtek
[12881.970620] usb 1-1.6: SerialNumber: 00e04c000001

and here is the relevant output of usb-devices:

$ usb-devices|grep -C 4 Realtek
T:  Bus=01 Lev=02 Prnt=02 Port=05 Cnt=03 Dev#=  7 Spd=480 MxCh= 0
D:  Ver= 2.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=2357 ProdID=0107 Rev=02.00
S:  Manufacturer=Realtek
S:  Product=802.11n NIC
S:  SerialNumber=00e04c000001
C:  #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=500mA
I:  If#=0x0 Alt= 0 #EPs= 5 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none)

however there's no network interface coming up

$ lspci -knn |grep -i net -A2
00:19.0 Ethernet controller [0200]: Intel Corporation 82579LM Gigabit Network Connection [8086:1502] (rev 04)
Subsystem: Intel Corporation 82579LM Gigabit Network Connection (Lewisville) [8086:2008]
Kernel driver in use: e1000e
Kernel modules: e1000e

also, ip a only shows the ethernet interface, and iw dev has no output.

My uninformed guess is that the system cannot find a driver for this particular dongle. I do have the non-free firmware-realtek package installed:

$ dpkg -l|grep realtek
ii  firmware-realtek                              20190114-2                              all          Binary firmware for Realtek wired/wifi/BT adapters

and there should be something related to rtl8192eu inside:

$ dpkg -L firmware-realtek |grep rtl8192eu
/lib/firmware/rtl_bt/rtl8192eu_fw.bin
/lib/firmware/rtlwifi/rtl8192eu_nic.bin
/lib/firmware/rtlwifi/rtl8192eu_wowlan.bin

$ apt-cache show firmware-realtek|grep -i rtl8192eu
* Realtek RTL8192EU Bluetooth firmware (rtl_bt/rtl8192eu_fw.bin)
* Realtek RTl8192EU non-WoWLAN firmware (rtlwifi/rtl8192eu_nic.bin)
* Realtek RTl8192EU WoWLAN firmware (rtlwifi/rtl8192eu_wowlan.bin)

$ grep -r rtl8192eu /lib/modules/4.19.0-20-amd64/
Binary file /lib/modules/4.19.0-20-amd64/kernel/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.ko matches

however I do not have a module named rtl8192eu:

$ sudo modprobe rtl8192eu
modprobe: FATAL: Module rtl8192eu not found in directory /lib/modules/4.19.0-20-amd64

and while I can load rtl8xxxu instead, it still does not make any new interface appear, both lspci and ip a keep showing only ethernet, and iw dev shows nothing.

I am now faced with a hard choice: debug this, buy another dongle with my own money, or switch jobs.

  • I strongly prefer a solution based on firmware-realtek, or another maintained package, over compiling drivers from github.
  • I am willing to upgrade to Debian 11 bullseye if needed, as I was planning to do that anyway.
  • I wonder if there were some installation steps where I said that I will not ever need wifi.

Can you help?

1

1 Answer 1

0

After some time and a full-upgrade to Debian bullseye, I think the best available solution is to install the module from this github repo, which is more up to date than the fork proposed on this Debian Wiki page (archived version).

Based on the instructions proposed on the repo's readme, the following worked for me in Debian 11.4 bullseye, Linux 5.10.0-16-amd64 #1 SMP Debian 5.10.127-2 (2022-07-23) x86_64 GNU/Linux:

sudo apt install git linux-headers-generic build-essential dkms
git clone https://github.com/Mange/rtl8192eu-linux-driver
cd rtl8192eu-linux-driver
sudo dkms add .
sudo dkms install rtl8192eu/1.0
echo "blacklist rtl8xxxu" | sudo tee /etc/modprobe.d/rtl8xxxu.conf

Not sure if the last line blacklisting rtl8xxxu is needed. After rebooting, the driver is loaded automatically:

$ usb-devices|grep -C 4 Realtek

T:  Bus=02 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=  2 Spd=480 MxCh= 0
D:  Ver= 2.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=2357 ProdID=0107 Rev=02.00
S:  Manufacturer=Realtek
S:  Product=802.11n NIC
S:  SerialNumber=00e04c000001
C:  #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=500mA
I:  If#=0x0 Alt= 0 #EPs= 5 Cls=ff(vend.) Sub=ff Prot=ff Driver=rtl8192eu

$ sudo iw dev
phy#0
       Interface wlxd037458b4186
               ifindex 3
               wdev 0x1
               addr d0:37:45:8b:41:86
               ssid eduroam
               type managed
               txpower 12.00 dBm

Under buster, I also had appended the following to /etc/NetworkManager/NetworkManager.conf:

[device]
wifi.scan-rand-mac-address=no

following the debian wiki guide, I am not sure if it's still necessary.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .