diff --git a/TinyGsmClientA6.h b/TinyGsmClientA6.h index 099f334..ca77106 100644 --- a/TinyGsmClientA6.h +++ b/TinyGsmClientA6.h @@ -361,7 +361,7 @@ public: if (isNetworkConnected()) { return true; } - delay(500); + delay(250); } return false; } diff --git a/TinyGsmClientESP8266.h b/TinyGsmClientESP8266.h index 100803c..a27405e 100644 --- a/TinyGsmClientESP8266.h +++ b/TinyGsmClientESP8266.h @@ -185,7 +185,7 @@ public: if (!testAT()) { return false; } - sendAT(GF("E0")); + sendAT(GF("E0")); // Echo Off if (waitResponse() != 1) { return false; } @@ -209,9 +209,7 @@ public: } void maintain() { - //while (stream.available()) { waitResponse(10, NULL, NULL); - //} } bool factoryDefault() { @@ -270,13 +268,22 @@ public: streamSkipUntil(','); // Skip BSSID/MAC address streamSkipUntil(','); // Skip Chanel number int res2 = stream.parseInt(); // Read RSSI - DBG(res2); waitResponse(); return res2; } bool isNetworkConnected() { - return true; // TODO + sendAT(GF("+CIPSTATUS")); + int res1 = waitResponse(3000, GF("STATUS:")); + if (res1 == 1) { + int res2 = waitResponse(GFP(GSM_ERROR), GF("2"), GF("3"), GF("4"), GF("5")); + if (res2 == 2 || res2 == 3 || res2 == 4) return true; + } + // status of ESP8266 station interface + // 2 : ESP8266 station connected to an AP and has obtained IP + // 3 : ESP8266 station created a TCP or UDP transmission + // 4 : the TCP or UDP transmission of ESP8266 station disconnected (but AP is connected) + // 5 : ESP8266 station did NOT connect to an AP } bool waitForNetwork(unsigned long timeout = 60000L) { @@ -287,12 +294,7 @@ public: int res2 = waitResponse(GFP(GSM_ERROR), GF("2"), GF("3"), GF("4"), GF("5")); if (res2 == 2 || res2 == 3 || res2 == 4) return true; } - // status of ESP8266 station interface - // 2 : ESP8266 station connected to an AP and has obtained IP - // 3 : ESP8266 station created a TCP or UDP transmission - // 4 : the TCP or UDP transmission of ESP8266 station disconnected (but AP is connected) - // 5 : ESP8266 station did NOT connect to an AP - delay(1000); + delay(250); } return false; } @@ -332,7 +334,6 @@ public: return ""; } String res2 = stream.readStringUntil('"'); - DBG(res2); waitResponse(); return res2; } diff --git a/TinyGsmClientM590.h b/TinyGsmClientM590.h index 3b56d66..2be755b 100644 --- a/TinyGsmClientM590.h +++ b/TinyGsmClientM590.h @@ -367,7 +367,7 @@ public: if (isNetworkConnected()) { return true; } - delay(500); + delay(250); } return false; } diff --git a/TinyGsmClientSIM800.h b/TinyGsmClientSIM800.h index e470efb..8007f05 100644 --- a/TinyGsmClientSIM800.h +++ b/TinyGsmClientSIM800.h @@ -432,7 +432,7 @@ public: if (isNetworkConnected()) { return true; } - delay(500); + delay(250); } return false; } diff --git a/TinyGsmClientU201.h b/TinyGsmClientU201.h index 27827cf..ddd2f99 100644 --- a/TinyGsmClientU201.h +++ b/TinyGsmClientU201.h @@ -372,7 +372,7 @@ public: if (isNetworkConnected()) { return true; } - delay(500); + delay(250); } return false; } diff --git a/TinyGsmClientXBee.h b/TinyGsmClientXBee.h index 1ecad38..259f241 100644 --- a/TinyGsmClientXBee.h +++ b/TinyGsmClientXBee.h @@ -341,7 +341,7 @@ public: if (res == GF("0")) { return true; } - delay(1000); + delay(250); } return false; } diff --git a/extras/doc/Digi XBee LTEC1 Users Guide - 90001525.pdf b/extras/doc/Digi XBee LTEC1 Users Guide - 90001525.pdf index 6ea1729..7c63957 100644 Binary files a/extras/doc/Digi XBee LTEC1 Users Guide - 90001525.pdf and b/extras/doc/Digi XBee LTEC1 Users Guide - 90001525.pdf differ diff --git a/extras/doc/Digi XBee S6B Users Guide - 90002180.pdf b/extras/doc/Digi XBee S6B Users Guide - 90002180.pdf index cdfacaf..14e4cf9 100644 Binary files a/extras/doc/Digi XBee S6B Users Guide - 90002180.pdf and b/extras/doc/Digi XBee S6B Users Guide - 90002180.pdf differ diff --git a/extras/doc/ESP8266 - Datasheet v4.3.pdf b/extras/doc/ESP8266 - Datasheet v4.3.pdf deleted file mode 100644 index a4e8411..0000000 Binary files a/extras/doc/ESP8266 - Datasheet v4.3.pdf and /dev/null differ diff --git a/extras/doc/ESP8266 - Low Power Solutions.pdf b/extras/doc/ESP8266 - Low Power Solutions.pdf deleted file mode 100644 index 5e1bafb..0000000 Binary files a/extras/doc/ESP8266 - Low Power Solutions.pdf and /dev/null differ diff --git a/extras/doc/SIM800 - AT Commands v1.10.pdf b/extras/doc/SIM800 - AT Commands v1.10.pdf deleted file mode 100644 index 0ec8983..0000000 Binary files a/extras/doc/SIM800 - AT Commands v1.10.pdf and /dev/null differ diff --git a/extras/doc/SIM800 AT Commands v1.11.pdf b/extras/doc/SIM800 AT Commands v1.11.pdf new file mode 100644 index 0000000..37c0a66 Binary files /dev/null and b/extras/doc/SIM800 AT Commands v1.11.pdf differ diff --git a/extras/doc/Telit_LE866_AT_Commands_Reference_Guide_r5.pdf b/extras/doc/Telit_LE866_AT_Commands_Reference_Guide_r5.pdf new file mode 100644 index 0000000..45fffc6 Binary files /dev/null and b/extras/doc/Telit_LE866_AT_Commands_Reference_Guide_r5.pdf differ diff --git a/extras/doc/UBlox SARA-R4 AT Commands Manual (UBX-17003787).pdf b/extras/doc/UBlox SARA-R4 AT Commands Manual (UBX-17003787).pdf new file mode 100644 index 0000000..a0a6d62 Binary files /dev/null and b/extras/doc/UBlox SARA-R4 AT Commands Manual (UBX-17003787).pdf differ diff --git a/extras/doc/WNC M14A2A AT&T Commands Guide v1.7.pdf b/extras/doc/WNC M14A2A AT&T Commands Guide v1.7.pdf new file mode 100644 index 0000000..0c61e45 Binary files /dev/null and b/extras/doc/WNC M14A2A AT&T Commands Guide v1.7.pdf differ diff --git a/extras/doc/u-blox-CEL_ATCommands_(UBX-13002752).pdf b/extras/doc/u-blox-CEL_ATCommands_(UBX-13002752).pdf new file mode 100644 index 0000000..b8b568b Binary files /dev/null and b/extras/doc/u-blox-CEL_ATCommands_(UBX-13002752).pdf differ