Hi!
Building the 1_1_Hello_World_WS for ESP32-C2 I’m getting following error:
.pio/libdeps/esp32-c3-devkitc-02/ESP Async WebServer/src/AsyncWebSocket.cpp: In member function ‘IPAddress AsyncWebSocketClient::remoteIP()’:
.pio/libdeps/esp32-c3-devkitc-02/ESP Async WebServer/src/AsyncWebSocket.cpp:840:28: error: call of overloaded ‘IPAddress(unsigned int)’ is ambiguous
return IPAddress(0U);
How can I fix this error?
Many thanks!
Enrico
Looking up in the Internet I could fix this error modifying in the file …/1_1_Hello_World_WS/.pio/libdeps/esp32-c3-devkitc-02/ESP Async WebServer/src/AsyncWebSocket.cpp the line 840:
from “return IPAddress(0U);” to “return IPAddress(0Ul);” inside the remoteIP() method.
Rebuilding the code I’ve got then this error: “undefined reference to mbedtls_md5_starts”.
I could also fix also this error modifying in the file …/1_1_Hello_World_WS/.pio/libdeps/esp32-c3-devkitc-02/ESP Async WebServer/src/ the lines 74 till 76 inside the getMD5 method:
from
mbedtls_md5_starts(&_ctx);
mbedtls_md5_update(&_ctx, data, len);
mbedtls_md5_finish(&_ctx, _buf);
to
mbedtls_md5_starts_ret(&_ctx);
mbedtls_md5_update_ret(&_ctx, data, len);
mbedtls_md5_finish_ret(&_ctx, _buf);
Now I could build successfully the HelloWorld WebServer, but because I had to modify 2 files in the imported libraries, I don’t know how is the right way to handle such errors.
Do I have to wait for a fixed version of the library?
Best regards,
Enrico
Hi.
We just updated the eBook with workarounds for that issue. Make sure you have the latest version (version 2.2): https://rntlab.com/module-1/welcome-build-web-servers/
Check page 188: “issue with Library Update” and check the several workaround options. Option number 2 is a quicker and easier solution.
Unfortunately, there’s nothing we can do besides those workarounds until the author of the library fixes the issue.
Regards,
Sara
Hi Sara,
many thanks for your answer.
Are there any release notes to be able to see what has been changed in the book from the previous version and which chapters should be read again?
Regards,
Enrico
Hi.
You can see the changes described here: https://rntlab.com/ebooks-updated-smart-home-firebase-and-build-web-servers/
Scroll down to the section “What’s new?” of the Build Web Servers eBook.
Regards,
Sara