[Debian] USB Wireless Adapter Driver

@rnab
1 min readFeb 15, 2021

--

If you connected USB wireless dongle and your linux distro does not recognize it, you can follow these steps to get it working.

First check if you can see your device listed with the following command

sudo lshw -C network | grep wireless

If your output is similar (not same) to what’s shown below, your distro detected the adapter successfully and there is no need for any driver and problem might be something else if your wireless does not work

capabilities: ethernet physical wireless
configuration: broadcast=yes driver=rtl8192cu driverversion=4.19.0-13-amd64 firmware=N/A ip=192.168.86.45 link=yes multicast=yes wireless=IEEE 802.11

However if the above command returns nothing, there is a possibility that the drive is missing. To confirm that, run the following command

sudo dmesg

Somewhere in the output, you would see the missing driver information.

[3016557.394914] r8188eu 3-1:1.0: firmware: failed to load rtlwifi/rtl8188eufw.bin (-2)
[3016557.394982] r8188eu 3-1:1.0: Direct firmware load for rtlwifi/rtl8188eufw.bin failed with error -2
[3016557.394986] r8188eu 3-1:1.0: Firmware rtlwifi/rtl8188eufw.bin not available

Here are the steps to install the missing driver

  • Install missing dependencies
sudo apt install build-essentials linux-headers-$(uname -r) git automake -y
  • Clone the driver repo
git clone https://github.com/lwfinger/rtl8188eu --depth=1
  • Link the installed linux-headersin the /lib/module folder
sudo ln -s /usr/src/linux-headers-4.19.0-13-amd64/ /lib/modules/4.19.0-13-amd64/build
  • Build and install the driver
cd ./rtl8188eu
make all
sudo make install
  • Finally reboot and run ip addr to see your new wireless device listed
wlx1cbfce7fc5ab: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN group default qlen 1000
link/ether 46:87:01:4e:51:ed brd ff:ff:ff:ff:ff:ff

--

--

@rnab
@rnab

Written by @rnab

Typescript, Devops, Kubernetes, AWS, AI/ML, Algo Trading

No responses yet