一.背景
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
转载本文章为转载内容,我们尊重原作者对文章享有的著作权。如有内容错误或侵权问题,欢迎原作者联系我们进行内容更正或删除文章。
提问和评论都可以,用心的回复会被更多人看到
评论
发布评论
相关文章
-
小型企业无线网部署(案例1)从客户需求来分析、规划、部署
客户需求分析来规划拓扑1、利用AR路由对接外网,并且设置一个内网网关 开启DHCP功能,提供内网用户上网2、AP接在POE上面,那么AC我们可以是接POE上面也可以接AR的LAN口上面3、由于客户有收银服务器,服务
小型企业无线部署 网络之路一天 华为无线AC AP组网 华三无线AC AP组网 中小型企业实战 -
WLAN1:AC6005组网配置实验
WLAN1:AC6005组网配置实验
WLAN1 AC6005 组网 配置实验 -
if (image.isContinuous()) { nc= nc*nl; nl= 1;
#include #include "opencv2/
#pragma #include 2d