I’m working on the first draft of the production version of the small server that acts as the brain for Boston Biomotion’s Proteus. Today, I hit a snag with the wifi that I want to document.

The unit we’re working with right now is the Intel NUC NUC6i3SYH. It uses the Intel WiFi 8260. We need to specify different wifi configurations for in-office and away, so I tried using wpa_supplicant in roam mode to specify our local and mobile settings with IP addresses. It kept hanging with a strange error and it took me way too many hours to get to the bottom of it.

The instructions I found everywhere were as follows:

Modify your /etc/network/interfaces like this:

allow-hotplug wlp1s0
iface wlp1s0 inet manual
  wpa-roam path-to-your-wpa_supplicant.conf

iface network-defined-in-supplicant.conf inet dhcp

# and so on...

This would fail to start at boot. The command sudo ifup wlp1s0 would fail with an error mentioning p2p-dev-wlp1s0 and, more importantly, wpa_bin daemon failed to start. The p2p-dev errors seemed more descriptive and pressing, so I troubleshot that for a while and came up empty.

I also found that if I started the service manually,

wpa_supplicant -B -i wlp1s0 -c path-to-config.conf

…it would start, but it did not have my roaming conf present so it was useless.

I finally started digging into /etc/wpa_supplicant/functions.sh, which contains functions invoked when someone calls ifup, among others.

I first modified the script’s call to enable more verbose output by appending -dd to the command, which wasn’t that useful, and then thought I saw somewhere that -D was another logging level. Strangely, adding just -D made everything work! It only took a second to notice that this specifies the “driver backend.”

Scanning a few more lines down, I noticed if statements that set different -D options. I execution to the path actually invoked and found that it looked like this:

WPA_SUP_OPTIONS="$WPA_SUP_OPTIONS -D nl80211,wext"

The docs for -D said that when given with no options, it defaults to wext. I modified the line to explicitly call wext without nl80211. My ifup command started working immediately. You can read up on the difference between wext and nl80211, but you can specify the driver to use from within your /etc/network/interfaces/ file. It looks like this:

allow-hotplug wlp1s0
iface wlp1s0 inet manual
  wpa-driver wext
  wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf

So, TLDR, add wpa-driver wext to your interface config file to use a legacy driver if the modern one is incompatible with your hardware.

Hope this saves someone else some time.