기존 이솝 임베디드 포럼의 지식인 서비스가 게시판 형태로 변경되었습니다.
안드로이드 2.1에서 OMAP3530 보드로 테스트 하고 있습니다.
안드로이드 wifi 실행에서 문제가 발생하여 염치 불구하고 질문 드립니다.
안드로이드 init.rc 파일을 아래와 같이 설정 하였습니다.
==================================================
,,,,
mkdir /data/misc/wifi 0770 system wifi
chmod 0770 /data/misc/wifi
chmod 0660 /data/misc/wifi/wpa_supplicant.conf
# wifi setting directory create
mkdir /data/misc/wifi/sockets 0770 wifi wifi
mkdir /data/system 0777 wifi wifi
mkdir /data/system/wpa_supplicant 0777 wifi wifi
mkdir /data/misc/dhcp 0770 dhcp dhcp
chown dhcp dhcp /data/misc/dhcp
....
# wifi service
service ifcfg_ralink /system/bin/ifconfig wlan0 up
#disabled
#oneshot
service wpa_supplicant /system/bin/logwrapper /system/bin/wpa_supplicant -Dwext -iwlan0 -c /data/misc/wifi/wpa_supplicant.conf -dd
disabled
group system
service dhcpcd /system/bin/logwrapper /system/bin/dhcpcd -d wlan0
disabled
oneshot
======================================================
/etc/wifi/wpa_supplicant.conf 파일은 아래와 같이 설정하였습니다.
======================================================
update_config=1
#ctrl_interface=tiwlan0
#ctrl_interface=rausb0
ctrl_interface=DIR=/data/system/wpa_supplicant GROUP=system
eapol_version=1
ap_scan=1
fast_reauth=1
network={
ssid="SoftAP-D4"
psk="free7942"
proto=RSN
key_mgmt=WPA-PSK
group=CCMP TKIP
priority=1
}
=======================================================
위와 같이 설정하고 wifi를 실행하면 네트워크를 연결할수 없다고 나오고 log는 아래와 같습니다.
=======================================================
.....
I/WifiHW ( 1033): wifi_load_driver(236) Loading WiFi Modules
D/SettingsWifiEnabler( 1788): Received wifi state changed from Disabled to Enabling
I/WifiHW ( 1033): wifi_load_driver(256) loading WiFi Modules => status : ok
D/WifiService( 1033): ACTION_BATTERY_CHANGED pluggedType: 1
E/WifiHW ( 1033): Unable to open connection to supplicant on "/data/system/wpa_supplicant/wlan0": No such file or directory
I//system/bin/wpa_supplicant( 1830): chown[ctrl_interface]: Operation not permitted
E/wpa_supplicant( 1831): Failed to initialize control interface 'DIR=/data/system/wpa_supplicant GROUP=system'.
E/wpa_supplicant( 1831): You may have another wpa_supplicant process already running or the file was
E/wpa_supplicant( 1831): left by an unclean termination of wpa_supplicant in which case you will need
E/wpa_supplicant( 1831): to manually remove this file before starting wpa_supplicant again.
I/wpa_supplicant( 1831): CTRL-EVENT-STATE-CHANGE id=-1 state=0
I/logwrapper( 1830): /system/bin/wpa_supplicant terminated by exit(255)
D/SettingsWifiEnabler( 1788): Received wifi state changed from Enabling to Enabled
D/dalvikvm( 1788): GC freed 3511 objects / 213712 bytes in 62ms
E/WifiHW ( 1033): Unable to open connection to supplicant on "/data/system/wpa_supplicant/wlan0": No such file or directory
I//system/bin/wpa_supplicant( 1842): chown[ctrl_interface]: Operation not permitted
E/wpa_supplicant( 1843): Failed to initialize control interface 'DIR=/data/system/wpa_supplicant GROUP=system'.
E/wpa_supplicant( 1843): You may have another wpa_supplicant process already running or the file was
E/wpa_supplicant( 1843): left by an unclean termination of wpa_supplicant in which case you will need
E/wpa_supplicant( 1843): to manually remove this file before starting wpa_supplicant again.
I/wpa_supplicant( 1843): CTRL-EVENT-STATE-CHANGE id=-1 state=0
I/logwrapper( 1842): /system/bin/wpa_supplicant terminated by exit(255)
E/SettingsWifiLayer( 1788): Unable to scan for networks
I/NotificationService( 1033): enqueueToast pkg=com.android.settings callback=android.app.ITransientNotification$Stub$Proxy@43cfe258 duration=1
E/WifiHW ( 1033): Unable to open connection to supplicant on "/data/system/wpa_supplicant/wlan0": No such file or directory
I//system/bin/wpa_supplicant( 1853): chown[ctrl_interface]: Operation not permitted
E/wpa_supplicant( 1854): Failed to initialize control interface 'DIR=/data/system/wpa_supplicant GROUP=system'.
E/wpa_supplicant( 1854): You may have another wpa_supplicant process already running or the file was
E/wpa_supplicant( 1854): left by an unclean termination of wpa_supplicant in which case you will need
E/wpa_supplicant( 1854): to manually remove this file before starting wpa_supplicant again.
I/wpa_supplicant( 1854): CTRL-EVENT-STATE-CHANGE id=-1 state=0
I/logwrapper( 1853): /system/bin/wpa_supplicant terminated by exit(255)
E/SettingsWifiLayer( 1788): Unable to scan for networks
I/NotificationService( 1033): enqueueToast pkg=com.android.settings callback=android.app.ITransientNotification$Stub$Proxy@43db92e0 duration=1
E/WifiHW ( 1033): Unable to open connection to supplicant on "/data/system/wpa_supplicant/wlan0": No such file or directory
V/WifiStateTracker( 1033): Supplicant died unexpectedly
I//system/bin/wpa_supplicant( 1864): chown[ctrl_interface]: Operation not permitted
E/wpa_supplicant( 1865): Failed to initialize control interface 'DIR=/data/system/wpa_supplicant GROUP=system'.
E/wpa_supplicant( 1865): You may have another wpa_supplicant process already running or the file was
E/wpa_supplicant( 1865): left by an unclean termination of wpa_supplicant in which case you will need
E/wpa_supplicant( 1865): to manually remove this file before starting wpa_supplicant again.
I/wpa_supplicant( 1865): CTRL-EVENT-STATE-CHANGE id=-1 state=0
I/logwrapper( 1864): /system/bin/wpa_supplicant terminated by exit(255)
D/NetworkStateTracker( 1033): setDetailed state, old =IDLE and new state=DISCONNECTED
D/ConnectivityService( 1033): ConnectivityChange for WIFI: DISCONNECTED/DISCONNECTED
W/MobileDataStateTracker( 1033): Ignoring feature request because could not acquire PhoneService
W/MobileDataStateTracker( 1033): Could not enable APN type "default"
D/SettingsWifiEnabler( 1788): Received wifi state changed from Enabled to Disabling
D/SettingsWifiEnabler( 1788): Received wifi state changed from Disabling to Disabled
...
==================================================================
" chown[ctrl_interface]: Operation not permitted " 라는 말이 있는것으로 보아 권한 설정이 잘못 된듯 한데
어디서 잘못 된건지 이해를 못하고 있습니다.
이부분에 관련하여 경험이 있거나 알고 계시다면 다소나마 정보를 나누어 주셨으면 합니다.
읽어 주셔서 감사합니다.
안녕하세요 답이될지는 모르겠지만
우선
service wpa_supplicant /system/bin/logwrapper /system/bin/wpa_supplicant -Dwext
에 인터페이스명과 컨피그팡리 지정이 빠져있는것 같네요
service wpa_supplicant /system/bin/logwrapper /system/bin/wpa_supplicant -Dwext -ieth0 -c /data/misc/wifi/wpa_supplicant.conf -dd
이런식으로 지정해주시고 다시 한번 시도해보세요^^