Android-11: wpa_supplicant not able to connect with AP

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Android-11: wpa_supplicant not able to connect with AP

跳至解决方案
2,954 次查看
nandan-khant
Contributor II

Hello @ocourson,

 We are facing an issue with connecting DUT STA with AP using wpa_supplicant in Android.

Our DUT is STA and it is not able to connect with AP using the command line. We are able to connect with AP successfully when we use GUI.

Command: wpa_supplicant -i wlan0 -D nl80211 -c /data/vendor/wifi/wpa/wpa.conf -B

wpa_supplicant.conf file:

ctrl_interface=/data/vendor/wifi/wpa/sockets
network={
ssid="test_5GHz"
key_mgmt=NONE
}

The DUT is not able to connect with test_5GHz  AP.

When I perform scanning explicitly using the following command, it is able to connect successfully.

$ wpa_cli -i wlan0 scan

Attaching the console and logcat logs for your reference.

Please help to resolve this issue on Android.

Thanks and Regards,

Nandan Khant

标签 (2)
0 项奖励
回复
1 解答
2,895 次查看
weidong_sun
NXP TechSupport
NXP TechSupport

Hello @nandan-khant ,

 

Discussed questions on wpa_supplicant in android source with internal team.

wpa_supplicant in android source doesn't support  automatic scan after it starts.

if you really wants to use the function, you will have to tune wpa_supplicant source code in android.

weidong_sun_0-1669275894521.jpeg

 

file name should be wpa_supplicant.c

 

[In addition]

wpa_supplicant in linux supports the feature(automatic scan)

 

 

Regards,

weidong

在原帖中查看解决方案

0 项奖励
回复
6 回复数
2,907 次查看
weidong_sun
NXP TechSupport
NXP TechSupport

Hello @nandan-khant ,

 

>>It should work on Android as well with the same wpa_supplicant.conf file. Because It works on Linux.

could you check if the wpa_supplicant service has been started in android init.rc ?

if yes, when you run "wpa_supplicant -i wlan0 -D nl80211 -c /data/vendor/wifi/wpa/wpa.conf -B" on command line, 2 wpa_supplicant services are running.

>> wpa config in WFA lab(for your reference)

I have ever checked wpa_supplicant.conf file on host of WFA lab sigma tool,

disabled=1 

is in their wpa_supplicant.conf.

It means that sigmal tool doesn't allow wpa_supplicant to connect to AP automatically.

So I don't know if your local WFA required it.

 

>> Current situation on your side

If the device is in WFA lab and run in sigma tool system, if the DUT can start wpa_supplicant and after getting instructions from ucc,it can connect to AP.  I think we should care about this.

 

Hope above advice is helpful for you.

Regards,

weidong

 

0 项奖励
回复
2,900 次查看
nandan-khant
Contributor II

Hello @weidong_sun,

Let me try to explain the query again.

The query is not with respect to certification.

Please try the below steps at your end:

1. Use NXP processor as host

2. Flash Android-11 OS.

3. Connect W8897 Wifi chipset.

4. Load driver and firmware.

5. Disable the android framework. (NOTE: We have to disable the framework because we have to use the command line in this use case)

6. Kill all the supplicants.

7. Copy wpa_supplicant.conf file on the NXP processor.

8. Execute the below command to start the wpa_supplicant:

 /vendor/bin/hw/wpa_supplicant -i wlan0 -D nl80211 -c /data/vendor/wifi/wpa/wpa.conf -B

Check and Observe if the DUT STA is able to connect with AP configured in wpa_supplicant.conf.

AFTER STEP-8, THE DEVICE WILL NOT ABLE TO CONNECT WITH AP.

YOU HAVE TO RUN THE FOLLOWING COMMAND:

$ WPA_CLI -i wlan0 scan

After the above command, the DUT STA will connect successfully.

-> Try the above steps at your end.

-> Share your observations and Results.

In case of any doubt or query, please share your availability and we can have a DEBUG call and discuss this issue.

Regards,

Nandan Khant

0 项奖励
回复
2,896 次查看
weidong_sun
NXP TechSupport
NXP TechSupport

Hello @nandan-khant ,

 

Discussed questions on wpa_supplicant in android source with internal team.

wpa_supplicant in android source doesn't support  automatic scan after it starts.

if you really wants to use the function, you will have to tune wpa_supplicant source code in android.

weidong_sun_0-1669275894521.jpeg

 

file name should be wpa_supplicant.c

 

[In addition]

wpa_supplicant in linux supports the feature(automatic scan)

 

 

Regards,

weidong

0 项奖励
回复
2,881 次查看
nandan-khant
Contributor II

Hello @weidong_sun,

Thank you for the suggestion.

I have verified it and it is working. You can close this case now.

Thanks and Regards,

Nandan Khant

标记 (1)
0 项奖励
回复
2,930 次查看
weidong_sun
NXP TechSupport
NXP TechSupport

Hello @nandan-khant ,

 

In your wpa_supplicant.conf file, you didn't allow wpa_supplicant to scan ap .

for example, you can try to add the line in the config file.

ap_scan=1

But for WFA cert, connection or disconnection is controlled by commands, so it is  no problem using wpa_cli to scan and connect to AP.

 

Regards,

weidong

0 项奖励
回复
2,924 次查看
nandan-khant
Contributor II

Hello @weidong_sun,

I have already tried below parameters:

scan_ssid=1

ap_scan=1

Still, it is not working on Android.

The wpa_supplicant.conf shared previously connects successfully in Linux without adding the above parameters.

It is not working on Android with the same wpa_supplicant.conf.

 

wpa_supplicant.conf file:

ctrl_interface=/data/vendor/wifi/wpa/sockets
network={
ssid="test_5GHz"
key_mgmt=NONE
}

 

It should work on Android as well with the same wpa_supplicant.conf file. Because It works on Linux.

Thanks and Regards,

Nandan Khant

0 项奖励
回复