Browse Source

Fix build

v_master
Volodymyr Shymanskyy 7 years ago
parent
commit
8931ec46a9
2 changed files with 6 additions and 3 deletions
  1. +1
    -0
      TinyGsmClient.h
  2. +5
    -3
      TinyGsmClientM590.h

+ 1
- 0
TinyGsmClient.h View File

@ -46,6 +46,7 @@
#include <TinyGsmClientU201.h>
typedef TinyGsmU201 TinyGsm;
typedef TinyGsmU201::GsmClient TinyGsmClient;
typedef TinyGsmU201::GsmClientSecure TinyGsmClientSecure;
#elif defined(TINY_GSM_MODEM_ESP8266)
#define TINY_GSM_MODEM_HAS_WIFI


+ 5
- 3
TinyGsmClientM590.h View File

@ -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() {


Loading…
Cancel
Save