From f77a67167eacacd0d5d43a9713b87d151d543a62 Mon Sep 17 00:00:00 2001 From: Sara Damiano Date: Mon, 20 May 2024 12:49:59 -0400 Subject: [PATCH] Readd lost stop Signed-off-by: Sara Damiano --- examples/AllFunctions/AllFunctions.ino | 8 ++++---- src/TinyGsmClientBG96.h | 3 +++ tools/Diagnostics/Diagnostics.ino | 1 + tools/test_build/test_build.ino | 2 -- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/examples/AllFunctions/AllFunctions.ino b/examples/AllFunctions/AllFunctions.ino index 4766bab8..9fbd32f7 100644 --- a/examples/AllFunctions/AllFunctions.ino +++ b/examples/AllFunctions/AllFunctions.ino @@ -23,6 +23,7 @@ // #define TINY_GSM_MODEM_SARAR4 // #define TINY_GSM_MODEM_SARAR5 // #define TINY_GSM_MODEM_M95 +// #define TINY_GSM_MODEM_BG95 // #define TINY_GSM_MODEM_BG96 // #define TINY_GSM_MODEM_A6 // #define TINY_GSM_MODEM_A7 @@ -226,8 +227,7 @@ void loop() { DBG("Phone number (USSD):", ussd_phone_num); #endif -#if TINY_GSM_TEST_TCP && defined TINY_GSM_MODEM_HAS_TCP && \ - not defined(TINY_GSM_MODEM_BG95SSL) +#if TINY_GSM_TEST_TCP && defined TINY_GSM_MODEM_HAS_TCP TinyGsmClient client(modem, 0); const int port = 80; DBG("Connecting to", server); @@ -376,9 +376,9 @@ void loop() { #if TINY_GSM_TEST_GPS && defined TINY_GSM_MODEM_HAS_GPS DBG("Enabling GPS/GNSS/GLONASS and waiting 15s for warm-up"); - #if !defined(TINY_GSM_MODEM_SARAR5) +#if !defined(TINY_GSM_MODEM_SARAR5) modem.enableGPS(); - #endif +#endif delay(15000L); float lat2 = 0; float lon2 = 0; diff --git a/src/TinyGsmClientBG96.h b/src/TinyGsmClientBG96.h index 35080b76..3955795a 100644 --- a/src/TinyGsmClientBG96.h +++ b/src/TinyGsmClientBG96.h @@ -148,6 +148,9 @@ class TinyGsmBG96 : public TinyGsmModem, sock_connected = false; at->waitResponse((maxWaitMs - (millis() - startMillis))); } + void stop() override { + stop(15000L); + } }; /* diff --git a/tools/Diagnostics/Diagnostics.ino b/tools/Diagnostics/Diagnostics.ino index 152d6f5e..8d2247ff 100644 --- a/tools/Diagnostics/Diagnostics.ino +++ b/tools/Diagnostics/Diagnostics.ino @@ -22,6 +22,7 @@ // #define TINY_GSM_MODEM_UBLOX // #define TINY_GSM_MODEM_SARAR4 // #define TINY_GSM_MODEM_M95 +// #define TINY_GSM_MODEM_BG95 // #define TINY_GSM_MODEM_BG96 // #define TINY_GSM_MODEM_A6 // #define TINY_GSM_MODEM_A7 diff --git a/tools/test_build/test_build.ino b/tools/test_build/test_build.ino index 80c5aa04..ef5bcb6b 100644 --- a/tools/test_build/test_build.ino +++ b/tools/test_build/test_build.ino @@ -66,7 +66,6 @@ void loop() { char server[] = "somewhere"; char resource[] = "something"; -#if not defined(TINY_GSM_MODEM_BG95SSL) // no insecure client // Test TCP functions modem.maintain(); TinyGsmClient client; @@ -91,7 +90,6 @@ void loop() { } client.stop(); -#endif #if defined(TINY_GSM_MODEM_HAS_SSL) // modem.addCertificate(); // not yet impemented