-
Notifications
You must be signed in to change notification settings - Fork 46
Add LibreTiny support #187
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
Add LibreTiny support #187
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds LibreTiny platform support to ESPAsyncWebServer by introducing conditional code branches for LIBRETINY alongside existing platforms and by adding a new dependency (AsyncTCP-esphome). Key changes include updates to preprocessor conditionals across several source files, integration of mbedtls-based SHA1 calculation for LibreTiny, and updated documentation and library metadata.
Reviewed Changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
src/literals.h | Added extern declaration and macro alias for emptyString for LIBRETINY support. |
src/WebServer.cpp | Defined emptyStringForEspAsync for LIBRETINY compilation. |
src/WebRequest.cpp | Updated conditional checks to include LIBRETINY when using legacy String methods. |
src/WebHandlers.cpp | Added LIBRETINY branches for etag generation. |
src/Middleware.cpp | Adjusted client IP printing logic to support LibreTiny. |
src/ESPAsyncWebServer.h | Extended platform conditionals to include LIBRETINY for AsyncTCP. |
src/AsyncWebSocket.h | Updated preprocessor conditions to include LIBRETINY. |
src/AsyncWebSocket.cpp | Integrated mbedtls SHA1 implementation for LibreTiny. |
src/AsyncEventSource.h | Updated conditionals for LIBRETINY support. |
library.json | Added LibreTiny platform and relevant dependency changes. |
README.md | Documented the new AsyncTCP-esphome dependency and LibreTiny usage. |
@kuba2k2 : do you want to look into this compile issue (ESP32Async/AsyncTCP#64) before I release AsyncTCP and before you can resume this PR ? Or we simply drop support for generic-rtl8710bn-2mb-788k ? |
I will look into that. |
It's upgraded to v3.4.3 now - I'll let the CI do the rest 😄 |
src/literals.h
Outdated
#ifdef LIBRETINY | ||
extern const String emptyStringForEspAsync; | ||
#define emptyString emptyStringForEspAsync | ||
#endif | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is it safe to have it defined globally ? Could it conflict with other libs ?
@kuba2k2 : your PR is ready to be rebased on main: there are some conflicts. |
@kuba2k2 : please let me know if you'll have time to revisit this PR, or if you can open your branch to maintainers so that I can continue within this same PR. Thanks! |
Hi |
cd2a5aa
to
817efb2
Compare
The PR is now updated to use LibreTiny v1.9.1, since it's now available on PlatformIO Registry. |
@kuba2k2 : build is failing.... |
That's because DNSServer library is not available in LT, ESPHome uses this instead: https://registry.platformio.org/libraries/bbx10/DNSServer |
@kuba2k2 : could you please rebase ? I cannot update your branch. Thanks! |
fb38ee3
to
dd934b8
Compare
There you go. But anyway, I also enabled WiFi related code on LT, so CI should now pass (I tested the |
@kuba2k2 : CI still not passing... |
If we could get this merged soon that would great. I am trying to move ESPHome to use this and having LibreTiny support would simplify that effort. Thanks! |
I will try to fix CI. |
Ok yeah I see it, I basically did the same thing. I need this for the Arduino 3 PR, can join the discord discussion here https://discord.com/channels/429907082951524364/1377029109758038087 |
If you can get this LibreTiny PR merged hopefully we can get esphome/esphome#8867 merged with the Arduino 3 PR next week. Want to get it merged after the release. |
Some of the examples are ESP-specific, for example they use LittleFS. |
Like I said, I cannot edit the PR to add a new commit. I suggest you can replace the loop with a list of example names you know will compile then. Thanks! |
Thanks! Release v3.7.8 is in progress... |
Excellent thanks |
This PR introduces a series of non-breaking changes that make it possible to use latest ESPAsyncWebServer on LibreTiny platform (BK72xx, RTL87xx).
Previously, this was supported in https://github.com/esphome/ESPAsyncWebServer and used in ESPHome this way. That library is unmaintained, so I'm introducing support for LibreTiny in the updated version by ESP32Async. When it gets released, the web server used by ESPHome may be updated to ^v3.7.7 (in this PR: esphome/esphome#8867).
The AsyncTCP implementation used for LibreTiny is https://github.com/esphome/AsyncTCP - it is the same one used for the few last years, so it's well-tested and stable.
This was tested and verified working on BK7231N and RTL8710BN.