Closed gauthamikosanam closed 1 year ago
Hi Yogesh, I tried again with NG driver , it is working. This is the log of host. root@rugged-board-a5d2x-sd1:~# modprobe esp32_sdio.ko esp_probe: ESP network device detected Rx Pre ====== 0 Rx Pos ====== 0 Tx Pre ====== 0 Tx Pos ====== 10 esp_probe:793 esp_sdio: probe of mmc0:0001:2 failed with error -22 root@rugged-board-a5d2x-sd1:~# Received ESP bootup event EVENT: 3 ESP chipset detected [esp32] EVENT: 0 ESP peripheral capabilities: 0x1d ESP Bluetooth init Capabilities: 0x1d. Features supported are:
root@rugged-board-a5d2x-sd1:~# ifconfig -a
can0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
NOARP MTU:16 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:10
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
Interrupt:48
espsta0 Link encap:Ethernet HWaddr C4:DE:E2:63:56:8C
BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
eth0 Link encap:Ethernet HWaddr 04:91:62:D3:7A:C6
BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
Interrupt:28 Base address:0x8000
lo Link encap:Local Loopback
LOOPBACK MTU:65536 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
sit0 Link encap:IPv6-in-IPv4
NOARP MTU:1480 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
In Esp32 module flashed this image. 2023.03.16_NG_timingNP_1.0.2.zip
2023.03.16_NG_timingNP_1.0.2.zip
Please try with NP binaries with new host side code from master: commit: 5910e160d20e99d6ea9ab5a45c0bbdb6afa65629 -> https://github.com/espressif/esp-hosted/tree/5910e160d20e99d6ea9ab5a45c0bbdb6afa65629/esp_hosted_ng/host
let me know If this works, will create fg bins.
Please stick to binaries and host side git commit. no other commit should be used.
Hi Yogesh, For Fg driver, driver is loaded and created nodes in raspberry pi . How can I test for both station and ap mode. If I give this command getting error. wpa_supplicant -D nl80211 -i ethsta0 -c /etc/wpa_supplicant.conf & nl80211: Driver does not support authentication/association or connect commands nl80211: deinit ifname=ethsta0 disabled_11b_rates=0 ethsta0: Failed to initialize driver interface
I raspberry pi, for soft ap mode to test I am using c_support. In this I am getting protobuf-c.c no such file or directory. In protobuf-c folder .c file is not there. I tried with https://github.com/protobuf-c/protobuf-c.git but getting No such file or directory.
wpa_supplicant -D nl80211 -i ethsta0 -c /etc/wpa_supplicant.conf &
This is not the way to use FG driver, please check FG documentation.
I raspberry pi, for soft ap mode to test I am using c_support. In this I am getting protobuf-c.c no such file or directory.
If you follow the documentation correctly, you should not face this issue.
https://github.com/espressif/esp-hosted/blob/master/esp_hosted_fg/docs/Linux_based_host/Linux_based_readme.md#12-host-setup ->
Clone ESP-Hosted code repository
In raspberrypi 3 model B+ , I am testing the soft ap mode,getting this error. pi@raspberrypi:~/Documents/esp_timing_fg/esp-hosted/esp_hosted_fg/host/linux/host_control/c_support $ sudo ./test.out set_softap_vendor_ie Enable heartbeat with duration 20 Heartbeat operation successful Freeing 0x0x350730 Success in set vendor specific ie
Requested operation complete Sleeping for some time just to showcase heartbeat 2023-08-18 17:48:12 > App EVENT: Heartbeat event [0] 2023-08-18 17:48:37 > App EVENT: Heartbeat event [1] Disable Heartbeat Heartbeat operation successful pi@raspberrypi:~/Documents/esp_timing_fg/esp-hosted/esp_hosted_fg/host/linux/host_control/c_support $ sudo ./test.out reset_softap_vendor_ie Enable heartbeat with duration 20 Heartbeat operation successful Success in set vendor specific ie
Requested operation complete Sleeping for some time just to showcase heartbeat 2023-08-18 17:49:15 > App EVENT: Heartbeat event [0] 2023-08-18 17:49:40 > App EVENT: Heartbeat event [1] Disable Heartbeat Heartbeat operation successful pi@raspberrypi:~/Documents/esp_timing_fg/esp-hosted/esp_hosted_fg/host/linux/host_control/c_support $ sudo ./test.out softap_start Enable heartbeat with duration 20 Heartbeat operation successful esp32 softAP started ethap0 interface down MAC address 30:ae:a4:10:95:59 set to ethap0 interface ethap0 interface up
Requested operation complete Sleeping for some time just to showcase heartbeat 2023-08-18 17:50:19 > App EVENT: Heartbeat event [0] 2023-08-18 17:50:44 > App EVENT: Heartbeat event [1] Disable Heartbeat Heartbeat operation successful
daemon --no-resolv --no-poll --dhcp-script=/system/bin/dhcp_announce --dhcp-range=192.168.4.1,192.168.4.20,1h
dnsmasq: failed to create listening socket for port 53: Address already in use
any suggestion.
dnsmasq is illustrated just as an example to show how higher layer can use the dhcp server. dnsmasq issues are out of scope for ESP-Hosted.
If I give this command ,getting the error. sudo python3 test.py start_softap --ssid ESP_WiFi --pwd ESP_WiFi@123 --channel 6 --sec_prot wpa_wpa2_psk --max_conn 9 --hide_ssid False --bw 40 control response timed out after 30 sec Response not received. ESP log:
I (957563) slave_ctrl: softap mode set I (957563) slave_ctrl: mac [30:ae:a4:10:95:59] I (957565) slave_ctrl: 30:ae:a4:10:95:59 I (957567) slave_ctrl: softap stop handler stop I (957571) wifi:Total power save buffer number: 32 I (957575) slave_ctrl: ssid ESP_Wifi pwd ESP_Wifi@123 authmode 4 ssid_hidden 0 max_conn 9 channel 6 I (957581) slave_ctrl: ESP32 SoftAP is avaliable I (957587) NETWORK_ADAPTER: Get softap mac address I (957591) NETWORK_ADAPTER: AP mac [30:ae:a4:10:95:59]
Is this same observed always in python and not in C? Or also fails in c some times?
Sometimes It is observed in C also. Done with sudo ./test.out set_softap_vendor ie sudo ./test.out reset_softap_vendor_ie sudo ./test.out softap_start
If I on Wifi in my mobile, ESPWifi can able to identify but connection is getting failed.
ESP Log:
I (311381) wifi:
I (336591) wifi:
Most likely this is spi level timing issue. Please run raw throughput test both Tx and Rx) check raw TP doc
Which esp chipset is being used?
From porting guide at: https://github.com/espressif/esp-hosted/blob/master/esp_hosted_fg/docs/Linux_based_host/porting_guide.md#24-peripheral-configurations
Check all things ( smaller wires, smaller clk, timing tuning etc step by step)
Hi Yogesh, I am using esp32 wroom 32E module. In raspberry pi 3 model B + I am trying to connect station mode,but ip is not pinging. Attaching the logs of both host and esp. rasp_log.txt esp_log.txt
With python based approach, This is the log captured. esp_log.txt rasp_log.txt
As seen from logs, you can send the packets from host to esp. but esp to host packet are not sent some times.
Also with combination,
raspberry pi 3B+ <--sdio--> esp32
you do not need timing adjustment.
so test with sdio timing =0;
Make sure that you have very small wires and external pull-ups in place. if you do not do these two things, you may still face issues.
Can I use fg 0.0.5 version for both host and esp ?
yes you can. option 1. make sure the git commit is matched at host to one on which release is made. option 2. I had also sent you timing adjust binaries and their expected host commit. if you are on same commit, you can just switch to fg binries without timing adjustment.
are external pull-ups and shorter length wires used?
I have used esp fg 0.0.5 version . Flashed the respective binaries in esp module. This is the log captured. Getting read packet error -85. rasp_log.txt esp_log.txt
setup image?
I strongly suspect the pull-ups are not working in your case. We use external pull-ups with 51K Ohm with same setup, with pcb, works fine:
Raspberry Pi 3B+ <-- sdio --> esp32.
I used 10K Ohm pull-ups externally,is not sufficient?
is sufficient. So you mean you try ng and works on same setup and fg doesn't work (both with RaspberryPi - SDIO - ESP32)?
I want soft ap mode ,so switched to fg driver. Once I want to test with raspberry pi ,if it works fine then I need switch to arm cortex processor.So testing on raspberry pi to understand better.Please let me know further how to proceed.
As you had said in earlier comments, your ng driver works but fg doesn't (on your hardware). Which is strange as at transport layer, both are same.
Considering Raspberry Pi, your FG doesn't work, with error -84. this is typically issue when the communication is not correct in between slave and host. reasons vary like signal integrity issue, external pull-ups not present etc.
You had claimed the ng worked and fg didn't work for your hardware. is it the same observation in case of fg on Raspberry Pi?
In arm cortex processor--esp32--sdio, used https://github.com/espressif/esp-hosted/commit/8cb1ccb4da87da952b3b28e5544c849c1dcd7b67 commit it is compiled and probe also working. ESP module is flashed with https://github.com/espressif/esp-hosted/files/12288782/2023.08.08_gh242_sdio_timingchange_ESP32_sdio.tgz binaries.But need to test both station and soft ap mode.Previously for ng driver used wpa_supplicant and udhcpd commands for connectivity,here in fg driver it is not supporting those same commands to test station mode.
For raspberry pi , tested with host side commit is https://github.com/espressif/esp-hosted/commit/8cb1ccb4da87da952b3b28e5544c849c1dcd7b67 and esp module is flashed with https://github.com/espressif/esp-hosted/files/12288782/2023.08.08_gh242_sdio_timingchange_ESP32_sdio.tgz but while testing dhclient is not confgured.Ip is not set.This is the issue facing in raspberrypi.
Dear Yogesh, Please let me know how to proceed further with raspberry pi , with the above setup not able to get response from esp to host for the below command. $ sudo python3 ./test.py connect_ap --ssid PHYIN_TEST --pwd Phytec@2023
Hello @gauthamikosanam @gauthamik9
Were you able to run the NG on Raspberry Pi?
Yes Yogesh, It is working and able to connect with the router using wpa_supplicant and udhcpd commands.In similar way,tested with my arm processor ----esp32 combination setup also.It is working. In similar way I want to test the FG driver to set the configuration for AP mode. Need your support to complete this task.
So you mean Raspberry Pi works with NG and not with FG. just similar to your board?
After sdio timing changed in esp, the driver is working in both configuration. 1.RaspberryPi--esp32 Not getting read error. If I try to check station and soft ap mode, ip is not configured via dhclient command. 2.Arm Processor ----esp32
https://github.com/espressif/esp-hosted/issues/242#issuecomment-1687416977 These are the logs.
That is the reason it is suggested to run the raw throughput. If you run raw throughput, it will not have any higher layer configuration dependency. if transport isn ot working, we should only check transport first.
If we add unknowns, we would not understand what is making it to fail.
So, I need to understand first:
confirm Raspberry Pi with ESP32
Hi Yogesh, I tried with raw throughput, this is the log.Please let me know. Changed the TEST_RAW_TP to 1 ,compiled ,build,and flashed into the module. log.zip
1.raspberrypi 3 model B+ -----esp32 2.host side git commit is root@0d4c4bb56531:/home/wifi/esp_timing_fg/esp-hosted/esp_hosted_fg# git branch
Hi Yogesh, Any solution can you give us to close this issue.
actually your raw throughput is not working. This is very clear sign that the sdio level things are not working correctly.
I see first event was received. but later the message exchange was not working. Please cross check wire lengths and external pull-ups again.
if you can setup the idf (release/v5.1) correctly, I can give you instructions to try to tweak the changes in esp firmware.
I really do not understand when you say
3.esp firmware 0.0.5 is used and 4.In this changed sdio timing to SDIO_SLAVE_TIMING_NSEND_PSAMPLE TEST_RAW_TP 1
Are you using release binaries or source code building or something else?
As told multiple times, same code to be used for building at esp and host. otherwise solution will just fail.
As you say NG worked on Raspberry Pi (say v1), what exactly works on NG? If raw throughput is working fine or iperf is running fine, run fg on the same solution with:
master branch FG code built at both esp and host.
-84 is typical error, indicating there is timing issues due to wire lengths or external gpio or something damaged on host hardware.
-84 error I am not getting now when I load the driver.I am able to get the nodes for both station and soft ap nodes.
I took the git commit 8cb1ccb,and integrated the driver with arm processor as well raspberry pi. root@0d4c4bb56531:/home/wifi/esp_timing_fg/esp-hosted/esp_hosted_fg# git branch
In the below path I changed the sdio timing and enable the test raw tp to 1 and build and flashed into the esp32 module. gauthami@gauthami-Latitude-3420:~/esp_timing/esp-hosted/esp_hosted_fg/esp/esp_driver/network_adapter/main
Please let me know if anything is wrong.
I tried again with softap mode, getting this log. host commit 8cb1ccb esp flashed with https://github.com/espressif/esp-hosted/files/12288782/2023.08.08_gh242_sdio_timingchange_ESP32_sdio.tgz rasp_log.txt esp_log.txt When I was trying to connect to mobile, name is showing ESPWifi but when I enter the password getting connecting... but it is not connecting.
On raspberry Pi the timing is not expected to be NP for ESP32 sdio. it is expected to be PP (default).
How can I check the bluetooth connectivity over sdio? It is to be expected to be PP (default) ,for this what changed i need to do ?
When I do advertise on then getting segmentation fault . LEAdvertisingManager not found Segmentation fault
is the transport working for you?
Without transport correctly set-up, any higher level applications would misbehave. Unless you don't get correct/reliable raw throughput in both Tx/Rx directions, running higher layer apps, would not be of any use.
Please send the bin files so that will check and let you know the status.
Have you set up the IDF?
just let me know if you can build master using
idf.py build
Hi Yogesh, Able to compile the esp-idf of master branch. This is the log. esp-idf log
Okay. can you please checkout hosted latest master (currently at 5910e16) ? and build & flash esp32?
same code copy to raspberry pi and build the kernel module for sdio. I hope /boot/config.txt is updated correctly as per esp-hosted documentation. (let me know if you are using device tree method at raspberry pi)
once done, please let me know the logs. do not change timing at sdio.
dmesg, esp log, commands and output log.
btw documentation link: https://github.com/espressif/esp-hosted/blob/master/esp_hosted_fg/docs/Linux_based_host/Linux_based_readme.md
keep transport as 'sdio only' in mind.
Hi I am using arm cortex a5d2x microprocessor as host and esp32 module as slave. In between this communication I am getting error. I have used fg 0.0.5 version and compiled in kernel and flashed the respective binaries in esp 32 module. Attaching the logs for both host and esp ,please let me know the solution. host_fg.txt esp_fg.txt esp_sdio: probe of mmc0:0001:1 failed with error -84