Hi, I can't look it up directly now, because I trashed my system in the course of debugging, but what I remember is this:
Ok this is going to be a bit nebulous but maybe better than nothing... either the wifi service or the wpa_supplicant creates a special device /data/misc/wifi/wlan0/wlan0. I think it's the supplicant and the other part uses this to set up 2 pipes in /data/misc/wifi/sockets/ to actually control and monitor the supplicant. What I want to say is, I think it boils down to some ugly permission stuff, I am debugging myself currently. I went so far to comment out the privilege drop somewhere (android drops from root (or system?) to wifi/wifi or wifi/system or something. Unsure if it helps, it's nothing very concrete. best, Bastian Hecht Am Mittwoch, 6. Juni 2012 14:35:43 UTC+2 schrieb swaraj: > > > Hi, > > I am building android 4.0.4 for imx53 board. I'm stuck with wifi porting > issue. > I'm able to scan and connect using command prompt, but i'm unable to use > GUI for wlan0 and not able to start supplicant properly with GUI when > turning on wifi. > > The following is the error message: > > > D/NetworkManagementService( 1144): Registering observer > I/WifiService( 1144): WifiService starting up with Wi-Fi enabled > I/WifiHW ( 1144): ************* wifi.c insmod is called********** > I/ethernet( 1144): User ask for device name on 0, list:B7F740, total:2 > I/ethernet( 1144): User ask for device name on 1, list:B7F740, total:2 > I/WifiHW ( 1144): ************* wifi.c insmod is called********** > D/NetworkManagementService( 1144): rsp <213 00:23:a7:00:01:58 0.0.0.0 0 > [down broadcast multicast]> > D/CommandListener( 1066): Setting iface cfg > D/CommandListener( 1066): Trying to bring down wlan0 > D/CommandListener( 1066): broadcast flag ignored > D/CommandListener( 1066): multicast flag ignored > D/NetworkManagementService( 1144): flags <[down broadcast multicast]> > E/WifiHW ( 1144): ctrl_interface is = /data/misc/wifi > E/WifiHW ( 1144): Unable to open connection to supplicant on "wlan0": > E/WifiHW ( 1144): Unable to open connection to supplicant on "wlan0": No > such file or directory > E/WifiHW ( 1144): Unable to open connection to supplicant on "wlan0": > E/WifiHW ( 1144): Unable to open connection to supplicant on "wlan0": No > such file or directory > W/EthernetStateMachine( 1144): Could not stop DHCP > I/EthernetSta[ 66.122325] init: no such service 'dhcpcd_sit0:-h > android-45fe3c772cef2905 sit0' > teMachine( 1144): trigger dhcp for device sit0 > I/SystemServer( 1144): Throttle Service > E/WifiHW ( 1144): Unable to open connection to supplicant on "wlan0": > E/WifiHW ( 1144): Unable to open connection to supplicant on "wlan0": No > such file or directory > I/SystemServer( 1144): Backup Service > D/dalvikvm( 1144): GC_CONCURRENT freed 182K, 4% free 8037K/8327K, paused > 3ms+47ms > I/SystemServer( 1144): SamplingProfiler Service > E/WifiHW ( 1144): Unable to open connection to supplicant on "wlan0": > E/WifiHW ( 1144): Unable to open connection to supplicant on "wlan0": No > such file or directory > I/SystemServer( 1144): NetworkTimeUpdateService > I/WindowManager( 1144): SAFE MODE not enabled > W/RecognitionManagerService( 1144): no available voice recognition > services found > E/WifiHW ( 1144): Unable to open connection to supplicant on "wlan0": > E/WifiHW ( 1144): Unable to open connection to supplicant on "wlan0": No > such file or directory > D/dalvikvm( 1144): GC_CONCURRENT freed 252K, 4% free 8311K/8647K, paused > 5ms+5ms > I/ActivityManager( 1144): Start proc org.linaro.wallpaper for service > org.linaro.wallpaper/.LogoWallpaper: pid=1236 uid=10019 gids={} > W/InputManagerService( 1144): Ignoring setImeWindowStatus of uid 1000 > token: null > E/WifiHW ( 1144): Unable to open connection to supplicant on "wlan0": > E/WifiHW ( 1144): Unable to open connection to supplicant on "wlan0": No > such file or directory > E/WifiStateMachine( 1144): Failed to setup control channel, restart > supplicant > I/ActivityManager( 1144): Start proc com.android.inputmethod.latin for > service com.android.inputmethod.latin/.LatinIME: pid=1248 uid=10028 gids={} > D/SystemUIService( 1221): loading: class > com.android.systemui.statusbar.tablet.TabletStatusBar > D/SystemUIService( 1221): running: > com.android.systemui.statusbar.tablet.TabletStatusBar@4112ff98 > sms: com.android.providers.telephony.MmsSmsProvider > I/Process ( 1144): Sending signal. PID: 1298 SIG: 3 > I/dalvikvm( 1298): threadid=3: reacting to signal 3 > I/wpa_supplicant( 1315): CTRL-EVENT-STATE-CHANGE id=-1 state=2 > BSSID=00:00:00:00:00:00 > [ 76.900519] SIOCSIWPRIV request wlan0, info->cmd:8b0c, info->flags:0 > [ 76.900532] dwrq->length:20E/WifiHW ( 1144): Unable to open > connection to supplicant on "wlan0": > E/WifiHW ( 1144): Unable to open connection to supplicant on "wlan0": No > such file or directory > > > > In wifi.c file i included few changes: > > //static const char IFACE_DIR[] = "/data/system/wpa_supplicant"; > //#ifdef WIFI_DRIVER_MODULE_PATH > //static const char DRIVER_MODULE_NAME[] = WIFI_DRIVER_MODULE_NAME; > static const char DRIVER_MODULE_TAG[] = WIFI_DRIVER_MODULE_NAME " "; > //static const char DRIVER_MODULE_PATH[] = WIFI_DRIVER_MODULE_PATH; > static const char DRIVER_MODULE_ARG[] = WIFI_DRIVER_MODULE_ARG; > //#endif > static const char FIRMWARE_LOADER[] = WIFI_FIRMWARE_LOADER; > static const char DRIVER_PROP_NAME[] = "wlan.driver.status"; > static const char SUPPLICANT_NAME[] = "wpa_supplicant"; > static const char SUPP_PROP_NAME[] = "init.svc.wpa_supplicant"; > static const char SUPP_CONFIG_TEMPLATE[]= > "/system/etc/wifi/wpa_supplicant.conf"; > static const char SUPP_CONFIG_FILE[] = > "/data/misc/wifi/wpa_supplicant.conf"; > static const char P2P_CONFIG_FILE[] = > "/data/misc/wifi/p2p_supplicant.conf"; > static const char CONTROL_IFACE_PATH[] = "/data/misc/wifi"; > static const char MODULE_FILE[] = "/proc/modules"; > > static const char SUPP_ENTROPY_FILE[] = WIFI_ENTROPY_FILE; > static unsigned char dummy_key[21] = { 0x02, 0x11, 0xbe, 0x33, 0x43, 0x35, > 0x68, 0x47, 0x84, 0x99, 0xa9, 0x2b, > 0x1c, 0xd3, 0xee, 0xff, 0xf1, 0xe2, > 0xf3, 0xf4, 0xf5 }; > > > > > In init.rc i made following modifications: > > mkdir /data/misc/systemkeys 0700 system system > mkdir /data/misc/vpn/profiles 0770 system system > # give system access to wpa_supplicant.conf for backup and restore > mkdir /data/misc/wifi 0770 wifi wifi > chmod 0770 /data/misc/wifi > chmod 0777 /data/misc/wifi/wpa_supplicant > chmod 0777 /system/release > mkdir /data/misc/wifi/sockets 0777 wifi wifi > chmod 0667 /data/misc/wifi/wpa_supplicant.conf > chmod 0777 /system/release/wifi_settings.cfg > mkdir /data/local 0751 root root > mkdir /data/local/tmp 0771 shell shell > mkdir /data/data 0771 system system > mkdir /data/app-private 0771 system system > mkdir /data/app 0771 system system > mkdir /data/property 0700 root root > chmod 0777 /system/release > > setprop wifi.interface wlan0 > #setprop wlan.driver.status "ok" > > #Define service for wifi > #service wpa_supplicant /system/bin/wpa_supplicant -Drsi -iwlan0 > -c/system/release/wifi_settings.cfg > #service wpa_supplicant /system/bin/wpa_supplicant -Drsi -iwlan0 > -c/data/misc/wifi/wpa_supplicant.conf > service wpa_supplicant /system/bin/wpa_supplicant -Dwext -iwlan0 > -c/data/misc/wifi/wpa_supplicant.conf > group system wifi inet > disabled > oneshot > > service ifcfg_eth /system/bin/ifconfig wlan0 up > disabled > oneshot > > #service dhcpcd_wlan0 /system/bin/dhcpcd -BKL wlan0 -f > /system/etc/android.conf > service dhcpcd_wlan0 /system/bin/dhcpcd -BKL wlan0 > group system dhcp > disabled > oneshot > > > Thanks > Swaraj > Am Mittwoch, 6. Juni 2012 14:35:43 UTC+2 schrieb swaraj: > > > Hi, > > I am building android 4.0.4 for imx53 board. I'm stuck with wifi porting > issue. > I'm able to scan and connect using command prompt, but i'm unable to use > GUI for wlan0 and not able to start supplicant properly with GUI when > turning on wifi. > > The following is the error message: > > > D/NetworkManagementService( 1144): Registering observer > I/WifiService( 1144): WifiService starting up with Wi-Fi enabled > I/WifiHW ( 1144): ************* wifi.c insmod is called********** > I/ethernet( 1144): User ask for device name on 0, list:B7F740, total:2 > I/ethernet( 1144): User ask for device name on 1, list:B7F740, total:2 > I/WifiHW ( 1144): ************* wifi.c insmod is called********** > D/NetworkManagementService( 1144): rsp <213 00:23:a7:00:01:58 0.0.0.0 0 > [down broadcast multicast]> > D/CommandListener( 1066): Setting iface cfg > D/CommandListener( 1066): Trying to bring down wlan0 > D/CommandListener( 1066): broadcast flag ignored > D/CommandListener( 1066): multicast flag ignored > D/NetworkManagementService( 1144): flags <[down broadcast multicast]> > E/WifiHW ( 1144): ctrl_interface is = /data/misc/wifi > E/WifiHW ( 1144): Unable to open connection to supplicant on "wlan0": > E/WifiHW ( 1144): Unable to open connection to supplicant on "wlan0": No > such file or directory > E/WifiHW ( 1144): Unable to open connection to supplicant on "wlan0": > E/WifiHW ( 1144): Unable to open connection to supplicant on "wlan0": No > such file or directory > W/EthernetStateMachine( 1144): Could not stop DHCP > I/EthernetSta[ 66.122325] init: no such service 'dhcpcd_sit0:-h > android-45fe3c772cef2905 sit0' > teMachine( 1144): trigger dhcp for device sit0 > I/SystemServer( 1144): Throttle Service > E/WifiHW ( 1144): Unable to open connection to supplicant on "wlan0": > E/WifiHW ( 1144): Unable to open connection to supplicant on "wlan0": No > such file or directory > I/SystemServer( 1144): Backup Service > D/dalvikvm( 1144): GC_CONCURRENT freed 182K, 4% free 8037K/8327K, paused > 3ms+47ms > I/SystemServer( 1144): SamplingProfiler Service > E/WifiHW ( 1144): Unable to open connection to supplicant on "wlan0": > E/WifiHW ( 1144): Unable to open connection to supplicant on "wlan0": No > such file or directory > I/SystemServer( 1144): NetworkTimeUpdateService > I/WindowManager( 1144): SAFE MODE not enabled > W/RecognitionManagerService( 1144): no available voice recognition > services found > E/WifiHW ( 1144): Unable to open connection to supplicant on "wlan0": > E/WifiHW ( 1144): Unable to open connection to supplicant on "wlan0": No > such file or directory > D/dalvikvm( 1144): GC_CONCURRENT freed 252K, 4% free 8311K/8647K, paused > 5ms+5ms > I/ActivityManager( 1144): Start proc org.linaro.wallpaper for service > org.linaro.wallpaper/.LogoWallpaper: pid=1236 uid=10019 gids={} > W/InputManagerService( 1144): Ignoring setImeWindowStatus of uid 1000 > token: null > E/WifiHW ( 1144): Unable to open connection to supplicant on "wlan0": > E/WifiHW ( 1144): Unable to open connection to supplicant on "wlan0": No > such file or directory > E/WifiStateMachine( 1144): Failed to setup control channel, restart > supplicant > I/ActivityManager( 1144): Start proc com.android.inputmethod.latin for > service com.android.inputmethod.latin/.LatinIME: pid=1248 uid=10028 gids={} > D/SystemUIService( 1221): loading: class > com.android.systemui.statusbar.tablet.TabletStatusBar > D/SystemUIService( 1221): running: > com.android.systemui.statusbar.tablet.TabletStatusBar@4112ff98 > sms: com.android.providers.telephony.MmsSmsProvider > I/Process ( 1144): Sending signal. PID: 1298 SIG: 3 > I/dalvikvm( 1298): threadid=3: reacting to signal 3 > I/wpa_supplicant( 1315): CTRL-EVENT-STATE-CHANGE id=-1 state=2 > BSSID=00:00:00:00:00:00 > [ 76.900519] SIOCSIWPRIV request wlan0, info->cmd:8b0c, info->flags:0 > [ 76.900532] dwrq->length:20E/WifiHW ( 1144): Unable to open > connection to supplicant on "wlan0": > E/WifiHW ( 1144): Unable to open connection to supplicant on "wlan0": No > such file or directory > > > > In wifi.c file i included few changes: > > //static const char IFACE_DIR[] = "/data/system/wpa_supplicant"; > //#ifdef WIFI_DRIVER_MODULE_PATH > //static const char DRIVER_MODULE_NAME[] = WIFI_DRIVER_MODULE_NAME; > static const char DRIVER_MODULE_TAG[] = WIFI_DRIVER_MODULE_NAME " "; > //static const char DRIVER_MODULE_PATH[] = WIFI_DRIVER_MODULE_PATH; > static const char DRIVER_MODULE_ARG[] = WIFI_DRIVER_MODULE_ARG; > //#endif > static const char FIRMWARE_LOADER[] = WIFI_FIRMWARE_LOADER; > static const char DRIVER_PROP_NAME[] = "wlan.driver.status"; > static const char SUPPLICANT_NAME[] = "wpa_supplicant"; > static const char SUPP_PROP_NAME[] = "init.svc.wpa_supplicant"; > static const char SUPP_CONFIG_TEMPLATE[]= > "/system/etc/wifi/wpa_supplicant.conf"; > static const char SUPP_CONFIG_FILE[] = > "/data/misc/wifi/wpa_supplicant.conf"; > static const char P2P_CONFIG_FILE[] = > "/data/misc/wifi/p2p_supplicant.conf"; > static const char CONTROL_IFACE_PATH[] = "/data/misc/wifi"; > static const char MODULE_FILE[] = "/proc/modules"; > > static const char SUPP_ENTROPY_FILE[] = WIFI_ENTROPY_FILE; > static unsigned char dummy_key[21] = { 0x02, 0x11, 0xbe, 0x33, 0x43, 0x35, > 0x68, 0x47, 0x84, 0x99, 0xa9, 0x2b, > 0x1c, 0xd3, 0xee, 0xff, 0xf1, 0xe2, > 0xf3, 0xf4, 0xf5 }; > > > > > In init.rc i made following modifications: > > mkdir /data/misc/systemkeys 0700 system system > mkdir /data/misc/vpn/profiles 0770 system system > # give system access to wpa_supplicant.conf for backup and restore > mkdir /data/misc/wifi 0770 wifi wifi > chmod 0770 /data/misc/wifi > chmod 0777 /data/misc/wifi/wpa_supplicant > chmod 0777 /system/release > mkdir /data/misc/wifi/sockets 0777 wifi wifi > chmod 0667 /data/misc/wifi/wpa_supplicant.conf > chmod 0777 /system/release/wifi_settings.cfg > mkdir /data/local 0751 root root > mkdir /data/local/tmp 0771 shell shell > mkdir /data/data 0771 system system > mkdir /data/app-private 0771 system system > mkdir /data/app 0771 system system > mkdir /data/property 0700 root root > chmod 0777 /system/release > > setprop wifi.interface wlan0 > #setprop wlan.driver.status "ok" > > #Define service for wifi > #service wpa_supplicant /system/bin/wpa_supplicant -Drsi -iwlan0 > -c/system/release/wifi_settings.cfg > #service wpa_supplicant /system/bin/wpa_supplicant -Drsi -iwlan0 > -c/data/misc/wifi/wpa_supplicant.conf > service wpa_supplicant /system/bin/wpa_supplicant -Dwext -iwlan0 > -c/data/misc/wifi/wpa_supplicant.conf > group system wifi inet > disabled > oneshot > > service ifcfg_eth /system/bin/ifconfig wlan0 up > disabled > oneshot > > #service dhcpcd_wlan0 /system/bin/dhcpcd -BKL wlan0 -f > /system/etc/android.conf > service dhcpcd_wlan0 /system/bin/dhcpcd -BKL wlan0 > group system dhcp > disabled > oneshot > > > Thanks > Swaraj > -- unsubscribe: android-porting+unsubscr...@googlegroups.com website: http://groups.google.com/group/android-porting