From b3044d27626dcd624a819df3b33416fde38edb4c Mon Sep 17 00:00:00 2001 From: SRGDamia1 Date: Wed, 25 Oct 2017 12:11:09 -0400 Subject: [PATCH] Added TestAT to XBee --- src/TinyGsmClientXBee.h | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/src/TinyGsmClientXBee.h b/src/TinyGsmClientXBee.h index 259f241..3131497 100644 --- a/src/TinyGsmClientXBee.h +++ b/src/TinyGsmClientXBee.h @@ -190,7 +190,18 @@ public: return true; } - bool testAT(unsigned long timeout = 10000L) { // not supported + bool testAT(unsigned long timeout = 10000L) { + for (unsigned long start = millis(); millis() - start < timeout; ) { + if (commandMode()) + { + sendAT(); + if (waitResponse(200) == 1) { + return true; + } + exitCommand(); + } + delay(100); + } return false; } @@ -205,6 +216,10 @@ public: return ret_val; } + bool hasSSL() { + return true; + } + /* * Power functions */