esp32FOTA icon indicating copy to clipboard operation
esp32FOTA copied to clipboard

TinyGSM and FOTA

Open grichfitz opened this issue 4 years ago • 7 comments

Hay peeps,

OK so this isnt really an issue, this FOTA works well. Thanks chris.

But can it work via GSM in particular TinyGSMclient?

I tried, but obviously it fails.

Just wondered if anyone had any input.

Thanks all. grichfitz

grichfitz avatar Mar 11 '21 20:03 grichfitz

Hi,

I would be very interested too.

I had not time to test yet but maybe changing the following: // OTA Logic void esp32FOTA::execOTA() { WiFiClient client;

By this would make the trick: // OTA Logic void esp32FOTA::execOTA() { TinyGsmClient client(modem);

hilsonp avatar Mar 17 '21 23:03 hilsonp

The usage with TinyGSM I think, should look like this (but it is impossible for given lib, for given moment): `#include <TinyGSM.h> #include someSSL.h #include esp32fota.h

TinyGSM modem(Serial1); TinyGSMClient baseclient(modem); someSSLClient sslclient(baseclient); esp32Fota (sslclient);`

woodlist avatar Apr 23 '21 21:04 woodlist

A few more places are using WiFi object too. If use GSM, I expect to have more changes. https://github.com/chrisjoyce911/esp32FOTA/blob/master/src/esp32fota.cpp#L216

IoTThinks avatar Jun 11 '21 05:06 IoTThinks

After one hour, I think it is quite difficult to integrate Tiny GSM into this library. The current library uses WiFiClient and HttpClient which are not friendly with Tiny GSM stack.

IoTThinks avatar Jun 12 '21 10:06 IoTThinks

I forked this library into esp32FOTAGSM. Able to...compile it now.

Not run yet. Still in progress.

IoTThinks avatar Jun 13 '21 12:06 IoTThinks

Working with TinyGSM. https://github.com/IoTThinks/esp32FOTAGSM Changed quite a few places

  • Fixed peek() in TinyGSM library.
  • Replaced WiFiClient by TinyGSM.
  • Replaced HTTPClient by ArduinoHttpClient.
  • Broke checkURL into checkHOST, checkPORT, checkRESOURCE
  • Support HTTP only.

IoTThinks avatar Jun 15 '21 04:06 IoTThinks

I made a fork that now working with TinyGsm https, by changing WifiClient with SSLClient. https://github.com/chupachupbum/esp32FOTA

chupachupbum avatar Aug 24 '22 09:08 chupachupbum