Fix build
This commit is contained in:
@@ -46,6 +46,7 @@
|
|||||||
#include <TinyGsmClientU201.h>
|
#include <TinyGsmClientU201.h>
|
||||||
typedef TinyGsmU201 TinyGsm;
|
typedef TinyGsmU201 TinyGsm;
|
||||||
typedef TinyGsmU201::GsmClient TinyGsmClient;
|
typedef TinyGsmU201::GsmClient TinyGsmClient;
|
||||||
|
typedef TinyGsmU201::GsmClientSecure TinyGsmClientSecure;
|
||||||
|
|
||||||
#elif defined(TINY_GSM_MODEM_ESP8266)
|
#elif defined(TINY_GSM_MODEM_ESP8266)
|
||||||
#define TINY_GSM_MODEM_HAS_WIFI
|
#define TINY_GSM_MODEM_HAS_WIFI
|
||||||
|
@@ -392,22 +392,24 @@ public:
|
|||||||
sendAT(GF("+XIIC=1"));
|
sendAT(GF("+XIIC=1"));
|
||||||
waitResponse();
|
waitResponse();
|
||||||
|
|
||||||
|
const unsigned long timeout = 60000L;
|
||||||
for (unsigned long start = millis(); millis() - start < timeout; ) {
|
for (unsigned long start = millis(); millis() - start < timeout; ) {
|
||||||
if (isGprsConnected()) {
|
if (isGprsConnected()) {
|
||||||
|
//goto set_dns; // TODO
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
delay(500);
|
delay(500);
|
||||||
}
|
}
|
||||||
|
return false;
|
||||||
|
|
||||||
/*
|
set_dns:
|
||||||
sendAT(GF("+DNSSERVER=1,8.8.8.8"));
|
sendAT(GF("+DNSSERVER=1,8.8.8.8"));
|
||||||
waitResponse();
|
waitResponse();
|
||||||
|
|
||||||
sendAT(GF("+DNSSERVER=2,8.8.4.4"));
|
sendAT(GF("+DNSSERVER=2,8.8.4.4"));
|
||||||
waitResponse();
|
waitResponse();
|
||||||
*/
|
|
||||||
|
|
||||||
return false;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool gprsDisconnect() {
|
bool gprsDisconnect() {
|
||||||
|
Reference in New Issue
Block a user