我的电脑只有 Wifi 网络。没有RJ45插座。我必须使用命令行配置 Wifi。我的无线网络:
Authentication : WPA2-Personal
Cipher : CCMP
Connection mode : Profile
Channel : 1
我FreePBX
有文件/etc/wpa_supplicant/wpa_supplicant.conf
::
ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=wheel
network={
ssid="mynetworkname"
psk="mypassword"
}
当我输入命令时:
wpa_supplicant -B -i wlan0 -c wpa_supplicant.conf -D wext
我收到错误:
Successfully initialized wpa_supplicant
Failed to open config file '/etc/wpa_supplicant.conf', error: No such file or directory
Delete '/var/run/wpa_supplicant/wlan0' manually if it is not used anymore
Failed to initialize control interface '/var/run/wpa_supplicant'.
You may have another wpa_supplicant process already running or the file was left by an unclean termination of wpa_supplicant in which case you will need to manually remove this file before starting wpa_supplicant again.
答案1
您应该提供配置文件的完整路径wpa_supplicant.conf
killall wpa_supplicant
wpa_supplicant -B -i wlan0 -D wext -c /etc/wpa_supplicant/wpa_supplicant.conf