Problem 1: WiFi interface is completely missing
This is caused by a missing WiFi driver, usually on newer NUCs. We need to install the driver manually.
Call:
uname -r
This will give you your kernel version, something like this:
5.15.0-117-generic
Install the driver version that corresponds to your kernel:
sudo apt update
sudo apt install linux-modules-iwlwifi-5.15.0-117-generic
If you want to just download the .deb package (for example when the UAV does not have internet connection, you can download the package on your laptop and move it to the UAV via a flash drive) call this:
sudo apt install --download-only linux-modules-iwlwifi-5.15.0-117-generic
The package will be downloaded to /var/cache/apt/archives
Reboot the NUC, you should have your WiFi interface now.
Problem 2: WiFi will not connect to 5GHz networks
This is somehow caused by newer kernel/wifi driver, we have to use an older kernel to fix this issue. First of all, disable unattended upgrades by calling:
sudo apt remove unattended-upgrades
Now, call this to list the available kernels:
sudo grep 'menuentry \|submenu ' /boot/grub/grub.cfg | cut -f2 -d "'"
The output will look like this:
Ubuntu Advanced options for Ubuntu Ubuntu, with Linux 5.15.0-131-generic Ubuntu, with Linux 5.15.0-131-generic (recovery mode) Ubuntu, with Linux 5.15.0-67-generic Ubuntu, with Linux 5.15.0-67-generic (recovery mode) UEFI Firmware Settings
In this case, we were using the 5.15.0-131, which had the 5GHz issue. So we want to switch to the 5.15.0-67. Backup the grub settings, in case something goes wrong:
sudo cp /etc/default/grub ~/grub.backup
edit the grub settings:
sudo vim /etc/default/grub
find the line GRUB_DEFAULT=0 and change it for the following:
GRUB_DEFAULT='Advanced options for Ubuntu>Ubuntu, with Linux 5.15.0-67-generic'
Specify the correct kernel version that you want to use. Next:
sudo upgrade-grub
Reboot the computer, and you should be running the older kernel, check by calling:
uname -r
By changing the kernel version, you might need to install the correct wifi driver too (see problem 1 on this page). In short:
sudo apt install linux-modules-iwlwifi-5.15.0-67-generic
And reboot. Now your wifi should work