DWA-171 C1 on Odroid C2 (kernel issue)

Hi, Linux noob here (sorry),

I recently got a Odroid C2, loaded it with DietPi, and then tried adding a DWA-171 C1 wifi dongle (https://wikidevi.com/wiki/D-Link_DWA-171_rev_C1).

The dongle didn’t ‘just work’, so I found the following Git repo (https://github.com/uzh-rpg/rpg_dwa171_wifidongle) to try and get things going.

Before I did anything, I ran:

dietpi-update
apt-get update
apt-get upgrade
reboot

After that, changed the Makefile platform to ARMv8, then started following the DKMS instructions, until I got to ‘sudo dkms build -m ${DRV_NAME} -v ${DRV_VERSION}’, at which point I received the below message:

root@DietPi:~/rpg_dwa171_wifidongle# sudo dkms build -m ${DRV_NAME} -v ${DRV_VERSION}
Error! echo
Your kernel headers for kernel 3.16.57+ cannot be found at
/lib/modules/3.16.57+/build or /lib/modules/3.16.57+/source.

I also tried the non-DKMS option and got a similar kernel related result:

root@DietPi:~/rpg_dwa171_wifidongle# make
make ARCH=arm64 CROSS_COMPILE= -C /lib/modules/3.16.57+/build M=/root/rpg_dwa171_wifidongle  modules
make[1]: *** /lib/modules/3.16.57+/build: No such file or directory.  Stop.
Makefile:1923: recipe for target 'modules' failed
make: *** [modules] Error 2

I originally posted this on the Odroid forum (https://forum.odroid.com/viewtopic.php?f=139&t=35026), but was told

I think they didn’t sync with meveric’s Kernel update packages from last August.

Basically, I’m currently stuck getting this thing working. Any ideas or updates would be greatly appreciated.

First of all our kernel version is not up-to-date, please do:

apt install linux-image-arm64-odroid-c2 linux-headers-arm64-odroid-c2
apt full-upgrade

The above also installs the linux headers for this kernel. A reboot is required to load it. After reboot you might want to purge the old kernel: G_AGA