-
Notifications
You must be signed in to change notification settings - Fork 169
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SoftAP works if connecting via Mobile (Android/iOS) but Laptops(Windows/Linux) did not work. #502
Comments
can you tell me at least for now if its a known topic or something wrong from our side? |
This seems like security config mismatch, meaning the laptop asking some security protocol, which is not supported, and resulting in disconnection and return of WIFI_REASON_UNSUPP_RSN_IE_VERSION as not connected. But I think @kapilkedawat can confirm it. I appreciate your patience on this case. We will confirm if it is a bug or actual expected behaviour. |
@Shreyas0-7 please help to check. @mayurpatel19912009 please share hostapd logs as well. Please pass |
Hey @mayurpatel19912009 is possible for you to capture the sniffer ifconfig wlp0s20f3 down Please note that a lot of WiFi cards (NIC) don't support putting them in monitor mode. So it is vital to check the compatibility of your laptop's NIC. |
Just some que ,
It will make things fast if you can try to connect via Laptop and see the same issue. |
Yes @mayurpatel19912009 I used the same hostapd configuration provided for test_ssid and was able to connect a linux client to the access point |
Hi @Shreyas0-7 , could you please state commit and branch you used for host and network adapter? I followed these instructions (https://github.com/espressif/esp-hosted/blob/master/esp_hosted_ng/README.md#configuring-ap-with-hostapd) I am configuring CONFIG_AP_SUPPORT=y for the host, do I have to setup anything additional for the network adapter firmware? |
Hey @iradmilo-bytelab |
Hi @Shreyas0-7 , I am attaching wireshark capture file of linux PC trying to connect to AP provided by ESP32C3, |
Hey @iradmilo-bytelab I can see only association request in the capture, is it possible for you to turn on the capture first and then try to connect with softap. Also please do attach hostapd logs for the same. you can use |
Hi @Shreyas0-7 , do you have a mail address where I can send you these files? |
Hey @iradmilo-bytelab you can attach your files here |
hostapd_start_logs.gz Master commit used on both sides is 30f4082 |
Hey @iradmilo-bytelab from the logs and capture we can observe that we are able associate a station and start 4 way handshake. But we are failing in between of 4 way handshake. To debug it further more can you please share dmesg logs as well. |
I am attaching dmesg logs form host side and logs from esp32c3 side: |
Hey @iradmilo-bytelab can you please check you hardware connection between host and esp. Dmesg and esp log shows that connection is not stable. |
Hi @Shreyas0-7 , Thank you for the analysis. |
Command timeout logs in dmesg suggest that connection might be unstable. Also you can check raw throughput to verify if connection is stable https://github.com/espressif/esp-hosted/blob/master/esp_hosted_ng/docs/Raw_TP_Testing.md. |
After checking the tp: esp_2_host_tp.gz Is this expected tp? |
Hey @iradmilo-bytelab do you have values for esp as well? |
Hey @iradmilo-bytelab thanks for the logs, raw throughput looks okay. I see scan issued on the interface multiple times in the logs, could you please check if there is a wpa_supplicant instance running on the host besides hostapd. |
wpa_supplicant and network manager were both killed and not working at the moment of testing. |
Hey @iradmilo-bytelab can you please check if there are some background script which may be issuing scan? Could you also share a ps -a output when issue is coming. |
ps -ef No scanning request at the moment, connecting to esp AP still not working. |
Hey @iradmilo-bytelab
Also please enable debug logs as shown below using idf.py menuconfig for the firmware. |
1 ) RPI 3 - ESP32C3 SPI setup test We have connected Raspberry Pi 3 Model B with esp32C3 chip using the hostapd conf and dnmasq template you provided in the README and did not get the AP mode to work. We cannot even get the AP to advertise in this RPI setup. esp32c3_log.txt commit used: 30f4082 Can you please screenshot me where you got Raspberry Pi ESP setup to work in AP mode? Additionally: How did you get wpa_key_mgmt=SAE to work with hostapd (we are using version 2.10)? 2 ) STM32MP133 - ESP32C3 SPI patch test After testing the provided patch we still are not able to connect to AP. Host_logs_after_patch.txt 3 ) Stable release Our customer will soon (in month or so) go into testing of the final product which has to have WIFI chip with AP mode functional. Can we organize a call session where we could troubleshoot the issue and get the information about a stable release? |
Let me sync up internally and come back on this tomorrow.. |
Hello @mayurpatel19912009 , Noted. Let me test this feature on the raspberry pi I have and let me share you the logs, at least reproduce and face the issues as faced by you to at least know what is going wrong and come back on this. In any case, I understand you need urgent closure or commitment from our side. |
Hello @mayurpatel19912009 , We are making a short video to showcase how we trigger the connection. @iradmilo-bytelab I would request you to wait up till tomorrow. |
Hey @iradmilo-bytelab uploading the video with ps logs. |
Thanks for the fast response. Our team will look into this.
|
@Shreyas0-7 PTAL |
@Shreyas0-7 |
Yes, as @iradmilo-bytelab mentioned we get error when we use SAE in hostapd.conf |
Yes, we tried android and iOS client, however we don't test using windows much.
Yes, dhcp server is required for IP, you can also use static IP depending on your requirement and usecase.
We use current hostapd version (v2.11) normally, however hostapd version doesn't matter much here since most features are present from long and you can use your current version(v2.10).
Sure, we will retest with (recent kernel version + Linux laptop) again and see if any issue is observed.
You can recompile the hostapd with SAE feature enabled. Please enable this flag during recompilation. |
With using hostapd 2.10 ( with SAE enabled) and hostapd and wpa_supplicant setup as in video example I get this result wpa_supplicant linux notebook side: sudo wpa_supplicant -i wlp0s20f3 -c ~/wpa2_esp.conf wlp0s20f3: SME: Trying to authenticate with dc:54:75:56:26:dd (SSID='MY_SSID' freq=2437 MHz) cat ~/wpa2_esp.conf Host side: root@mcm-ng:~# echo $(uname -r) cat /etc/hostapd.conf interface=wlan0 root@mcm-ng:~# cat /etc/dnsmasq.conf |
So now very eager to see your latest Kernel (ex. 6.1.28) test from espressif side. I hope that also works on your side. |
Btw, @mayurpatel19912009 , Do you have raspberry pi same as that of the setup? If no, it's okay. If yes, it would fasten to localise issue. If you do not issue in raspberry pi and only in your Linux, I think we might need to dig deeper. In any case we will try with latest raspberry pi (with highest possible kernel which come with raspberry pi) and let you know our findings. |
No we dont have raspebrryPi here at the moment and have no plan and resources for that. That's why we are keen to know the output of your latest kernel tests. Fingers crossed.. :) |
Sure , we are working on it, keep you posted. |
Hey @mayurpatel19912009 @iradmilo-bytelab |
@Shreyas0-7 and @mantriyogesh Have you setup a configuration with linux kernel version later than 4.16 and what version did you setup. Additionally did you try this patch on that setup? |
Tried myself only the patch applied to the latest master and still not able to connect to AP Host logs: wlan0: interface state UNINITIALIZED->ENABLED Peripheral logs: I (29956) supported_rates: 0x3fcbad20 01 0a 02 04 0b 16 0c 12 18 24 30 48 |.........$0H| I (30084) FW_CMD: process_ap_station:got station add command I (30085) mac: 0x3fcbad00 14 85 7f 23 ee d9 |...#..| I (30096) supported_rates: 0x3fcbad20 00 00 00 00 00 00 00 00 00 00 00 00 |............| I (30194) FW_MAIN: AP station command I (30194) FW_CMD: process_ap_station:got station add command I (30194) mac: 0x3fcbad00 14 85 7f 23 ee d9 |...#..| I (30206) supported_rates: 0x3fcbad20 00 00 00 00 00 00 00 00 00 00 00 00 |............| I (30424) FW_MAIN: Add key request I (30424) FW_CMD: set_key_internal:1545 I (30424) FW_CMD: Setting PTK I (30426) FW_CMD: Unregistered event: 14 I (30454) FW_MAIN: AP station command I (30454) FW_CMD: process_ap_station:got station add command I (30454) mac: 0x3fcbad00 14 85 7f 23 ee d9 |...#..| |
Hi @iradmilo-bytelab , |
Hi, thank you for providing the logs of the solution working on newer kernel version. From my side I still cannot connect linux laptop to ESP AP, even after following all the instructions. Commit of ESP hosted on host and peripheral is 4798049. Kernel version is 6.1.28 (stm32mp-r1.1 mickledore) Hostapd version is 11 built with SAE config flag. ./hostapd -v dnsmasq conf and hostapd conf are as in README of esp/hosted_ng. Attaching logs from host, peripheral and linux PC where wpa_supplicant with stopped NM was utilized. |
Hello, we tried completely from beginning by
summary from this was : i have to restart hostapd every time once i am successfully connected via client to connect again. one more point that i found as error in hostapd logs ->
so finally, for your detailed info I am attaching a zip containing
Please let us know if these things gives some hints at your side.
|
Hey @mayurpatel19912009 thanks for reporting the issue. Recent issue observed was due a fix provided earlier. This issue has been resolved properly now. Please pull the latest change and check for reconnection. |
Hi @Shreyas0-7 , we are still not able to connect to ESP AP after pulling the latest changes. Additionally I am attaching logs from esp side of the moment station tries to connect to AP, not sure if they are of any help. |
Hey @iradmilo-bytelab |
@Shreyas0-7 OK I will try capture the traffic, just give me more information before I do the test, should I change anything in ESP32C3 firmware menuconfig, do I need to kill network manager on the device connecting to the AP or only on the host? Can I use WPA2-PSK as key or do I need SAE for the solution to work? |
|
I get it to connect, at least from logs, however disconnection happens after around a minute. |
Also |
Thank you for helping us get the solution working. The trick was to kill NetworkManager and wpa_supplicant. |
Hey @iradmilo-bytelab |
Checklist
Issue or Suggestion Description
Hello Devs,
We are currently using this setup
STM32mp133
esp32c3
interface: SPI
mode: SoftAp
type: esp-hosted-ng
Linux HostAP startup tool: Hostapd
Master commit used on both side: 250e292
Description:
We have compiled the driver, we can see it via ifconfig, even station mode (connecting from esp32 to a hotspot) works fine.
Then we wanted to confirm that connecting from any device to esp softAP and we noticed it did not work. We were also seeinig errors on esp32 monitor side on logs.
Logs:
(look for the line E (238925) FW_MAIN: Sending data failed=12309 which come only connecting via Laptop)
error screenshot:
Can you tell us what is missing and what can be different via Laptop?
Thank you very much in advance.
The text was updated successfully, but these errors were encountered: