RT3070L_USB_WIFI网卡在GT2440开发板上的移植和使用(三)---移植wpa_supplicant

5、移植wpa_supplicant

5.1、源码准备与参考

关于wpa_supplicant的介绍可以参考:http://linuxwireless.sipsolutions.net/en/users/Documentation/wpa_supplicant/
(1)下载wpa_supplicant源码并配置编译:http://blog.csdn.net/hktkfly6/article/details/48949863
                                                                 http://w1.fi/releases/
(2)下载配套版本的openssl并配置编译:https://www.openssl.org/source/old/1.0.1/
                                                               ftp://ftp.openssl.org/source/old/0.9.x/
(3)源码文件版本确认(也可以到我的CSDN下载。整个文件我会打包在一起):
    wpa_supplicant    :wpa_supplicant-2.0.tar.gz
    openssl                :openssl-1.0.1d.tar.gz

5.2、编译生成wpa_supplicant。

(1)、复制源码到虚拟机。详细阅读里面的README文件可以知道编译方法。
(2)、编译wpa_supplicant
cd 03_wpa_supplicant                                                     //进入源码目录
tar xzf wpa_supplicant-2.0.tar.gz                                     //解压源码
cd wpa_supplicant-2.0/wpa_supplicant/                          //进入源码目录
cp defconfig .config                                                         //复制默认配置文件为.config
里面没有configure,所以我们修改Makefile
vi Makefile
/@#######################
 --  1 ifndef CC
 --  2 CC=gcc
 --  3 endif
 ++  2 CC=arm-linux-gcc
#######################@/
make        //如果没有openssl会出错误的。当出现错误要往前看找到第一个错误
make > log.txt 2>&1 //信息会存入log.txt。出错的信息也会存入。分析出错问题是openssl的问题
(3)、出错,编译依赖库openssl
tar xzf openssl-1.0.1d.tar.gz
cd openssl-1.0.1d/
./Configure --help    //里面有configure,可以用这个命令来看看都有哪些支持。
/@##################
Usage: Configure [no-<cipher> ...] [enable-<cipher> ...] [experimental-<cipher> ...] [-Dxxx] [-lxxx] [-Lxxx] [-fxxx] [-Kxxx] [no-hw-xxx|no-hw] [[no-]threads] [[no-]shared] [[no-]zlib|zlib-dynamic] [no-asm] [no-dso] [no-krb5] [sctp] [386] [--prefix=DIR] [--openssldir=OPENSSLDIR] [--with-xxx[=vvv]] [--test-sanity] os/compiler[:flags]
os/compiler[:flags]这个可能是编译选项。试一试
##################@/
./Configure os/compiler:arm-linux-gcc    //配置为arm交叉编译
make        //开始编译
vi Makefile    //查看里面有INSTALL_PREFIX,应该是安装目录
make INSTALL_PREFIX=$PWD/tmp install    /开始安装了。安装到当前目录的tmp目录。
查看内容发现不正确。缺少动态库等等。因此重新查看configure选项,没有加动态库,重新配置
./Configure shared --prefix=$PWD/tmp os/compiler:arm-linux-gcc
/@########################
You gave the option 'shared'.  Normally, that would give you shared libraries.
Unfortunately, the OpenSSL configuration doesn't include shared library support
for this platform yet, so it will pretend you gave the option 'no-shared'.  If
you can inform the developpers (openssl-dev\@openssl.org) how to support shared
libraries on this platform, they will at least look at it and try their best
(but please first make sure you have tried with a current version of OpenSSL).
还是用问题,他说shared还不支持我们的arm平台。换./config试一试吧。真是困难重重啊
########################@/    
./config --help
/@###################
Operating system: i686-whatever-linux2
Configuring for linux-elf
Usage: Configure [no-<cipher> ...] [enable-<cipher> ...] [experimental-<cipher> ...] [-Dxxx] [-lxxx] [-Lxxx] [-fxxx] [-Kxxx] [no-hw-xxx|no-hw] [[no-]threads] [[no-]shared] [[no-]zlib|zlib-dynamic] [no-asm] [no-dso] [no-krb5] [sctp] [386] [--prefix=DIR] [--openssldir=OPENSSLDIR] [--with-xxx[=vvv]] [--test-sanity] os/compiler[:flags]
也需要指定,怎么办?先不修改交叉编译。配置好了再修改Makefile试试吧。
##################@/
编译总结:
./config shared --prefix=$PWD/tmp
vi Makefile
/@######################
-- 62 CC= gcc
++ 62 CC= arm-linux-gcc
-- 69 AR= ar $(ARFLAGS) r
++ 69 AR= arm-linux-ar $(ARFLAGS) r
-- 70 RANLIB= /usr/bin/ranlib
++ 70 RANLIB= arm-linux-ranlib
-- 71 NM= nm
++ 71 NM= arm-linux-nm
-- 75 MAKEDEPPROG= gcc
++ 75 MAKEDEPPROG= arm-linux-gcc
######################@/
make
/@####################
x86cpuid.s: Assembler messages:
x86cpuid.s:4: Error: unrecognized symbol type ""
x86cpuid.s:5: Error: alignment too large: 15 assumed
x86cpuid.s:8: Error: bad instruction `pushl %ebp'
x86cpuid.s:9: Error: bad instruction `pushl %ebx'
x86cpuid.s:10: Error: bad instruction `pushl %esi'
x86cpuid.s:11: Error: bad instruction `pushl %edi'
x86cpuid.s:12: Error: bad instruction `xorl %edx,%edx'
x86cpuid.s:13: Error: bad instruction `pushfl'
还是有问题啊。我们是arm平台不需要x86啊。配置选项还需要重新修改,加上no-asm。不适用里面的汇编代码。里面的汇编代码是
为x86平台优化的。我们不需要。
####################@/
./config shared no-asm --prefix=$PWD/tmp //重新配置,去掉asm的代码。
vi Makefile            //重新修改Makefile
/@######################
-- 62 CC= gcc
++ 62 CC= arm-linux-gcc
-- 69 AR= ar $(ARFLAGS) r
++ 69 AR= arm-linux-ar $(ARFLAGS) r
-- 70 RANLIB= /usr/bin/ranlib
++ 70 RANLIB= arm-linux-ranlib
-- 71 NM= nm
++ 71 NM= arm-linux-nm
-- 75 MAKEDEPPROG= gcc
++ 75 MAKEDEPPROG= arm-linux-gcc
######################@/
make                //等待几分钟,终于编译成功了^_^
make install        //安装
cd tmp && ls        //看一下
/@###########
bin  include  lib  ssl
###########@/
最后一步部署安装:就是将编译好的lib库和include头文件复制到交叉编译工具链相应的库和lib目录(当然也可以在编译时指定位置)
然后将编译好的lib库复制到开发板的lib库目录。cp时的-d选项是为了保持文件的属性不变。
a、编译出来的头文件放入交叉编译工具链的头文件目录:
cd include
cp * -rf /usr/local/arm/4.3.2/arm-none-linux-gnueabi/libc/usr/include/
b、编译出来的库放入交叉编译工具链的库文件目录:
cd ../lib/
cp * -d -rf /usr/local/arm/4.3.2/arm-none-linux-gnueabi/libc/armv4t/lib/
c、编译出来的动态库放入开发板的库目录,应用程序的运行需要这些库:
cp *so* -d /work/nfs_root/first_fs/lib/
至此openssl编译成功了。现在重新编译 wpa_supplicant
(4)重新进到wpa_supplicant的目录。编译 wpa_supplicant。执行命令序列
make
/@###################
 CC  ../src/drivers/driver_wired.c
../src/drivers/driver_nl80211.c: In function 'nl80211_handle_alloc':
../src/drivers/driver_nl80211.c:91: warning: implicit declaration of function 'nl_handle_alloc_cb'
../src/drivers/driver_nl80211.c:91: warning: assignment makes pointer from integer without a cast
../src/drivers/driver_nl80211.c:101: warning: passing argument 1 of 'nl_socket_set_local_port' from incompatible pointer type
../src/drivers/driver_nl80211.c: In function 'nl80211_handle_destroy':
../src/drivers/driver_nl80211.c:108: warning: passing argument 1 of 'nl_socket_get_local_port' from incompatible pointer type
../src/drivers/driver_nl80211.c:113: warning: implicit declaration of function 'nl_handle_destroy'
../src/drivers/driver_nl80211.c: In function 'nl_create_handle':
../src/drivers/driver_nl80211.c:129: warning: passing argument 1 of 'genl_connect' from incompatible pointer type
../src/drivers/driver_nl80211.c: In function 'send_and_recv':
../src/drivers/driver_nl80211.c:421: warning: passing argument 1 of 'nl_send_auto_complete' from incompatible pointer type
../src/drivers/driver_nl80211.c:436: warning: passing argument 1 of 'nl_recvmsgs' from incompatible pointer type
../src/drivers/driver_nl80211.c: In function 'nl_get_multicast_id':
../src/drivers/driver_nl80211.c:511: warning: passing argument 1 of 'genl_ctrl_resolve' from incompatible pointer type
../src/drivers/driver_nl80211.c: In function 'nl80211_get_wiphy_data_ap':
../src/drivers/driver_nl80211.c:698: warning: passing argument 1 of 'nl_socket_get_fd' from incompatible pointer type
../src/drivers/driver_nl80211.c: In function 'nl80211_put_wiphy_data_ap':
../src/drivers/driver_nl80211.c:746: warning: passing argument 1 of 'nl_socket_get_fd' from incompatible pointer type
../src/drivers/driver_nl80211.c: In function 'wpa_driver_nl80211_init_nl_global':
../src/drivers/driver_nl80211.c:2843: warning: passing argument 1 of 'genl_ctrl_resolve' from incompatible pointer type
../src/drivers/driver_nl80211.c:2856: warning: passing argument 1 of 'nl_socket_add_membership' from incompatible pointer type
../src/drivers/driver_nl80211.c:2866: warning: passing argument 1 of 'nl_socket_add_membership' from incompatible pointer type
../src/drivers/driver_nl80211.c:2876: warning: passing argument 1 of 'nl_socket_add_membership' from incompatible pointer type
../src/drivers/driver_nl80211.c:2889: warning: passing argument 1 of 'nl_socket_get_fd' from incompatible pointer type
../src/drivers/driver_nl80211.c: In function 'nl80211_alloc_mgmt_handle':
../src/drivers/driver_nl80211.c:3206: warning: passing argument 1 of 'nl_socket_get_fd' from incompatible pointer type
../src/drivers/driver_nl80211.c: In function 'nl80211_mgmt_subscribe_ap':
../src/drivers/driver_nl80211.c:3361: warning: passing argument 1 of 'nl_socket_get_fd' from incompatible pointer type
../src/drivers/driver_nl80211.c: In function 'nl80211_mgmt_subscribe_ap_dev_sme':
../src/drivers/driver_nl80211.c:3383: warning: passing argument 1 of 'nl_socket_get_fd' from incompatible pointer type
../src/drivers/driver_nl80211.c: In function 'nl80211_mgmt_unsubscribe':
../src/drivers/driver_nl80211.c:3395: warning: passing argument 1 of 'nl_socket_get_fd' from incompatible pointer type
../src/drivers/driver_nl80211.c: In function 'wpa_driver_nl80211_probe_req_report':
../src/drivers/driver_nl80211.c:8459: warning: passing argument 1 of 'nl_socket_get_fd' from incompatible pointer type
../src/drivers/driver_nl80211.c:8483: warning: passing argument 1 of 'nl_socket_get_fd' from incompatible pointer type
../src/drivers/driver_nl80211.c: In function 'nl80211_global_deinit':
../src/drivers/driver_nl80211.c:8808: warning: passing argument 1 of 'nl_socket_get_fd' from incompatible pointer type
  CC  ../src/drivers/driver_nl80211.c
  ...
  /usr/local/arm/4.3.2/bin/../lib/gcc/arm-none-linux-gnueabi/4.3.2/../../../../arm-none-linux-gnueabi/bin/ld: cannot find -lnl
collect2: ld returned 1 exit status
make: *** [wpa_supplicant] Error 1
主要是说找不到cannot find -lnl。可以查看一下。肯定有啊。我们前一节刚编译了的
###################@/
grep "lnl" * -nR        //在我的源码根目录下搜索这个选项
/@################
src/drivers/drivers.mak:31:  DRV_LIBS += -lnl-3
...
################@/
vi src/drivers/drivers.mk
/@##############
ifdef CONFIG_LIBNL32        #从这一项可以知道定义了这个选项才会加这个库。
  DRV_LIBS += -lnl-3
  DRV_LIBS += -lnl-genl-3
  DRV_CFLAGS += -DCONFIG_LIBNL20 -I/usr/include/libnl3
##############@/
vi wpa_supplicant/.config 
/@####################
++ 12 CONFIG_LIBNL32=y
####################@/
make
/@#################终于编译成功了^_^
sed -e 's|\@BINDIR\@|/usr/local/sbin/|g' systemd/wpa_supplicant.service.in >systemd/wpa_supplicant.service
sed -e 's|\@BINDIR\@|/usr/local/sbin/|g' systemd/wpa_supplicant.service.arg.in >systemd/wpa_supplicant@.service
sed -e 's|\@BINDIR\@|/usr/local/sbin/|g' systemd/wpa_supplicant-nl80211.service.arg.in >systemd/wpa_supplicant-nl80211@.service
sed -e 's|\@BINDIR\@|/usr/local/sbin/|g' systemd/wpa_supplicant-wired.service.arg.in >systemd/wpa_supplicant-wired@.service
sed -e 's|\@BINDIR\@|/usr/local/sbin/|g' dbus/fi.epitest.hostap.WPASupplicant.service.in >dbus/fi.epitest.hostap.WPASupplicant.service
sed -e 's|\@BINDIR\@|/usr/local/sbin/|g' dbus/fi.w1.wpa_supplicant1.service.in >dbus/fi.w1.wpa_supplicant1.service
#################@/
从Makefile中看怎么安装的
/@#################
$(DESTDIR)$(BINDIR)/%: %  #需要指定DESTDIR这个目录
        install -D $(<) $(@)
#################@/
make DESTDIR=$PWD/tmp install
ls tmp/usr/local/sbin/        //看看都有什么
/@#################
wpa_cli  wpa_passphrase  wpa_supplicant //全部复制到开发板下。
#################@/

5.3、应用程序wpa_supplicant的使用

在源码下搜索*.conf文件有介绍方法。
/@#################一般的使用方法
                    指定配置文件              指定网卡
wpa_supplicant -B -c/etc/wpa_supplicant.conf -iwlan0
#################@/
/etc/wpa_supplicant.conf文件内容:
/@#################
ctrl_interface=/var/run/wpa_supplicant

network={
        key_mgmt=认证模式 NONE/WPA-PSK
        ssid="网卡名"
        psk="密码,没有可以不加这一句"
}
#################@/
(1)OPEN/OPEN即没有密码下测试命令序列
mkdir -p /var/run/wpa_supplicant        //这个不用管,也可以不要应该。
wpa_supplicant -B -c/etc/wpa_supplicant.conf -ira0
/@#################又出问题了。还是不行啊。哪里的问题呢?
Successfully initialized wpa_supplicant
rfkill: Cannot open RFKILL control device
l2_packet_init: socket(PF_PACKET): Address family not supported by protocol
#################@/
wpa_cli -ira0 status  // 查看状态
/@#################
Failed to connect to non-global ctrl_ifname: ra0  error: No such file or directory
#################@/
后来怀疑到可能是内核配置的问题。经过和韦老师提供的内核的配置的对比,发现我的好多都没有配置上才造成的这些莫名其妙的问题。
后来我重新配置了内核可以使用了。我把内核的配置一并传到里面供大家参考config_GT2440_W35_wifi。(应该只加几项就能解决。为了排除后患我加了好多):

5.4、错误解决后,应用程序wpa_supplicant的使用教程。

可以参考源码里面的README:Command line options一节。
(1)OPEN/OPEN即没有密码下测试的命令序列
路由器(TP-LINK WR886N 3.0)端设置:
    LAN口IP                :192.168.15.1
    DHCP服务网关    :192.168.15.1
    无线SSID号         :wd
    信道                     :自动
    模式                     :11bgn mixed
    频段带宽              :自动
    无线安全设置       :不开启无线安全
开发板端测试命令序列:
mkdir /etc/wpaconf
vi wpa_open.conf    //    在wpaconf下编辑配置文件,wpa_open.conf
/@#################配置内容如下:
ctrl_interface=/var/run/wpa_supplicant

network={
        ssid="WD"
        key_mgmt=NONE
}
#################@/
insmod rt3070sta.ko            //在rt3070l_usbwifi_driver目录下加载驱动
ifconfig ra0 up                //打开无线设备
mkdir -p /var/run/wpa_supplicant
wpa_supplicant -B -c/etc/wpaconf/wpa_open.conf -ira0 //开启wpa_supplicant这个服务
/@#################
Successfully initialized wpa_supplicant
rfkill: Cannot open RFKILL control device
===>rt_ioctl_giwscan. 9(9) BSS returned, data->length = 1669
==>rt_ioctl_siwfreq::SIOCSIWFREQ(Channel=11)
#################@/
wpa_cli -ira0 status        //wpa_cli这个命令连接到wpa服务器查看网卡状态
/@#################
bssid=ec:26:ca:c1:ab:3a
ssid=WD        #说明已经连接上了我的WD的AP了。
id=0
mode=station
pairwise_cipher=NONE
group_cipher=NONE
key_mgmt=NONE
wpa_state=COMPLETED    #状态是COMPLETED。说明已经连接上去了。
address=48:5d:60:90:5d:1a
#################@/
ifconfig ra0 192.168.15.101    //配置我们的网卡的ip
ping 192.168.15.1            //可以ping通路由器

(2)WEP模式下测试的命令序列
路由器(TP-LINK WR886N 3.0)端设置:
    LAN口IP                :192.168.15.1
    DHCP服务网关    :192.168.15.1
    无线SSID号         :wd
    信道                     :自动
    模式                     :11bgn mixed
    频段带宽              :自动
    无线安全设置       :WEP
    认证类型              :自动     
    WEP密钥格式      :ASCII码     
    密钥 1                  :water_droplet     
开发板端测试命令序列:
mkdir /etc/wpaconf
vi wpa_wep.conf    //    在wpaconf下编辑配置文件,wpa_wep.conf
/@#################配置内容如下:wep_tx_keyidx指的是第0个秘钥。
ctrl_interface=/var/run/wpa_supplicant

network={
        ssid="WD"
        key_mgmt=NONE
        wep_key0="water_droplet"
        wep_tx_keyidx=0
}
#################@/
killall wpa_supplicant        //关闭服务
ifconfig ra0 down              //关闭网卡
wpa_supplicant -B -c/etc/wpaconf/wpa_wep.conf -ira0     //开启wpa_supplicant这个服务
wpa_cli -ira0 status                 //wpa_cli这个命令连接到wpa服务器查看网卡状态
ifconfig ra0 192.168.15.101    //配置我们的网卡的ip
ping 192.168.15.1                   //可以ping通路由器

(3)WPA(TKIP)模式下测试的命令序列
路由器(TP-LINK WR886N 3.0)端设置:
    LAN口IP                :192.168.15.1
    DHCP服务网关    :192.168.15.1
    无线SSID号         :wd
    信道                     :自动
    模式                     :11bgn mixed
    频段带宽              :自动
    无线安全设置       :WPA-PSK/WPA2-PSK
    认证类型              :WPA-PSK    
    加密算法              :TKIP    
    PSK密码              :water_droplet
开发板端测试命令序列:
vi wpa_psk_tkip.conf      // 在wpaconf下编辑配置文件,wpa_psk_tkip.conf
/@#################配置内容如下:
# WPA-PSK/TKIP

ctrl_interface=/var/run/wpa_supplicant

network={
        ssid="WD"
        key_mgmt=WPA-PSK
        proto=WPA
        pairwise=TKIP
        group=TKIP
        psk="water_droplet"
}
#################@/
killall wpa_supplicant        //关闭服务
ifconfig ra0 down              //关闭网卡
wpa_supplicant -B -c/etc/wpaconf/wpa_psk_tkip.conf -ira0   //开启wpa_supplicant这个服务
wpa_cli -ira0 status          //wpa_cli这个命令连接到wpa服务器查看网卡状态
ifconfig ra0 192.168.15.101    //配置我们的网卡的ip
ping 192.168.15.1                  //可以ping通路由器

(4)WPA2(CCMP-AES)模式下测试的命令序列
路由器(TP-LINK WR886N 3.0)端设置:
    LAN口IP                :192.168.15.1
    DHCP服务网关    :192.168.15.1
    无线SSID号         :wd
    信道                     :自动
    模式                     :11bgn mixed
    频段带宽              :自动
    无线安全设置       :WPA-PSK/WPA2-PSK
    认证类型              :WPA2-PSK    
    加密算法              :AES    
    PSK密码              :water_droplet
开发板端测试命令序列:
vi wpa2_ccmp_aes.conf      //在wpaconf下编辑配置文件,wpa2_ccmp_aes.conf
/@#################配置内容如下:
# WPA2-PSK/CCMP-AES

ctrl_interface=/var/run/wpa_supplicant

network={
        ssid="WD"
        psk="water_droplet"
}
#################@/
killall wpa_supplicant         //关闭服务
ifconfig ra0 down               //关闭网卡
wpa_supplicant -B -c/etc/wpaconf/wpa2_ccmp_aes.conf -ira0 //开启wpa_supplicant这个服务
wpa_cli -ira0 status           //wpa_cli这个命令连接到wpa服务器查看网卡状态
ifconfig ra0 192.168.15.101    //配置我们的网卡的ip
ping 192.168.15.1             //可以ping通路由器

(5)连接外网
insmod rt3070sta.ko            //在rt3070l_usbwifi_driver目录下加载驱动
ifconfig ra0 up                     //打开无线设备
wpa_supplicant -B -c/etc/wpaconf/aes_tkip.conf -ira0 //开启wpa_supplicant这个服务
wpa_cli -ira0 status             //wpa_cli这个命令连接到wpa服务器查看网卡状态
ifconfig ra0 192.168.1.20     //配置我们的网卡的ip
route add default gw 192.168.1.1 dev ra0
ping 192.168.15.1               //可以ping通路由器
ping 58.250.137.36             //qq的ip
vi /etc/resolv.conf               //修改/etc/resolv.conf添加DNS(域名服务器)。可以看man手册。man resolv.conf
/@#################添加下面一行:
nameserver 192.168.1.1
#################@/
ping qq.com

总算是有个顺利的。今天很高兴。下一步打算使用DHCP

附1:
wpa_cli可工作于"命令模式"和"交互模式"
附2:
配置文件里设置多个network:
ctrl_interface=/var/run/wpa_supplicant
network={
        ssid="yourid"
        psk="password"
}
network={
        ssid="anotherid"
        psk="password"
}
附3:
/etc/wpa_supplicant.conf文件配置内容介绍(参考源码的wpa_supplicant.conf):
ctrl_interface=/var/run/wpa_supplicant  # 一个目录,用于wpa_supplicant和wpa_cli的socket通信

ssid="WD"    #要连的WIFI的AP名称
key_mgmt:
# key_mgmt: list of accepted authenticated key management protocols可以有一下几种方式
# WPA-PSK = WPA pre-shared key (this requires 'psk' field)
# WPA-EAP = WPA using EAP authentication
# IEEE8021X = IEEE 802.1X using EAP authentication and (optionally) dynamically 认证服务器
#    generated WEP keys
# NONE = WPA is not used; plaintext or static WEP could be used
# WPA-PSK-SHA256 = Like WPA-PSK but using stronger SHA256-based algorithms
# WPA-EAP-SHA256 = Like WPA-EAP but using stronger SHA256-based algorithms
# If not set, this defaults to: WPA-PSK WPA-EAP 默认值是这个

proto :
# proto: list of accepted protocols 接受的协议
# WPA = WPA/IEEE 802.11i/D3.0
# RSN = WPA2/IEEE 802.11i (also WPA2 can be used as an alias for RSN)
# If not set, this defaults to: WPA RSN 如果不设置默认这两个

pairwise
# pairwise: list of accepted pairwise (unicast) ciphers for WPA
# CCMP = AES in Counter mode with CBC-MAC [RFC 3610, IEEE 802.11i/D7.0] WPA2里的AES
# TKIP = Temporal Key Integrity Protocol [IEEE 802.11i/D7.0]
         WPA里用的
# NONE = Use only Group Keys (deprecated, should not be included if APs support
#    pairwise keys)
# If not set, this defaults to: CCMP TKIP 默认2个都可以

group=TKIP
# group: list of accepted group (broadcast/multicast) ciphers for WPA
# CCMP = AES in Counter mode with CBC-MAC [RFC 3610, IEEE 802.11i/D7.0]
# TKIP = Temporal Key Integrity Protocol [IEEE 802.11i/D7.0]
# WEP104 = WEP (Wired Equivalent Privacy) with 104-bit key
# WEP40 = WEP (Wired Equivalent Privacy) with 40-bit key [IEEE 802.11]
# If not set, this defaults to: CCMP TKIP WEP104 WEP40 默认这四种都可以

psk和wep_key0:当然就是密码了。

                                                                                                                                                                 Water Droplet

                                                                                                                                                                 598323431@qq.com

                                                                                                                                                                 2020.4.5

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
a20_hummingbird_v4.5_v1.0_csi01_2ov7670_rtl8188eus 20150918 1830 JNI.7z 无法打开USB Wifi rtl8188eus.txt 配置前后ov7670双摄像头 JNI调用读写一次之后就会出现内核出错,系统死机。 有可能与系统为android4.4有关。 无法打开USB Wifi rtl8188eus shell@wing-k70:/ $ shell@wing-k70:/ $ shell@wing-k70:/ $ shell@wing-k70:/ $ logcat -c shell@wing-k70:/ $ logcat --------- beginning of /dev/log/system I/ActivityManager( 1670): Waited long enough for: ServiceRecord{41e90e08 u0 com.android.calendar/.alerts.InitAlarmsService} --------- beginning of /dev/log/main D/dalvikvm( 1849): GC_FOR_ALLOC freed 673K, 22% free 5143K/6512K, paused 41ms, total 47ms I/ActivityManager( 1670): START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.android.settings/.Settings} from pid 1849 D/PermissionCache( 1252): checking android.permission.READ_FRAME_BUFFER for uid=1000 =&gt; granted (3161 us) D/BluetoothAdapter( 1931): 1103979928: getState() : mService = null. Returning STATE_OFF D/libEGL ( 1931): loaded /system/lib/egl/libEGL_mali.so D/libEGL ( 1931): loaded /system/lib/egl/libGLESv1_CM_mali.so D/libEGL ( 1931): loaded /system/lib/egl/libGLESv2_mali.so D/OpenGLRenderer( 1931): Enabling debug mode 0 D/BluetoothAdapter( 1931): 1103979928: getState() : mService = null. Returning STATE_OFF I/ActivityManager( 1670): Displayed com.android.settings/.Settings: +1s78ms D/WifiService( 1670): setWifiEnabled: true pid=1931, uid=1000 D/WifiHW ( 1670): Start to insmod 8188eu.ko [ 54.805792] ****wyb arch/arm/mach-sun7i/rf/wifi_pm.c:69/wifi_pm_power()! on=1 [ 54.813855] ****wyb arch/arm/mach-sun7i/rf/wifi_pm.c:73/wifi_pm_power()! [ 54.821376] ****wyb arch/arm/mach-sun7i/rf/wifi_pm_rtl8188eu.c:197/rtl8188eu_power()! mode=1 *updown=1 [ 54.831805] ****wyb arch/arm/mach-sun7i/rf/wifi_pm_rtl8188eu.c:95/rtl8188eu_gpio_ctrl()! name=rtk_rtl8188eu_wl_dis, level=1 [ 54.844290] ****wyb arch/arm/mach-sun7i/rf/wifi_pm_rtl8188eu.c:209/rtl8188eu_power()! usb wifi power state: on [ 54.855621] ----wyb arch/arm/mach-sun7i/rf/wifi_pm_rtl8188eu.c:222/rtl8188eu_power()! D/WifiHW ( 1670): faied to read proc/net/wireless D/WifiHW ( 1670): loading wifi driver... D/WifiHW ( 1670): faied to read proc/net/wireless D/WifiHW ( 1670): loading wifi driver... I/USB3G ( 1258): event { 'add', '/devices/platform/sw-ehci.2/usb4/4-1', 'usb', '', 189, 385 } I/USB3G ( 1258): path : '/sys/devices/platform/sw-ehci.2/usb4/4-1' I/USB3G ( 1258): VID :size 5,vid_path '/sys/devices/platform/sw-ehci.2/usb4/4-1/idVendor',VID '0bda I/USB3G ( 1258): '. I/USB3G ( 1258): PID :size 5,Pid_path '/sys/devices/platform/sw-ehci.2/usb4/4-1/idProduct',PID '8179 I/USB3G ( 1258): '. I/USB3G ( 1258): cmd=source /system/xbin/usb_modeswitch.sh /system/etc/usb_modeswitch.d/0bda_8179 &, D/WifiHW ( 1670): faied to read proc/net/wireless D/WifiHW ( 1670): loading wifi driver... I/USB3G ( 1258): excute ret:0,err:No such file or directory I/USB3G ( 1258): free cmd W/ContextImpl( 1670): Calling a method in the system process without a qualified user: android.app.ContextImpl.sendBroadcast:1123 com.android.server.usb.UsbSettingsManager.deviceAttached:621 com.android.server.usb.UsbHostManager.usbDeviceAdded:156 com.android.server.usb.UsbHostManager.monitorUsbHostBus:-2 com.android.server.usb.UsbHostManager.access$000:38 D/Tethering( 1670): sendTetherStateChangedBroadcast 1, 0, 0 W/SocketClient( 1249): write error (Broken pipe) D/Tethering( 1670): InitialState.processMessage what=4 D/Tethering( 1670): sendTetherStateChangedBroadcast 0, 0, 0 D/WifiHW ( 1670): faied to read proc/net/wireless D/WifiHW ( 1670): loading wifi driver... D/WifiHW ( 1249): Enter: wifi_get_fw_path function, fw_type=0, D/WifiHW ( 1249): Eneter: wifi_change_fw_path, fwpath = STA. D/SoftapController( 1249): Softap fwReload - Ok D/CommandListener( 1249): Setting iface cfg D/CommandListener( 1249): Trying to bring down wlan0 D/WifiMonitor( 1670): startMonitoring(wlan0) with mConnected = false I/wpa_supplicant( 2247): Successfully initialized wpa_supplicant I/wpa_supplicant( 2247): rfkill: Cannot open RFKILL control device D/BluetoothAdapter( 1931): 1103979928: getState() : mService = null. Returning STATE_OFF I/wpa_supplicant( 2247): rfkill: Cannot open RFKILL control device D/WifiConfigStore( 1670): Loading config and enabling all networks E/WifiConfigStore( 1670): Error parsing configurationjava.io.FileNotFoundException: /data/misc/wifi/ipconfig.txt: open failed: ENOENT (No such file or directory) D/BluetoothAdapter( 1931): 1103979928: getState() : mService = null. Returning STATE_OFF E/WifiStateMachine( 1670): Failed to set device name wing_k70 E/WifiStateMachine( 1670): Failed to set manufacturer Allwinner E/WifiStateMachine( 1670): Failed to set model name AOSP on wing E/WifiStateMachine( 1670): Failed to set model number AOSP on wing E/WifiStateMachine( 1670): Failed to set serial number 582034060190a829459 E/WifiStateMachine( 1670): Failed to set WPS config methods E/WifiStateMachine( 1670): Failed to set primary device type 10-0050F204-5 D/CommandListener( 1249): Setting iface cfg D/CommandListener( 1249): Trying to bring up p2p0 D/WifiMonitor( 1670): startMonitoring(p2p0) with mConnected = true E/WifiStateMachine( 1670): Failed to set frequency band 0 [ 57.384990] init: untracked pid 2221 exited D/InitAlarmsService( 2053): Clearing and rescheduling alarms. W/SocketClient( 1249): write error (Broken pipe) D/ConnectivityService( 1670): Sampling interval elapsed, updating statistics .. D/ConnectivityService( 1670): Done. D/ConnectivityService( 1670): Setting timer for 720seconds I/MediaFocusControl( 1670): AudioFocus abandonAudioFocus() from android.media.AudioManager@41cc7828com.android.music.MediaPlaybackService$3@41cc66a8 I/ActivityManager( 1670): Start proc com.android.musicfx for broadcast com.android.musicfx/.ControlPanelReceiver: pid=2265 uid=10008 gids={50008, 3003, 3002} V/MusicFXControlPanelReceiver( 2265): onReceive V/MusicFXControlPanelReceiver( 2265): Action: android.media.action.CLOSE_AUDIO_EFFECT_CONTROL_SESSION V/MusicFXControlPanelReceiver( 2265): Package name: com.android.music V/MusicFXControlPanelReceiver( 2265): Audio session: 8 V/MusicFXControlPanelEffect( 2265): closeSession(android.app.ReceiverRestrictedContext@41ccc508, com.android.music, 8) ^C 130|shell@wing-k70:/ $
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值