usb wifi移植终于搞定了

来源:互联网 发布:那年那兔那些事儿知乎 编辑:程序博客网 时间:2024/04/28 10:39
1.选的wifi芯片是rtl8188cus
2.选的开发包是0001-RTL8188C_8192C_USB_linux_v4.0.2_9000.20130911.zip
3.编译8192cu.ko
4.编译iwconfig工具
5.编译wpa工具
6.移植到板上
1>首先内核要识别usb设备,insmod 8192cu.ko,会有打印,注意看有没有失败或者usb设备出错
2>之前用linux2.6.22的确会出现insmod失败,后来换成高版本内核,insmod成功
3>ifconifg wlan0 up ok
4>iwlist wlan0 scan ok
5>iwconifg wlan0 essid xxxxxx
6>iwconig wlan0 key s:xxx其实这一步是不需要的有了上面一步就可以连上网了,原因是,路由器必须设置成无密码的形式,否则登录不上
7>eth0可以down也可以不down,我发现up也没影响
8>接着ping 192.168.1.1路由,可以ping通
9>接着ping百度发现ping: sendto: Network is unreachable错误
10>route add default gw 192.168.1.1,再ping,正常,可以访问百度
11>打印的时候会有socket和wext的错误,那些错误应该不是太重要,如果发现根本不能ping,有可能是路由器的设置问题,这个时候设置成无密码就可以了
12>wpa连ap的时候执行pdf中的命令,注意conf文件
network={
    ssid="xxxx"
    #key_mgmt=WPA-PSK
    key_mgmt=WPA-EAP WPA-PSK IEEE8021X NONE
    proto=WPA
    #pairwise=TKIP
    pairwise=TKIP CCMP
    #group=TKIP
    group=CCMP TKIP WEP104 WEP40
    psk="xxxx" //............
}
原因不清楚,如果这样就好了,用给的conf文件貌似有问题
13>到底什么原因造成的?
route 
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.1.0     *               255.255.255.0   U     0      0        0 eth0
192.168.1.0     *               255.255.255.0   U     0      0        0 wlan0






default         192.168.1.1     0.0.0.0         UG    0      0        0 eth0
只是用来ping外网,连不连上网无关


13>说明没连上
WEXT: Failed to set bogus BSSID/SSID to disconnect
netlink: Operstate: linkmode=0, operstate=6
14>timeout或者出现disconnect都说明没连上
15>最后连上的时候是这样的wlan0: State: GROUP_HANDSHAKE -> COMPLETED,刚开始我没有设密码可以这样子,设了密码就不行了
怎么解决 参考这个http://blog.csdn.net/ti_tantbx/article/details/7037741地址,记住一定要生成psk,我之前用密码肯定不行
network={
        ssid="xxxx"
        key_mgmt=WPA-PSK
        proto=WPA
        pairwise=CCMP TKIP
        group=CCMP TKIP WEP104 WEP40
        psk="1234567890" //............
        #psk="xxxxx"
        psk=123642cc3f9e3edaeea5121c4841fddc031810c946b1fe2dc3be52b73ac84684
}
group刚开始只有CCMP,确实连不上,改成CCMP TKIP WEP104 WEP40,就可以连上了
16>wlan0: State: GROUP_HANDSHAKE -> COMPLETED 问题解决,可以访问有密码的路由了
0 0
原创粉丝点击