diff --git a/TinyGsmClientSIM800.h b/TinyGsmClientSIM800.h index 7e1a52c..0daaba7 100644 --- a/TinyGsmClientSIM800.h +++ b/TinyGsmClientSIM800.h @@ -524,7 +524,14 @@ public: } int res = stream.readStringUntil('\n').toInt(); waitResponse(); - return res == 1; + if (res != 1) + return false; + + sendAT(GF("+CIFSR;E0")); // Another option is to use AT+CGPADDR=1 + if (waitResponse() != 1) + return false; + + return true; } String getLocalIP() {