From 16b843ec4358f040bce6dc2b01ead19f8efbb597 Mon Sep 17 00:00:00 2001 From: SRGDamia1 Date: Wed, 25 Oct 2017 15:11:43 -0400 Subject: [PATCH] Waiting for WiFi disconnect --- src/TinyGsmClientESP8266.h | 4 +++- src/TinyGsmClientXBee.h | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/TinyGsmClientESP8266.h b/src/TinyGsmClientESP8266.h index 089665f..3cdff2d 100644 --- a/src/TinyGsmClientESP8266.h +++ b/src/TinyGsmClientESP8266.h @@ -330,7 +330,9 @@ public: bool networkDisconnect() { sendAT(GF("+CWQAP")); - return waitResponse(10000L) == 1; + bool retVal = waitResponse(10000L) == 1; + waitResponse(GF("WIFI DISCONNECT")); + return retVal; } String getLocalIP() { diff --git a/src/TinyGsmClientXBee.h b/src/TinyGsmClientXBee.h index 3131497..7fe55f7 100644 --- a/src/TinyGsmClientXBee.h +++ b/src/TinyGsmClientXBee.h @@ -608,7 +608,7 @@ finish: data.replace(GSM_NL GSM_NL, GSM_NL); data.replace(GSM_NL, "\r\n "); if (data.length()) { - DBG("<<< ", data, "\r\n"); + // DBG("<<< ", data); } } return index;