首页 技术 正文
技术 2022年11月16日
0 收藏 759 点赞 4,806 浏览 1875 个字

本文转载自:http://blog.h5min.cn/wuhongxin123/article/details/41820877

本文是在正确安装好wifi驱动后对系统进行的配置。

1.   配置wpa_supplicant的配置文件

在加载驱动之前在/etc下新建目录/wpa_supplicant/wpa_supplicant.conf

配置好需要的wifi的ssid及psk即可

具体配置如下 :

#vi  wpa_supplicant.conf

ctrl_interface=/var/run/wpa_supplicant

update_config=1

eapol_version=1

fast_reauth=1

network={

ssid=”wifi名称”

psk=”密码”

priority=1

}

2.加载驱动: insmod     /lib/modules/3.4.39/8723au.ko

3.启动wifi:

# ifconfig  获取wifi名称 一般是wlan0

# ifconfig wlan0 up

4.后台运行wpa_supplicant:

wpa_supplicant-d -Dnl80211 -iwlan0 -c/etc/wpa_supplicant/wpa_supplicant.conf  &

其中 :

wpa_supplicant:可执行程序

–d :增加打印信息

-Dnl80211: 驱动名称

-iwlan0:wlan0,网络接口名称

/etc/wpa_supplicant/wpa_supplicant.conf:wpa_supplicant的配置文件path

5. 为wlan0动态分配ip地址:udhcpc -iwlan0

打印如下: udhcpc (v1.18.3)started

Sending discover…

Sending select for 192.168.1.110…

Lease of 192.168.1.110 obtained, lease time 7200

deleting routers

route: SIOCDELRT: No such process

adding dns 192.168.14.12

adding dns 192.168.1.1

6.   查看wlan0状态:# ifconfig

打印如下:

wlan0      Link encap:Ethernet  HWaddr CC:D2:9B:6E:6C:00

inet addr:192.168.1.110  Bcast:255.255.255.255  Mask:255.255.255.0  inet6 addr: fe80::ced2:9bff:fe6e:6c00/64Scope:Link

UP BROADCAST RUNNINGMULTICAST  MTU:1500  Metric:1

RX packets:242 errors:0dropped:1 overruns:0 frame:0

TX packets:25 errors:0 dropped:2overruns:0 carrier:0

collisions:0 txqueuelen:1000

RX bytes:36120 (35.2KiB)  TX bytes:3851 (3.7 KiB)

7.   ping 网络测试

# ping www.baidu.com

PING www.baidu.com (112.80.248.73): 56 data bytes

64 bytes from 112.80.248.73: seq=0 ttl=50 time=104.026 ms

64 bytes from 112.80.248.73: seq=1 ttl=50 time=190.992 ms

64 bytes from 112.80.248.73: seq=2 ttl=50 time=316.463 ms

64 bytes from 112.80.248.73: seq=3 ttl=50 time=135.019 ms

64 bytes from 112.80.248.73: seq=4 ttl=50 time=156.059 ms

64 bytes from 112.80.248.73: seq=5 ttl=50 time=79.399 ms

64 bytes from 112.80.248.73: seq=6 ttl=50 time=100.952 ms

64 bytes from 112.80.248.73: seq=7 ttl=50 time=255.441 ms

64 bytes from 112.80.248.73: seq=8 ttl=50 time=143.440 ms

64 bytesfrom 112.80.248.73: seq=9 ttl=50 time=64.766 ms

 

0
相关推荐
python开发_常用的python模块及安装方法
adodb:我们领导推荐的数据库连接组件bsddb3:BerkeleyDB的连接组件Cheetah-1.0:我比较喜欢这个版本的cheeta…
日期:2022-11-24 点赞:878 阅读:9,000
Educational Codeforces Round 11 C. Hard Process 二分
C. Hard Process题目连接:http://www.codeforces.com/contest/660/problem/CDes…
日期:2022-11-24 点赞:807 阅读:5,512
下载Ubuntn 17.04 内核源代码
zengkefu@server1:/usr/src$ uname -aLinux server1 4.10.0-19-generic #21…
日期:2022-11-24 点赞:569 阅读:6,358
可用Active Desktop Calendar V7.86 注册码序列号
可用Active Desktop Calendar V7.86 注册码序列号Name: www.greendown.cn Code: &nb…
日期:2022-11-24 点赞:733 阅读:6,141
Android调用系统相机、自定义相机、处理大图片
Android调用系统相机和自定义相机实例本博文主要是介绍了android上使用相机进行拍照并显示的两种方式,并且由于涉及到要把拍到的照片显…
日期:2022-11-24 点赞:512 阅读:7,771
Struts的使用
一、Struts2的获取  Struts的官方网站为:http://struts.apache.org/  下载完Struts2的jar包,…
日期:2022-11-24 点赞:671 阅读:4,849