6

I was following this Raspberry Pi documentation (https://www.raspberrypi.org/documentation/configuration/wireless/wireless-cli.md) about connecting to wireless connection. My SSID and password are correct.

Whenever I use the command:

ifconfig wlan0

It has an inet addr value.

I used the command:

sudo iwlist wlan0 scan

It displays all the available WiFi connections.

But when I try using the command:

sudo wpa_cli -i wlan0 reconfigure

It says "Failed to connect to non-global ctrl_ifname: wlan0 error: No such file or directory"

Any of you have encountered this? I followed the documentation and all but it doesn't seem to tackle this problem.

passerby
  • 61
  • 1
  • 1
  • 3

2 Answers2

2

Try doing:

pi@raspberrypi:~ $ sudo killall wpa_supplicant
pi@raspberrypi:~ $ sudo wpa_supplicant -i wlan0 -D wext -c/etc/wpa_supplicant/wpa_supplicant.conf -B

OmarH
  • 21
  • 1
2

I had the same problem and realized that wlan0 wasn't up. Just activate the interface with sudo ifconfig wlan0 up and then scan again with sudo iwlist wlan0 scan.