Closed Warlib1975 closed 5 years ago
The problem occurs only when using GSMClient class. Everything work ok without using it. I've tested on the boards: MH ET Live ESP32 Devboard Wemos D1 Mini (ESP8266)
The error is the same.
On the Arduino Mega 2560 compiled without problems.
Someone has managed the problem?
I have the same problem, for now I change my Arduino ESP32 Board Version form 1.0.2 to 1.0.1...With this I can compile now
This is a problem only for the esp32 hardware, to solveit I comment in C:\Users\Max\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.2\cores\esp32\Client.h
This two lines:
//virtual int connect(IPAddress ip, uint16_t port, int timeout) =0; //virtual int connect(const char *host, uint16_t port, int timeout) =0;
After that I can compile, but It is not the correct solution...
After that I can compile, but It is not the correct solution...
Thank you for the solution. But, I suppose it's a too rough way to solve the problem. Every time you need to remember, that after ESP32 lib updating you need to fix Client.h
I solved the problem with compilation adding this block of code into TinyGsmClientSIM800.h
virtual int connect(IPAddress ip, uint16_t port, int timeout) { throw "Method [virtual int connect(IPAddress ip, uint16_t port, int timeout)] is not implemented in TinyGsmClientSIM800.h"; }
virtual int connect(const char host, uint16_t port, int timeout) { throw "Method [virtual int connect(const char host, uint16_t port, int timeout)] is not implemented in TinyGsmClientSIM800.h"; }
I've made pull request to implement this piece of code in the TinyGsmClientSIM800.h. https://github.com/vshymanskyy/TinyGSM/pull/271/commits/85368d1f3ff41a5dd2572d071dc5424f1c368e63
Same problem here while compiling on a ESP8266 / WeMos D1. I tried Warlib1975 fix to no avail. Compiliation breaks at the TinyGsmClient client(modem) - Line 81 in the webclient.ino.
Same problem here while compiling on a ESP8266 / WeMos D1. I tried Warlib1975 fix to no avail. Compiliation breaks at the TinyGsmClient client(modem) - Line 81 in the webclient.ino.
Try to remove ifdef section of the fix. I'm not sure that in case of different ESP8266 boards this clause works properly.
Thanks Warlib1975 for the idea - sadly no luck there :(
This really should be fixed on the ESP32 side, not by TinyGSM. They added/modified virtual functions to the Client.h that are out of line with the standard Arduino API. They should have been aware of this, but I created a new issue on their side just in case (https://github.com/espressif/arduino-esp32/issues/2755).
The ESP8266 core created the same problem in version 2.5.0. On the ESP8266 side, it appears to be fixed for the yet-to-be-released 2.5.1.
As mentioned in https://github.com/vshymanskyy/TinyGSM/issues/220, you should be able to compile by rolling back to core version 1.0.1 for the ESP32.
For the ESP8266 you could roll back to 2.4.2 or use pull the core from git.
The compiler problems with the ESP32 and ESP8266 should now be fixed. The timeout functions are now fully implemented for all modems.
During compilation on ESP32 board the example WebClient.ino got the error
GSM_SIM800L.cpp:39:15: error: cannot declare variable 'client' to be of abstract type 'TinyGsmSim800::GsmClient'
TinyGsmClient client(modemGSM);
In file included from C:\Users\Fedorov_A\Documents\Arduino\libraries\TinyGSM_ID1287\src/TinyGsmClient.h:15:0,
C:\Users\Fedorov_A\Documents\Arduino\libraries\TinyGSM_ID1287\src/TinyGsmClientSIM800.h:50:7: note: because the following virtual functions are pure within 'TinyGsmSim800::GsmClient':
class GsmClient : public Client
In file included from C:\Users\Fedorov_A\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.2\cores\esp32/Arduino.h:157:0,
C:\Users\Fedorov_A\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.2\cores\esp32/Client.h:31:17: note: virtual int Client::connect(IPAddress, uint16_t, int)
C:\Users\Fedorov_A\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.2\cores\esp32/Client.h:32:17: note: virtual int Client::connect(const char*, uint16_t, int)
Multiple libraries were found for "WiFiClient.h"
I couldn't find any solution here. The issue https://github.com/vshymanskyy/TinyGSM/issues/220 is similar for ESP8266