Problem building Wireless USB Adapter (TL-WN821N) driver for ReSpeaker Core v2

I’m trying to setup a Wireless USB Adapter (TL-WN821N version 5) on a ReSpeaker Core v2 (to compare bandwidth to the built-in wireless adapter) but ran into a problem building the necessary driver.



The driver is built for the specific Linux kernel version. In the case of ReSpeaker Core v2, the kernel version is “4.4.138-respeaker-r0”. When I try to build the driver (using instructions similar to https://wiki.debian.org/WiFi) I get the following error: make[1]: *** /lib/modules/4.4.138-respeaker-r0/build: No such file or directory.



Typically this is resolved by installing the kernel headers (e.g. sudo apt install linux-headers-<kernel-version-number>) but it appears the kernel headers for this version are not available on apt.



Are the kernel headers available elsewhere? Or any other suggestions how to get the adapter to work on the ReSpeaker Core v2?



(In case it is important, I am using respeaker-debian-9-lxqt-flasher-20180801 image.)