I have a generic rtl8812 based Wifi adapter bought on eBay, I tried building the drivers on Jessie and gave up so I'm having a go on Stretch. But for really old Pi's I'd buy a known compatible version, I have an Edimax based on the 7811 - works perfectly and you'll never need the 802.11ac speed....
I'm rebuilding the drivers right now, having installed the headers as suggested above, but I am following this post
https://www.erol.name/compile-realtek-r ... -jessie/
Start at the point where it says 'If you are going to compile on Raspberry Pi', after doing these steps from the top of the same post...
sudo apt install git
git clone https://github.com/abperiasamy/rtl8812AU_8821AU_linux
cd rtl8812AU_8821AU_linux
sudo make clean from those instructions doesn't work until the headers have been installed...
then
sudo make - this might take a long time.... it does on a Raspberry Pi Zero
Make sure wpa_supplicant.conf is set up properly and reboot.
The generic adapter seems to be connected and working, try
iwconfig
wlan0 IEEE 802.11AC ESSID:"xxxxxxxxxxxxxx" Nickname:"<WIFI@REALTEK>"
Mode:Managed Frequency:5.24 GHz Access Point: 24:20:C7:70:27:71
Bit Rate:434 Mb/s Sensitivity:0/0
Retry:off RTS thr:off Fragment thr:off
Power Management:off
Link Quality=78/100 Signal level=100/100 Noise level=0/100
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0
and
ifconfig
wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.1.58 netmask 255.255.255.0 broadcast 192.168.1.255
inet6 fe80::6fa4:7811:d4aa:c7de prefixlen 64 scopeid 0x20<link>
ether 16:88:11:c3:70:d4 txqueuelen 1000 (Ethernet)
RX packets 185 bytes 55786 (54.4 KiB)
RX errors 0 dropped 2 overruns 0 frame 0
TX packets 54 bytes 8874 (8.6 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
Works
