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"
ifdef ANDROID endif" but now I am using the android private 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( 773): wpa_driver_wext_set_key: alg=0 key_idx=2
> set_tx=0 seq_len=0 key_len=0
> D/wpa_supplicant( 773): wpa_driver_wext_set_key: alg=0 key_idx=3
> set_tx=0 seq_len=0 key_len=0
> D/wpa_supplicant( 773): wpa_driver_wext_set_countermeasures
> D/wpa_supplicant( 773): wpa_driver_wext_set_drop_unencrypted
> D/wpa_supplicant( 773): Setting scan request: 0 sec 100000 usec
> D/wpa_supplicant( 773): Using existing control interface directory.
> D/wpa_supplicant( 773): ctrl_interface_group=1010 (from group name
> 'wifi')
> D/wpa_supplicant( 773): Added interface eth1
> D/wpa_supplicant( 773): RTM_NEWLINK: operstate=0 ifi_flags=0x1043
> ([UP][RUNNING])
> D/wpa_supplicant( 773): RTM_NEWLINK, IFLA_IFNAME: Interface 'eth1'
> added
> D/wpa_supplicant( 773): RTM_NEWLINK: operstate=0 ifi_flags=0x1003
> ([UP])
> D/wpa_supplicant( 773): RTM_NEWLINK, IFLA_IFNAME: Interface 'eth1'
> added
> D/wpa_supplicant( 773): RTM_NEWLINK: operstate=0 ifi_flags=0x1003
> ([UP])
> D/wpa_supplicant( 773): Wireless event: cmd=0x8b06 len=8
> D/wpa_supplicant( 773): State: DISCONNECTED -> SCANNING
> I/wpa_supplicant( 773): CTRL-EVENT-STATE-CHANGE id=-1 state=2
> D/wpa_supplicant( 773): Starting AP scan (broadcast SSID)
> D/wpa_supplicant( 773): Trying to get current scan results first
> without requesting a new scan to speed up initial association
> D/wpa_supplicant( 773): Received 0 bytes of scan results (0 BSSes)
> D/wpa_supplicant( 773): Scan results: 0
> I/wpa_supplicant( 773): CTRL-EVENT-SCAN-RESULTS Ready
> D/wpa_supplicant( 773): No suitable AP found.
> D/wpa_supplicant( 773): Setting scan request: 0 sec 0 usec
> D/wpa_supplicant( 773): Starting AP scan (broadcast SSID)
> D/wpa_supplicant( 773): Scan requested (ret=0) - scan timeout 5
> seconds
> D/wpa_supplicant( 773): RTM_NEWLINK: operstate=0 ifi_flags=0x1003
> ([UP])
> D/wpa_supplicant( 773): Wireless event: cmd=0x8b19 len=8
> D/wpa_supplicant( 773): Received 0 bytes of scan results (0 BSSes)
> D/wpa_supplicant( 773): Scan results: 0
> I/wpa_supplicant( 773): CTRL-EVENT-SCAN-RESULTS Ready
> D/wpa_supplicant( 773): No suitable AP found.
> D/wpa_supplicant( 773): Setting scan request: 5 sec 0 usec
> D/WifiService( 708): ACTION_BATTERY_CHANGED pluggedType: 1
> D/wpa_supplicant( 773): No enabled networks - do not scan
> D/wpa_supplicant( 773): State: SCANNING -> INACTIVE
> I/wpa_supplicant( 773): CTRL-EVENT-STATE-CHANGE id=-1 state=1
> D/WifiService( 708): ACTION_SCREEN_ON
> V/WifiStateTracker( 708): Supplicant died unexpectedly
> D/wpa_supplicant( 773): RTM_NEWLINK: operstate=0 ifi_flags=0x1002 ()
> D/wpa_supplicant( 773): RTM_NEWLINK, IFLA_IFNAME: Interface 'eth1'
> added
> I/wpa_supplicant( 773): CTRL-EVENT-TERMINATING - signal 15 received
> I/wpa_supplicant( 773): CTRL-EVENT-TERMINATING - signal 0 received
> D/wpa_supplicant( 773): Removing interface eth1
> D/wpa_supplicant( 773): State: INACTIVE -> DISCONNECTED
> I/wpa_supplicant( 773): CTRL-EVENT-STATE-CHANGE id=-1 state=0
> D/wpa_supplicant( 773): wpa_driver_wext_set_operstate: operstate 0->0
> (DORMANT)
> D/wpa_supplicant( 773): WEXT: Operstate: linkmode=-1, operstate=5
> D/wpa_supplicant( 773): No keys have been configured - skip key
> clearing
> D/wpa_supplicant( 773): EAPOL: External notification - portEnabled=0
> D/wpa_supplicant( 773): EAPOL: External notification - portValid=0
> D/wpa_supplicant( 773): wpa_driver_wext_set_wpa
> D/wpa_supplicant( 773): wpa_driver_wext_set_drop_unencrypted
> D/wpa_supplicant( 773): wpa_driver_wext_set_countermeasures
> D/wpa_supplicant( 773): No keys have been configured - skip key
> clearing
> D/wpa_supplicant( 773): CTRL_IFACE wait for attached monitors to
> receive messages
> D/wpa_supplicant( 773): Cancelling scan request
> D/wpa_supplicant( 773): Cancelling authentication timeout
> D/wpa_supplicant( 773): WEXT: Operstate: linkmode=0, operstate=6
>
> Then ,I try the private socket
> first ,I remove the /data/system/wpa_supplicant as you said in the
> groups
> then:
> 3.
> ctrl_interface=eth1
> update_config=1
> ap_scan=1
> 4.
> init.rc
> comment these:
> ## 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
> 5.
> service wpa_supplicant /system/bin/wpa_supplicant -dd -Dwext -ieth1 -
> c /system/etc/wifi/wpa_supplicant.conf
> socket wpa_eth1 dgram 777wifiwifi
> group systemwifiinet
> disabled
> oneshot
>
> the others are the same as the uinx socket.
> but it still can not connnect.
>
> 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): Starting
> ...
>
> read more »
--
unsubscribe: [email protected]
website: http://groups.google.com/group/android-porting