-
Notifications
You must be signed in to change notification settings - Fork 89
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
Use custom networking stack? #157
Comments
hi, thanks for your feedback 👍 SSLClient and NetworkClientSecure inherit from the same Arduino Client class and share the client method names used by esp32FOTA, so it should probably work. you can experiment by modifying the include block in esp32FOTA.hpp. #if __has_include(<SSLClient.h>)
#include <SSLClient.h> // https://github.com/govorox/SSLClient/
#define ClientSecure SSLClient
#elif __has_include(<NetworkClientSecure.h>)
#include <NetworkClientSecure.h> // arduino-esp32 core 3.x
#define ClientSecure NetworkClientSecure
#else
#include <WiFiClientSecure.h> // // arduino-esp32 core 2.x
#define ClientSecure WiFiClientSecure
#endif
if this works for you, feel free to submit a pull request 😉 |
the specific instance i provide needs to be configured before like sim settings etc. before i can leave control over to the update library, so just replacing the type wouldnt work? i would need to pass the network instance to be used to the library i think? an example would be |
been trying to get esp32FOTA to work with phy/transport/app layers without refactoring every OSI related function calls but failed so I guess a refactor will be needed after all I'm testing a template that I hope will accept both custom and builtin phy/transport/app clients: template<typename APP, typename PRES, typename PHY>
struct OSILayers
{
OSILayers() { };
OSILayers( APP& app, PRES& pres, PHY& phy )
: AppClient(&app), PresClient(&pres), PhyClient(&phy) { }
APP AppClient; // application (HTTP, Pubsub)
PRES PresClient; // Presentation (SSL, Network)
PHY PhyClient; // Transport/Phy (WiFi, Ethernet, GSM)
};
HTTPClient appclient;
NetworkClientSecure presclient;
NetworkClient phyclient;
auto builtinStack = new OSILayers<HTTPClient*,NetworkClientSecure*,NetworkClient*>(&appclient, &presclient, &phyclient);
// PubSubCLient appclient;
// SSLClient presclient;
// TinyGSMClient phyclient;
// auto customStack = OSILayers<PubSubCLient*,SSLClient*,TinyGSMClient*> stackFOTA(&appclient, &presclient, &phyclient); This This creates a significant tech debt:
|
Sounds like its quite complicated to get this working if I'm correct? |
So i have a question if its possible to instead of using networkclient built in to esp32 if we can use custom networking like
https://github.com/govorox/SSLClient
Or other Client based transports.
That way we get support for many different Wifi, Sim and Ethernet modems that implements a client class. And ssl on top of that implemented by SSLClient using those clients etc.
The text was updated successfully, but these errors were encountered: