Hi Ashwin, I am trying to enable wifi in froyo. when i try to enable wifi is getting enabled but I am unable to connect to AP. for IP configuration I am getting 0.0.0.0 entries for many fields(below)
V/WifiStateTracker( 1010): IP configuration: ipaddr 0.0.0.0 gateway 0.0.0.0 netmask 0.0.0.0 dns1 10.50.201.5 dns2 125.22.47.125 DHCP server 0.0.0.0 lease 1111074324 seconds if i see dhcpcd logs, it is getting IP address, lease gateway information from the server but these fields are not getting updated. dhcpcd 4.0.15 starting D/dhcpcd ( 1226): hardware address = 00:24:23:10:f5:37 D/dhcpcd ( 1226): executing `/system/etc/dhcpcd/dhcpcd-run-hooks', reason PREINIT D/dhcpcd ( 1226): host does not support a monotonic clock - timing can skew D/dhcpcd ( 1226): broadcasting for a lease D/dhcpcd ( 1226): sending DHCP_DISCOVER with xid 0x8ef31cc, next in 4.77 seconds D/dhcpcd ( 1226): offered 10.50.200.53 from 10.50.200.5 D/dhcpcd ( 1226): sending DHCP_REQUEST with xid 0x8ef31cc, next in 4.48 seconds D/Exchange( 1216): BootReceiver onReceive D/dhcpcd ( 1226): acknowledged 10.50.200.53 from 10.50.200.5 D/dhcpcd ( 1226): leased 10.50.200.53 for 86400 seconds D/dhcpcd ( 1226): adding IP address 10.50.200.53/24 D/dhcpcd ( 1226): adding route to 0.0.0.0/0 via 10.50.200.1 D/dhcpcd ( 1226): executing `/system/etc/dhcpcd/dhcpcd-run-hooks', reason BOUND V/WifiStateTracker( 1010): DhcpHandler: DHCP request succeeded Please let me know where I am going wrong. Thanks Gururaja B O On Jul 22, 6:52 pm, Ashwin Bihari <[email protected]> wrote: > Weber, > > I have the following in my init.rc file associated with brining up the > WiFi interface: > > #----- > service wpa_supplicant /system/bin/logwrapper > /system/bin/wpa_supplicant -Dwext -iwlan0 > -c/system/etc/wifi/wpa_supplicant.conf -dd > disabled > group system > > service dhcpcd /system/bin/logwrapper/system/bin/dhcpcd -d wlan0 > disabled > oneshot > #group system dhcp > #------ > > My interface is called wlan0.. > > -- Ashwin > > On Thu, Jul 22, 2010 at 9:37 AM, Weber <[email protected]> wrote: > > Hi Ashwin > > I tried the wpa_supplicant code of donut ,and then problem went > > away. > > > Now my board can scan the ap and return the results, but it still can > > not connect to ap. > > Maybe it is because of the dhcp > > > and in init.rc,My dhcp service is started by the follow line: > > > service dhcpcd /system/bin/dhcpcd -f /system/etc/dhcpcd/dhcpcd.conf - > > d eth1 > > group system dhcp wifi > > disabled > > oneshot > > > but it seems that it can not work, the logs are: > > D/WifiStateTracker( 713): Deconfiguring interface and stopping DHCP > > D/WifiStateTracker( 713): DhcpHandler: DHCP request started > > I/WifiStateTracker( 713): DhcpHandler: DHCP request failed: Timed out > > waiting for DHCP to finish > > V/WifiStateTracker( 713): Changing supplicant state: COMPLETED ==> > > DORMANT > > D/WifiStateTracker( 713): Deconfiguring interface and stopping DHCP > > > and I started the dhcp manually, it says:flock > > # dhcpcd -f /system/etc/dhcpcd/dhcpcd.conf -d eth1 > > eth1: flock `/data/misc/dhcp/dhcpcd-eth1.pid': Try again > > > Could you give me some clue? > > Thanks! > > --Weber > > On Jul 21, 10:40 am, Ashwin Bihari <[email protected]> wrote: > >> Weber, > > >> This is exactly what I faced when I recently tried to get theWiFiup > >> and running on my Eclair based device..I had everything up and running > >> on Donut and I copied the configuration and all and kept getting these > >> 'permission denied' and 'operation not permitted' with the chown/mkdir > >> related to ctrl_interface and so on.. > > >> After monkeying with the wpa_supplicant.conf file and the init.rc file > >> with the various user/group permissions..just on a whim I decided to > >> do a diff between the older wpa_supplicant code and the new one and > >> there were a few differences..I just brought back all of the older > >> wpa_supplicant code and BOOMWiFiwas up and running in Eclair.. > > >> I think wpa_supplicant is somehow broken in Eclair and needs to be > >> patched to work..I'll have to go through my diff step by step and > >> figure out what exactly breaks things..and I might do that over the > >> next few weeks.. > > >> Regards > >> -- Ashwin > > >> On Tue, Jul 20, 2010 at 10:05 PM, Weber <[email protected]> wrote: > >> > Hi > >> > Just now I started the wpa_supplicant mannually, but is seem that it > >> > can not be started,like this: > >> > # wpa_supplicant -dd -Dwext -ieth1 -c /system/etc/wifi/ > >> > wpa_supplicant.conf& > >> > # ioctl[SIOCSIWPMKSA]: Invalid argument > >> > mkdir[ctrl_interface]: Permission denied > > >> > [1] + Done(255) wpa_supplicant -dd -Dwext -ieth1 -c / > >> > system/etc/wifi/wpa_supplicant.conf > >> > Then I grep and found that "mkdir[ctrl_interface]" is in > >> > ctrl_iface_unix.c ,and what confused me is that it is not inside the" > >> > ifdefANDROIDendif" but now I am using theandroidprivate socket. > > >> > by the way,Someone had mentioned in the groups that > >> > wpa_supplicant/Android.mk > > >> > (3.1) > > >> > LOCAL_PATH := $(call my-dir) > > >> > WPA_BUILD_SUPPLICANT := true > > >> > ifneq ($(TARGET_SIMULATOR),true) > > >> > ifneq ($(BOARD_WPA_SUPPLICANT_DRIVER),) > > >> > WPA_BUILD_SUPPLICANT := true > > >> > CONFIG_DRIVER_$(BOARD_WPA_SUPPLICANT_DRIVER) = y > > >> > endif > > >> > (3.2) remove mark symbol, and look like this > > >> > ######################## > > >> > local_target_dir := $(TARGET_OUT)/etc/wifi > > >> > include $(CLEAR_VARS) > > >> > LOCAL_MODULE := wpa_supplicant.conf > > >> > LOCAL_MODULE_TAGS := user > > >> > LOCAL_MODULE_CLASS := ETC > > >> > LOCAL_MODULE_PATH := $(local_target_dir) > > >> > LOCAL_SRC_FILES := $(LOCAL_MODULE) > > >> > include $(BUILD_PREBUILT) > > >> > But in My wpa_supplicant/Android.mk WPA_BUILD_SUPPLICANT := > >> > false ,Does this matter? > > >> > Thank you! > >> > --Weber > >> > On Jul 21, 9:22 am, Weber <[email protected]> wrote: > >> >> Hi,I read yourwifiportingguide ,and followed it > >> >> but the error still appears--By the way the version I use is eclair > >> >> 2.1-update1 > > >> >> E/WifiHW ( 708): Unable to open connection to supplicant on "/data/ > >> >> system/wpa_supplicant/sta": No such file or directory > > >> >> Here is myportingflow: > >> >> 1. > >> >> build/target/board/generic/BoardConfig.mk > >> >> BOARD_WPA_SUPPLICANT_DRIVER := WEXT > >> >> I also try to add ------HAVE_CUSTOM_WIFI_DRIVER_2 := true,but it still > >> >> cannot work > >> >> 2. > >> >> 2.1 modify external/wpa_supplicant/common.c and set wpa_debug_level = > >> >> MSG_DEBUG > >> >> 2.2 modify common.h and change #define wpa_printf from if ((level) >= > >> >> MSG_INFO) to if ((level) >= MSG_DEBUG) > >> >> 3. > >> >> system/etc/wifi/wpa_supplicant.conf and data/misc/wifi/ > >> >> wpa_supplicant.conf > >> >> ctrl_interface=DIR=/data/system/wpa_supplicant GROUP=wifi > >> >> update_config=1 > >> >> ap_scan=1 > >> >> 4. > >> >> init.rc > >> >> mkdir /system/etc/wifi0777wifiwifi > >> >> chmod 0777 /system/etc/wifi > >> >> chmod 0777 /system/etc/wifi/wpa_supplicant.conf > >> >> chownwifiwifi/system/etc/wifi/wpa_supplicant.conf > > >> >> ##wpa_supplicant control socket forandroidwifi.c (androidprivate > >> >> socket) > >> >> mkdir /data/misc/wifi0777wifiwifi > >> >> mkdir /data/misc/wifi/sockets 0777wifiwifi > >> >> chmod 0777 /data/misc/wifi > >> >> chmod 0777 /data/misc/wifi/wpa_supplicant.conf > >> >> chownwifiwifi/data/misc/wifi > >> >> chownwifiwifi/data/misc/wifi/wpa_supplicant.conf > > >> >> ## wpa_supplicant socket (unix socket mode) > >> >> mkdir /data/system/wpa_supplicant 0777wifiwifi > >> >> chmod 0777 /data/system/wpa_supplicant > >> >> chownwifiwifi/data/system/wpa_supplicant > >> >> chownwifiwifi/data/system > >> >> chownwifiwifi/data > > >> >> ## wpa_supplicant socket (unix socket mode--another goup version) > >> >> ----when it failed ,I try this one ,still failed > >> >> # mkdir /data/system/wpa_supplicant 0777 system system > >> >> # chmod 0777 /data/system/wpa_supplicant > >> >> # chown system system /data/system/wpa_supplicant > >> >> # chown system system /data/system > >> >> # chown system system /data > >> >> 5.init.rc > >> >> service wpa_supplicant /system/bin/wpa_supplicant -dd -Dwext -ieth1 - > >> >> c /system/etc/wifi/wpa_supplicant.conf > >> >> group systemwifiinet > >> >> disabled > >> >> oneshot > > >> >> service dhcpcd /system/bin/dhcpcd -f /system/etc/dhcpcd/dhcpcd.conf -d > >> >> eth1 > >> >> group system dhcpwifi > >> >> disabled > >> >> oneshot > > >> >> /system/etc/dhcpcd/dhcpcd.conf > >> >> interface eth1 > >> >> option subnet_mask, routers, domain_name_servers > >> >> 6. > >> >> modifiedwifi.c to loader my libertas.ko and libertas_sdio.ko > >> >> and add the bellow in init.rc > >> >> setpropwifi.interface "eth1" > >> >> setprop wlan.driver.status "ok" > >> >> setprop wlan.interface "eth1" > > >> >> but the erro is the same > >> >> E/WifiHW ( 708):Unable to open connection to supplicant on "/data/ > >> >> system/wpa_supplicant/eth1": No such file or directory > > >> >> I add some log in external/wpa_supplicant/wpa_ctrl.c > >> >> and found that the error is generated in wpa_ctrl.c by the following > >> >> line: > >> >> connect(ctrl->s, (struct sockaddr *) &ctrl->dest,sizeof(ctrl->dest)) > >> >> < 0) > > >> >> here are the logs > >> >> I/PackageManager( 708): > >> >> Features:android.hardware.wifiandroid.hardware.location.networkandroid.hardware.bluetoothandroid.hardware.locationandroid.hardware.location.gpsandroid.hardware.touchscreenandroid.hardware.sensor.accelerometerandroid.hardware.sensor.compass > >> >> V/ConnectivityService( 708): StartingWifiService. > >> >> I/WifiService( 708): WifiService starting up with Wi-Fi enabled > >> >> W/WifiQiu ( 708): we...@ctrl is NULL after connect(...)for > >> >> CTRL_IFACE_UNIX-ifNdefANDROID! > >> >> E/WifiHW ( 708): Unable to open connection to supplicant on "/data/ > >> >> system/wpa_supplicant/eth1": No such file or directory > >> >> D/wpa_supplicant( 773): Initializing interface 'eth1' conf '/system/ > >> >> etc/wifi/wpa_supplicant.conf' driver 'wext' ctrl_interface 'N/A' > >> >> bridge 'N/A' > >> >> D/wpa_supplicant( 773): Configuration file '/system/etc/wifi/ > >> >> wpa_supplicant.conf' -> '/system/etc/wifi/wpa_supplicant.conf' > >> >> D/wpa_supplicant( 773): Reading configuration file '/system/etc/wifi/ > >> >> wpa_supplicant.conf' > >> >> D/wpa_supplicant( 773): ctrl_interface='DIR=/data/system/ > >> >> wpa_supplicant GROUP=wifi' > >> >> D/wpa_supplicant( 773): update_config=1 > >> >> D/wpa_supplicant( 773): ap_scan=1 > >> >> D/wpa_supplicant( 773): Initializing interface (2) 'eth1' > >> >> D/wpa_supplicant( 773): EAPOL: SUPP_PAE entering state DISCONNECTED > >> >> D/wpa_supplicant( 773): EAPOL: KEY_RX entering state NO_KEY_RECEIVE > >> >> D/wpa_supplicant( 773): EAPOL: SUPP_BE entering state INITIALIZE > >> >> D/wpa_supplicant( 773): EAP: EAP entering state DISABLED > >> >> D/wpa_supplicant( 773): EAPOL: External notification - portEnabled=0 > >> >> D/wpa_supplicant( 773): EAPOL: External notification - portValid=0 > >> >> D/wpa_supplicant( 773): SIOCGIWRANGE: WE(compiled)=22 WE(source)=15 > >> >> enc_capa=0xf > >> >> D/wpa_supplicant( 773): capabilities: key_mgmt 0xf enc 0xf > >> >> D/wpa_supplicant( 773): WEXT: Operstate: linkmode=1, operstate=5 > >> >> D/wpa_supplicant( 773): Own MAC address: 00:1a:6b:a2:38:65 > >> >> D/wpa_supplicant( 773): wpa_driver_wext_set_wpa > >> >> D/wpa_supplicant( 773): wpa_driver_wext_set_key: alg=0 key_idx=0 > >> >> set_tx=0 seq_len=0 key_len=0 > >> >> D/wpa_supplicant( 773): wpa_driver_wext_set_key: alg=0 key_idx=1 > >> >> set_tx=0 seq_len=0 key_len=0 > >> >> D/wpa_supplicant( > > ... > > read more » -- unsubscribe: [email protected] website: http://groups.google.com/group/android-porting
