1. 程式人生 > >linux下連接無線網出現nl80211: Could not configure driver mode nl80211: deinit ifname=wlan1 disabled_11b_rates=0 wlan1: Failed to initialize driver interface

linux下連接無線網出現nl80211: Could not configure driver mode nl80211: deinit ifname=wlan1 disabled_11b_rates=0 wlan1: Failed to initialize driver interface

frequency pro 信號 ann 文件中 enc nas face lock

一.背景
1.1 jello@jello:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 16.04.3 LTS
Release: 16.04
Codename: xenial
1.2 usb無線網卡
jello@jello:~$ lsusb|grep Wireless
Bus 001 Device 003: ID 0bda:8179 Realtek Semiconductor Corp. RTL8188EUS 802.11n Wireless Network Adapter
1.3 usb無線網卡使用的驅動
jello@jello:~$ lsmod |grep 8188
r8188eu 454656 0
cfg80211 565248 2 wl,r8188eu
1.4 列出當前的無線網卡設備的當前狀態
jello@jello:~$ sudo rfkill list
0: phy0: Wireless LAN
Soft blocked: no
Hard blocked: no
1: brcmwl-0: Wireless LAN
Soft blocked: no
Hard blocked: no
1.5 列出指定無線網卡的配置情況
jello@jello:~$ sudo iwconfig wlan1
wlan1 unassociated Nickname:"<WIFI@REALTEK>"
Mode:Managed Frequency=2.412 GHz Access Point: Not-Associated
Sensitivity:0/0
Retry:off RTS thr:off Fragment thr:off
Encryption key:off
Power Management:off
Link Quality:0 Signal level:0 Noise level:0
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0
從此處可以看出當前網卡處於2.412GHz的頻率
1.6 列出要連接的無線信號的信息
jello@jello:~$ sudo iwlist wlan1 scan
ell 10 - Address: 62:38:3A:43:12:C3
ESSID:"myWifi"
Protocol:IEEE 802.11bgn
Mode:Master
Frequency:2.472 GHz (Channel 13)
Encryption key:on
Bit Rates:144 Mb/s
Extra:wpa_ie=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
IE: WPA Version 1
Group Cipher : TKIP
Pairwise Ciphers (2) : TKIP CCMP
Authentication Suites (1) : PSK
Extra:rsn_ie=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
IE: IEEE 802.11i/WPA2 Version 1
Group Cipher : TKIP
Pairwise Ciphers (2) : TKIP CCMP
Authentication Suites (1) : PSK
Quality:0 Signal level:0 Noise level:0
從此處可以看出要連接的wifi使用的chan=13
1.7 列出網卡支持的frequency
jello@jello:~$ sudo iwlist wlan1 frequency
wlan1 13 channels in total; available frequencies :
Channel 01 : 2.412 GHz
Channel 02 : 2.417 GHz
Channel 03 : 2.422 GHz
Channel 04 : 2.427 GHz
Channel 05 : 2.432 GHz
Channel 06 : 2.437 GHz
Channel 07 : 2.442 GHz
Channel 08 : 2.447 GHz
Channel 09 : 2.452 GHz
Channel 10 : 2.457 GHz
Channel 11 : 2.462 GHz
Channel 12 : 2.467 GHz
Channel 13 : 2.472 GHz
Current Frequency=2.412 GHz (Channel 1)

二.連接chan=13的wifi無線信號
2.1 啟動無線網卡(筆者的usb無線網卡對應的名字為wlan1,請根據自己的情況選擇)
sudo ifconfig wlan1 up
2.2 連接加密的chan=13的無線網(wpa_supplicant.conf文件中有無線網的信息)
jello@jello:~$sudo wpa_supplicant -B -iwlan1 -c wpa_supplicant.conf
2.3 通過2.2出現以下錯誤提示
Successfully initialized wpa_supplicant
nl80211: Could not configure driver mode
nl80211: deinit ifname=wlan1 disabled_11b_rates=0
wlan1: Failed to initialize driver interface
2.4 解決2.3的錯誤提示
jello@jello:~$ sudo wpa_supplicant -B -iwlan1 -c wpa_supplicant.conf -Dwext
Successfully initialized wpa_supplicant
ioctl[SIOCSIWAP]: Operation not permitted
ioctl[SIOCSIWENCODEEXT]: Invalid argument
ioctl[SIOCSIWENCODEEXT]: Invalid argument
不用管這些錯誤信息
2.5 獲取ip
jello@jello:~$ sudo dhclient wlan1

linux下連接無線網出現nl80211: Could not configure driver mode nl80211: deinit ifname=wlan1 disabled_11b_rates=0 wlan1: Failed to initialize driver interface