Browse Source

Wait for isGprsConnected()

v_master
Volodymyr Shymanskyy 7 years ago
parent
commit
679d957ab9
1 changed files with 8 additions and 8 deletions
  1. +8
    -8
      TinyGsmClientM590.h

+ 8
- 8
TinyGsmClientM590.h View File

@ -392,22 +392,22 @@ public:
sendAT(GF("+XIIC=1"));
waitResponse();
delay(10000L); // TODO
sendAT(GF("+XIIC?"));
waitResponse();
for (unsigned long start = millis(); millis() - start < timeout; ) {
if (isGprsConnected()) {
return true;
}
delay(500);
}
/*
sendAT(GF("+DNSSERVER=1,8.8.8.8"));
waitResponse();
sendAT(GF("+DNSSERVER=2,8.8.4.4"));
if (waitResponse() != 1) {
return false;
}
waitResponse();
*/
return true;
return false;
}
bool gprsDisconnect() {


Loading…
Cancel
Save