But with this configuration, if I try to access wpa_supplicant using wpa_cli I get an error which indicates that wpa_supplicant is not running. Is there something I can add to this configuration that will allow wpa_supplicant to start up but not be used to connect up to a network?

I suppose I could just use iwlist scan to find the list of available wireless networks in range... but I already have my parsing setup for the output of wpa_cli scan_results :)

1 Answer
1

wireless-tools (i.e. iwlist, iwconfig, iwpriv ...) are prehistoric and should be replaced by invocations of iw. The wireless- things in /etc/network/interfaces are not handled by wpa_supplicant, but by those old wireless-tools, which ships scripts in /etc/network/if-*.d/wireless-tools.

Compare with the script shipped by wpa_supplicant in /etc/network/if-*.d/wpasupplicant which are just symlinks to scripts in /etc/wpa_supplicant/. They handle options of the form wpa-*

To start wpa_supplicant without an active config, just specify an empty configuration file, like ... /dev/null. Remember to use the nl80211 driver, because everything else (including wext) is just outdated, but is still the default in the old 1.1 version of wpa_supplicant that Debian ships.

I'm a little confused by your answer. First of all if I just type iw, it is not recognized as a command. Does that mean I am using an older version of Debian? Second you said that /etc/network/interfaces is used to configure the older wireless tools. Does that mean I shouldn't need to use that file at all? I tried updating my interfaces file above by adding the two lines in the bottom of your answer but I get the following error: wpa_supplicant: cannot read contents of /dev/null ... exited with error code 1
–
PICyourBrainMar 31 '14 at 23:29

Ok. I installed the iw tools. Unfortunately, it looks like my network adapter doesn't support the nl80211 driver. I am using an Edimax nano usb wifi adapter.
–
PICyourBrainApr 1 '14 at 12:40

@PICyourBrain: What old version of Debian are you using ?
–
BatchyXApr 2 '14 at 18:12

The latest Raspian image for the RaspberryPi
–
PICyourBrainApr 5 '14 at 15:54