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.
已解决! 转到解答。
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,
Thanks for reply,
I am running wpa_supplicant in init.freescale.rc and at boot time I am getting below error :
D/NetworkManagementService( 2501): enabling bandwidth control
I/wpa_supplicant( 2591): Successfully initialized wpa_supplicant
I/wpa_supplicant( 2591): rfkill: Cannot open RFKILL control device
E/wpa_supplicant( 2591): nl80211: Could not configure driver to use managed mode
E/wpa_supplicant( 2591): Could not read interface p2p0 flags: No such device
E/wpa_supplicant( 2591): p2p0: Failed to initialize driver interface
E/WifiStateMachine( 2501): Failed to start supplicant!
D/WifiStateMachine( 2501): handleMessage: X
D/WifiStateMachine( 2501): handleMessage: E msg.what=131144
D/WifiStateMachine( 2501): processMsg: InitialState
D/WifiStateMachine( 2501): processMsg: DefaultState
D/WifiStateMachine( 2501): handleMessage: X
D/WifiStateMachine( 2501): handleMessage: E msg.what=131085
D/WifiStateMachine( 2501): processMsg: InitialState
D/WifiStateMachine( 2501): processMsg: DefaultState
D/WifiStateMachine( 2501): handleMessage: X
D/WifiStateMachine( 2501): handleMessage: E msg.what=131149
D/WifiStateMachine( 2501): processMsg: InitialState
D/WifiStateMachine( 2501): processMsg: DefaultState
D/WifiStateMachine( 2501): setSuspendOptimizations: 2 true
D/WifiStateMachine( 2501): mSuspendOptNeedsDisabled 0
D/WifiStateMachine( 2501): handleMessage: X
Note : When I run ps | grep wpa : result is nothing and wpa_supplicant is not running.
But it works fine for me from command line
Thanks And Regards,
Ranganath TM
Are the service name and the name in the interface file same?
vim hardware/realtek/wlan/libhardware_legacy/wifi/wifi_realtek.c
static const char SUPPLICANT_NAME[] = "rtw_suppl"; /* without p2p concurrent */
and
in init.rc or init.xxxxx.rc script
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
You could add ALOGE to wifi_start_supplicant function, to get more debug data.
p2p is another service and interface.
Are the modules loaded ok, after booting?
Is the insert mod in the right place (you have on early-init, on boot, on fs), so maybe to make it as part of kernel, not modules, for start, to eliminate that.
BR,
Zoran
Hi Zoran,
Thanks for reply,
1) Yes services names are same inside init.freescale.rc and wifi_realtek.c, kindly find below :
static const char P2P_SUPPLICANT_NAME_REALTEK[] = "rtw_suppl_con"; /* p2p concurrent */
service rtw_suppl_con /system/bin/rtl_wpa_supplicant \
-iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf
class late_start
socket wpa_wlan0 dgram 660 wifi wifi
disabled
oneshot
2) I added logs inside function wifi_start_supplicant function and it pass below condition which give confidence supplicant is running,
if (pi != NULL) {
__system_property_read(pi, NULL, supp_status);
if (strcmp(supp_status, "running") == 0) {
ALOGE("TMR supplicant running success");
return 0;
}
3) Yes the modules are loading after boot in init.rc. Below is the result of lsmod,
rtl8192cu 91079 0 - Live 0x00000000
rtl8192c_common 54246 1 rtl8192cu, Live 0x00000000
rtlwifi 88904 1 rtl8192cu, Live 0x00000000
mac80211 164669 3 rtl8192cu,rtl8192c_common,rtlwifi, Live 0x00000000
cfg80211 149736 2 rtlwifi,mac80211, Live 0x00000000
4)But it fails in wifi_connect_on_socket_path function inside condition
ctrl_conn[index] = wpa_ctrl_open(path1);
if (ctrl_conn[index] == NULL) {
ALOGE("TMR wifi_connect_on_socket_path inside if");
ALOGE("Unable to open connection to supplicant on \"%s\": %s",
path, strerror(errno));
return -1;
}
By throwing error E/WifiHW ( 2514): Unable to open connection to supplicant on "/data/system/wpa_supplicant/wlan0": Connection refused.
please help me to resolve issue.
Thanks In Advance,
Ranganath TM
This is P2P supplicant.
static const char P2P_SUPPLICANT_NAME_REALTEK[] = "rtw_suppl_con"; /* p2p concurrent */
or
static const char SUPPLICANT_NAME[] = "rtw_suppl"; /* without p2p concurrent */
Do you have rtw_suppl running on system?
I only have primary interface, not p2p (we dont need it)
root@shd_6sl:/ # ps | grep supp
wifi 2915 1 3108 1856 c00fdb8c 40191448 S /system/bin/wpa_supplicant
root@shd_6sl:/ # getprop |grep suppl
[init.svc.rtw_suppl]: [running]
Do you have this file in android fs:
/data/system/wpa_supplicant/wlan0 ?
I dont think this is correct path.
What is your wpa conf file, after you start wifi?
Mine is:
root@shd_6sl:/ # cat /data/misc/wifi/wpa_supplicant.conf
update_config=1
ctrl_interface=wlan0
eapol_version=1
ap_scan=1
fast_reauth=1
/* PRIMARY refers to the connection on the primary interface
* SECONDARY refers to an optional connection on a p2p interface */
Did you made modification so that jni (android_net_wifi_Wifi.cpp) can interface this driver?
vim frameworks/base/core/jni/android_net_wifi_Wifi.cpp
static jboolean android_net_wifi_killSupplicant(JNIEnv* env, jobject, jboolean p2pSupported)
{
return (jboolean)(::wifi_stop_supplicant(p2pSupported) == 0);
}
In 4.3 wifi_stop_supplicant function has argument:
int wifi_stop_supplicant(int p2p_supported);
also we have to add this (and some debug log):
vim hardware/realtek/wlan/libhardware_legacy/wifi/wifi_realtek.c
int wifi_stop_supplicant(int p2p_supported) {
.......
if (p2p_supported) {
property_get("wifi.supplicant", supplicant_name, P2P_SUPPLICANT_NAME);
snprintf(supplicant_prop_name, PROPERTY_KEY_MAX, P2P_PROP_NAME, supplicant_name);
ALOGE("p2p_supported wifi.supplicant=%s\n",supplicant_name);
} else {
property_get("wifi.supplicant", supplicant_name, SUPPLICANT_NAME);
snprintf(supplicant_prop_name, PROPERTY_KEY_MAX, SUPP_PROP_NAME, supplicant_name);
ALOGE("wifi.supplicant=%s\n",supplicant_name);
}
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.
BR,
Zoran
Hi Zoran,
sorry for late reply,
when I run below command I am getting Permission denied issue where to change permission,
root@sabresd_6dq:/data/system # wpa_supplicant -Dnl80211 -iwlan0 -c/data/misc/wifi/wpa_supplicant.conf -dd -B
rtl8192cu: MAC auto ON okay!
rtl8192cu: Tx queue select: 0x05
rtl8192c: Loading firmware file rtlwifi/rtl8192cufw.bin
ADDRCONF(NETDEV_UP): wlan0: link is not ready
mkdir[ctrl_interface]: Permission denied
I tried my mounting /system and /data partition as rw in fstab.freescale
Thanks And Regards,
Ranganath TM
Hi Ranganath,
In init.rc file, you have to setup correct permission, group and owner:
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
Check this two folders and files in them:
/system/etc/wifi
and
/data/misc/wifi
BR,
Zoran
Hi Zoran,
I am able to solve permission issue now wpa_supplicant is running in command line, but I fails when I try from settings app below are logs:
root@sabresd_6dq:/data/system/wpa_supplicant # logcat
--------- beginning of /dev/log/system
D/WifiService( 2515): setWifiEnabled: true pid=2835, uid=1000
--------- beginning of /dev/log/main
D/WifiStateMachine( 2515): handleMessage: E msg.what=131083
D/WifiStateMachine( 2515): processMsg: InitialState
E/WifiHW ( 2515): the ret value form is_wifi_driver_loaded = 1
E/WifiHW ( 2515): the check condition inside wifi.c wifi_load_driver
E/WifiStateMachine( 2515): trying to start supplicant
D/SoftapController( 2184): Softap fwReload - Ok
D/CommandListener( 2184): Setting iface cfg
D/CommandListener( 2184): Trying to bring down wlan0
E/WifiHW ( 2515): inside wifi_stop_supplicant = init.svc.wpa_supplicant
D/dalvikvm( 2515): GC_CONCURRENT freed 315K, 44% free 5272K/9408K, paused 3ms+3ms, total 42ms
E/WifiHW ( 2515): wifi_start_supplicant p2p=0
E/WifiHW ( 2515): Wi-Fi will ensure config file exist
D/WifiHW ( 2515): start supplicant cmd=wpa_supplicant
E/WifiHW ( 2515): TMR after start supplicant checking its status
E/WifiHW ( 2515): TMR supplicant name = init.svc.wpa_supplicant
I/wpa_supplicant( 3297): Successfully initialized wpa_supplicant
E/WifiHW ( 2515): TMR after start supplicant checking its status
E/WifiHW ( 2515): TMR supplicant name = init.svc.wpa_supplicant
E/WifiHW ( 2515): TMR: supplicant stopped
E/WifiStateMachine( 2515): Failed to start supplicant!
D/WifiStateMachine( 2515): handleMessage: X
D/WifiStateMachine( 2515): handleMessage: E msg.what=131144
D/WifiStateMachine( 2515): processMsg: InitialState
D/WifiStateMachine( 2515): processMsg: DefaultState
D/WifiStateMachine( 2515): handleMessage: X
D/WifiStateMachine( 2515): handleMessage: E msg.what=131085
D/WifiStateMachine( 2515): processMsg: InitialState
D/WifiStateMachine( 2515): processMsg: DefaultState
D/WifiStateMachine( 2515): handleMessage: X
D/WifiStateMachine( 2515): handleMessage: E msg.what=131149
D/WifiStateMachine( 2515): processMsg: InitialState
D/WifiStateMachine( 2515): processMsg: DefaultState
D/WifiStateMachine( 2515): setSuspendOptimizations: 2 true
D/WifiStateMachine( 2515): mSuspendOptNeedsDisabled 0
D/WifiStateMachine( 2515): handleMessage: X
Thanks And Regrads,
Ranganath TM
Did you restart device, always try to turn wifi on from Settings after reboot.
Could you cat wpa_supplicant.conf file in /system/etc/wifi/ and also in /data/misc/wifi, they seamed to be same size, but a little too big :-) ?
Here are mine:
root@shd_6sl:/ # cat /data/misc/wifi/wpa_supplicant.conf
update_config=1
ctrl_interface=wlan0
eapol_version=1
ap_scan=1
fast_reauth=1
same as in
root@shd_6sl:/ # cat /system/etc/wifi/wpa_supplicant.conf
BR,
Zoran
Hi Zoran,
I did following experiment first I turned on wpa_supplicant in command line and after the I typed svc_wifi_enable, by below experiment I am able to see wifi device list in settings app,
cat system/etc/permissions/platform.xml | grep -i wifi ---------> I am not able find any thing in my system
Below are my config files:
cat /data/misc/wifi/wpa_supplicant.conf
ctrl_interface=DIR=/data/system/wpa_supplicant GROUP=wifi
update_config=1
device_name=sabresd_6dq
manufacturer=Freescale
model_name=SABRESD-MX6DQ
model_number=SABRESD-MX6DQ
serial_number=
device_type=10-0050F204-5
config_methods=physical_display virtual_push_button
p2p_listen_reg_class=81
p2p_listen_channel=11
persistent_reconnect=1
network={
ssid="XT1068 2883"
key_mgmt=NONE
priority=5
}
network={
ssid="HemanthAP"
psk="medconnect"
key_mgmt=WPA-PSK
priority=6
disabled=1
}
cat /system/etc/wifi/wpa_supplicant.conf <
##### wpa_supplicant configuration file template #####
update_config=1
ctrl_interface=DIR=/data/system/wpa_supplicant GROUP=wifi
eapol_version=1
ap_scan=1
fast_reauth=1
config_methods=virtual_push_button physical_display keypad
p2p_listen_channel=11
p2p_listen_reg_class=81
persistent_reconnect=1
root@sabresd_6dq:/ #
Thanks And Regrads,
Ranganath TM
Hi Zoran,
If I start wpa_supplicant and run svc wifi enable form command line its working, but it's not working form setting app.
And I am not able to find any thing in command line by typing below command,
cat system/etc/permissions/platform.xml | grep -i wifi
Thanks And Regards,
Ranganath TM
So, there is a problem with jni or some permissions.
What is in the logcat?
Do you have this:
cat system/etc/permissions/required_hardware.xml | grep wifi
<feature name="android.hardware.wifi" />
there should be also android.hardware,wifi.direct or something like that. You could try it for now, without wifi.direct.
Edit file
vim ./frameworks/base/data/etc/platform.xml
or directly in android /system/etc/permissions/platform.xml and add those lines
BR,
Zoran
Hi Zoran,
I have android.hardware.wifi.xml which as the <feature name="android.hardware.wifi" /> and I tried by removing android.hardware.wifi.direct.xml, but the result is same the wpa_supplicant is not running. Below are errors:
E/WifiHW ( 2511): the ret value form is_wifi_driver_loaded = 1
E/WifiStateMachine( 2511): trying to start supplicant
D/SoftapController( 2195): Softap fwReload - Ok
D/CommandListener( 2195): Setting iface cfg
D/CommandListener( 2195): Trying to bring down wlan0
E/WifiHW ( 2511): wifi_start_supplicant p2p=0
E/WifiHW ( 2511): Wi-Fi will ensure config file exist
D/WifiHW ( 2511): start supplicant cmd=wpa_supplicant
E/WifiHW ( 2511): TMR:supplicant running success, sup_name=wpa_supplicant
D/WifiStateMachine( 2511): setWifiState: enabling
D/WifiStateMachine( 2511): Supplicant start successful
E/WifiHW ( 2511): TMR:wifi_connect_to_supplicant wlan0
E/WifiHW ( 2511): Unable to open connection to supplicant on "/data/system/wpa_supplicant/wlan0": No such file or directory
Thanks And Regards,
Ranganath TM
This means that android is working correctly:-).
As I said, couple messages before, wlan0 isnt in
/data/system/wpa_supplicant
I am not sure that there is even that directory.
In your wpa_supplicant.conf file, you set path to interface directory, but that path doesnt exist, and of course wlan0 file isnt there.
Please try with wpa_supplicant.conf that I've sent you before.
BR,
Zoran
Hi Zoran,
When I execute by copying content of wpa_supplicant.conf as specified by you, I am not able to lunch wpa_supplicant below are errors,
rtl8192cu: MAC auto ON okay!
rtl8192cu: Tx queue select: 0x05
rtl8192c: Loading firmware file rtlwifi/rtl8192cufw.bin
ADDRCONF(NETDEV_UP): wlan0: link is not ready
mkdir[ctrl_interface]: Read-only file system
But if lunch wpa_supplicant in command, after that if I turn on my wiifi from settings app its working for me.
Zoran Kindly let me know where all the wpa-supplicant will stopped in HAL layer and who will the status of update init.svc.wpa_supplicant.
Thanks And Regards,
Ranganath TM
This is the problem:
mkdir[ctrl_interface]: Read-only file system
Could you pack this files/folders and send them to me. I will send you my email address in pm.
out/target/product/{yourdevice}/system/etc/wifi/wpa_supplicant.conf
out/target/product/{yourdevice}/root//init.rc
out/target/product/{yourdevice}/root/init.{yourdevice}.rc
out/target/product/{yourboard}/system/etc/permissions
hardware/realtek
hardware/libhardware_legacy
external/wpa_supplicant_8
kernel_imx/arch/arm/configs/imx6s_{yourdevice}_android_defconfig
device/fsl/{yourdevice}/BoardConfig.mk
frameworks/base/wifi/java/android/net/wifi
Please list all relevant folders/files to recheck permissions!
It is irrelevant, it just reports if process is running. Its a way to get info between layers in android.
BR,
Zoran
Hi Zoran,
Thanks For reply,
Now I am able scan all wifi node from setting app and wpa_supplicant is starting successfully, but it fails to connect.
Below are the logs,
E/WifiConfigStore( 2511): Error parsing configurationjava.io.FileNotFoundException: /data/misc/wifi/ipconfig.txt: open failed: ENOENT (No such
file or directory
D/WifiStateMachine( 2501): handleMessage: E msg.what=131131
D/WifiStateMachine( 2501): processMsg: DisconnectedState
D/WifiStateMachine( 2501): processMsg: ConnectModeState
D/WifiStateMachine( 2501): handleMessage: X
D/WifiStateMachine( 2501): handleMessage: E msg.what=151553
D/WifiStateMachine( 2501): processMsg: DisconnectedState
D/WifiStateMachine( 2501): processMsg: ConnectModeState
W/audio_hw_primary( 2178): card 0, port 0 device 0x400
W/audio_hw_primary( 2178): rate 44100, channel 2 period_size 0x300
I/wpa_supplicant( 3054): wlan0: SME: Trying to authenticate with 80:6c:1b:de:9b:67 (SSID='XT1068 2883' freq=2437 MHz)
D/WifiStateMachine( 2501): transitionTo: destState=DisconnectingState
D/WifiStateMachine( 2501): handleMessage: new destination call exit/enter
D/WifiStateMachine( 2501): setupTempStateStackWithStatesToEnter: X mTempStateStackCount=1,curStateInfo: state=ConnectModeState,active=true,pare
nt=DriverStartedState
D/WifiStateMachine( 2501): invokeExitMethods: DisconnectedState
D/WifiStateMachine( 2501): moveTempStackToStateStack: i=0,j=4
D/WifiStateMachine( 2501): moveTempStackToStateStack: X mStateStackTop=4,startingIndex=4,Top=DisconnectingState
D/WifiStateMachine( 2501): invokeEnterMethods: DisconnectingState
D/WifiStateMachine( 2501): handleMessage: X
D/WifiStateMachine( 2501): handleMessage: E msg.what=147462
D/WifiStateMachine( 2501): processMsg: DisconnectingState
D/WifiStateMachine( 2501): deferMessage: msg=147462
D/WifiStateMachine( 2501): Stopping DHCP and clearing IP
D/CommandListener( 2173): Clearing all IP addresses on wlan0
D/WifiStateMachine( 2501): setDetailed state, old =IDLE and new state=DISCONNECTED
D/WifiStateMachine( 2501): transitionTo: destState=DisconnectedState
D/WifiStateMachine( 2501): handleMessage: new destination call exit/enter
D/WifiStateMachine( 2501): setupTempStateStackWithStatesToEnter: X mTempStateStackCount=1,curStateInfo: state=ConnectModeState,active=true,pare
nt=DriverStartedState
D/WifiStateMachine( 2501): invokeExitMethods: DisconnectingState
D/WifiStateMachine( 2501): moveTempStackToStateStack: i=0,j=4
D/WifiStateMachine( 2501): moveTempStackToStateStack: X mStateStackTop=4,startingIndex=4,Top=DisconnectedState
D/WifiStateMachine( 2501): invokeEnterMethods: DisconnectedState
D/WifiStateMachine( 2501): moveDeferredMessageAtFrontOfQueue; what=147462
D/WifiStateMachine( 2501): handleMessage: X
D/WifiStateMachine( 2501): handleMessage: E msg.what=147462
D/WifiStateMachine( 2501): processMsg: DisconnectedState
D/WifiStateMachine( 2501): setDetailed state, old =DISCONNECTED and new state=SCANNING
D/WifiStateMachine( 2501): processMsg: ConnectModeState
D/WifiStateMachine( 2501): handleMessage: X
D/WifiStateMachine( 2501): handleMessage: E msg.what=131131
D/WifiStateMachine( 2501): processMsg: DisconnectedState
D/WifiStateMachine( 2501): processMsg: ConnectModeState
D/WifiStateMachine( 2501): handleMessage: X
D/WifiStateMachine( 2501): handleMessage: E msg.what=147462
D/WifiStateMachine( 2501): processMsg: DisconnectedState
D/WifiStateMachine( 2501): setDetailed state, old =SCANNING and new state=CONNECTING
D/WifiStateMachine( 2501): processMsg: ConnectModeState
D/WifiStateMachine( 2501): handleMessage: X
D/ConnectivityService( 2501): ConnectivityChange for WIFI: DISCONNECTED/DISCONNECTED
D/ConnectivityService( 2501): Attempting to switch to mobile
D/ConnectivityService( 2501): Attempting to switch to BLUETOOTH_TETHER
D/ConnectivityService( 2501): Attempting to switch to ETHERNET
D/Nat464Xlat( 2501): requiresClat: netType=1, hasIPv4Address=false
D/WifiStateMachine( 2501): handleMessage: E msg.what=131131
D/WifiStateMachine( 2501): processMsg: DisconnectedState
D/WifiStateMachine( 2501): processMsg: ConnectModeState
D/WifiStateMachine( 2501): handleMessage: X
D/WifiStateMachine( 2501): handleMessage: E msg.what=147461
D/WifiStateMachine( 2501): processMsg: DisconnectedState
D/WifiStateMachine( 2501): processMsg: ConnectModeState
D/WifiStateMachine( 2501): processMsg: DriverStartedState
D/WifiStateMachine( 2501): processMsg: SupplicantStartedState
D/WifiStateMachine( 2501): handleMessage: X
D/WifiStateMachine( 2501): handleMessage: E msg.what=131131
D/WifiStateMachine( 2501): processMsg: DisconnectedState
D/WifiStateMachine( 2501): processMsg: ConnectModeState
D/WifiStateMachine( 2501):wlan0: authenticate with 80:6c:1b:de:9b:67 (try 1)
handleMessage: X
wlan0: authenticated
wlan0: associate with 80:6c:1b:de:9b:67 (try 1)
I/wpa_supplicant( 3054): wlan0: Trying to associate with 80:6c:1b:de:9b:67 (SSID='XT1068 2883' freq=2437 MHz)
D/WifiStateMachine( 2501): handleMessage: E msg.what=147462
D/WifiStateMachine( 2501): processMsg: DisconnectedStwlan0: RX AssocResp from 80:6c:1b:de:9b:67 (capab=0x8421 status=0 aid=3)
ate
D/WifiStateMachine( 2501): swlan0: associated
etDetailed state, old =CONNECTING and new state=CONNECTING
D/WifiStateMachine( 2501): processMsg: ConnectModeState
D/WifiStateMachine( 2501): handleMessage: X
D/dalvikvm( 2754): GC_CONCURRENT freed 329K, 10% free 3663K/4044K, paused 3ms+5ms, total 26ms
ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
I/wpa_supplicant( 3054): wlan0: Associated with 80:6c:1b:de:9b:67
I/wpa_supplicant( 3054): wlan0: CTRL-EVENT-CONNECTED - Connection to 80:6c:1b:de:9b:67 completed (auth) [id=0 id_str=]
D/WifiStateMachine( 2501): handleMessage: E msg.what=147462
D/WifiStateMachine( 2501): processMsg: DisconnectedState
D/WifiStateMachine( 2501): setDetailed state, old =CONNECTING and new state=CONNECTING
D/WifiStateMachine( 2501): processMsg: ConnectModeState
D/WifiStateMachine( 2501): handleMessage: X
D/WifiStateMachine( 2501): handleMessage: E msg.what=147459
D/WifiStateMachine( 2501): processMsg: DisconnectedSwlan0: deauthenticating from 80:6c:1b:de:9b:67 by local choice (reason=3)
tate
D/WifiStateMachine( 2501): processMsg: ConnectModeState
D/WifiStateMachine( 2501): Network connection established
D/WifiStateMachine( 2501): setDetailed state, old =CONNECTING and new state=OBTAINING_IPADDR
D/WifiStateMachine( 2501): transitionTo: destState=ObtainingIpState
D/WifiStateMachine( 2501): handleMessage: new destination call exit/enter
D/WifiStateMachine( 2501): setupTempStateStackWithStatesToEnter: X mTempStateStackCount=2,curStateInfo: state=ConnectModeState,active=true,pare
nt=DriverStartedState
D/WifiStateMachine( 2501): invokeExitMethods: DisconnectedState
D/WifiStateMachine( 2501): moveTempStackToStateStack: i=1,j=4
D/WifiStateMachine( 2501): moveTempStackToStateStack: i=0,j=5
D/WifiStateMachine( 2501): moveTempStackToStateStack: X mStateStackTop=5,startingIndex=4,Top=ObtainingIpState
D/WifiStateMachine( 2501): invokeEnterMethods: L2ConnectedState
D/WifiStateMachine( 2501): invokeEnterMethods: ObtainingIpState
D/Tethering( 2501): sendTetherStateChangedBroadcast 1, 0, 0
D/WifiStateMachine( 2501): handleMessage: X
D/WifiStateMachine( 2501): handleMessage: E msg.what=147462
D/WifiStateMachine( 2501): processMsg: ObtainingIpState
D/Wcfg80211: Calling CRDA for country: US
ifiStateMachine( 2501): ObtainingIpState{ what=147462 when=-8ms obj=android.net.wifi.StateChangeResult@42090f98 }
D/WifiStateMachine( 2501): processMsg: L2ConnectedState
D/WifiStateMachine( 2501): processMsg: ConnectModeState
D/WifiStateMachine( 2501): handleMessage: X
D/WifiStateMachine( 2501): handleMessage: E msg.what=131155
D/WifiStateMachine( 2501): processMsg: ObtainingIpState
D/WifiStateMachine( 2501): ObtainingIpState{ what=131155 when=-6ms arg1=1 }
D/WifiStateMachine( 2501): processMsg: L2ConnectedState
D/WifiStateMachine( 2501): handleMessage: X
D/WifiStateMachine( 2501): handleMessage: E msg.what=131101
D/WifiStateMachine( 2501): processMsg: ObtainingIpState
D/WifiStateMachine( 2501): ObtainingIpState{ what=131101 when=-7ms obj=android.net.wifi.WifiStateMachine$TetherStateChange@42096700 }
D/WifiStateMachine( 2501): processMsg: L2ConnectedState
D/WifiStateMachine( 2501): processMsg: ConnectModeState
D/WifiStateMachine( 2501): processMsg: DriverStartedState
D/WifiStateMachine( 2501): processMsg: SupplicantStartedState
D/WifiStateMachine( 2501): processMsg: DefaultState
D/WifiStateMachine( 2501): handleMessage: X
D/WifiStateMachine( 2501): handleMessage: E msg.what=196612
D/WifiStateMachine( 2501): processMsg: ObtainingIpState
D/WifiStateMachine( 2501): ObtainingIpState{ what=196612 when=-7ms }
D/WifiStateMachine( 2501): processMsg: L2ConnectedState
E/wpa_supplicant( 3054): wpa_driver_nl80211_driver_cmd: failed to issue private commands
I/wpa_supplicant( 3054): wlan0: CTRL-EVENT-DRIVER-STATE HANGED
D/WifiStateMachine( 2501): setSuspendOptimizationsNative: 1 false
D/WifiStateMachine( 2501): handleMessage: X
D/WifiStateMachine( 2501): handleMessage: E msg.what=131131
D/WifiStateMachine( 2501): processMsg: ObtainingIpState
D/WifiStateMachine( 2501): ObtainingIpState{ what=131131 when=-5ms }
D/WifiStateMachine( 2501): processMsg: L2ConnectedState
D/WifiStateMachine( 2501): processMsg: ConnectModeState
D/WifiStateMachine( 2501): handleMessage: X
D/WifiStateMachine( 2501): handleMessage: E msg.what=147468
D/WifiStateMachine( 2501): processMsg: ObtainingIpState
D/WifiStateMachine( 2501): ObtainingIpState{ what=147468 when=-4ms }
D/WifiStateMachine( 2501): processMsg: L2ConnectedState
D/WifiStateMachine( 2501): processMsg: ConnectModeState
D/WifiStateMachine( 2501): processMsg: DriverStartedState
D/WifiStateMachine( 2501): processMsg: SupplicantStartedState
D/WifiStateMachine( 2501): processMsg: DefaultState
D/WifiStateMachine( 2501): handleMessage: X
D/WifiStateMachine( 2501): handleMessage: E msg.what=131084
D/WifiStateMachine( 2501): processMsg: ObtainingIpState
D/WifiStateMachine( 2501): ObtainingIpState{ what=131084 when=0 }
D/WifiStateMachine( 2501): processMsg: L2ConnectedState
D/WifiStateMachine( 2501): processMsg: ConnectModeState
D/WifiStateMachine( 2501): processMsg: DriverStartedState
D/WifiStateMachine( 2501): processMsg: SupplicantStartedState
D/WifiStateMachine( 2501): transitionTo: destState=SupplicantStoppingState
D/WifiStateMachine( 2501): handleMessage: new destination call exit/enter
D/WifiStateMachine( 2501): setupTempStateStackWithStatesToEnter: X mTempStateStackCount=1,curStateInfo: state=DefaultState,active=true,parent=n
ull
D/WifiStateMachine( 2501): invokeExitMethods: ObtainingIpState
D/WifiStateMachine( 2501): invokeExitMethods: L2ConnectedState
D/WifiStateMachine( 2501): invokeExitMethods: ConnectModeState
D/WifiStateMachine( 2501): invokeExitMethods: DriverStartedState
D/WifiStateMachine( 2501): invokeExitMethods: SupplicantStartedState
D/WifiStateMachine( 2501): moveTempStackToStateStack: i=0,j=1
D/WifiStateMachine( 2501): moveTempStackToStateStack: X mStateStackTop=1,startingIndex=1,Top=SupplicantStoppingState
D/WifiStateMachine( 2501): invokeEnterMethods: SupplicantStoppingState
D/WifiStateMachine( 2501): Stopping DHCP and clearing IP
D/WifiStateMachine( 2501): setSuspendOptimizationsNative: 1 true
E/wpa_supplicant( 3054): wpa_driver_nl80211_driver_cmd: failed to issue private commands
D/CommandListener( 2173): Clearing all IP addresses on wlan0
D/WifiStateMachine( 2501): setDetailed state, old =OBTAINING_IPADDR and new state=DISCONNECTED
D/WifiStateMachine( 2501): stopping supplicant
D/WifiStateMachine( 2501): setWifiState: disabling
D/WifiStateMachine( 2501): handleMessage: X
D/WifiStateMachine( 2501): handleMessage: E msg.what=131083
D/WifiStateMachine( 2501): processMsg: SupplicantStoppingState
D/WifiStateMachine( 2501): deferMessage: msg=131083
D/WifiStateMachine( 2501): handleMessage: X
D/ConnectivityService( 2501): ConnectivityChange for WIFI: DISCONNECTED/DISCONNECTED
D/ConnectivityService( 2501): Attempting to switch to mobile
D/ConnectivityService( 2501): Attempting to switch to BLUETOOTH_TETHER
D/ConnectivityService( 2501): Attempting to switch to ETHERNET
D/Nat464Xlat( 2501): requiresClat: netType=1, hasIPv4Address=false
D/WifiStateMachine( 2501): handleMessage: E msg.what=131143
D/WifiStateMachine( 2501): processMsg: SupplicantStoppingState
D/WifiStateMachine( 2501): processMsg: DefaultState
D/WifiStateMachine( 2501): handleMessage: X
D/BluetoothAdapter( 2754): 1105219112: getState() : mService = null. Returning STATE_OFF
I/wpa_supplicant( 3054): wlan0: CTRL-EVENT-DISCONNECTED bssid=80:6c:1b:de:9b:67 reason=3 locally_generated=1
D/WifiStateMachine( 2501): handleMessage: E msg.what=147460
D/WifiStateMachine( 2501): processMsg: SupplicantStoppingState
D/WifiStateMachine( 2501): processMsg: DefaultState
D/WifiStateMachine( 2501): handleMessage: X
D/WifiStateMachine( 2501): handleMessage: E msg.what=147462
D/WifiStateMachine( 2501): processMsg: SupplicantStoppingState
D/WifiStateMachine( 2501): processMsg: DefaultState
D/WifiStateMachine( 2501): handleMessage: X
D/Tethering( 2501): InitialState.processMessage what=4
D/Tethering( 2501): sendTetherStateChangedBroadcast 0, 0, 0
D/WifiStateMachine( 2501): handleMessage: E msg.what=131101
D/WifiStateMachine( 2501): processMsg: SupplicantStoppingState
D/WifiStateMachine( 2501): processMsg: DefaultState
D/WifiStateMachine( 2501): handleMessage: X
I/wpa_supplicant( 3054): wlan0: CTRL-EVENT-TERMINATING
D/WifiStateMachine( 2501): handleMessage: E msg.what=147458
D/WifiStateMachine( 2501): processMsg: SupplicantStoppingState
D/WifiStateMachine( 2501): Supplicant connection lost
D/WifiStateMachine( 2501): setWifiState: disabled
D/WifiStateMachine( 2501): transitionTo: destState=InitialState
D/WifiStateMachine( 2501): handleMessage: new destination call exit/enter
D/WifiStateMachine( 2501): setupTempStateStackWithStatesToEnter: X mTempStateStackCount=1,curStateInfo: state=DefaultState,active=true,parent=n
ull
Thanks And Regards,
Ranganath TM