Rasberry pi无法连接到wpa_supplicant - wpa_ctrl_open:没有这样的文件或目录

时间:2015-07-09 00:52:14

标签: network-programming raspberry-pi wpa

我正在尝试允许我的Pi连接到没有密码的公共Wifi网络,但我似乎无法正确获取wpa_supplicant.conf文件。这是文件:

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1

# Public network
network={
    ssid="PublicSSID"
    key_mgmt=None
}

但是,当我尝试连接时,我收到此错误:

wpa_supplicant: /sbin/wpa_supplicant daemon failed to start
run-parts: /etc/network/if-pre-up.d/wpasupplicant exited with return code 1
Failed to connect to wpa_supplicant - wpa_ctrl_open: No such file or directory
wpa_supplicant: /sbin/wpa_cli daemon failed to start
run-parts: /etc/network/if-up.d/wpasupplicant exited with return code 1

我可以连接到我的家庭网络和其他有密码的人。有什么想法会出错吗?

是的,我这样连接:(wifi是wlan1):

$ sudo ifdown wlan1
$ sleep 5
$ sudo ifup wlan1

1 个答案:

答案 0 :(得分:0)

你的wpa_supplicant.conf文件中应该包含psk =“”,因此它表示没有密码。

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1

# Public network
network={
    ssid="PublicSSID"
    psk=""
    key_mgmt=None
}