WPA_supplicants 连接问题

WPA_supplicants 连接问题

我尝试连接无线路由器,但没有任何成功。有人能给我一些建议吗?

skay@raspberrypi ~ $ sudo wpa_supplicant -iwlan0 -c/etc/wpa_supplica/wpa_supplicant.conf
rfkill: Cannot open RFKILL control device
ioctl[SIOCSIWENCODEEXT]: Invalid argument
ioctl[SIOCSIWENCODEEXT]: Invalid argument
wlan0: Trying to associate with xx:xx:xx:xx:xx:xx (SSID='Cerberus' freq=2462 MHz)
wlan0: Associated with 00:00:00:00:00:00
wlan0: CTRL-EVENT-DISCONNECTED bssid=xx:xx:xx:xx:xx:xx reason=0

这是我的 wpa_supplicants 配置:

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


network={
    ssid="Cerberus"
    #psk="XXXXXX"
    psk=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
}

答案1

sudo -H gedit /etc/wpa_supplicant.conf

在文件中添加以下内容WPA2

ctrl_interface=/var/run/wpa_supplicant
network={
        ssid="ESSID_IN_QUOTES"
        psk="ASCII PSK Password in Quotes"
        key_mgmt=WPA-PSK
        proto=RSN WPA
        pairwise=CCMP TKIP
        group=CCMP TKIP
}

我的示例:ssid="A-B-C-D" &密码是 =psk="abc12345"

然后移除网络管理器-gnome

sudo apt-get purge network-manager-gnome

设置启动时连接的无线接口

sudo -H gedit /etc/rc.local

添加以下行

ifconfig eth0 down
ifconfig wlan0 down
dhclient -r wlan0
iwconfig wlan0 essid "A-B-C-D"
iwconfig wlan0 mode Managed
ifconfig wlan0 up
dhclient wlan0

然后重新启动网络...我重新启动了

注意:我已经将路由器配置为静态 IP(路由器保留的 IP)和 DNS

如需更多帮助,请参阅Ubuntu 论坛上的这篇文章

相关内容