New Wifi device; unknown hardware class

I recently purchased a new USB Wifi adapter, and have been trying to get the thing to work for some time now. After a bit of testing I think that I have found the issue in the form of the device not having the “network” hardware class. I was wondering if there was any way to forcibly set the hardware class of an unknown device? That may not have been the best phrasing however what I was going for was some way of arbitrarily setting the hardware class of a USB device? device info is included if that is helpful.

10: USB 00.0: 0000 Unclassified device
SysFS ID: /devices/pci0000:00/0000:00:13.2/usb2/2-2/2-2:1.0
SysFS BusID: 2-2:1.0
Hardware Class: unknown
Model: “D-Link DWA-171”
Hotplug: USB
Vendor: usb 0x2001 “D-Link”
Device: usb 0x331d “DWA-171”
Revision: “2.00”
Serial ID: “123456”
Speed: 480 Mbps
Module Alias: “usb:v2001p331Dd0200dc00dsc00dp00icFFiscFFipFFin00”
Attached to: #18 (Hub)

Install linux headers for your running kernel. The following command will install the linux-headers automatically for all installed kernels:

sudo pacman -S $(pacman -Qsq "^linux" | grep "^linux[0-9]*[-rt]*$" | awk '{print $1"-headers"}' ORS=' ')

Reboot and then to install this driver AUR (en) - rtl8821cu-dkms-git run:

pamac build rtl8821cu-dkms-git

Once is done:

  1. ran wpa supplicant to authenticate and associate the interface. See here wpa_supplicant - ArchWiki or
  2. dhcpcd to get a lease dhcpcd - ArchWiki

If you enable the wpa_supplicant hook for dhcpcd then you don’t have to also enable wpa_supplicant@interface .service
With the service then you can use the NetworkManager to manage it, and that would be the best way in any DE.
Hope this helps.