Raspberry Pi3 error “Failed to connect to non-global ctrl_ifname: (null) error: No such file or directory” after wpa_cli reconfigure

Trying to get WiFi working on the Raspberry Pi 3 following the instructions found at https://www.raspberrypi.org/documentation/configuration/wireless/wireless-cli.md when I got to start the WiFi using

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
sudo wpa_cli reconfigure
sudo wpa_cli reconfigure
sudo wpa_cli reconfigure

It reports an error:

Failed to connect to non-global ctrl_ifname: (null)  error: No such file or directory

Error messages like this are great as they don’t provide any clue’s, anyway the fix for me was simple once found. Run:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
sudo ifdown wlan0
sudo ifdown wlan0
sudo ifdown wlan0

This may error with a message

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
ifdown: interface wlan0 not configured
ifdown: interface wlan0 not configured
ifdown: interface wlan0 not configured

Don’t give up! Still run

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
sudo ifup wlan0
sudo ifup wlan0
sudo ifup wlan0

That fixed it for me. Hope it helps you too! 🙂

I’m using Raspbian GNU/Linux 8 (jessie). uname -a returns

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
Linux <hostname> 4.4.50-v7+ #970 SMP Mon Feb 20 19:18:29 GMT 2017 armv7l GNU/Linux
Linux <hostname> 4.4.50-v7+ #970 SMP Mon Feb 20 19:18:29 GMT 2017 armv7l GNU/Linux
Linux <hostname> 4.4.50-v7+ #970 SMP Mon Feb 20 19:18:29 GMT 2017 armv7l GNU/Linux