8000 Ready for ESP32 V3 &V2 by ednieuw · Pull Request #2 · lacamera/ESPAsyncWebServer · GitHub
[go: up one dir, main page]

Skip to content

Ready for ESP32 V3 &V2 #2

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Ready for ESP32 V3 &V2 #2

wants to merge 1 commit into from

Conversation

ednieuw
Copy link
@ednieuw ednieuw commented May 30, 2024

Changed ESP32 board to 3.0.0
Changed in Arduino\libraries\ESPAsyncWebServer\src\WebAuthentic
at line 75,76,77
//-----------------
#ifdef ESP_ARDUINO_VERSION_MAJOR
#if ESP_ARDUINO_VERSION >= ESP_ARDUINO_VERSION_VAL(3, 0, 0)
// Code for version 3.x
mbedtls_md5_init(&_ctx);
mbedtls_md5_starts(&_ctx);
mbedtls_md5_update(&_ctx, data, len);
mbedtls_md5_finish(&_ctx, _buf);
#else
// Code for version 2.x
#ifdef ESP32
mbedtls_md5_init(&_ctx);
mbedtls_md5_starts_ret(&_ctx);
mbedtls_md5_update_ret(&_ctx, data, len);
mbedtls_md5_finish_ret(&_ctx, _buf);
#else
MD5Init(&_ctx);
MD5Update(&_ctx, data, len);
MD5Final(_buf, &_ctx);
#endif
#endif
#endif
//--------------------
in AsyncEventSource.cpp changed at line 189 ets_printf --> log_e for V3
in AsyncWebSocket.cpp changed at line 549 ets_printf --> log_e for V3
#ifdef ESP_ARDUINO_VERSION_MAJOR
#if ESP_ARDUINO_VERSION >= ESP_ARDUINO_VERSION_VAL(3, 0, 0)
// Code for version 3.x
log_e("ERROR: Too many messages queued\n");
#else
// Code for version 2.x
ets_printf("ERROR: Too many messages queued\n");
#endif
#endif

 Changed ESP32 board to 3.0.0
               Changed in Arduino\libraries\ESPAsyncWebServer\src\WebAuthentic
               at line 75,76,77   
               //-----------------              
                #ifdef ESP_ARDUINO_VERSION_MAJOR
                   #if ESP_ARDUINO_VERSION >= ESP_ARDUINO_VERSION_VAL(3, 0, 0)
                     // Code for version 3.x
                   mbedtls_md5_init(&_ctx);
                   mbedtls_md5_starts(&_ctx);
                   mbedtls_md5_update(&_ctx, data, len);
                   mbedtls_md5_finish(&_ctx, _buf);
                   #else
                    // Code for version 2.x
                   #ifdef ESP32
                      mbedtls_md5_init(&_ctx);
                      mbedtls_md5_starts_ret(&_ctx);
                      mbedtls_md5_update_ret(&_ctx, data, len);
                      mbedtls_md5_finish_ret(&_ctx, _buf);
                   #else
                      MD5Init(&_ctx);
                      MD5Update(&_ctx, data, len);
                      MD5Final(_buf, &_ctx);
                    #endif
                 #endif
                #endif
               //-------------------- 
               in AsyncEventSource.cpp changed at line 189 ets_printf --> log_e for V3
               in AsyncWebSocket.cpp changed at line 549 ets_printf --> log_e  for V3
                 #ifdef ESP_ARDUINO_VERSION_MAJOR
                   #if ESP_ARDUINO_VERSION >= ESP_ARDUINO_VERSION_VAL(3, 0, 0)
                     // Code for version 3.x
                    log_e("ERROR: Too many messages queued\n");
                   #else
                    // Code for version 2.x
                    ets_printf("ERROR: Too many messages queued\n");
                 #endif
                #endif
@Evs91
Copy link
Evs91 commented Jun 23, 2024

For what my opinion is worth (i.e. trying to make a remote relay module with the async library) - this addresses the changes needed to fix for the 3.x version of Arduino core for ESP32.

@jake
Copy link
jake commented Jun 29, 2024

also just anecdotal, but after getting error: 'mbedtls_md5_starts_ret' was not declared in this scope; did you mean 'mbedtls_md5_starts'? and similar errors, using this fork works great with my ESP32-S2-WROVER boad

@Evs91
Copy link
Evs91 commented Jun 30, 2024

I don't see code to initialize your wifi client? I can assume it is lower but I hate making assumptions if this is partial code. I'm assuming as well that if you do have the wifi initizlized that is outputting the IP address to serial output? Also: Same network or different VLANs (if applicable)?

@AllanOricil
Copy link

@Evs91 the issue was that I was declaring AsyncWebServer server(80); inside the function's scope. At the end of the scope the object is gone. After moving it to outside, in the global scope, everything worked as expected.

@giddel
Copy link
giddel commented Jul 16, 2024

Same error message here :-(
I've selected the board "ESP32 Dev Module" in Arduino IDE and use a "ESP-32 Dev Kit C 2" from AzDelivery.

What can I do?

@normaligator
Copy link

Thank you, this is working for my setup

@mnemocron
Copy link

Heya, I just crashed into the ol' issue of mbedtls_md5_starts_ret was not declared in this scope. Maybe someone could actually merge this PR (?)

@giddel
Copy link
giddel commented May 6, 2025

Yes, please merge 😗

@ednieuw
Copy link
Author
ednieuw commented May 15, 2025

Use the ESPAsyncWebServer regular maintained by Mathieu Carbou.
https://github.com/ESP32Async/ESPAsyncWebServer
it can also be found between the Arduino libraries in the Arduino IDE

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants
0