Open Speakpig opened 4 weeks ago
I've found out that if I set ESP32 to be a host target, error will occur like pic upside, but when I choose ESP32-C3 as a host target, the processing will be a suc, but actually I'm using ESP32 as host and ESP32-C3 as slave now accoding to what I've been told bofore (https://github.com/espressif/esp-hosted-mcu/issues/8) better using two defferent ESP chipsets each as a host and a slave, but I've found the the tutorial document have been changed much, is it still neccesary, what should I do with my two chipest?
Hello @Speakpig,
We are checking still why should it treat as sdmmc as 'cmake' interface. Please spare time, we will get back on this.
@SohKamYung-Espressif PTAL..
Assuming this build issue is only happening at host.
As I understand, if you use classic ESP32, you experience build issue at the
if(CONFIG_ESP_SDIO_HOST_INTERFACE) idf_component_optional_requires(PRIVATE sdmmc) endif()
This issue not present for ESP32-C6.
Can you please help me in providing:
1.SPI 2.I upload a log, will that be helpful? CMakeOutput.log build.log 3.esp-idf-v5.3.0, if this is what u asking? 4.
I just found that the error happened while I'm setting the target device, not in the building process, so I just can't get to the step to do some menucofig to choose SDIO or SPI.
In case you are manually changing any content in sdkconfig
or sdkconfig.h
file, bypassing idf.py menuconfig, it is not supported. Also result is undefined.
Manual changes, such done, will override all the logic placed in KConfig.
I didn't manually modify the file, I just added dependencies espressif/esp_wifi_remote
and espressif/esp_hosted
, and can't get into idf.py menuconfig
.
builid.txt
@Speakpig Have you disabled Native Wi-Fi on the ESP32 as documented in the troubleshooting page https://github.com/espressif/esp-hosted/blob/feature/esp_as_mcu_host/docs/troubleshooting.md#1-esp-host-to-evaluate-already-has-native-wi-fi :
Edit the ESP-IDF file components/soc/<soc>/include/soc/Kconfig.soc_caps.in and change all WIFI related configs to n. For example:
config SOC_WIFI_SUPPORTED
bool
# default y # original configuration
default n
This should be done for all SOC_WIFI_xxx configs found in the file.
@SohKamYung-Espressif Yeah, I' sure I missed that, the doc structure has been changed a lot since last time I read it, actually, I have been being concerned about this above, however, it's indeed my missing of guidance reading, I'm sry and I will try it out later, thx!
been told bofore (#462 (comment)) better using two defferent ESP chipsets each as a host and a slave, but I've found the the tutorial document have been changed much, is it still neccesary, what should I do with my two chipest?
@Speakpig yes, the documentation is indeed changed. We tried to simplify and detail enough. Your feedback on this is valuable and welcome.
If I understand correctly, the SPI FD test is best to start from 5MHz and gradually increase to the actual upper limit, so I need to change this parameter in pic from 30 to 5, right?
4 Hardware Considerations
4.1 General ConsiderationsUse the lower clock frequency like 5 MHz for evaluation. Once solution verified, optimise the clock frequency in increasing steps to max possible value. To find out practical maximum SPI slave frequency for your co-processor, check IDF_PERFORMANCE_MAX_SPI_CLK_FREQ in ESP-IDF SPI slave benchmark
And I can't menuconfig the SPI clock in slave side, so it's no need 'cause it dependes on the host setting, right?
check the 'IDF_PERFORMANCE_MAX_SPI_CLK_FREQ' mentioned in ESP-IDF SPI slave benchmark.
For C3 as slave, max it can go upto 40MHz. Clock is released from host, but it cannot go more than 40.
But if you use jumper cables as connection (and several other dependencies), it would saturate somewhere by ~30MHz.
Manual KConfig change is discouraged.
Finally, it would end here (to avoid again again again idf.py menuconfig) https://github.com/espressif/esp-hosted/blob/32be5adb7a281eb97a64289f6a1213c6206a52d5/host/port/spi_wrapper.c#L81C35-L81C53
Once you sure what is max, you remove manual change and use
idf.py menuconfig
and set the freq under 'SPI Clock Freq' option.
OK, when I'm building the host after my menuconfig done, it ouccur sth like this, why? Before I'm using the default setting which is UART, and it passed the build, I've changed it to be a SPI transaction. build.txt
Have you changed the sdkconfig or sdkconfig.h manually?
Can you remove
rm -rf build sdkconfig
and
idf.py menuconfig
and set values through the config GUI?
Not related to build error, just as information,
if you wish to change to spi, exact similar transport need to be setup at slave as well. For example, you use standard SPI (full duplex) at host, build and flash slave also with standard SPI. If you use QSPI, use QSPI at both places and so on.
I finally come to the iperf test, but what seems to be the question?
iperf2 is only supported by default.
OK,I will try iperf2, thx!
Sorry I missed to understand, can you please assist in letting me know the host and slave ESP used?
ESP32 as host, and ESP32-C3 as slave
Sorry I missed to understand, can you please assist in letting me know the host and slave ESP used?
iperf2 is only supported by default.
I' using iperf3 on WINDOWS, shall I use iperf2?
The IDF example integrates iperf2 minimal code. So, it needs other end running iperf2 only. Iperf3 may not work, irrespective of operating system used.
It finally worked!!! So much thx! Given the result, how to judge this performance? I'm setting spi clock to be 5MHz.
And this is what it is when spi clock comes to 30MHz, just asking is it resonable?
If you test over he air, a lot of factors come in picture.
Test first the pure transport speed. The frequency depends upon the connections used in C6-P4. jumper cable lengths, their quality etc.
If you use PCB, C3 would cope up till 40MHz.
Test raw transport throughput, before making wifi conclusions.
To enable the Raw Throughput Option and set Raw Throughput direction on Host, enter Menuconfig and enable Component config ---> ESP-Hosted config ---> Debug Settings ---> RawTP. Set the data transfer direction: Host to Slave, Slave to Host or Bidirectional.
How shall I set the data transfer direction, if I'will be using spi FD?
Explained in link,
Component config ---> ESP-Hosted config ---> Debug Settings ---> RawTP. Set the data transfer direction: Host to Slave, Slave to Host or Bidirectional
You can test bidirectional
Hi,this is my raw transport throughput test result, how does it look like? Thx!
The throughput could be achieved little high. But overall both sides are symmetrical, and the transport throughput is great.
Can you please try to configure the AP to use 'auto' channel and try to reduce the interference? Alternatively, you can configure native (non hosted) wifi and compare the results.
But from hosted perspective, I see this through.
Can you please try to configure the AP to use 'auto' channel and try to reduce the interference? Alternatively, you can configure native (non hosted) wifi and compare the results.
Sry, I don't quite get it, can u be more specific? 1.first, in the raw transport throughput test, I did not connect to a wifi. 2.secondly,if shall I connect, it shall be a sta, how to configure the AP to use 'auto' ? 3."you can configure native (non hosted) wifi", which means what?
1 & 2. As the transport throughput is good, but the Wi-Fi throughput is very bad (Confirm?), I suspect the radio environment is noisy. Ways to test better environment: a. Test in less interference like home based setup b. Configure your AP i.e. router settings to use 'auto' channel selection. Any high interference channel is avoided by AP itself.
I understood,that's some work to do, but for the result I provided, how could u know as below, do u mean spi could achieve about 17M while wifi only comes out at about 7.48M?
As the transport throughput is good, but the Wi-Fi throughput is very bad (Confirm?)
Yes, wifi throughput should really about match the transport. It would be 1-2mbps less than peak transport throughput in good wifi conditions.
The transport test is packet transfer from one place to other.
Also you have tested bi-directional transport test. Which would be little bit lower than single direction.
So transport I expect to bump little more say about 19-20m in single direction. Nevertheless, try to test with another AP, different environment.
In general, the test case (3) would give good amount of transparency for your test.
Thanks a lot, that's very clear, I'm using the company's wifi mesh network, which is used by many employees, and the test results may be affected by the network environment.
Any updates ahead @Speakpig ?
Checklist
Issue or Suggestion Description
I'm using \esp-idf-v5.3\examples\wifi\iperf as a host example, it can pass build process untill I use cmds below
info as follows, much thx: