From 96c1fed3ef8afed0778ddc61aaa31d51f91e2559 Mon Sep 17 00:00:00 2001 From: Sara Damiano Date: Fri, 17 May 2019 17:15:31 -0400 Subject: [PATCH] Typo --- examples/WebClient/WebClient.ino | 4 ++-- src/TinyGsmClientSIM7000.h | 3 --- src/TinyGsmClientSIM800.h | 4 ---- src/TinyGsmClientSaraR4.h | 7 +++++-- src/TinyGsmClientUBLOX.h | 7 +++++-- 5 files changed, 12 insertions(+), 13 deletions(-) diff --git a/examples/WebClient/WebClient.ino b/examples/WebClient/WebClient.ino index 3b4b92d..53095ef 100644 --- a/examples/WebClient/WebClient.ino +++ b/examples/WebClient/WebClient.ino @@ -9,7 +9,7 @@ **************************************************************/ // Select your modem: -#define TINY_GSM_MODEMs_SIM800 +#define TINY_GSM_MODEM_SIM800 // #define TINY_GSM_MODEM_SIM808 // #define TINY_GSM_MODEM_SIM868 // #define TINY_GSM_MODEM_SIM900 @@ -65,7 +65,7 @@ // Your GPRS credentials // Leave empty, if missing user or pass -const char apn[] = "hologram"; +const char apn[] = "YourAPN"; const char gprsUser[] = ""; const char gprsPass[] = ""; const char wifiSSID[] = "YourSSID"; diff --git a/src/TinyGsmClientSIM7000.h b/src/TinyGsmClientSIM7000.h index ff25f1e..3abeae3 100644 --- a/src/TinyGsmClientSIM7000.h +++ b/src/TinyGsmClientSIM7000.h @@ -145,9 +145,6 @@ public: TINY_GSM_YIELD(); rx.clear(); sock_connected = at->modemConnect(host, port, mux, true); - // sock_connected = at->modemConnect(host, port, &mux, true); - // at->sockets[mux] = this; - // TODO: When is the socket attached? return sock_connected; } }; diff --git a/src/TinyGsmClientSIM800.h b/src/TinyGsmClientSIM800.h index 76dd497..6a6fd51 100644 --- a/src/TinyGsmClientSIM800.h +++ b/src/TinyGsmClientSIM800.h @@ -146,9 +146,6 @@ public: TINY_GSM_YIELD(); rx.clear(); sock_connected = at->modemConnect(host, port, mux, true); - // sock_connected = at->modemConnect(host, port, &mux, true); - // at->sockets[mux] = this; - // TODO: When is the socket attached? return sock_connected; } }; @@ -483,7 +480,6 @@ TINY_GSM_MODEM_WAIT_FOR_NETWORK() return TinyGsmIpFromString(getLocalIP()); } - /* * Phone Call functions */ diff --git a/src/TinyGsmClientSaraR4.h b/src/TinyGsmClientSaraR4.h index 197000c..8f628fc 100644 --- a/src/TinyGsmClientSaraR4.h +++ b/src/TinyGsmClientSaraR4.h @@ -163,10 +163,13 @@ public: stop(); TINY_GSM_YIELD(); rx.clear(); - // sock_connected = at->modemConnect(host, port, mux, true); + uint8_t oldMux = mux; sock_connected = at->modemConnect(host, port, &mux, true); + if (mux != oldMux) { + DBG("WARNING: Mux number changed from", oldMux, "to", mux); + at->sockets[oldMux] = NULL; + } at->sockets[mux] = this; - // TODO: When is the socket attached? at->maintain(); return sock_connected; } diff --git a/src/TinyGsmClientUBLOX.h b/src/TinyGsmClientUBLOX.h index bc5b961..74c0206 100644 --- a/src/TinyGsmClientUBLOX.h +++ b/src/TinyGsmClientUBLOX.h @@ -147,10 +147,13 @@ public: stop(); TINY_GSM_YIELD(); rx.clear(); - // sock_connected = at->modemConnect(host, port, mux, true); + uint8_t oldMux = mux; sock_connected = at->modemConnect(host, port, &mux, true); + if (mux != oldMux) { + DBG("WARNING: Mux number changed from", oldMux, "to", mux); + at->sockets[oldMux] = NULL; + } at->sockets[mux] = this; - // TODO: When is the socket attached? at->maintain(); return sock_connected; }