• Skip to main content
  • Skip to primary sidebar

RNTLab.com

The Ultimate Shortcut to Learn Electronics and Programming with Open Source Hardware and Software

  • Courses
  • Forum
    • Forum
    • Ask Question
  • Shop
  • Account
  • Blog
  • Login

ESP32S2

Q&A Forum › Category: ESP32 › ESP32S2
0 Vote Up Vote Down
Dattatraya Apte asked 5 years ago

Dear Sir,
You have provide excellent tutorials on ESP8266 and ESP 32. Do you have plans in near future to provide tutorials on the latest version of ESP32 i.e. ESP32S2.
Regards
D. V. Apte
Baroda – India

20 Answers
0 Vote Up Vote Down
Best Answer
Sara Santos Staff answered 2 years ago

Basically, PIO can’t recognize/download the latest version of the library and uses a version with deprecated methods. This will result in the following error: “undefined reference to ‘mbedtls_md5_starts´”.

There are several ways to fix/workaround this issue:

1. Fix the library file to use the latest methods:
Hover your mouse over the reference to the directory of the problematic file. You’ll get a little box with a link to open that file. Press CTRL and click on the blue link to open the file.

PlatformIO will open the problematic file (WebAuthentication.cpp) on the lines that are causing the issue. The problematic lines are lines 74, 75, and 76. Replace them with the following:

mbedtls_md5_starts_ret(&_ctx);
mbedtls_md5_update_ret(&_ctx, data, len);
mbedtls_md5_finish_ret(&_ctx, _buf);

Save the file by pressing CTRL+S. Then, you can close that file.
Try to compile and upload the code again to your board. The issue should be gone.

 

2. Use espressif version 3.5.0.
Replace the platform to espressif32@3.5.0 instead espressif32 in the platformio.ini file like this:

platform = espressif32@3.5.0

 

3. Use the library by referencing the library repository link
Instead of using the following on your platformio.ini:

lib_deps = ESP Async WebServer

use the following instead:

lib_deps = https://github.com/me-no-dev/ESPAsyncWebServer.git

Regards,
Sara

0 Vote Up Vote Down
Sara Santos Staff answered 5 years ago

Hi.
Thanks for your suggestion.
We may came up with some tutorials for that, but not in a near future.
We have other projects lined up first.
Regards,
Sara

0 Vote Up Vote Down
Jean-Francois PEYRE answered 4 years ago

Hello, any news regarding ESP32S2 ?
I purchased your (excellent) Ebook on webservers, just to discover the projects do not work for ESP32S2.
Apparently, the library you use, ESPAsyncWebServer, doesn’t work for the S2.
I get 
undefined reference to `mbedtls_md5_starts’
Any idea ? Thanks
Jef

0 Vote Up Vote Down
Sara Santos Staff answered 4 years ago

Hi.
Did you try the examples with a regular ESP32?
Are you using Vs Code or Arduino IDE?
Regards,
Sara

0 Vote Up Vote Down
Jean-Francois PEYRE answered 4 years ago

THANKS FOR YOUR VERY QUICK REPLY, IT SEEMS TO BE WORKING NOW !
I am using Arduino, your question regarding ESP32 helped me, I was getting the same error with pure ESP32.
I managed, with pain,to remove the 3 libraries (ESPAsyncWebServer, AsyncTCP & ESPAsyncTCP were placed twice on my disc, including one set under the /documents/Arduino/librairies and one in user//appdata/local/arduino15…..
And after installing up to date libraries from zip files, It works, both for ESP32 and ESP32S2
Thanks a lot
Jef

0 Vote Up Vote Down
Sara Santos Staff answered 4 years ago

That’s great!
I’m glad you solved the problem.
If you need further help, you just need to open a new question in our forum.
Regards,
Sara

0 Vote Up Vote Down
Roger Neumair answered 3 years ago

Hello Sara,
I’ve just updated to the latest libraries and now I am getting: “undefined reference to `mbedtls_md5_starts'”
I am using a AZ Delivery devkit v4 (ESP32) and VS code. I am sure it was working before.
I used the sensor readings example from the build-web-servers-ebook with slight modifications (only on the sensor side) but also other SW that is based on ESP async web server seems to fail.
Any idea where to look?
Best regards,
Roger
 
 

0 Vote Up Vote Down
Roger Neumair answered 3 years ago

Just to add I use AsyncTCP 1.1.1, ESP Async WebServer 1.2.3

0 Vote Up Vote Down
Sara Santos Staff answered 3 years ago

Hi.
To be honest, I’m not sure why that error happens.
It happened to me before and to other readers. The issue was solved by reinstalling IDE and libraries from scratch. I hope that fixes the issue.
Regards,
Sara

0 Vote Up Vote Down
Roger Neumair answered 3 years ago

Hi Sara,
Thanks for your reply. I tried something different meanwhile.
I used ottowinter/ESPAsyncWebServer-esphome@^2.1.0 instead of ESP Async WebServer and it at least compiles without a problem. I haven’t tested functionality yet but my guess is that it will work.
I also did clean the complete workspace in VSCode but that didn’t help.
Best regards,
Roger
 

0 Vote Up Vote Down
Roger Neumair answered 3 years ago

Did a complete reinstall of IDE including platformIO. It seems it is now working again.
At least thePWM slider web server example did compile and execute OK.
Best regards,
Roger
 

0 Vote Up Vote Down
Sara Santos Staff answered 3 years ago

Great!
Let’s hope the problem is solved.
I’ll mark this issue as resolved. If you need further help, you just need to open a new question in our forum.
Regards,
Sara

1 Vote Up Vote Down
Roger Neumair answered 3 years ago

Hi Sara,
The problem came back again.
I found a way to solve it udating the library directly from github.
Best regards,
Roger
 

0 Vote Up Vote Down
Sara Santos Staff answered 3 years ago

Great! Thanks for sharing that.
Regards,
Sara

0 Vote Up Vote Down
Jonathan Randall answered 3 years ago

I had the same issue and I had to add the following to my .ini file and it solved it:

lib_deps =
    https://github.com/me-no-dev/ESPAsyncWebServer
lib_ldf_mode = chain+

0 Vote Up Vote Down
Sara Santos Staff answered 3 years ago

Thanks for sharing that solution. 
I’ll add that workaround in future projects in case the user has problems with the library.
Regards,
Sar

0 Vote Up Vote Down
Roger Neumair answered 3 years ago

Unfortunately Jonathans solution comes with a drawback in my case.
The Build Filesystem option disappears from the project tasks using the changes in .ini file. Actually the whole Platform option disappears.

 

0 Vote Up Vote Down
Sara Santos Staff answered 3 years ago

Hi Roger.
What is exaclty the issue you’re facing?
Regards,
Sara

0 Vote Up Vote Down
Roger Neumair answered 3 years ago

Hi Sara,
The problem is that the whole Platform item is not present in platformio tab of VS-Code.
Normally you find commands like Build Filesystem Image, Program Size, Upload File System Image … in there.
PIO Menu PIO Menu with issue
Tried to include two screenshot but I am not sure it works.

0 Vote Up Vote Down
Sara Santos Staff answered 3 years ago

Hi.
 
To include a screenshot, please upload your images to Google drive, or Imgur, or Dropbox, for example, and then share a link to the pictures.
 
Have you tried searching on the PlatformIO forum if there’s a similar issue?
For example, take a look at the following issues and see if some of the suggestions help: 

  • https://community.platformio.org/t/platformio-toolbar-and-home-icon-not-showing-in-vscode/12334/5
  • https://community.platformio.org/t/platformio-icon-not-show-in-my-vstudio-ide/21673

 
Let me know if this helps.
Regards,
Sara

Primary Sidebar

Login to Ask or Answer Questions

This Forum is private and it’s only available for members enrolled in our Courses.

Login »

Latest Course Updates

  • [eBook Updated] Learn Raspberry Pi Pico/Pico W with MicroPython eBook – Version 1.2 May 26, 2025
  • [New Edition] Build ESP32-CAM Projects eBook – 2nd Edition April 16, 2025

You must be logged in to view this content.

Contact Support - Refunds - Privacy - Terms - MakerAdvisor.com - Member Login

Copyright © 2013-2025 · RandomNerdTutorials.com · All Rights Reserved

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.