Swaraj vutturi

dhcp fails on ethernet and wlan0 in android 4.0 linaro

Discussion created by Swaraj vutturi on Jun 12, 2012
Latest reply on Jun 13, 2012 by waterzhou
Hi, Can anyone suggest me, why dhcp fails on ethernet and on wifi when dhcp service is started from init.rc. But its working fine when dhcpcd -B wlan0/eth0 command is given manually. Dhcp is not starting during start up and when started manually it works. D/wpa_supplicant( 1753): State: ASSOCIATING -> ASSOCIATED I/wpa_supplicant( 1753): CTRL-EVENT-STATE-CHANGE id=1 state=7 BSSID=00:00:00:00:00:00 I/wpa_supplicant( 1753): CTRL-EVENT-CONNECTED - Connection to 00:18:f8:51:45:3f completed (reauth) I//system/bin/dhcpcd( 1778): dhcpcd[1779]: Android requires an interface I//system/bin/dhcpcd( 1778): dhcpcd[1779]: stop_control: No such file or directory I/logwrapper( 1778): /system/bin/dhcpcd terminated by exit(1) D/Tethering( 1155): MasterInitialState.processMessage what=3 D/Tethering( 1155): MasterInitialState.processMessage what=3 E/DhcpStateMachine( 1155): DHCP failed on wlan0: Timed out waiting for dhcpcd to start I/ethernet( 1146): ==>android_net_ethernet_initEthernetNative I/ethernet( 1146): interface eth0:2 found V/EthernetStateTracker( 1146): Starts... I/ethernet( 1146): interface sit0:3 found E/ethernet( 1146): android_net_ethernet_initEthernetNative exited with success I/ethernet( 1146): User ask for device name on 0, list:7BC7F8, total:2 I/ethernet( 1146): User ask for device name on 1, list:7BC7F8, total:2 V/EthernetStateTracker( 1146): Successed V/EthernetStateTracker( 1146): start to monitor the ethernet devices I/EthernetManager( 1146): Init Ethernet Manager, service: com.android.server.EthernetService@4129e608 V/EthernetService( 1146): device 0 name sit0 V/EthernetService( 1146): device 1 name eth0 E/EthernetService( 1146): EthernetManager.ETHERNET_STATE_ENABLED E/MobileDataStateTracker( 1146): default: Ignoring feature request because could not acquire PhoneService E/MobileDataStateTracker( 1146): default: Could not enable APN type "default" D/NetworkManagementService( 1146): Registering observer D/NetworkManagementService( 1146): Registering observer I/WifiService( 1146): WifiService starting up with Wi-Fi enabled E/WifiStateMachine( 1146): Failed to reload STA firmware java.lang.IllegalStateException: Error communicating to native daemon I/ethernet( 1146): User ask for device name on 0, list:7BC7F8, total:2 I/ethernet( 1146): User ask for device name on 1, list:7BC7F8, total:2 I/EthernetService( 1146): Ethernet dev enabled 2 V/EthernetService( 1146): device 0 name sit0 V/EthernetService( 1146): device 1 name eth0 D/NetUtils( 1146): android_net_utils_resetConnections in env=0x7d8df8 clazz=0x2f900001 iface=sit0 mask=0x3 V/EthernetStateMachine( 1146): start to monitor the ethernet devices E/EthernetStateMachine( 1146): startMonitoring resetInterface() I/EthernetStateMachine( 1146): reset device sit0 W/CommandListener( 1068): Failed to retrieve HW addr for wlan0 (No such device) D/CommandListener( 1068): Setting iface cfg D/NetworkManagementService( 1146): rsp <213 00:00:00:00:00:00 0.0.0.0 0 [down]> D/NetworkManagementService( 1146): flags <[down]> E/WifiStateMachine( 1146): Unable to change interface settings: java.lang.IllegalStateException: Unable to communicate with native daemon to interface setcfg - com.android.server.NativeDaemonConnectorException: Cmd {interface setcfg wlan0 0.0.0.0 0 [down]} failed with code 400 : {Failed to set address (No such device)} E/WifiHW ( 1146): Cannot open "/system/etc/wifi/wpa_supplicant.conf": No such file or directory E/WifiHW ( 1146): Wi-Fi will not be enabled E/WifiStateMachine( 1146): Failed to start supplicant! [ 49.792060] init: no such service 'dhcpcd_sit0' W/EthernetStateMachine( 1146): Could not stop DHCP I/EthernetSta[ 54.808940] init: no such service 'dhcpcd_sit0:-h android-49740c444506a674 sit0' teMachine( 1146): trigger dhcp for device sit0 I/SystemServer( 1146): Throttle Service D/EthernetStateMachine( 1146): DhcpHandler: DHCP request started I/SystemServer( 1146): Mount Service E/EthernetStateMachine( 1146): DhcpHandler: DHCP request failed: Timed out waiting for dhcpcd to start I/Process ( 1146): Sending signal. PID: 1307 SIG: 3 *******init.rc********* chmod 0770 /system/etc/wifi chmod 0660 /system/etc/wifi/wpa_supplicant.conf chmod 0777 /system/etc/dhcpd/dhcpd.conf chown dhcp dhcp /system/etc/dhcpcd chown dhcp dhcp /system/etc/dhcpcd/dhcpcd.conf chmod 0775 /system/etc/dhcpcd/dhcpcd-run-hooks mkdir /data/local 0771 shell shell chown dhcp dhcp /system/etc/dhcpcd/dhcpcd-run-hooks chown dhcp dhcp /system/etc/dhcpcd/dhcpcd-hooks chown wifi wifi /system/etc/wifi/wpa_supplicant.conf #wpa_supplicant control socket for android wifi.c (android private socket) mkdir /data/misc/wifi 0770 wifi wifi mkdir /data/misc/wifi/sockets 0770 wifi wifi chmod 0770 /data/misc/wifi chmod 0770 /data/misc/wifi/wpa_supplicant.conf chown wifi wifi /data/misc/wifi chown wifi wifi /data/misc/wifi/wpa_supplicant.conf chown wifi wifi /system/release/wifi_settings.cfg mkdir /data/system/wpa_supplicant 0777 wifi wifi chmod 0777 /data/system/wpa_supplicant chown wifi wifi /data/system/wpa_supplicant # Setup paths used for socket communication with the dhcp daemon(dhcpd) mkdir /data/misc/dhcpcd 0770 dhcp dhcp chown dhcp dhcp /data/misc/dhcpcd mkdir /data/misc/dhcp 0770 dhcp dhcp chown dhcp dhcp /data/misc/dhcp service dhcpcd_eth0 /system/bin/dhcpcd -dABKL class main group dhcp disabled oneshot service dhcpcd_wlan0 /system/bin/logwrapper /system/bin/dhcpcd -dd -B wlan0 disabled oneshot Thanks Swaraj

Outcomes