mirror of
https://github.com/KevinMidboe/TinyGSM.git
synced 2025-10-29 18:00:18 +00:00
Wait for isGprsConnected()
This commit is contained in:
@@ -392,22 +392,22 @@ public:
|
|||||||
sendAT(GF("+XIIC=1"));
|
sendAT(GF("+XIIC=1"));
|
||||||
waitResponse();
|
waitResponse();
|
||||||
|
|
||||||
delay(10000L); // TODO
|
for (unsigned long start = millis(); millis() - start < timeout; ) {
|
||||||
|
if (isGprsConnected()) {
|
||||||
sendAT(GF("+XIIC?"));
|
return true;
|
||||||
waitResponse();
|
}
|
||||||
|
delay(500);
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
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"));
|
||||||
if (waitResponse() != 1) {
|
waitResponse();
|
||||||
return false;
|
|
||||||
}
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
return true;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool gprsDisconnect() {
|
bool gprsDisconnect() {
|
||||||
|
|||||||
Reference in New Issue
Block a user