wifi获取不到IP地址

[size=medium][color=red]如果supplicant已经启动,在连接具体AP时一直处于获取IP地址的状态,则很可能是dhcpcd服务没有启动,dhcpcd没有启动可以修改init.rc。将dhcpcd_eth0服务,wpa_supplicant服务放在zygote服务之下执行。[/color]如下:
service zygote /system/bin/app_process -Xzygote /system/bin --zygote --start-system-server
socket zygote stream 666
onrestart write /sys/android_power/request_state wake
onrestart write /sys/power/state on
onrestart restart media
onrestart restart netd

service wifi_up /system/bin/ifconfig eth0 up
disabled
oneshot

service wifi_down /system/bin/ifconfig eth0 down
disabled
oneshot

# modify and add for wifi dhcp serivce
service dhcpcd_eth0 /system/bin/logwrapper /system/bin/dhcpcd -f /system/etc/dhcpcd/dhcpcd.conf -d -B eth0
user root
group wifi inet
disabled
oneshot

# add service for wifi
service wpa_supplicant /system/bin/logwrapper /system/bin/wpa_supplicant \
-Dwext -ieth0 -c/system/etc/wifi/wpa_supplicant.conf
user root
group wifi inet
socket wpa_eth0 dgram 660 wifi wifi
oneshot
[color=red]如果dhcpcd启动不了,也可以检查WifiStateTracker.java中的mInterfaceName是否正确,如果驱动定义的接口为eth0,则mInterfaceName也应该为eth0。
如果不是eth0,则因该检查init.rc中是否有setprop wifi.interface eth0的配置。[/color]
[/size]
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值