From 8931ec46a93a3e0c7d626f7b0c46f40591780b07 Mon Sep 17 00:00:00 2001 From: Volodymyr Shymanskyy Date: Thu, 28 Sep 2017 09:53:37 +0300 Subject: [PATCH] Fix build --- TinyGsmClient.h | 1 + TinyGsmClientM590.h | 8 +++++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/TinyGsmClient.h b/TinyGsmClient.h index cae7fb4..5f07600 100644 --- a/TinyGsmClient.h +++ b/TinyGsmClient.h @@ -46,6 +46,7 @@ #include typedef TinyGsmU201 TinyGsm; typedef TinyGsmU201::GsmClient TinyGsmClient; + typedef TinyGsmU201::GsmClientSecure TinyGsmClientSecure; #elif defined(TINY_GSM_MODEM_ESP8266) #define TINY_GSM_MODEM_HAS_WIFI diff --git a/TinyGsmClientM590.h b/TinyGsmClientM590.h index 7356ecf..aa53ee6 100644 --- a/TinyGsmClientM590.h +++ b/TinyGsmClientM590.h @@ -392,22 +392,24 @@ public: sendAT(GF("+XIIC=1")); waitResponse(); + const unsigned long timeout = 60000L; for (unsigned long start = millis(); millis() - start < timeout; ) { if (isGprsConnected()) { + //goto set_dns; // TODO return true; } delay(500); } + return false; - /* +set_dns: sendAT(GF("+DNSSERVER=1,8.8.8.8")); waitResponse(); sendAT(GF("+DNSSERVER=2,8.8.4.4")); waitResponse(); - */ - return false; + return true; } bool gprsDisconnect() {