Bonjour, Après avoir lu plusieurs de vos videos j’ai acheté l’eBook Build WebServers 3e Edition
C’est ma première question sur le site : Dois je la rédiger en anglais ?
Question : Comment résoudre l’erreur de compilation des bibliotheques suivantes :
d:\Magasin\Arduino\libraries\ESPAsyncWebServer\src\WebAuthentication.cpp: In function ‘bool getMD5(uint8_t*, uint16_t, char*)’:
d:\Magasin\Arduino\libraries\ESPAsyncWebServer\src\WebAuthentication.cpp:74:3: error: ‘mbedtls_md5_starts_ret’ was not declared in this scope; did you mean ‘mbedtls_md5_starts’?
74 | mbedtls_md5_starts_ret(&_ctx);
| ^~~~~~~~~~~~~~~~~~~~~~
| mbedtls_md5_starts
d:\Magasin\Arduino\libraries\ESPAsyncWebServer\src\WebAuthentication.cpp:75:3: error: ‘mbedtls_md5_update_ret’ was not declared in this scope; did you mean ‘mbedtls_md5_update’?
75 | mbedtls_md5_update_ret(&_ctx, data, len);
| ^~~~~~~~~~~~~~~~~~~~~~
| mbedtls_md5_update
d:\Magasin\Arduino\libraries\ESPAsyncWebServer\src\WebAuthentication.cpp:76:3: error: ‘mbedtls_md5_finish_ret’ was not declared in this scope; did you mean ‘mbedtls_md5_finish’?
76 | mbedtls_md5_finish_ret(&_ctx, _buf);
| ^~~~~~~~~~~~~~~~~~~~~~
| mbedtls_md5_finish
Plusieurs bibliothèque trouvées pour “AsyncTCP.h”
Utilisé: D:\Magasin\Arduino\libraries\AsyncTCP
Non utilisé: D:\Magasin\Arduino\libraries\Async_TCP
Plusieurs bibliothèque trouvées pour “ESPAsyncWebServer.h”
Utilisé: D:\Magasin\Arduino\libraries\ESPAsyncWebServer
Non utilisé: D:\Magasin\Arduino\libraries\ESP_Async_WebServer
exit status 1
Compilation error: exit status 1
Hi.
Yes, preferbly we prefer to write in English. You can use the translator if needed.
In which project are you getting that error?
Are you using Arduino IDE or VS Code? Which versions of the Library?
Regards,
Sara
Hello and thank you for your prompt reply.
I use Arduino IDE V2.3.5 and the libraries :
AsyncTCP.h (dvarel) V 1.1.4
ESPAsyncWebServer.h (lacamera) V 3.1.0
with Rui Santos’ program : ESP WebSocketServer
which I’d like to test with an ESP32 Dev Kit C V2 Wroom32
Hi.
If you follow the instructions correctly, you’ll see that we recommend installing the ESPAsyncWebServer and AsyncTCP libraries by ESP32Async. It’s not the first option in the library manager. You may need to scroll down in the library manager to find the correct ones.
Please uninstall those libraries and install the correct ones mentioned in the eBook.
Let me know if that fixes the issue or if you need further help.
Regards,
Sara
Thank you for your reply. I didn’t know there were libraries with the same name.
The compilation works now but there are still warning :
D:\Magasin\Arduino\ESP32_WebSocket_Server_Control_Outputs\ESP32_WebSocket_Server_Control_Outputs.ino: In lambda function:
D:\Magasin\Arduino\ESP32_WebSocket_Server_Control_Outputs\ESP32_WebSocket_Server_Control_Outputs.ino:225:20: warning: ‘void AsyncWebServerRequest::send_P(int, const String&, const char*, AwsTemplateProcessor)’ is deprecated: Replaced by send(int code, const String& contentType, const char* content = asyncsrv::empty, AwsTemplateProcessor callback = nullptr) [-Wdeprecated-declarations]
225 | request->send_P(200, “text/html”, index_html, processor);
| ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from D:\Magasin\Arduino\ESP32_WebSocket_Server_Control_Outputs\ESP32_WebSocket_Server_Control_Outputs.ino:13:
d:\Magasin\Arduino\libraries\ESP_Async_WebServer\src/ESPAsyncWebServer.h:424:8: note: declared here
424 | void send_P(int code, const String &contentType, PGM_P content, AwsTemplateProcessor callback = nullptr) {
| ^~~~~~
Hi.
Can you tell me from where you’re copying the code?
It seems you’re using an older version of the project…
Regards,
Sara
That warning message can be ignored because we’re not using the send_P() function, which is a deprecated version of the send() function.
Is the project working as expected?
I load your programs by searching them on the web (maybe older version) because the links in the book are (only?) for Visual Studio Code and currently I would like to stay on IDE Arduino. Can you tell me how to load the programs in the book on IDE?
To use the Visual Studio Code folders from the book with the IDE, I created the following draft:
1. Open a new folder in the Arduino directory
1. Extract the Scr folder from the main.ccp file that was converted to main.ino and copy it into the new folder
2. Copy the Data folder (including favicon.png, index.html, and style.css, inserted into the new folder)
I still have c_cpp_properties.json and extensions.json, which I don't know how to process or place.
Hi.
Yes, that’s right. Copy the main.cpp file content to a new file in Arduino ide. Then, use the data folder inside the Arduino sketch.
You don’t need these files: c_cpp_properties.json and extensions.json.
Use the links provided in the eBook to ensure you’re using the latest code versions.
Regards,
Sara