-
-
Notifications
You must be signed in to change notification settings - Fork 63
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
WifiClient and WiFiClientSecure issues... #239
Comments
Hi I haven't had much time to check your library repo yet, so I just gave it a quick look. If you want, we can discuss this further on our Discord server (link in the docs), or here of course. Feel free to make PRs, even if they don't get merged or will need changes I think it's worth it to show off your ideas. I'm planning to refactor LibreTiny (again) and cleanup vendor SDKs as much as possible. It'll then use the same version of LwIP and mbedTLS on all platforms. That's a future plan, but I think it's reasonable and doable. |
Hi, I ended up with two different classes because I already had the RTL version sorted out and when I needed to fix the Beken code I decided to first start from scratch to see what's going on, so I copied the ESP32 library's code as a start point. So I ended up with two sets of classes for different platforms. At the end, in any case, they need to be merged into one class for all platforms and handled with macros, but I didnt have time yet to polish and cleanup in that level. My idea about the LibreTiny fixes for a pull request for the same area is:
If you agree with me about it, I will create a pull request with the above plan as soon as possible.. About the HTTPClient class issues. Do we really need the CookieJar implementation there? About the story on why I started to use your project: I added you in LinkedIn and would like to talk to you.. In case you are willing to and have time, I would be happy to discuss about a plan to work together professionally. The work we would do together would in any case end up as new features or bug fixes in LibreTiny, but with a professional, paid approach to work on issues/features.. Thanks and regards. |
We can accept such an approach (separate classes) as a temporary solution - until we cleanup the SDK and use the same versions of LwIP and mbedTLS on all platforms. This will probably happen sometime this year, but it might be months from now. These classes (LwIPClient, WiFiClient[Secure] and HTTPClient) were copied from somewhere else, most likely ESP32 Arduino Core. They might be unstable, because I did not put much work into testing them. The reason for this is that LibreTiny is mostly used by ESPHome users, and not by developers working on their own projects. That makes it easy to miss such bugs, until someone actually starts using these libraries. The HTTPClient class was also copied from other Arduino cores, because LibreTiny was meant to be ESP32-Arduino-compatible. Hence, removing a functionality (the CookieJar) could cause problems for some use cases, even if that functionality isn't 100% bug-free. Adding a new "simple" class is a better idea. That being said, if you're doing more serious work with LibreTiny, consider using LwIP and mbedTLS directly - without the Arduino wrapper classes. That way you get much more control about what your program is doing. The LwIP library allows to use Unix socket-like approach to network programming. Anyways, I've accepted the invitation on LinkedIn. I'm not actively using that platform, so I'm not sure where to begin. |
There are a some issues I encountered when coding for wb3s and wbr3 chips (using the feature/realtek-update branch for wbr3):
But the good news is:
After some digging and experimenting, I solved all of the above issues by implementing:
**The only change I made in my local copy of LibreTiny repo is, changing the bool _connected field of LWIPClient class to protected instead of private, so that I could access it during inheritance.. All 3 classes I implemented rely on this change to work.
All of the above are packed in https://github.com/nsavga/WiFiLib-LibreTiny repository I created.
I tested them for both wbr3 and wb3s and everything seem to be working fine.
I checked the contributor's guide but I was still hesitant to create a pull request before communicating..
I would love to apply the changes, in an appropriate way, in LIBRETINY natively itself, and create a pull request.. but it would be better first discussing the most proper way to do it..
Also I am willing to contribute in any other part of the project after the discussion. (For instance, I desparately need to make wbr3(RTL8720CF) OTA work..)
@kuba2k2, please let me know how we can have a discussion for applying my solution into LibreTiny natively and possible future contributions..
Regards.
The text was updated successfully, but these errors were encountered: