Open Xiehanxin opened 7 months ago
@kapilkedawat ++
@Xiehanxin Can you help communicate following information to customer?
Is the AP they are trying to connect nearby and are they able to connect the same AP SSID and password using other device like mobile phone, when kept nearby ESP?
[A] use exact same git commit at both ESP and Linux
[B] Make sure there is only one process of wpa_supplicant running
Check https://github.com/espressif/esp-hosted/tree/master/esp_hosted_ng#311-wi-fi
It does sudo killall wpa_supplicant
and then starts new instance of wpa_supplicant
[C] you can add -d
in wpa_supplicant command to get the debug logs. These debug logs will help a lot to understand what is ongoing at wpa_supplicant.
[D] Use master branch for your testing.
$ idf.py menuconfig
Navigate to (Top) → Component config → Log output → Default log verbosity
and change log level to Debug
and re-flash ESP using latest master
Flash ESP and get full textual logs from starting
Full textual Linux dmesg log from bootup
wpa_supplicant debug textual logs with option -d
added (see above [C])
Possibly a full sniffer capture, which will pinpoint the issue (start sniffer before triggering connect)
Hi @Xiehanxin, wpa_supplicant issues scan periodically to update its scan cache and find relevant AP provided in network configuration(which is an expected and default behavior).
What is the exact issue here? Is station not able to connect if correct credentials are provided or just that we are seeing periodical scan request.
hi @kapilkedawat @mantriyogesh here is the debug log esp32.log nuc980.log
Hi @Xiehanxin, espsta0 is not able to find the AP during the scan. Is the AP present in the vicinity of client?
There are multiple WiFi access points (APs) around the espsta0 device, and the PC can connect normally. However, there are instances where using the iw dev espsta0 scan command also fails to detect any AP hotspots.
@kapilkedawat There are multiple WiFi access points (APs) around the espsta0 device, and the PC can connect normally. However, there are instances where using the iw dev espsta0 scan command also fails to detect any AP hotspots.
The ESP wifi log can be confirmed by Kapil (the team would be on regional holiday)
I am wondering why the capabilities are not populated:
esp32_sdio: print_capabilities: Capabilities: 0x0. Features supported are:
Are these capabilities always coming 0? Surprisingly, In your earlier log, you had espsta0 Mac address updated fine.
As I remember, you used to connect using the PCB. But the pull up registers were not correct earlier. Are the pull up registers corrected (cmd, d0-d3) need to be minimum 10k ohm.
Is it possible to run raw throughout first, before jumping to wifi, just to make sure your transport is correct and stable? Raw throughout: https://github.com/espressif/esp-hosted/blob/master/esp_hosted_ng/docs/Raw_TP_Testing.md Please test rx and tx both sides individually.
Hi @linjif, given that transport is correct and verified and external antenna is attached properly. Please try with attached patch and share logs from starting till issue occurs. 0001-esp_hosted_ng-Add-scan-logging.patch
Hi @kapilkedawat, i was trying to build the ng bin for our customer but encountered some issue. I used the latest esp-hosted and applied the patch you provied, can you take a look?
The ESP wifi log can be confirmed by Kapil (the team would be on regional holiday)
I am wondering why the capabilities are not populated:
esp32_sdio: print_capabilities: Capabilities: 0x0. Features supported are:
- Are these capabilities always coming 0? Surprisingly, In your earlier log, you had espsta0 Mac address updated fine.
- As I remember, you used to connect using the PCB. But the pull up registers were not correct earlier. Are the pull up registers corrected (cmd, d0-d3) need to be minimum 10k ohm.
- Is it possible to run raw throughout first, before jumping to wifi, just to make sure your transport is correct and stable? Raw throughout: https://github.com/espressif/esp-hosted/blob/master/esp_hosted_ng/docs/Raw_TP_Testing.md Please test rx and tx both sides individually. Hi @kapilkedawat iIn the early stage, I used device debugging, but now I'm using development board debugging. T development board has pull up registers(cmd,d0-d3) for 10K ohm. and in development board,using ESP32-WROOM-32E .Regarding the third point, I'll give it a try,
Hi @kapilkedawat, i was trying to build the ng bin for our customer but encountered some issue. I used the latest esp-hosted and applied the patch you provied, can you take a look?
Please follow the instructions here first to setup the environment or use export.sh to setup the env. Apply the patch after that(since export.sh resets the changes) and the try to compile.
Hi @kapilkedawat,,The log of the firmware test using the new firmware is as follows: nuc980.log esp322.log
Hi @KenKang2015, from the logs, esp32 is forwarding beacons and probe response to host.
FW_CMD: handle_wpa_sta_rx_mgmt:654 beacon frame RSSI=-33 FW_CMD: handle_wpa_sta_rx_mgmt:659 probe response RSSI=-66 wifi:Send scan done event: status=0, apnum=9 FW_CMD: Wifi scan done event
Could you please not daemonize wpa_supplicant and add extra logging mode(-d) to see what's happening.
wpa_supplicant -i espsta0 -c wpa_supplicant.conf -dd &
Also please share content of wpa_supplicant.conf file.
Hi @kapilkedawat using "pa_supplicant -i espsta0 -c wpa_supplicant.conf -dd &" for log nuc980.log esp322.log
Hi @KenKang2015, Please check 3 point of https://github.com/espressif/esp-hosted/issues/361#issuecomment-2045085662 . We need to verify the SDIO transport and its working correctly. I see that esp32 is sending the scan results whereas supplicant is not seeing any.
Also does customer has any local modification in the driver, if yes, we would like to check if that is not causing any issue.
Hi @kapilkedawat
How do I modify the source code to achieve the functionality of "./rpi_init.sh sdio rawtp_esp_to_host"? because I'm using cross-compilation.,compile on Ubuntu 22, run on NUC980 (ARM9).
rawtp code is always compiled in, we just need to pass argument during insmod. please use
sudo insmod esp32_sdio.ko $RESETPIN raw_tp_mode=1 # for host to esp
sudo insmod esp32_sdio.ko $RESETPIN raw_tp_mode=2 # for esp to host
Hi @kapilkedawat, with using "insmod esp32_sdio.ko $RESETPIN raw_tp_mode=2 # for esp to host" command ,the log is: nuc980-foresp2host.log esp32-foresp2host.log with using "insmod esp32_sdio.ko $RESETPIN raw_tp_mode=1 # for host to esp" command ,the log is: nuc980-forhost2esp.log esp32-forhost2esp.log
Hey @KenKang2015 As we can check from logs the raw throughput between ESP and Host is 0, which implies there is some problem with connection of ESP and Host. I suspect this is reason why you are facing issues you mentioned earlier. Can you please verify your connection once again?
Hi @kapilkedawat, Our customer performed Troubleshoot Instructions - 1 and offers messages from linux and debug log from esp, can you take a look?
Hi @MacChu0315, did you load the driver(esp32_sdio.ko) using insmod? messages_20240418.txt doesn't show that it was loaded.
Hi @kapilkedawat , the customer provide test information in the attachment, could you please help checkout ? Thanks ! 20240419_message.txt
Hi @jiajia13201845317, Please help customer to capture dmesg correctly. We need to dmesg when customer loaded the kernel module(ie insmod esp32_sdionew.ko). Provided logs doesn't show any of those logs.
Also please confirm that the pull-up b/w esp and broad matches our SDIO pull-up requirements.
same issue in linux 5.1/4.4 , esp32 module keep scanning request