Set D-Link DWA 171 As Wireless Device and not as USB Stick on Ubuntu

by Jack
5 minutes
Set D-Link DWA 171 As Wireless Device and not as USB Stick on Ubuntu

The problem many people face after installing the dual-band Wi-Fi drivers for D-Link DWA USB dongle is that Linux system doesn't recognize them.

Missing Wi-Fi icon in ubuntu

So, if you are on Linux and struggling with setting up a DWA device, then here's the guide for you to follow.

  1. The very first thing you have to do is get the correct drivers from the official D-Link support page.
  2. Install the drivers, and to do that, extract the archive and cd into the root of the main directory.
  3. Run these commands to install the module.
    make
    sudo make install
  4. Issue lsusb command to see if you see the installed device listed.
    lsusb show installed device
  5. Do the modswitch now. Run this final command now.
    sudo /usr/sbin/usb_modeswitch -K -v 0bda -p 1a2b
    lsusb ubuntu mod switch
  6. Run lsusb once again and see if the device is showing as a Wireless one.
  7. The Wi-Fi networks will be showing now.
    Wifi icon now showing in ubuntu

Connect to any Wi-Fi and start browsing the internet without any worried.

Note: Sometimes, when you restart your computer, there are chances that Wi-Fi option disappears again. For that, I will suggest you to keep a bash script in some folder with the following lines.

lsusb
#Bus 003 Device 005: ID 0bda:1a2b Realtek Semiconductor Corp.
/usr/sbin/usb_modeswitch -K -v 0bda -p 1a2b
lsusb

Save the above lines in a file names usb.sh and then run with root privileges to get the Wi-Fi working again.

Method 2:

For some reason, if the process above doesn't work then you can try the following GitHub project.

https://github.com/CarlosDev314159/d-link-dwa-171-wifi-adapter-automatic-driver-installer

Using this is very simple.

Open Terminal and then run these commands first to setup the dependencies.

sudo apt install python3-pip python3-venv
cd ~/Public
python3 -m venv driver && source ./driver/bin/activate

Now, you just run the project by running the following commands.

git clone https://github.com/CarlosDev314159/d-link-dwa-171-wifi-adapter-automatic-driver-installer.git && cd d-link-dwa-171-wifi-adapter-automatic-driver-installer
pip3 install -r requirements.txt
python3 main.py

Once the process finishes, you will have the WiFi working though the DWA-171 dongle!