In your wpa_supplicant.conf, change your GROUP=system to GROUP=wifi.
If you create /data/system/wpa_supplicant using 0777 wifi wifi, your
group needs to be wifi so the correct permissions can be used. I had
this issue before until I changed the group, then it was able to make
the interface.

On Mar 2, 1:22 am, Gaan <gaan...@gmail.com> wrote:
> I found that it may kernel config relative.
> I open CONFIG_PACKET option in kernel.
> it seems wpa_supplicant start running.
> but now I have another problem.
> message with **** **** is dumped by adding debug message code.
>
> ======= new log ==============
> I/power   (  961): *** set_screen_state 1
> E/WifiHW  (  961): ******* wifi_load_driver ********
> E/WifiHW  (  961): check_driver_loaded 1
> I/WifiHW  (  961): Loading WiFi Modules
> D/SettingsWifiEnabler( 1169): Received wifi state changed from
> Disabled to Enabling
> I/WifiHW  (  961): insmod
> rtusb init --->
> ra0 (usb): not using net_device_ops yet
> usbcore: registered new interface driver rt2870
> E/WifiHW  (  961): ******* ok ********
> E/WifiHW  (  961): ******* driver_status OK, ifconfig up ********
> 0x1300 = 00064300
> I/WifiHW  (  961): **1** inside wifi_start_supplicant
> I/WifiHW  (  961): **1** inside ensure_config_file_exists
> E/WifiHW  (  961): **** system_property_find ***
> E/WifiHW  (  961): ***wpa_supplicant -Dwext -ira0 -c /system/etc/wifi/
> wpa_supplicant.conf ***
> E/WifiHW  (  961): *** wpa_supplicant is running state***
> D/WifiService(  961): ACTION_BATTERY_CHANGED pluggedType: 1
> E/WifiHW  (  961): ******* wifi_connect_to_supplicant ********
> I/WifiHW  (  961): *** Interface directory = /data/system/
> wpa_supplicant
> I/WifiHW  (  961):  Interface name = /data/system/wpa_supplicant/ra0
> ***
> E/WifiHW  (  961): Unable to open connection to supplicant on "/data/
> system/wpa_supplicant/ra0": No such file or directory
> E/WifiHW  (  961): ******* wifi_send_command ********
> D/SettingsWifiEnabler( 1169): Received wifi state changed from
> Enabling to Enabled
> E/wpa_supplicant( 1389): Failed to initialize control interface 'DIR=/
> data/system/wpa_supplicant/ GROUP=system'.
> E/wpa_supplicant( 1389): You may have another wpa_supplicant process
> already running or the file was
> E/wpa_supplicant( 1389): left by an unclean termination of
> wpa_supplicant in which case you will need
> E/wpa_supplicant( 1389): to manually remove this file before starting
> wpa_supplicant again.
> I/wpa_supplicant( 1389): CTRL-EVENT-STATE-CHANGE id=-1 state=0
> I//system/bin/wpa_supplicant( 1387): chown[ctrl_interface]: Operation
> not permitted
> Terminate the task(RtmpMlmeTask) with pid(1385)!
> Terminate the task(RtmpCmdQTask) with pid(1386)!
> Terminate the task(RtmpTimerTask) with pid(1384)!
> I/logwrapper( 1387): /system/bin/wpa_supplicant terminated by
> exit(255)
> D/PowerManagerService(  961): setPowerState: mPowerState=6 newState=3
> noChangeLights=false
> D/PowerManagerService(  961):   oldKeyboardBright=false
> newKeyboardBright=false
> D/PowerManagerService(  961):   oldScreenBright=true
> newScreenBright=true
> D/PowerManagerService(  961):   oldButtonBright=true
> newButtonBright=false
> D/PowerManagerService(  961):   oldScreenOn=false newScreenOn=true
> D/PowerManagerService(  961):   oldBatteryLow=false
> newBatteryLow=false
> I/power   (  961): *** set_screen_state 1
> E/WifiHW  (  961): ******* wifi_connect_to_supplicant ********
> I/WifiHW  (  961): *** Interface directory = /data/system/
> wpa_supplicant
> I/WifiHW  (  961):  Interface name = /data/system/wpa_supplicant/ra0
> ***
> E/WifiHW  (  961): Unable to open connection to supplicant on "/data/
> system/wpa_supplicant/ra0": No such file or directory
> 0x1300 = 00064300
> E/wpa_supplicant( 1391): Failed to initialize control interface 'DIR=/
> data/system/wpa_supplicant/ GROUP=system'.
> E/wpa_supplicant( 1391): You may have another wpa_supplicant process
> already running or the file was
> E/wpa_supplicant( 1391): left by an unclean termination of
> wpa_supplicant in which case you will need
> E/wpa_supplicant( 1391): to manually remove this file before starting
> wpa_supplicant again.
> I/wpa_supplicant( 1391): CTRL-EVENT-STATE-CHANGE id=-1 state=0
> I//system/bin/wpa_supplicant( 1390): chown[ctrl_interface]: Operation
> not permitted
> Terminate the task(RtmpMlmeTask) with pid(1393)!
> Terminate the task(RtmpCmdQTask) with pid(1394)!
> Terminate the task(RtmpTimerTask) with pid(1392)!
> I/logwrapper( 1390): /system/bin/wpa_supplicant terminated by
> exit(255)
> E/WifiHW  (  961): ******* wifi_connect_to_supplicant ********
> I/WifiHW  (  961): *** Interface directory = /data/system/
> wpa_supplicant
> I/WifiHW  (  961):  Interface name = /data/system/wpa_supplicant/ra0
> ***
> E/WifiHW  (  961): Unable to open connection to supplicant on "/data/
> system/wpa_supplicant/ra0": No such file or directory
> 0x1300 = 00064300
> I//system/bin/wpa_supplicant( 1395): chown[ctrl_interface]: Operation
> not permitted
> E/wpa_supplicant( 1396): Failed to initialize control interface 'DIR=/
> data/system/wpa_supplicant/ GROUP=system'.
> E/wpa_supplicant( 1396): You may have another wpa_supplicant process
> already running or the file was
> E/wpa_supplicant( 1396): left by an unclean termination of
> wpa_supplicant in which case you will need
> E/wpa_supplicant( 1396): to manually remove this file before starting
> wpa_supplicant again.
> I/wpa_supplicant( 1396): CTRL-EVENT-STATE-CHANGE id=-1 state=0
> Terminate the task(RtmpMlmeTask) with pid(1398)!
> Terminate the task(RtmpCmdQTask) with pid(1399)!
> Terminate the task(RtmpTimerTask) with pid(1397)!
> I/logwrapper( 1395): /system/bin/wpa_supplicant terminated by
> exit(255)
> E/WifiHW  (  961): ******* wifi_connect_to_supplicant ********
> I/WifiHW  (  961): *** Interface directory = /data/system/
> wpa_supplicant
> I/WifiHW  (  961):  Interface name = /data/system/wpa_supplicant/ra0
> ***
> E/WifiHW  (  961): Unable to open connection to supplicant on "/data/
> system/wpa_supplicant/ra0": No such file or directory
> V/WifiStateTracker(  961): Supplicant died unexpectedly
> E/WifiHW  (  961): ******* wifi_close_supplicant_connection ********
> 0x1300 = 00064300
> init: no such service 'dhcpcd'
> E/wpa_supplicant( 1401): Failed to initialize control interface 'DIR=/
> data/system/wpa_supplicant/ GROUP=system'.
> E/wpa_supplicant( 1401): You may have another wpa_supplicant process
> already running or the file was
> E/wpa_supplicant( 1401): left by an unclean termination of
> wpa_supplicant in which case you will need
> E/wpa_supplicant( 1401): to manually remove this file before starting
> wpa_supplicant again.
> I/wpa_supplicant( 1401): CTRL-EVENT-STATE-CHANGE id=-1 state=0
> I//system/bin/wpa_supplicant( 1400): chown[ctrl_interface]: Operation
> not permitted
> Terminate the task(RtmpMlmeTask) with pid(1403)!
> Terminate the task(RtmpCmdQTask) with pid(1404)!
> Terminate the task(RtmpTimerTask) with pid(1402)!
> I/logwrapper( 1400): /system/bin/wpa_supplicant terminated by
> exit(255)
> 0x1300 = 00064300
> E/WifiStateTracker(  961): Could not stop DHCP
> D/NetworkStateTracker(  961): setDetailed state, old =DISCONNECTED and
> new state=DISCONNECTED
> init: untracked pid 1410 exited
> D/SettingsWifiEnabler( 1169): Received wifi state changed from Enabled
> to Disabling
> init: no such service 'dhcpcd'
> E/WifiStateTracker(  961): Could not stop DHCP
> I/WifiHW  (  961): **1** inside wifi_unload_driver
> E/WifiHW  (  961): ******* before rmmod, ifconfig down ********
> Terminate the task(RtmpMlmeTask) with pid(1412)!
> Terminate the task(RtmpCmdQTask) with pid(1413)!
> Terminate the task(RtmpTimerTask) with pid(1411)!
> usbcore: deregistering interface driver rt2870
> RtmpOSNetDevDetach(): RtmpOSNetDeviceDetach(), dev->name=ra0!
> I/WifiHW  (  961): rmmod
> <--- rtusb exit
> E/WifiHW  (  961): check_driver_loaded 1
> W/WifiHW  (  961): check_driver_loaded 2
> D/SettingsWifiEnabler( 1169): Received wifi state changed from
> Disabling to Disabled
> =============================
>
> I think the problem is
> E/WifiHW  (  961): Unable to open connection to supplicant on "/data/
> system/wpa_supplicant/ra0": No such file or directory
>
> anyone can help??
>
> On 2月26日, 上午7時37分, Brandon <robert...@gmail.com> wrote:
>
>
>
> > Did you check your system/bin to see if wpa_supplicant was present?
>
> > Here is what's in my BoardConfig.mk in order to build wpa supplicant.
>
> > #Wifirelated defines
> > BOARD_WPA_SUPPLICANT_DRIVER      := WEXT
> > BOARD_WPA_SUPPLICANT_PRIVATE_LIB :=
>
> > On Feb 23, 3:56 am, Gaan <gaan...@gmail.com> wrote:
>
> > > Hi everyone,
> > >     I'm portingwifidriver (Ralink chip) on Android 2.0.1 board.
> > > first of all I made some modifies
>
> > > (1)   modify build/target/board/generic/BoardConfig.mk
>
> > > add HAVE_CUSTOM_WIFI_DRIVER_2 := true
>
> > > (2)   Android using wpa_supplicant to managementwifi. Make sure
> > > external/wpa_supplicant/.config is looking like this
>
> > > # CONFIG_NO_WPA=y
>
> > > CONFIG_OS=unix
>
> > > CONFIG_IEEE8021X_EAPOL=y
>
> > > CONFIG_EAP_MD5=y
>
> > > CONFIG_EAP_MSCHAPV2=y
>
> > > CONFIG_EAP_TLS=y
>
> > > CONFIG_EAP_PEAP=y
>
> > > CONFIG_EAP_TTLS=y
>
> > > CONFIG_EAP_GTC=y
>
> > > CONFIG_EAP_OTP=y
>
> > > CONFIG_EAP_SIM=y
>
> > > CONFIG_EAP_AKA=y
>
> > > CONFIG_EAP_PSK=y
>
> > > CONFIG_EAP_SAKE=y
>
> > > CONFIG_EAP_GPSK=y
>
> > > CONFIG_EAP_PAX=y
>
> > > CONFIG_EAP_LEAP=y
>
> > > # CONFIG_EAP_FAST=y
>
> > > CONFIG_PKCS12=y
>
> > > # CONFIG_PCSC=y
>
> > > CONFIG_SMARTCARD=y
>
> > > CONFIG_WIRELESS_EXTENSION=y
>
> > > CONFIG_CTRL_IFACE=y
>
> > > # CONFIG_DRIVER_HOSTAP=y
>
> > > # CONFIG_DRIVER_HERMES=y
>
> > > # CONFIG_DRIVER_MADWIFI=y
>
> > > # CONFIG_DRIVER_ATMEL=y
>
> > > CONFIG_DRIVER_WEXT=y
>
> > > # CONFIG_DRIVER_NDISWRAPPER=y
>
> > > # CONFIG_DRIVER_BROADCOM=y
>
> > > # CONFIG_DRIVER_IPW=y
>
> > > # CONFIG_DRIVER_BSD=y
>
> > > # CONFIG_DRIVER_NDIS=y
>
> > > # CONFIG_DRIVER_TEST=y
>
> > > # CONFIG_DRIVER_CUSTOM=y
>
> > > # CONFIG_DEBUG_FILE=y
>
> > > # CONFIG_INTERNAL_LIBTOMMATH=y
>
> > > (3)   Enable wpa_supplicant compile option, modify external/
> > > 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)...
>
> read more »

-- 
unsubscribe: android-porting+unsubscr...@googlegroups.com
website: http://groups.google.com/group/android-porting

Reply via email to