We are having problem with board that is based on imx6sl evk and rtl8192cu (chip on wifi module is RTL8188CTV). The wifi module is on USB interface.
We integrated rtl8192cu driver from another package, we used manual supplied by realtek to integrate there driver into android (from zip file RTL8188C_8192C_USB_linux_v4.0.2_9000.20130911.zip pdf file \android_ref_codes_JB_4.2\Realtek_Wi-Fi_SDK_for_Android_JB_4_2.pdf).
The driver is build as part of the kernel, not module. We used there's wpa_supplicant, that came with realteks package (wpa_supplicant_8_jb_4.2_rtw_r8680.20130821.tar.gz).
Package is from this site: http://www.realtek.com/downloads/downloadsView.aspx?Langid=2&PFid=48&Level=5&Conn=4&ProdID=277&DownT...
RTL8192CU for Linux/Android
Firmware is from this link: rtl819x - Linux Wireless
Using serial interface terminal, we tested the wlan0 interface, we can bring it up, and get ip number:
root@evk_6sl:/ # cat /sys/kernel/debug/usb/devices
T: Bus=02 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 2 Spd=480 MxCh= 0
D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1
P: Vendor=0bda ProdID=8176 Rev= 2.00
S: Manufacturer=Realtek
S: Product=802.11n WLAN Adapter
S: SerialNumber=00e04c000001
C:* #Ifs= 1 Cfg#= 1 Atr=a0 MxPwr=500mA
I:* If#= 0 Alt= 0 #EPs= 4 Cls=ff(vend.) Sub=ff Prot=ff Driver=rtl8192cu
E: Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=84(I) Atr=03(Int.) MxPS= 64 Ivl=125us
root@evk_6sl:/ # dhcpcd wlan0
dhcpcd[2859]: version 5.5.6 start+871x_drv - drv_open, bup=0
===> FirmwareDownload91C() fw:Rtl819XFwImageArray_UMC_B
FirmwareDownload92C accquire FW from embedded image
fw_ver=v80, fw_subver=0, sig=0x88c0
fw download ok!
Set RF Chip ID to RF_6052 and RF type to 1T1R.
IQK:Start!!!
Path A IQK Success!!
Path A IQK Success!!
IQK: final_candidate is 0
IQK: RegE94=103 RegE9C=f RegEA4=fb RegEAC=5 RegEB4=0 RegEBC=0 RegEC4=0 RegECC=0
Path A IQ Calibration Success !
pdmpriv->TxPowerTrackControl = 1
MAC Address from REG_MACID = 44:33:4c:8b:f2:10
rtl8192cu_hal_init in 610ms
MAC Address = 44:33:4c:8b:f2:10
-871x_drv - drv_open, bup=1
ADDRCONF(NETDEV_UP): wlan0: link is not ready
dhcpcd[2859]: wlan0: checking for 169.254.169.141
dhcpcd[2859]: wlan0: using IPv4LL address 169.254.169.141
dhcpcd[2859]: forked to background, child pid 2885
root@evk_6sl:/ # ifconfig wlan0
wlan0: ip 169.254.169.141 mask 255.255.0.0 flags [up broadcast running multicast]
root@evk_6sl:/ # netcfg
lo UP 127.0.0.1/8 0x00000049 00:00:00:00:00:00
eth0 UP 192.168.0.152/24 0x00001043 24:80:00:00:00:00
tunl0 DOWN 0.0.0.0/0 0x00000080 00:00:00:00:00:00
sit0 DOWN 0.0.0.0/0 0x00000080 00:00:00:00:00:00
ip6tnl0 DOWN 0.0.0.0/0 0x00000080 00:00:00:00:00:00
wlan0 UP 169.254.169.141/16 0x00001043 44:33:4c:8b:f2:10
We need to use dhcpcd wlan0 command, the suggested init.rs service doesn't work, but thats not the problem.
Our problem is that binding from android ui and kernel isnt working.
When we tried to turn on wifi, from Settings>Wifi in Android UI, the slider button can move and change to On state, but the message on display "To see available networks, turn WiFi on" is still there.
in logcat we get:
D/WifiService( 2363): setWifiEnabled: true pid=2363, uid=1000
After that we can't move slider back.
When we exit that menu and return, the slider is back in Off state.
Using wifi from shell, we can get all the other wifi networks:
root@evk_6sl:/data # ./xbin/iwlist wlan0 scanning
survey done event(18)
wlan0 Scan completed :
Cell 01 - Address: BC:AE:C5:C4:3B:F7
ESSID:"Automatic"
Protocol:IEEE 802.11bg
Mode:Master
Frequency:2.412 GHz (Channel 1)
Encryption key:on
Bit Rates:54 Mb/s
Quality=59/100 Signal level=-95 dBm
Cell 02 - Address: 68:7F:74:01:C6:BE
ESSID:""
Protocol:IEEE 802.11bg
Mode:Master
Frequency:2.432 GHz (Channel 5)
Encryption key:off
Bit Rates:54 Mb/s
Quality=100/100 Signal level=-55 dBm
Cell 03 - Address: 20:AA:4B:1B:A1:7C
ESSID:"TEST"
Protocol:IEEE 802.11bgn
Mode:Master
Frequency:2.437 GHz (Channel 6)
Encryption key:off
Bit Rates:144 Mb/s
IE: Unknown: DD750050F204104A0001101044000102103B0001031047001020AA4B1BA17A20AA4B1BA17A022AC107102100104C696E6B73797320627920436973636F102300085752543136304E4C1024000776312E302E303210420001351054000800060050F2040001101100085752543136304E4C100800020084
Quality=100/100 Signal level=-71 dBm
Cell 04 - Address: 00:1D:7E:BD:10:05
ESSID:"alt02"
Protocol:IEEE 802.11bg
Mode:Master
Frequency:2.457 GHz (Channel 10)
Encryption key:on
Bit Rates:54 Mb/s
Extra:wpa_ie=dd180050f20101000050f20201000050f20201000050f2020c00
IE: WPA Version 1
Group Cipher : TKIP
Pairwise Ciphers (1) : TKIP
Authentication Suites (1) : PSK
Quality=100/100 Signal level=-74 dBm
Cell 05 - Address: 00:18:F8:3B:F1:0A
ESSID:"alt1"
Protocol:IEEE 802.11bg
Mode:Master
Frequency:2.462 GHz (Channel 11)
Encryption key:on
Bit Rates:54 Mb/s
Quality=101/100 Signal level=-95 dBm
We also added permissions for wifi in android ..
Please, ask me if you need more details, I kept track of all the changed done in the android and kernel.
Logcat with DBG for classes in wifi is also available.
Does anyone have any idea about this problem? Could you help us, please? We wasted a lot of time on this.
Solved! Go to Solution.
Yes, we manage to get wifi working. Here are info's in more detail, so if anybody else has problem ...
We build driver as part of the kernel:
vim kernel_imx/arch/arm/configs/imx6s_{yourdevice}_android_defconfig
CONFIG_CFG80211=y
CONFIG_MAC80211_MESH=y
CONFIG_MAC80211=y
CONFIG_HOSTAP=y
CONFIG_RTL8192CU=y
CONFIG_RTLWIFI=y
CONFIG_RTL8192C_COMMON=y
#CONFIG_RTL8723AS=m
CONFIG_USB_USBNET=y
CONFIG_NET_RADIO=y
vim device/fsl/{yourdevice}/BoardConfig.mk
BOARD_WIFI_VENDOR := realtek
WPA_SUPPLICANT_VERSION := VER_0_8_X
CONFIG_DRIVER_NL80211 := true
BOARD_WPA_SUPPLICANT_DRIVER := NL80211
BOARD_WPA_SUPPLICANT_PRIVATE_LIB := lib_driver_cmd_rtl
BOARD_HOSTAPD_DRIVER := NL80211
BOARD_HOSTAPD_PRIVATE_LIB := lib_driver_cmd_rtl
BOARD_WLAN_DEVICE := rtl8192cu
WIFI_DRIVER_MODULE_NAME := "wlan0"
WIFI_DRIVER_MODULE_PATH := ""
WIFI_DRIVER_MODULE_ARG := ""
WIFI_FIRMWARE_LOADER := ""
WIFI_DRIVER_FW_PATH_STA := ""
WIFI_DRIVER_FW_PATH_AP := ""
WIFI_DRIVER_FW_PATH_P2P := ""
WIFI_DRIVER_FW_PATH_PARAM := ""
We disabled p2p, since we dont need it:
vim device/fsl/imx6/{yourboard}.mk
PRODUCT_COPY_FILES += \
#frameworks/native/data/etc/android.hardware.wifi.direct.xml:system/etc/permissions/android.hardware.wifi.direct.xml
or
rm out/target/product/{yourboard}/system/etc/permissions/android.hardware.wifi.direct.xml
or just remount system partition:
root@{yourboard}:/ # mount -o remount, rw /system;
and remove xml:
root@{yourboard}:/ # rm /system/etc/permissions/android.hardware.wifi.direct.xml
edit:
root@{yourboard}:/ # busybox vi system/etc/permissions/required_hardware.xml
or
vim device/fsl/{yourboard}/required_hardware.xml
or
vim out/target/product/{yourboard}/system/etc/permissions/required_hardware.xml
<!--
<feature name="android.hardware.wifi.direct" />
-->
If you use it as module, you will need to add it also in PRODUCT_COPY_FILES
You need to correct init scripts, leave just this lines:
(this is from: http://blog.linuxconsulting.ro/2010/04/porting-wifi-drivers-to-android.html )
You can do it directly to out folder:
vim out/target/product/{yourboard}/root/init.rc
or/and (rebuild the whole system):
vim device/fsl/imx6/imx6.mk
mkdir /system/etc/wifi 0770 wifi wifi
chmod 0770 /system/etc/wifi
chmod 0660 /system/etc/wifi/wpa_supplicant.conf
chown wifi wifi /system/etc/wifi/wpa_supplicant.conf
#wpa_supplicant control socket for android wifi.c (android private socket)
mkdir /data/misc/wifi 0770 wifi wifi
mkdir /data/misc/wifi/sockets 0770 wifi wifi
chmod 0770 /data/misc/wifi
chmod 0660 /data/misc/wifi/wpa_supplicant.conf
chown wifi wifi /data/misc/wifi
chown wifi wifi /data/misc/wifi/wpa_supplicant.conf
setprop wifi.interface wlan0
setprop wlan.driver.status "ok"
#setprop wifi.ap.interface wlan0
#and also remove this lines:
# mkdir /data/system/wpa_supplicant 0771 wifi wifi
# chmod 0771 /data/system/wpa_supplicant
# symlink /data/misc/wifi/wpa_supplicant /data/system/wpa_supplicant
you can read it in that blog link, about unix/android standard socket setup.
vim out/target/product/{yourboard}/root/init.freescale.rc
or/and
vim device/fsl/{yourboard}/init.rc
#this is the only supplicant service and dhcpcd service for wifi that we use:
service rtw_suppl /system/bin/wpa_supplicant -dd -iwlan0 -Dnl80211 \
-c/data/misc/wifi/wpa_supplicant.conf
socket wpa_wlan0 dgram 660 wifi wifi
class main
disabled
oneshot
service dhcpcd_wlan0 /system/bin/dhcpcd -aABKL
class main
disabled
oneshot
service iprenew_wlan0 /system/bin/dhcpcd -n
class main
disabled
oneshot
To keep it clean (it doesnt effect wifi):
vim device/fsl/imx6/imx6.mk
PRODUCT_PACKAGES += \
rtw_suppl \
We needed to make a little change in wifi_realtek.c since our jb is 4.3:
vim hardware/realtek/wlan/libhardware_legacy/wifi/wifi_realtek.c
int wifi_start_supplicant(int p2p_supported)
..
wifi_stop_supplicant(p2p_supported);
….
int wifi_stop_supplicant(int p2p_supported){
char supp_status[PROPERTY_VALUE_MAX] = {'\0'};
int count = 50; /* wait at most 5 seconds for completion */
if (p2p_supported) {
property_get("wifi.supplicant", supplicant_name, P2P_SUPPLICANT_NAME);
snprintf(supplicant_prop_name, PROPERTY_KEY_MAX, P2P_PROP_NAME, supplicant_name);
} else {
property_get("wifi.supplicant", supplicant_name, SUPPLICANT_NAME);
snprintf(supplicant_prop_name, PROPERTY_KEY_MAX, SUPP_PROP_NAME, supplicant_name);
}
Our problem was wrong supplicant name in prop setup. And, when wifi starts it first stops supplicant, and it wasn’t able to transfer that info through system. It was quite fun tracking this problem.
vim ./frameworks/base/wifi/java/android/net/wifi/WifiStateMachine.java
mWifiNative.killSupplicant(mP2pSupported);
if(mWifiNative.startSupplicant(mP2pSupported)) {
setWifiState(WIFI_STATE_ENABLING);
if (DBG) log("Supplicant start successful");
mWifiMonitor.startMonitoring();
transitionTo(mSupplicantStartingState);
} else {
loge("Failed to start supplicant!!");
}
Here are more info:
root@{yourdevice}:/ # cat /data/misc/wifi/wpa_supplicant.conf
ctrl_interface=wlan0
update_config=1
device_name={yourdevice}
manufacturer=Freescale
model_name={YOURDEVICE}
model_number={YOURDEVICE}
serial_number=
device_type=10-0050F204-5
config_methods=physical_display virtual_push_button
network={
ssid="XXXXX"
key_mgmt=NONE
priority=1
}
and it started with:
root@{yourdevice}:/ # cat system/etc/wifi/wpa_supplicant.conf
update_config=1
ctrl_interface=wlan0
eapol_version=1
ap_scan=1
fast_reauth=1
permissions:
root@{yourdevice}:/ # ls -l /data/misc/wifi
-rw-rw---- system wifi 21 2014-05-27 12:39 entropy.bin
drwxrwx--- wifi wifi 2014-05-27 12:39 sockets
-rw------- system system 33 2014-05-27 12:39 softap.conf
-rw-rw---- wifi wifi 272 2014-05-27 12:39 wpa_supplicant.conf
root@{yourboard}:/ # ls -l /data/misc/
drwxr-s--- system shell 2014-05-27 12:39 adb
drwxrwx--- bluetooth net_bt_stack 2014-05-27 12:39 bluedroid
drwxrwx--- system system 2014-05-27 12:39 bluetooth
drwxrwx--- dhcp dhcp 2014-05-27 12:39 dhcp
drwxrwx--x system system 2014-05-27 12:39 keychain
drwx------ keystore keystore 2014-05-27 12:39 keystore
drwx------ media media 2014-05-27 12:39 media
drwxrwx--- system radio 2014-05-27 12:39 radio
drwxrwx--- system radio 2014-05-27 12:39 sms
drwx------ system system 2014-05-27 12:39 systemkeys
drwxrwx--- system vpn 2014-05-27 12:39 vpn
drwxrwx--- wifi wifi 2014-05-27 12:39 wifi
drwxrwxr-x system system 2014-05-27 12:39 zoneinfo
root@{yourboard}:/ # ls -l /system/etc/wifi
-rw-rw---- wifi wifi 77 2014-05-27 12:39 wpa_supplicant.conf
root@{yourboard}:/ # ps | grep wpa
wifi 2555 1 3104 1876 c0103edc 401a4448 S /system/bin/wpa_supplicant
root@{yourboard}:/ # cat system/etc/permissions/platform.xml | grep -i wifi
<permission name="android.permission.ACCESS_WIFI_STATE" >
<group gid="wifi" />
<permission name="android.permission.CHANGE_WIFI_STATE" >
<group gid="wifi" />
<permission name="android.permission.WIFI" >
<group gid="wifi" />
root@{yourboard}:/ # cat system/etc/permissions/required_hardware.xml | grep wifi
<feature name="android.hardware.wifi" />
root@{yourboard}:/ # getprop | grep wifi
[net.tcp.buffersize.wifi]: [524288,1048576,2097152,262144,524288,1048576]
[ro.wifi.channels]: []
[wifi.interface]: [wlan0]
root@{yourboard}:/ # getprop | grep wlan
[dhcp.wlan0.dns1]: [192.168.1.1]
[dhcp.wlan0.dns2]: []
[dhcp.wlan0.dns3]: []
[dhcp.wlan0.dns4]: []
[dhcp.wlan0.domain]: []
[dhcp.wlan0.gateway]: [192.168.1.1]
[dhcp.wlan0.ipaddress]: [192.168.1.118]
[dhcp.wlan0.leasetime]: [86400]
[dhcp.wlan0.mask]: [255.255.255.0]
[dhcp.wlan0.pid]: [2689]
[dhcp.wlan0.reason]: [REBOOT]
[dhcp.wlan0.result]: [ok]
[dhcp.wlan0.server]: [192.168.1.1]
[dhcp.wlan0.vendorInfo]: []
[init.svc.dhcpcd_wlan0]: [running]
[wifi.interface]: [wlan0]
[wlan.driver.status]: [ok]
[wlan.interface]: [wlan0]
root@{yourboard}:/ # getprop | grep suppl
[init.svc.rtw_suppl]: [running]
root@{yourboard}:/ # cat /sys/kernel/debug/usb/devices
T: Bus=02 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 2 Spd=480 MxCh= 0
D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1
P: Vendor=0bda ProdID=8176 Rev= 2.00
S: Manufacturer=Realtek
S: Product=802.11n WLAN Adapter
S: SerialNumber=00e04c000001
C:* #Ifs= 1 Cfg#= 1 Atr=a0 MxPwr=500mA
I:* If#= 0 Alt= 0 #EPs= 4 Cls=ff(vend.) Sub=ff Prot=ff Driver=rtl8192cu
E: Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=84(I) Atr=03(Int.) MxPS= 64 Ivl=125us
root@{yourboard}:/ # cat /sys/bus/usb/devices/2-1/product
802.11n WLAN Adapter
Useful commands:
disable wifi:
root@{yourboard}:/ # svc wifi disable
enable wifi:
root@{yourboard}:/ # svc wifi enable
open wifi settings panel:
root@{yourboard}:/ # am start -a android.intent.action.MAIN -n com.android.settings/.wifi.WifiSettings
manually starting supplicant with debug:
root@{yourboard}:/ # wpa_supplicant -Dnl80211 -iwlan0 -c/data/misc/wifi/wpa_supplicant.conf -dd -B
root@{yourboard}:/ # netcfg wlan0 up/down/dhcp
root@{yourboard}:/ # wpa_cli
> status
bssid=20:aa:4b:1b:a1:7c
ssid=ECTEST
id=0
mode=station
pairwise_cipher=NONE
group_cipher=NONE
key_mgmt=NONE
wpa_state=COMPLETED
ip_address=192.168.1.118
p2p_device_address=44:34:4c:8b:f2:10
address=44:34:4c:8b:f2:10
<3>CTRL-EVENT-STATE-CHANGE id=0 state=9 BSSID=20:aa:4b:1b:a1:7c SSID=ECTEST
<3>CTRL-EVENT-CONNECTED - connection to 20:aa:4b:1b:a1:7c completed (reauth) [id=0 id_str=]
> scan
cfg80211_rtw_scan(wlan0)
OK
> no packet in tx packet buffer (0)
survey done event(14) band:0 for wlan0
<3>CTRL-EVENT-SCAN-RESULTS
> scan_results
bssid / frequency / signal level / flags / ssid
20:aa:1b:1b:a1:7c 2437 -74 [WPS][ESS] ECTEST
00:1d:3e:bd:10:05 2457 -85 [WPA-PSK-TKIP][ESS] net02
68:7f:74:03:c6:be 2432 -59 [ESS] \x00\x00\x00\x00
c8:23:73:3f:05:71 2462 -66 [ESS] Nick's router. Hands off.
root@{yourboard}:/ # ifconfig wlan0
wlan0: ip 192.168.1.118 mask 255.255.255.0 flags [up broadcast running multicast]
root@{yourboard}:/ # dhcpcd wlan0
dhcpcd[3373]: version 5.5.6 starting
dhcpcd[3373]: wlan0: rebinding lease of 192.168.1.118
dhcpcd[3373]: wlan0: acknowledged 192.168.1.118 from 192.168.1.1
dhcpcd[3373]: wlan0: leased 192.168.1.118 for 86400 seconds
dhcpcd[3373]: forked to background, child pid 3405
root@{yourboard}:/ # netcfg
lo UP 127.0.0.1/8 0x00000049 00:00:00:00:00:00
eth0 UP 192.168.0.152/24 0x00001043 24:80:00:00:00:00
tunl0 DOWN 0.0.0.0/0 0x00000080 00:00:00:00:00:00
sit0 DOWN 0.0.0.0/0 0x00000080 00:00:00:00:00:00
ip6tnl0 DOWN 0.0.0.0/0 0x00000080 00:00:00:00:00:00
wlan0 UP 192.168.1.118/24 0x00001043 44:34:4c:8b:f2:10
wlan1 DOWN 0.0.0.0/0 0x00001002 46:34:4c:8b:f2:10
Good luck with it and please let me know if you need more info.
problem/solution:
if you get this problem:
E/wpa_supplicant( 3159): Could not set interface wlan0 flags (UP): Unknown error 132
solution:
missing rfkill, error 132 means "operation not possible due to RFkill"
vim kernel_imx/arch/arm/mach-mx6/board-mx6sl_{yourboard}.c
static int mx6sl_shd_bt_power_change(int status){return 0;}
static struct platform_device mxc_bt_rfkill = {
.name = "mxc_bt_rfkill",
};
static struct imx_bt_rfkill_platform_data mxc_bt_rfkill_data = {
.power_change = mx6sl_shd_bt_power_change,
};
/* init function */
static void __init {yourboard}_init(void){
...
mxc_register_device(&mxc_bt_rfkill, &mxc_bt_rfkill_data);
}
problem:
E/WifiHW ( 2488): Unable to open connection to supplicant on "/data/system/wpa_supplicant/wlan0": No such file or directory
solution:
setup correctly in init.rc and init.freescale.rc scripts wifi and wpa_supplicant permissions and services.
Hi Zoran,
When I run the below command I am not getting anu dhcpd results:
root@sabresd_6dq:/ # getprop | grep wlan
[wifi.interface]: [wlan0]
[wlan.driver.status]: [ok]
Thanks And Regards,
Ranganath TM
Hello Ranganath,
dhcp is run as service ini init script. Make sure the setup is correct and permissions are ok.
root@shd_6sl:/ # getprop | grep wlan
[wifi.ap.interface]: [wlan0]
[wifi.interface]: [wlan0]
[wlan.driver.status]: [ok]
[wlan.interface]: [wlan0]
root@shd_6sl:/ # getprop | grep dhcp
[dhcp.eth0.dns1]: [xxx.xxx.1.1]
[dhcp.eth0.dns2]: []
[dhcp.eth0.dns3]: []
[dhcp.eth0.dns4]: []
[dhcp.eth0.domain]: [lan]
[dhcp.eth0.gateway]: [192.168.2.1]
[dhcp.eth0.ipaddress]: [192.168.2.113]
[dhcp.eth0.leasetime]: [86400]
[dhcp.eth0.mask]: [255.255.255.0]
[dhcp.eth0.pid]: [2644]
[dhcp.eth0.reason]: [RENEW]
[dhcp.eth0.result]: [ok]
[dhcp.eth0.server]: [192.168.2.1]
[dhcp.eth0.vendorInfo]: []
[init.svc.dhcpcd_eth0]: [running]
BR,
Zoran
Hi Zoran,
Thanks for your help,
Wifi is working now, but it only connect for non-secured network without password, it obtains IPaddress for secured network but it fails to connect(WPA/WPA2 PSK).
Thanks And Regards,
Ranganath TM
Hi Ranganath,
Please read more carefully what I write to you, we are going in circle.
"If you do not use modules for rtl wifi, remember to add return 0; in wifi_realtek.c functions:
insmod,rmmod,load_driver,wifi_load_driver,unload_driver,wifi_unload_driver."
and
"PaNiC Random Rant (or how we used to call it: .plan): Porting WiFi drivers to Android"
BR,
Zoran
Hi Zoran,
I executed the permissions give by you in command line, and below are the permissions of
ls -l /system/etc/wifi/
-rw-rw---- wifi wifi 132 2014-11-19 09:19 wpa_supplicant.conf
ls -l /data/misc/wifi/ <
drwxrwx--- wifi wifi 1970-01-01 00:00 sockets
-rw------- system system 33 1970-01-02 00:00 softap.conf
drwxrwx--- wifi wifi 1970-01-01 00:00 wpa_supplicant
-rw-rw---- wifi wifi 132 1970-01-02 00:01 wpa_supplicant.conf
Thanks And Regards,
Ranganath TM