Closed ecuellar closed 6 years ago
All the examples are for the ESP8266
thanks for your answer, but for example: I tried the diagnostics example:
// Select your modem: // #define TINY_GSM_MODEM_SIM800 // #define TINY_GSM_MODEM_SIM900 // #define TINY_GSM_MODEM_A6 // #define TINY_GSM_MODEM_A7 // #define TINY_GSM_MODEM_M590
I uncomment the last line, and now when I tried to compile, its tells me that there is no method called"modem.gprsConnect()".. so I open some libraries, and found there is a method called "modem.networkConnect()".. I changed, it compiles, but the example does not run very well, does not connect to the network.
Hey Guys i also think its a great lib. But im running in the same problems like ecuellar with esp8266 the example and the diagnostic runs but i was not able to connect to a network.
Regards
ESP8266 is experimental, and I actually wouldn't recommend using it. I'm not providing examples, as WiFi modules require different setup, etc. And partially because I don't want to maintain it at the moment.. Maybe when developer community of this project grows a little bit, or at some point later guys ;)
I'm using TinyGSM on the TTGO T-Call, an ESP32 with SIM800 module. So my question would be can I use the build in WiFi module of the ESP32 with TinyGSM to submit alternatively data via Wifi? So is the ESPxx example meant for an ESP as microcontroller with built in Wifi or is it for any microcontroller with an "external" ESP connected to the microcontroller as modem?
@ClemensGruber The ESPxx code in this library is intended only for a microcontroller with an "external" ESP. That external ESP must be running Espressif's "AT" firmware.
In the meantime I found -- beside the #define TINY_GSM_MODEM_ESP8266
declaration -- the TINY_GSM_USE_WIFI
definition e.g. in
I wonder if this is the same, so also for an ESP with "AT firmware"?
Do I have to specify #define TINY_GSM_MODEM_ESP8266
and in addition set #define TINY_GSM_USE_GPRS false
and #define TINY_GSM_USE_WIFI true
Those declarations (#define TINY_GSM_USE_GPRS
, etc ) in the "allFunctions" and other examples only apply to the examples. They're just there as a short-cut so the same example can be used for lots of different modules with different functionalities by only adjusting the defines at the top. In any other program, you don't need to #define TINY_GSM_USE_xx
, just #define TINY_GSM_MODEM_ESP8266
.
The espressif modules are wifi only, so attempting any GPRS-esque functions will fail. It shouldn't even compile.
The TINY_GSM_MODEM_ESP8266 is ONLY for a microcontroller with the espressif attached externally and running AT firmware (ie, an Uno talking to a cheap ESP8266 breakout). If you're using the ESP8266 or ES32 as the main brain, you would connect to wifi using the functions from the Arduino core for the espressif and then you would have to connect some other module (ie, a SIM800) and define that for cellular functions.
Many thanks for the clarification Sara, I've hoped for a convenient software solution with an easy switch to use e.g. HTTP or MQTT with the same lib and switcheing easily from GPRS to WiFi but using the same lib and underlaying concepts on an ESPxx. Ok so it must be implemented twice.
Excelent lib. Is there any examples for the ESP8266? or documentation?
Regards