一种解决方案就是不使用Linux自带的,使用网上的驱动编译得到rtl8188eu.ko,加载,同时使用wpa_supplicant-0.6.9版本,编译wext驱动方式,这样就可以了,不会提示什么/sys/class/net/wlan0/phy80211/name的问题了。
这样可以使用了,再编译busybox,选中udhcpc。
执行udhcpc -i wlan0获取到了可用ip,但是ifconfig没有设置,很奇怪。
网上一搜才知道,http://bbs.csdn.net/topics/390713401
回复于: 2015-12-15 09:16:38
simple.script需要拷贝过来:
[root@GK sdcard]# cat udhcp.script #!/bin/sh # udhcpc script edited by Tim Riker <[email protected]> RESOLV_CONF="/etc/resolv.conf" [ -n "$1" ] || { echo "Error: should be called from udhcpc"; exit 1; } NETMASK="" [ -n "$subnet" ] && NETMASK="netmask $subnet" BROADCAST="broadcast +" [ -n "$broadcast" ] && BROADCAST="broadcast $broadcast" case "$1" in deconfig) echo "Setting IP address 0.0.0.0 on $interface" ifconfig $interface 0.0.0.0 ;; renew|bound) echo "Setting IP address $ip on $interface" ifconfig $interface $ip $NETMASK $BROADCAST if [ -n "$router" ] ; then echo "Deleting routers" while route del default gw 0.0.0.0 dev $interface ; do : done metric=0 for i in $router ; do echo "Adding router $i" route add default gw $i dev $interface metric $((metric++)) done fi echo "Recreating $RESOLV_CONF" echo -n > $RESOLV_CONF-$$ [ -n "$domain" ] && echo "search $domain" >> $RESOLV_CONF-$$ for i in $dns ; do echo " Adding DNS server $i" echo "nameserver $i" >> $RESOLV_CONF-$$ done mv $RESOLV_CONF-$$ $RESOLV_CONF ;; esac exit 0
我这里跟文件系统是不可写的,所以提示了
can't create /etc/resolv.conf-389: Read-only file system
这样的话,dns不能正确使用了。所以还得修改这个东西。脚本中有
RESOLV_CONF="/etc/resolv.conf",修改一下就可以了。
<pre name="code" class="html">但这样还不够啊,Adding DNS server xxxx,找到了两个dns服务器,但是提示 ping www.baidu.com ping: bad address 'www.baidu.com' 还得整DNS。
后来发现,系统使用的是/etc/resolv.conf,但我已经把RESOLV_CONF修改到其他地方了,而根文件系统不能直接修改为可写,需要mount -t jffs去挂载。
所以,我选择了链接,使用ln -s xxxx/resolv.conf /etc/resolv.conf,这样只要存在xxxx/resolv.conf,然后udhcpc去修改这个文件就可以了,系统使用/etc/resolv.conf链接到xxxx/resolv.conf,再ping www.baidu.com,OK,解决了。
[root@GK /]# ping www.baidu.com
rtw_set_ps_mode(): Busy Traffic , Leave 802.11 power save..
rtl8192c_set_FwPwrMode_cmd(): Mode = 0, SmartPS = 0
PING www.baidu.com (115.239.211.112): 56 data bytes
64 bytes from 115.239.211.112: seq=0 ttl=56 time=8.102 ms
64 bytes from 115.239.211.112: seq=1 ttl=56 time=10.396 ms
64 bytes from 115.239.211.112: seq=2 ttl=56 time=8.082 ms