-
Notifications
You must be signed in to change notification settings - Fork 1
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
ESP32 version will not compile #2
Comments
enable the macro ASYNC_TCP_SSL_ENABLED=1 |
This macro is already defined, but on closer inspection there is no beginSecure() routine in AsyncTCP.cpp ? I am using use https://github.com/yubox-node-org/AsyncTCPSock.git and https://github.com/yubox-node-org/ESPAsyncWebServer but beginSecure() is not present. Is it possible to get this example to compile for ESP32 ? |
i am able to compile this one in platform.io but getting run time error T tiT- failed: mbedtls_ssl_setup returned -0x7f00 and sometimes assert failed: tcp_update_rcv_ann_wnd IDF/components/lwip/lwip/src/core/tcp.c:951 (new_rcv_ann_wnd <= 0xffff) |
Thank you for having a look. Can you send a link to the AsyncTCP.cpp and AsyncTCP.h files you are using, there is a definition of 'beginSecure()' defined within the AsyncTCP.h I have but no 'beginSecure()' within AsyncTCP.cpp that I am using from the libraries above, which is strange. |
The I don't know if this version is still working with the current ESP32-arduino library version 2.x. |
Hi @Bmooij Downloaded that library and replaced the current AsyncTCP file set with the new. I am able to get it to compile up until the receiving the following two errors: tcp_mbedtls.cpp:760: undefined reference to _tcp_write4ssl(tcp_pcb*, char const*, unsigned int, unsigned char, void*) I think these are due to the jump pad definitions in AsyncTCP.cpp as follows:
but error line pointer '760' is completely wrong as it points to a Still using the original 1.x of the ESP32-arduino library so hopefully can get it going, any ideas ? |
Hi @Bmooij Have managed to get that to compile and its working up to a point. When requesting files that are < 2K things seem to work normally, but larger files cause an exception:
Looks like the Mbedtls process is taking too long and causing a TWDT timeout, any idea how this can be resolved. |
If you really know what you are doing, you could turn off the watchdog by setting build_flags =
-DCONFIG_ASYNC_TCP_USE_WDT=0 |
Thank you. I did notice this compiler switch for code within _async_service_task() and I was wondering if that might be worth a try. I suppose this was added to attach a TWDT to the current async_tcp task, but I cannot see an associated esp_task_wdt_reset() call to reset the TWDT so its bound to timeout if processing longer tasks. I'll give it go and let you know. |
Funny because the original ( without tls) behaves the same |
Added the config to the build flags and re-tested. It's stopped the exception from happening but the async_tcp task just locks up now so there is still something internally wrong, still looks like a corruption somewhere:
As you can see we get a setup fail, a memory corruption causing corrupted debug output and then it tries to write the data to the TCP connection but this is where the task locks up. |
It looks like there is not enough free heap available. How many connections where connected at the same time? |
I made a modification to AsyncTCP.cpp to add a heap length output:
As you can see the heap length is around 15K on the write before the corruption so I don't think it's a heap issue. I have also increased the stack allocation to 8192 * 4 and the same corruption still happens. Thought I was so close to getting working, just this last piece of the jigsaw to find. Any help much appreciated. |
Hello
I have been trying to get your code to compile for the ESP32 but the beginSecure() routine cannot be found.
Any ideas ?
The text was updated successfully, but these errors were encountered: