Hello.I have a project that I have been developing on a lollin s2 board. It works as intended and compiles, but if I add an esp32 devkit v1 board, it will not compile, givingme several errors in the AsyncTCP-esphome library. It’s the exact same code, I even tried starting a new project, selecting the board, and copying and pasting the code. The librarys download, but can’t compile. Here is a screenshot when trying to compile for this board, if I swap to Lollin board, everything compiles.
Here is my ini file that I modified to add the second board.
[env:lolin_s2_mini]
platform = espressif32
board = lolin_s2_mini
framework = arduino
monitor_speed = 115200
build_flags =
-DARDUINO_USB_CDC_ON_BOOT=1
lib_deps =
ottowinter/ESPAsyncWebServer-esphome@^3.1.0
esphome/AsyncTCP-esphome@^2.0.1
ottowinter/ESPAsyncTCP-esphome@^1.2.3
me-no-dev/AsyncTCP@^1.1.1
ayushsharma82/AsyncElegantOTA@^2.2.8
[env:esp32doit-devkit-v1]
platform = espressif32
board = esp32doit-devkit-v1
framework = arduino
monitor_speed = 115200
lib_deps =
ottowinter/ESPAsyncWebServer-esphome@^3.1.0
esphome/AsyncTCP-esphome@^2.0.1
ottowinter/ESPAsyncTCP-esphome@^1.2.3
me-no-dev/AsyncTCP@^1.1.1
ayushsharma82/AsyncElegantOTA@^2.2.8
Am I doing something wrong?
Here are a few things I noticed:
1. ayushsharma82/AsyncElegantOTA is deprecated the current version is ayushsharma82/ElegantOTA
2. ottowinter/ESPAsyncWebServer is a fork of me-no-dev/ESP Async WebServer. Is there a special reason that you are using this fork?
3.
esphome/AsyncTCP-esphome@^2.0.1
ottowinter/ESPAsyncTCP-esphome@^1.2.3
me-no-dev/AsyncTCP@^1.1.1
You are mixing things up here.
ESPAsyncTCP is for ESP8266 whereby AsyncTCP ist for ESP32.
The correct library is installed automaticly by ESPAsyncWebServer as depenency.
Remove these entries and have the correct library installed automatically.
Question: Are you creating a project for ESPHome or do you just want to use the ESPAsyncWebServer and ElegantOTA in your project?
1 Like
Thank you for your reply. last night I was up for an hour trying everything and saw these errors. The elegantOTA is deprecated, but I don’t really care about it right now, I’ll update it later. This is a semi old project I’m trying to add to a board I found alying around. And about the “fork” from ottowinter/ESPAsyncWebServer, I really don’t know, I used a sketch in my pogram that needed that library, so I added it.
As for point 3, I did delete the redundencies. Leaving only three needed, but that still gave me errors on compiling, all from esphome/AsyncTCP.
literally right before leaving, I found that setting the esphome/AsyncTCP to version 2.0.0 instead of ^2.0.1 (which I am guessing means above 2.0.1), downloaded the 2.0.0 version and it compiled. So something in the latest version (If I remember it was 2.1.0), is not letting the code compile. THe funny thing is, it compiles for the Lollin s2 board, but not for the devkit v1 board, both being esp32. That’s the odd part.
But thanks to the troubles, I have learned a lot about libaries, and how to download a specific version.
Sorry. This is the part I didn’t know, I thought I needed to declare AsyncTCP.h aslo. So, I deleted these three:
esphome/AsyncTCP-esphome@^2.0.1
ottowinter/ESPAsyncTCP-esphome@^1.2.3
me-no-dev/AsyncTCP@^1.1.1
and when compiling, it gave me errros for missing AsyncTCP.h. And if I remove AsyncTCP.h from library declaration, the same thing happens. Errors all over esphome/AsyncTCP.
Now know why, it’s because it downloads the latest version automatically. So I need to add to dependencies, but tell what version I want. Can anybody else confirm if this dependency is not working for them?
All this is because I’m a newbie, libaries in platformio is stil not my strong point, but I have learned a lot last night.
This assumption is wrong, an ESP32-S2 is not an ESP32!
Even if ESP32 appears in both names, they are completely different microcontrollers.
Without knowing your project and your exact intentions, it is difficult to determine the correct configuration.
There are several dependencies here that we first have to solve individually, by which I don’t mean the dependencies of the libraries but of your project and its configuration.
So let’s start with the unanswered question:
Are you creating a project for ESPHome or do you just want to use the ESPAsyncWebServer and ElegantOTA in your project?
This is not a project for ESPHome. The ESPAsyncWebServer is for a html page I am serving, to control the intensity of a pwm signal, to control LED intensity. And ElegantOTA was the last thing added (a few months ago), this is just to be able to update the firmware without connecting it up through usb.
Ok, then
first delete the .pio/libdeps folder.
Change your lib_deps in platformio.ini to:
lib_deps =
me-no-dev/ESP Async WebServer
ayushsharma82/AsyncElegantOTA
After saving the platformio.ini all dependent libraries (AsyncTCP etc.) should be installed automatically and show up in the .pio/libdeps folder.
Now I get different errors:
This bug has already been fixed in the ESPAsyncWebServer, but has not been picked up by the library registry.
To fix this, use the source from Github.
Change the lib_deps to:
lib_deps =
https://github.com/me-no-dev/ESPAsyncWebServer
ayushsharma82/AsyncElegantOTA
Sorry for the inconvenience (I always use the sources from Github, so the error never occurred for me)
Thank you very much! It now compiles without any errors, and with only those two dependencies.
Hi Sivar2311
I have getting this compilation error unfortunately with ESPAsyncWebServer either from ESPHome or from me-no-dev
Here is my plotformiO.ini
[env:esp32-c3-devkitm-1]
platform = espressif32
board = esp32-c3-devkitc-02
; board = esp32-c3-devkitm-1
framework = arduino
lib_deps =
LittleFS
https://github.com/tzapu/WiFiManager
https://github.com/me-no-dev/ESPAsyncWebServer
; mathieucarbou/ESPAsyncWebServer@^3.3.23
powerbroker2/SafeString @ ^4.1.31
bblanchon/ArduinoJson @ ^7.0.3
ayushsharma82/ElegantOTA
dlloydev/ESP32 ESP32S2 AnalogWrite@^5.0.2
; madhephaestus/ESP32Servo @ ^3.0.5
build_flags =
-D ARDUINO_USB_CDC_ON_BOOT=1
-D ARDUINO_USB_MODE=1
-fpermissive
-DELEGANTOTA_USE_ASYNC_WEBSERVER=1
-DESPWifiManualSetup=false
-DBOARD_HAS_PSRAM
board_build.filesystem = littlefs
board_build.f_cpu = 80000000L
board_build.mcu = esp32c3
board_build.flash_mode = dio
board_build.partitions = tinyuf2-partitions-4MB.csv
monitor_speed = 115200
lib_ldf_mode = chain+
@watersoup Can you share a minimal example to reproduce the error?
Hi @sivar2311,
Unforunately or fortunately, It seems my minimal version works fine whereas only two libraries are imported tzapu’s wifimanager and ESPHome-AsyncWebServer, even when I make use of matheiuCarbou’s version of AsyncWebServer in the bigger version it compiles fine.
Example that works fine
[env:esp32-c3-devkitm-1]
platform = espressif32
board = esp32-c3-devkitm-1
framework = arduino
build_flags =
-D ARDUINO_USB_CDC_ON_BOOT=1
-D ARDUINO_USB_MODE=1
-fpermissive
-DELEGANTOTA_USE_ASYNC_WEBSERVER=1
-DESPWifiManualSetup=false
-DBOARD_HAS_PSRAM
board_build.filesystem = littlefs
board_build.f_cpu = 80000000L
board_build.mcu = esp32c3
board_build.flash_mode = dio
lib_deps =
tzapu/WiFiManager @ ^2.0.17
esphome/ESPAsyncWebServer-esphome @ ^3.3.0
lib_ldf_mode = chain+
So your problem is solved?
You make a lot of adjustments in platformio.ini.
At least board_build.mcu
is unnecessary, as this is already set in esp32-c3-devtkivm-1.json.
Are you really sure that you need all these settings?
@sivar2311 : Thanks for the reply. The problem is not solved, as I am building ESP32
based IOT with my servoMotor
. I need this to be able to make use of CaptivePortal
.
I realized that Mathieu Carbou’s WifiManager compiles but the Portal never shows up when I try to look for SSID. Doubt you think my board ESP32-c3 might be flawed ? here is my full repo https://github.com/watersoup/ESP32JRBL-BLEClient/tree/w_localWiFiMang_CP
So I moved away to ESPHome-AsyncWebServer and WifiManager by Alexsw, realizing that there is good chance for it to work with ESP32C3-supermini. Alas, it never compiled in my project. ( I can point you to whole code if you think
About the settings:
I had been copying some of my settings from older version of my work.
I will remove .mcu
for sure, the board : esp32-c3-devkitm-1
and esp32-c3-devkitc-02
both work without any issues.
Thanks
Jag
This leads to a 404 page.
Do you mean GitHub - watersoup/Esp32BleServer ?
But this repository doesn’t have a branch named “w_localWiFiMang_CP” ?!
So the error message from here is gone?
Yes, Compilation error is not there, but the AP doesn’t show up on the list of available APs to connect on the network.
Here is the twist:
I have three of those ESP32-c3 mini, and I tried all of them the SSID does show up ones, but never again. When I try to connect it to new network, after Erase Flash.
Finally I think I am sticking to MathieuCarbou’s version of AsyncWebServer.
I will keep this post informed though.
Thanks for your help,
Jag
Hi @sivar2311
sorry not ESP32BleServer, it should be under ESP32BLEJRBL_client, I guess I must not have made it public… let me see, yes it shows private. Okay I made it public
Thanks
watersoup
I think you have to clean up your project.
There are some strange things like
You have https://github.com/tzapu/WiFiManager
in your lib_deps.
But you also have these files:
./src/ESPAsyncWiFiManager.cpp
./include/ESPAsyncWiFiManager.h
!?
But all in all your issue is about the WiFiManager library, correct?