diff --git a/examples/Advanced/GSM_Blynk/BlynkSimpleGSM_Generic.h b/examples/Advanced/GSM_Blynk/BlynkSimpleGSM_Generic.h
index ed6f733..cc11958 100644
--- a/examples/Advanced/GSM_Blynk/BlynkSimpleGSM_Generic.h
+++ b/examples/Advanced/GSM_Blynk/BlynkSimpleGSM_Generic.h
@@ -17,16 +17,6 @@
of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program.
If not, see .
-
- Version: 1.5.0
-
- Version Modified By Date Comments
- ------- ----------- ---------- -----------
- 1.2.4 K Hoang 11/03/2021 Initial public release to add support to many boards / modules besides MKRGSM 1400 / SARA U201
- 1.3.0 K Hoang 31/03/2021 Add ThingStream MQTTS support. Fix SMS receive bug.
- 1.3.1 K Hoang 25/04/2021 Fix bug making ESP32 reset repeatedly.
- 1.4.0 K Hoang 28/06/2021 Add support to RP2040-based boards using Arduino mbed or Arduino-pico core
- 1.5.0 K Hoang 14/08/2021 Add support to Adafruit nRF52 core v0.22.0+
*****************************************************************************************************************************/
/**
Based on and modified from
diff --git a/examples/Advanced/GSM_Blynk/GSM_Blynk.ino b/examples/Advanced/GSM_Blynk/GSM_Blynk.ino
index 855a961..3475d53 100644
--- a/examples/Advanced/GSM_Blynk/GSM_Blynk.ino
+++ b/examples/Advanced/GSM_Blynk/GSM_Blynk.ino
@@ -17,16 +17,6 @@
of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program.
If not, see .
-
- Version: 1.5.0
-
- Version Modified By Date Comments
- ------- ----------- ---------- -----------
- 1.2.4 K Hoang 11/03/2021 Initial public release to add support to many boards / modules besides MKRGSM 1400 / SARA U201
- 1.3.0 K Hoang 31/03/2021 Add ThingStream MQTTS support. Fix SMS receive bug.
- 1.3.1 K Hoang 25/04/2021 Fix bug making ESP32 reset repeatedly.
- 1.4.0 K Hoang 28/06/2021 Add support to RP2040-based boards using Arduino mbed or Arduino-pico core
- 1.5.0 K Hoang 14/08/2021 Add support to Adafruit nRF52 core v0.22.0+
*****************************************************************************************************************************/
/*************************************************************
Download latest Blynk library here:
diff --git a/examples/Advanced/GSM_Blynk/defines.h b/examples/Advanced/GSM_Blynk/defines.h
index 2604a0d..9a60cb7 100644
--- a/examples/Advanced/GSM_Blynk/defines.h
+++ b/examples/Advanced/GSM_Blynk/defines.h
@@ -41,7 +41,35 @@
//////////////////////////////////////////////
-#if !defined(ARDUINO_SAMD_MKRGSM1400)
+#if defined(ARDUINO_SAMD_MKRGSM1400)
+
+ // For original MKRGSM1400 => GSM_MODEM_UBLOX == true, GSM_MODEM_LARAR2 == false
+ // For modified MKRGSM1400 using LARA R2 => GSM_MODEM_UBLOX == false, GSM_MODEM_LARAR2 == true
+ #define GSM_MODEM_UBLOX false
+
+ #if GSM_MODEM_UBLOX
+ #define GSM_MODEM_LARAR2 false
+ #else
+ #define GSM_MODEM_LARAR2 true
+ #endif
+
+ #define UBLOX_USING_RESET_PIN true
+ #define UBLOX_USING_LOW_POWER_MODE true
+
+ #if GSM_MODEM_UBLOX
+ #warning Using MKRGSM1400 Configuration with SARA U201
+ #elif GSM_MODEM_LARAR2
+ #warning Using MKRGSM1400 Configuration with LARA R2xx
+ #else
+ #error Must select either GSM_MODEM_UBLOX or GSM_MODEM_LARAR2
+ #endif
+
+#else
+
+ // Optional usage of GSM_RESETN and GSM_DTR. Need to be here only when true. Default is false
+ #define UBLOX_USING_RESET_PIN true
+ #define UBLOX_USING_LOW_POWER_MODE true
+
// Override the default (and certainly not good) pins and port
// Only for boards other than ARDUINO_SAMD_MKRGSM1400
#if (ESP32)
@@ -81,50 +109,44 @@
#warning You must connect the Modem correctly and modify the pins / Serial port here
-#endif
-
-//////////////////////////////////////////////
-
-// Optional usage of GSM_RESETN and GSM_DTR. Need to be here only when true. Default is false
-
-//#define UBLOX_USING_RESET_PIN true
-//#define UBLOX_USING_LOW_POWER_MODE true
-
-//////////////////////////////////////////////
-
-#define GSM_MODEM_UBLOX false
-#define GSM_MODEM_SARAR4 false
+ //////////////////////////////////////////////
+
+ #define GSM_MODEM_UBLOX true
+ #define GSM_MODEM_SARAR4 false
+ #define GSM_MODEM_LARAR2 false
+
+ //////////////////////////////////////////////
+ // Not supported yet
+ #define GSM_MODEM_SIM800 false
+ #define GSM_MODEM_SIM808 false
+ #define GSM_MODEM_SIM868 false
+ #define GSM_MODEM_SIM900 false
+ #define GSM_MODEM_SIM5300 false
+ #define GSM_MODEM_SIM5320 false
+ #define GSM_MODEM_SIM5360 false
+ #define GSM_MODEM_SIM7000 false
+ #define GSM_MODEM_SIM7100 false
+ #define GSM_MODEM_SIM7500 false
+ #define GSM_MODEM_SIM7600 false
+ #define GSM_MODEM_SIM7800 false
+ #define GSM_MODEM_M95 false
+ #define GSM_MODEM_BG96 false
+ #define GSM_MODEM_A6 false
+ #define GSM_MODEM_A7 false
+ #define GSM_MODEM_M590 false
+ #define GSM_MODEM_MC60 false
+ #define GSM_MODEM_MC60E false
+ #define GSM_MODEM_XBEE false
+ #define GSM_MODEM_SEQUANS_MONARCH false
+ //////////////////////////////////////////////
-//////////////////////////////////////////////
-// Not supported yet
-#define GSM_MODEM_SIM800 false
-#define GSM_MODEM_SIM808 false
-#define GSM_MODEM_SIM868 false
-#define GSM_MODEM_SIM900 true
-#define GSM_MODEM_SIM5300 false
-#define GSM_MODEM_SIM5320 false
-#define GSM_MODEM_SIM5360 false
-#define GSM_MODEM_SIM7000 false
-#define GSM_MODEM_SIM7100 false
-#define GSM_MODEM_SIM7500 false
-#define GSM_MODEM_SIM7600 false
-#define GSM_MODEM_SIM7800 false
-#define GSM_MODEM_M95 false
-#define GSM_MODEM_BG96 false
-#define GSM_MODEM_A6 false
-#define GSM_MODEM_A7 false
-#define GSM_MODEM_M590 false
-#define GSM_MODEM_MC60 false
-#define GSM_MODEM_MC60E false
-#define GSM_MODEM_XBEE false
-#define GSM_MODEM_SEQUANS_MONARCH false
-//////////////////////////////////////////////
+#endif
#define USE_LOCAL_SERVER true //true
#if USE_LOCAL_SERVER
- #define gsm_blynk_tok "n1u-uhfrc0chbmLRqSjl8SjphkGfHRTN" //"GSM_BLYNK_TOKEN"
- #define blynk_server "khoih.duckdns.org"
+ #define gsm_blynk_tok "GSM_BLYNK_TOKEN"
+ #define blynk_server "account.duckdns.org"
// Use direct IPAddress in case GPRS can't use DDNS fast enough and can't connect
//#define blynk_server "192.168.2.32"
#else
diff --git a/examples/Advanced/GSM_MQTT/GSM_MQTT.ino b/examples/Advanced/GSM_MQTT/GSM_MQTT.ino
index e65bf23..037713e 100644
--- a/examples/Advanced/GSM_MQTT/GSM_MQTT.ino
+++ b/examples/Advanced/GSM_MQTT/GSM_MQTT.ino
@@ -17,16 +17,6 @@
of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program.
If not, see .
-
- Version: 1.5.0
-
- Version Modified By Date Comments
- ------- ----------- ---------- -----------
- 1.2.4 K Hoang 11/03/2021 Initial public release to add support to many boards / modules besides MKRGSM 1400 / SARA U201
- 1.3.0 K Hoang 31/03/2021 Add ThingStream MQTTS support. Fix SMS receive bug.
- 1.3.1 K Hoang 25/04/2021 Fix bug making ESP32 reset repeatedly.
- 1.4.0 K Hoang 28/06/2021 Add support to RP2040-based boards using Arduino mbed or Arduino-pico core
- 1.5.0 K Hoang 14/08/2021 Add support to Adafruit nRF52 core v0.22.0+
**********************************************************************************************************************************/
/****************************************************************************************************************************
You have to modify file ./libraries/Adafruit_MQTT_Library/Adafruit_MQTT.cpp as follows to avoid dtostrf error, if exists
diff --git a/examples/Advanced/GSM_MQTT/defines.h b/examples/Advanced/GSM_MQTT/defines.h
index 1d0207c..83f2432 100644
--- a/examples/Advanced/GSM_MQTT/defines.h
+++ b/examples/Advanced/GSM_MQTT/defines.h
@@ -34,7 +34,35 @@
//////////////////////////////////////////////
-#if !defined(ARDUINO_SAMD_MKRGSM1400)
+#if defined(ARDUINO_SAMD_MKRGSM1400)
+
+ // For original MKRGSM1400 => GSM_MODEM_UBLOX == true, GSM_MODEM_LARAR2 == false
+ // For modified MKRGSM1400 using LARA R2 => GSM_MODEM_UBLOX == false, GSM_MODEM_LARAR2 == true
+ #define GSM_MODEM_UBLOX false
+
+ #if GSM_MODEM_UBLOX
+ #define GSM_MODEM_LARAR2 false
+ #else
+ #define GSM_MODEM_LARAR2 true
+ #endif
+
+ #define UBLOX_USING_RESET_PIN true
+ #define UBLOX_USING_LOW_POWER_MODE true
+
+ #if GSM_MODEM_UBLOX
+ #warning Using MKRGSM1400 Configuration with SARA U201
+ #elif GSM_MODEM_LARAR2
+ #warning Using MKRGSM1400 Configuration with LARA R2xx
+ #else
+ #error Must select either GSM_MODEM_UBLOX or GSM_MODEM_LARAR2
+ #endif
+
+#else
+
+ // Optional usage of GSM_RESETN and GSM_DTR. Need to be here only when true. Default is false
+ #define UBLOX_USING_RESET_PIN true
+ #define UBLOX_USING_LOW_POWER_MODE true
+
// Override the default (and certainly not good) pins and port
// Only for boards other than ARDUINO_SAMD_MKRGSM1400
#if (ESP32)
@@ -74,44 +102,38 @@
#warning You must connect the Modem correctly and modify the pins / Serial port here
-#endif
-
-//////////////////////////////////////////////
-
-// Optional usage of GSM_RESETN and GSM_DTR. Need to be here only when true. Default is false
-
-//#define UBLOX_USING_RESET_PIN true
-//#define UBLOX_USING_LOW_POWER_MODE true
-
-//////////////////////////////////////////////
-
-#define GSM_MODEM_UBLOX false
-#define GSM_MODEM_SARAR4 false
+ //////////////////////////////////////////////
+
+ #define GSM_MODEM_UBLOX true
+ #define GSM_MODEM_SARAR4 false
+ #define GSM_MODEM_LARAR2 false
+
+ //////////////////////////////////////////////
+ // Not supported yet
+ #define GSM_MODEM_SIM800 false
+ #define GSM_MODEM_SIM808 false
+ #define GSM_MODEM_SIM868 false
+ #define GSM_MODEM_SIM900 false
+ #define GSM_MODEM_SIM5300 false
+ #define GSM_MODEM_SIM5320 false
+ #define GSM_MODEM_SIM5360 false
+ #define GSM_MODEM_SIM7000 false
+ #define GSM_MODEM_SIM7100 false
+ #define GSM_MODEM_SIM7500 false
+ #define GSM_MODEM_SIM7600 false
+ #define GSM_MODEM_SIM7800 false
+ #define GSM_MODEM_M95 false
+ #define GSM_MODEM_BG96 false
+ #define GSM_MODEM_A6 false
+ #define GSM_MODEM_A7 false
+ #define GSM_MODEM_M590 false
+ #define GSM_MODEM_MC60 false
+ #define GSM_MODEM_MC60E false
+ #define GSM_MODEM_XBEE false
+ #define GSM_MODEM_SEQUANS_MONARCH false
+ //////////////////////////////////////////////
-//////////////////////////////////////////////
-// Not supported yet
-#define GSM_MODEM_SIM800 false
-#define GSM_MODEM_SIM808 false
-#define GSM_MODEM_SIM868 false
-#define GSM_MODEM_SIM900 true
-#define GSM_MODEM_SIM5300 false
-#define GSM_MODEM_SIM5320 false
-#define GSM_MODEM_SIM5360 false
-#define GSM_MODEM_SIM7000 false
-#define GSM_MODEM_SIM7100 false
-#define GSM_MODEM_SIM7500 false
-#define GSM_MODEM_SIM7600 false
-#define GSM_MODEM_SIM7800 false
-#define GSM_MODEM_M95 false
-#define GSM_MODEM_BG96 false
-#define GSM_MODEM_A6 false
-#define GSM_MODEM_A7 false
-#define GSM_MODEM_M590 false
-#define GSM_MODEM_MC60 false
-#define GSM_MODEM_MC60E false
-#define GSM_MODEM_XBEE false
-#define GSM_MODEM_SEQUANS_MONARCH false
-//////////////////////////////////////////////
+#endif
// libraries
#include
diff --git a/examples/Advanced/GSM_MQTTClient_Auth/GSM_MQTTClient_Auth.ino b/examples/Advanced/GSM_MQTTClient_Auth/GSM_MQTTClient_Auth.ino
index deefccb..407be80 100644
--- a/examples/Advanced/GSM_MQTTClient_Auth/GSM_MQTTClient_Auth.ino
+++ b/examples/Advanced/GSM_MQTTClient_Auth/GSM_MQTTClient_Auth.ino
@@ -17,16 +17,6 @@
of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program.
If not, see .
-
- Version: 1.5.0
-
- Version Modified By Date Comments
- ------- ----------- ---------- -----------
- 1.2.4 K Hoang 11/03/2021 Initial public release to add support to many boards / modules besides MKRGSM 1400 / SARA U201
- 1.3.0 K Hoang 31/03/2021 Add ThingStream MQTTS support. Fix SMS receive bug.
- 1.3.1 K Hoang 25/04/2021 Fix bug making ESP32 reset repeatedly.
- 1.4.0 K Hoang 28/06/2021 Add support to RP2040-based boards using Arduino mbed or Arduino-pico core
- 1.5.0 K Hoang 14/08/2021 Add support to Adafruit nRF52 core v0.22.0+
*****************************************************************************************************************************/
/*
diff --git a/examples/Advanced/GSM_MQTTClient_Auth/defines.h b/examples/Advanced/GSM_MQTTClient_Auth/defines.h
index cfefda4..7b0e3aa 100644
--- a/examples/Advanced/GSM_MQTTClient_Auth/defines.h
+++ b/examples/Advanced/GSM_MQTTClient_Auth/defines.h
@@ -34,7 +34,35 @@
//////////////////////////////////////////////
-#if !defined(ARDUINO_SAMD_MKRGSM1400)
+#if defined(ARDUINO_SAMD_MKRGSM1400)
+
+ // For original MKRGSM1400 => GSM_MODEM_UBLOX == true, GSM_MODEM_LARAR2 == false
+ // For modified MKRGSM1400 using LARA R2 => GSM_MODEM_UBLOX == false, GSM_MODEM_LARAR2 == true
+ #define GSM_MODEM_UBLOX false
+
+ #if GSM_MODEM_UBLOX
+ #define GSM_MODEM_LARAR2 false
+ #else
+ #define GSM_MODEM_LARAR2 true
+ #endif
+
+ #define UBLOX_USING_RESET_PIN true
+ #define UBLOX_USING_LOW_POWER_MODE true
+
+ #if GSM_MODEM_UBLOX
+ #warning Using MKRGSM1400 Configuration with SARA U201
+ #elif GSM_MODEM_LARAR2
+ #warning Using MKRGSM1400 Configuration with LARA R2xx
+ #else
+ #error Must select either GSM_MODEM_UBLOX or GSM_MODEM_LARAR2
+ #endif
+
+#else
+
+ // Optional usage of GSM_RESETN and GSM_DTR. Need to be here only when true. Default is false
+ #define UBLOX_USING_RESET_PIN true
+ #define UBLOX_USING_LOW_POWER_MODE true
+
// Override the default (and certainly not good) pins and port
// Only for boards other than ARDUINO_SAMD_MKRGSM1400
#if (ESP32)
@@ -74,44 +102,38 @@
#warning You must connect the Modem correctly and modify the pins / Serial port here
-#endif
-
-//////////////////////////////////////////////
-
-// Optional usage of GSM_RESETN and GSM_DTR. Need to be here only when true. Default is false
-
-//#define UBLOX_USING_RESET_PIN true
-//#define UBLOX_USING_LOW_POWER_MODE true
-
-//////////////////////////////////////////////
-
-#define GSM_MODEM_UBLOX true
-#define GSM_MODEM_SARAR4 false
+ //////////////////////////////////////////////
+
+ #define GSM_MODEM_UBLOX true
+ #define GSM_MODEM_SARAR4 false
+ #define GSM_MODEM_LARAR2 false
+
+ //////////////////////////////////////////////
+ // Not supported yet
+ #define GSM_MODEM_SIM800 false
+ #define GSM_MODEM_SIM808 false
+ #define GSM_MODEM_SIM868 false
+ #define GSM_MODEM_SIM900 false
+ #define GSM_MODEM_SIM5300 false
+ #define GSM_MODEM_SIM5320 false
+ #define GSM_MODEM_SIM5360 false
+ #define GSM_MODEM_SIM7000 false
+ #define GSM_MODEM_SIM7100 false
+ #define GSM_MODEM_SIM7500 false
+ #define GSM_MODEM_SIM7600 false
+ #define GSM_MODEM_SIM7800 false
+ #define GSM_MODEM_M95 false
+ #define GSM_MODEM_BG96 false
+ #define GSM_MODEM_A6 false
+ #define GSM_MODEM_A7 false
+ #define GSM_MODEM_M590 false
+ #define GSM_MODEM_MC60 false
+ #define GSM_MODEM_MC60E false
+ #define GSM_MODEM_XBEE false
+ #define GSM_MODEM_SEQUANS_MONARCH false
+ //////////////////////////////////////////////
-//////////////////////////////////////////////
-// Not supported yet
-#define GSM_MODEM_SIM800 false
-#define GSM_MODEM_SIM808 false
-#define GSM_MODEM_SIM868 false
-#define GSM_MODEM_SIM900 false
-#define GSM_MODEM_SIM5300 false
-#define GSM_MODEM_SIM5320 false
-#define GSM_MODEM_SIM5360 false
-#define GSM_MODEM_SIM7000 false
-#define GSM_MODEM_SIM7100 false
-#define GSM_MODEM_SIM7500 false
-#define GSM_MODEM_SIM7600 false
-#define GSM_MODEM_SIM7800 false
-#define GSM_MODEM_M95 false
-#define GSM_MODEM_BG96 false
-#define GSM_MODEM_A6 false
-#define GSM_MODEM_A7 false
-#define GSM_MODEM_M590 false
-#define GSM_MODEM_MC60 false
-#define GSM_MODEM_MC60E false
-#define GSM_MODEM_XBEE false
-#define GSM_MODEM_SEQUANS_MONARCH false
-//////////////////////////////////////////////
+#endif
// libraries
#include
diff --git a/examples/Advanced/GSM_MQTTClient_Basic/GSM_MQTTClient_Basic.ino b/examples/Advanced/GSM_MQTTClient_Basic/GSM_MQTTClient_Basic.ino
index 9712180..abfe92f 100644
--- a/examples/Advanced/GSM_MQTTClient_Basic/GSM_MQTTClient_Basic.ino
+++ b/examples/Advanced/GSM_MQTTClient_Basic/GSM_MQTTClient_Basic.ino
@@ -17,16 +17,6 @@
of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program.
If not, see .
-
- Version: 1.5.0
-
- Version Modified By Date Comments
- ------- ----------- ---------- -----------
- 1.2.4 K Hoang 11/03/2021 Initial public release to add support to many boards / modules besides MKRGSM 1400 / SARA U201
- 1.3.0 K Hoang 31/03/2021 Add ThingStream MQTTS support. Fix SMS receive bug.
- 1.3.1 K Hoang 25/04/2021 Fix bug making ESP32 reset repeatedly.
- 1.4.0 K Hoang 28/06/2021 Add support to RP2040-based boards using Arduino mbed or Arduino-pico core
- 1.5.0 K Hoang 14/08/2021 Add support to Adafruit nRF52 core v0.22.0+
**********************************************************************************************************************************/
/*
diff --git a/examples/Advanced/GSM_MQTTClient_Basic/defines.h b/examples/Advanced/GSM_MQTTClient_Basic/defines.h
index cfefda4..7b0e3aa 100644
--- a/examples/Advanced/GSM_MQTTClient_Basic/defines.h
+++ b/examples/Advanced/GSM_MQTTClient_Basic/defines.h
@@ -34,7 +34,35 @@
//////////////////////////////////////////////
-#if !defined(ARDUINO_SAMD_MKRGSM1400)
+#if defined(ARDUINO_SAMD_MKRGSM1400)
+
+ // For original MKRGSM1400 => GSM_MODEM_UBLOX == true, GSM_MODEM_LARAR2 == false
+ // For modified MKRGSM1400 using LARA R2 => GSM_MODEM_UBLOX == false, GSM_MODEM_LARAR2 == true
+ #define GSM_MODEM_UBLOX false
+
+ #if GSM_MODEM_UBLOX
+ #define GSM_MODEM_LARAR2 false
+ #else
+ #define GSM_MODEM_LARAR2 true
+ #endif
+
+ #define UBLOX_USING_RESET_PIN true
+ #define UBLOX_USING_LOW_POWER_MODE true
+
+ #if GSM_MODEM_UBLOX
+ #warning Using MKRGSM1400 Configuration with SARA U201
+ #elif GSM_MODEM_LARAR2
+ #warning Using MKRGSM1400 Configuration with LARA R2xx
+ #else
+ #error Must select either GSM_MODEM_UBLOX or GSM_MODEM_LARAR2
+ #endif
+
+#else
+
+ // Optional usage of GSM_RESETN and GSM_DTR. Need to be here only when true. Default is false
+ #define UBLOX_USING_RESET_PIN true
+ #define UBLOX_USING_LOW_POWER_MODE true
+
// Override the default (and certainly not good) pins and port
// Only for boards other than ARDUINO_SAMD_MKRGSM1400
#if (ESP32)
@@ -74,44 +102,38 @@
#warning You must connect the Modem correctly and modify the pins / Serial port here
-#endif
-
-//////////////////////////////////////////////
-
-// Optional usage of GSM_RESETN and GSM_DTR. Need to be here only when true. Default is false
-
-//#define UBLOX_USING_RESET_PIN true
-//#define UBLOX_USING_LOW_POWER_MODE true
-
-//////////////////////////////////////////////
-
-#define GSM_MODEM_UBLOX true
-#define GSM_MODEM_SARAR4 false
+ //////////////////////////////////////////////
+
+ #define GSM_MODEM_UBLOX true
+ #define GSM_MODEM_SARAR4 false
+ #define GSM_MODEM_LARAR2 false
+
+ //////////////////////////////////////////////
+ // Not supported yet
+ #define GSM_MODEM_SIM800 false
+ #define GSM_MODEM_SIM808 false
+ #define GSM_MODEM_SIM868 false
+ #define GSM_MODEM_SIM900 false
+ #define GSM_MODEM_SIM5300 false
+ #define GSM_MODEM_SIM5320 false
+ #define GSM_MODEM_SIM5360 false
+ #define GSM_MODEM_SIM7000 false
+ #define GSM_MODEM_SIM7100 false
+ #define GSM_MODEM_SIM7500 false
+ #define GSM_MODEM_SIM7600 false
+ #define GSM_MODEM_SIM7800 false
+ #define GSM_MODEM_M95 false
+ #define GSM_MODEM_BG96 false
+ #define GSM_MODEM_A6 false
+ #define GSM_MODEM_A7 false
+ #define GSM_MODEM_M590 false
+ #define GSM_MODEM_MC60 false
+ #define GSM_MODEM_MC60E false
+ #define GSM_MODEM_XBEE false
+ #define GSM_MODEM_SEQUANS_MONARCH false
+ //////////////////////////////////////////////
-//////////////////////////////////////////////
-// Not supported yet
-#define GSM_MODEM_SIM800 false
-#define GSM_MODEM_SIM808 false
-#define GSM_MODEM_SIM868 false
-#define GSM_MODEM_SIM900 false
-#define GSM_MODEM_SIM5300 false
-#define GSM_MODEM_SIM5320 false
-#define GSM_MODEM_SIM5360 false
-#define GSM_MODEM_SIM7000 false
-#define GSM_MODEM_SIM7100 false
-#define GSM_MODEM_SIM7500 false
-#define GSM_MODEM_SIM7600 false
-#define GSM_MODEM_SIM7800 false
-#define GSM_MODEM_M95 false
-#define GSM_MODEM_BG96 false
-#define GSM_MODEM_A6 false
-#define GSM_MODEM_A7 false
-#define GSM_MODEM_M590 false
-#define GSM_MODEM_MC60 false
-#define GSM_MODEM_MC60E false
-#define GSM_MODEM_XBEE false
-#define GSM_MODEM_SEQUANS_MONARCH false
-//////////////////////////////////////////////
+#endif
// libraries
#include
diff --git a/examples/Advanced/GSM_MQTTS_ThingStream/GSM_MQTTS_ThingStream.ino b/examples/Advanced/GSM_MQTTS_ThingStream/GSM_MQTTS_ThingStream.ino
index 28535ab..f148b48 100644
--- a/examples/Advanced/GSM_MQTTS_ThingStream/GSM_MQTTS_ThingStream.ino
+++ b/examples/Advanced/GSM_MQTTS_ThingStream/GSM_MQTTS_ThingStream.ino
@@ -17,16 +17,6 @@
of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program.
If not, see .
-
- Version: 1.5.0
-
- Version Modified By Date Comments
- ------- ----------- ---------- -----------
- 1.2.4 K Hoang 11/03/2021 Initial public release to add support to many boards / modules besides MKRGSM 1400 / SARA U201
- 1.3.0 K Hoang 31/03/2021 Add ThingStream MQTTS support. Fix SMS receive bug.
- 1.3.1 K Hoang 25/04/2021 Fix bug making ESP32 reset repeatedly.
- 1.4.0 K Hoang 28/06/2021 Add support to RP2040-based boards using Arduino mbed or Arduino-pico core
- 1.5.0 K Hoang 14/08/2021 Add support to Adafruit nRF52 core v0.22.0+
*****************************************************************************************************************************/
/*
Basic MQTT example (with SSL!)
diff --git a/examples/Advanced/GSM_MQTTS_ThingStream/defines.h b/examples/Advanced/GSM_MQTTS_ThingStream/defines.h
index 0a36568..fe13e91 100644
--- a/examples/Advanced/GSM_MQTTS_ThingStream/defines.h
+++ b/examples/Advanced/GSM_MQTTS_ThingStream/defines.h
@@ -35,7 +35,35 @@
//////////////////////////////////////////////
-#if !defined(ARDUINO_SAMD_MKRGSM1400)
+#if defined(ARDUINO_SAMD_MKRGSM1400)
+
+ // For original MKRGSM1400 => GSM_MODEM_UBLOX == true, GSM_MODEM_LARAR2 == false
+ // For modified MKRGSM1400 using LARA R2 => GSM_MODEM_UBLOX == false, GSM_MODEM_LARAR2 == true
+ #define GSM_MODEM_UBLOX false
+
+ #if GSM_MODEM_UBLOX
+ #define GSM_MODEM_LARAR2 false
+ #else
+ #define GSM_MODEM_LARAR2 true
+ #endif
+
+ #define UBLOX_USING_RESET_PIN true
+ #define UBLOX_USING_LOW_POWER_MODE true
+
+ #if GSM_MODEM_UBLOX
+ #warning Using MKRGSM1400 Configuration with SARA U201
+ #elif GSM_MODEM_LARAR2
+ #warning Using MKRGSM1400 Configuration with LARA R2xx
+ #else
+ #error Must select either GSM_MODEM_UBLOX or GSM_MODEM_LARAR2
+ #endif
+
+#else
+
+ // Optional usage of GSM_RESETN and GSM_DTR. Need to be here only when true. Default is false
+ #define UBLOX_USING_RESET_PIN true
+ #define UBLOX_USING_LOW_POWER_MODE true
+
// Override the default (and certainly not good) pins and port
// Only for boards other than ARDUINO_SAMD_MKRGSM1400
#if (ESP32)
@@ -75,44 +103,38 @@
#warning You must connect the Modem correctly and modify the pins / Serial port here
-#endif
-
-//////////////////////////////////////////////
-
-// Optional usage of GSM_RESETN and GSM_DTR. Need to be here only when true. Default is false
-
-//#define UBLOX_USING_RESET_PIN true
-//#define UBLOX_USING_LOW_POWER_MODE true
-
-//////////////////////////////////////////////
-
-#define GSM_MODEM_UBLOX true
-#define GSM_MODEM_SARAR4 false
+ //////////////////////////////////////////////
+
+ #define GSM_MODEM_UBLOX true
+ #define GSM_MODEM_SARAR4 false
+ #define GSM_MODEM_LARAR2 false
+
+ //////////////////////////////////////////////
+ // Not supported yet
+ #define GSM_MODEM_SIM800 false
+ #define GSM_MODEM_SIM808 false
+ #define GSM_MODEM_SIM868 false
+ #define GSM_MODEM_SIM900 false
+ #define GSM_MODEM_SIM5300 false
+ #define GSM_MODEM_SIM5320 false
+ #define GSM_MODEM_SIM5360 false
+ #define GSM_MODEM_SIM7000 false
+ #define GSM_MODEM_SIM7100 false
+ #define GSM_MODEM_SIM7500 false
+ #define GSM_MODEM_SIM7600 false
+ #define GSM_MODEM_SIM7800 false
+ #define GSM_MODEM_M95 false
+ #define GSM_MODEM_BG96 false
+ #define GSM_MODEM_A6 false
+ #define GSM_MODEM_A7 false
+ #define GSM_MODEM_M590 false
+ #define GSM_MODEM_MC60 false
+ #define GSM_MODEM_MC60E false
+ #define GSM_MODEM_XBEE false
+ #define GSM_MODEM_SEQUANS_MONARCH false
+ //////////////////////////////////////////////
-//////////////////////////////////////////////
-// Not supported yet
-#define GSM_MODEM_SIM800 false
-#define GSM_MODEM_SIM808 false
-#define GSM_MODEM_SIM868 false
-#define GSM_MODEM_SIM900 false
-#define GSM_MODEM_SIM5300 false
-#define GSM_MODEM_SIM5320 false
-#define GSM_MODEM_SIM5360 false
-#define GSM_MODEM_SIM7000 false
-#define GSM_MODEM_SIM7100 false
-#define GSM_MODEM_SIM7500 false
-#define GSM_MODEM_SIM7600 false
-#define GSM_MODEM_SIM7800 false
-#define GSM_MODEM_M95 false
-#define GSM_MODEM_BG96 false
-#define GSM_MODEM_A6 false
-#define GSM_MODEM_A7 false
-#define GSM_MODEM_M590 false
-#define GSM_MODEM_MC60 false
-#define GSM_MODEM_MC60E false
-#define GSM_MODEM_XBEE false
-#define GSM_MODEM_SEQUANS_MONARCH false
-//////////////////////////////////////////////
+#endif
// libraries
#include
diff --git a/examples/Advanced/GSM_MQTT_Medium/GSM_MQTT_Medium.ino b/examples/Advanced/GSM_MQTT_Medium/GSM_MQTT_Medium.ino
index 279bb47..1f3d41f 100644
--- a/examples/Advanced/GSM_MQTT_Medium/GSM_MQTT_Medium.ino
+++ b/examples/Advanced/GSM_MQTT_Medium/GSM_MQTT_Medium.ino
@@ -17,16 +17,6 @@
of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program.
If not, see .
-
- Version: 1.5.0
-
- Version Modified By Date Comments
- ------- ----------- ---------- -----------
- 1.2.4 K Hoang 11/03/2021 Initial public release to add support to many boards / modules besides MKRGSM 1400 / SARA U201
- 1.3.0 K Hoang 31/03/2021 Add ThingStream MQTTS support. Fix SMS receive bug.
- 1.3.1 K Hoang 25/04/2021 Fix bug making ESP32 reset repeatedly.
- 1.4.0 K Hoang 28/06/2021 Add support to RP2040-based boards using Arduino mbed or Arduino-pico core
- 1.5.0 K Hoang 14/08/2021 Add support to Adafruit nRF52 core v0.22.0+
**********************************************************************************************************************************/
/****************************************************************************************************************************
You have to modify file ./libraries/Adafruit_MQTT_Library/Adafruit_MQTT.cpp as follows to avoid dtostrf error, if exists
diff --git a/examples/Advanced/GSM_MQTT_Medium/defines.h b/examples/Advanced/GSM_MQTT_Medium/defines.h
index 0a36568..fe13e91 100644
--- a/examples/Advanced/GSM_MQTT_Medium/defines.h
+++ b/examples/Advanced/GSM_MQTT_Medium/defines.h
@@ -35,7 +35,35 @@
//////////////////////////////////////////////
-#if !defined(ARDUINO_SAMD_MKRGSM1400)
+#if defined(ARDUINO_SAMD_MKRGSM1400)
+
+ // For original MKRGSM1400 => GSM_MODEM_UBLOX == true, GSM_MODEM_LARAR2 == false
+ // For modified MKRGSM1400 using LARA R2 => GSM_MODEM_UBLOX == false, GSM_MODEM_LARAR2 == true
+ #define GSM_MODEM_UBLOX false
+
+ #if GSM_MODEM_UBLOX
+ #define GSM_MODEM_LARAR2 false
+ #else
+ #define GSM_MODEM_LARAR2 true
+ #endif
+
+ #define UBLOX_USING_RESET_PIN true
+ #define UBLOX_USING_LOW_POWER_MODE true
+
+ #if GSM_MODEM_UBLOX
+ #warning Using MKRGSM1400 Configuration with SARA U201
+ #elif GSM_MODEM_LARAR2
+ #warning Using MKRGSM1400 Configuration with LARA R2xx
+ #else
+ #error Must select either GSM_MODEM_UBLOX or GSM_MODEM_LARAR2
+ #endif
+
+#else
+
+ // Optional usage of GSM_RESETN and GSM_DTR. Need to be here only when true. Default is false
+ #define UBLOX_USING_RESET_PIN true
+ #define UBLOX_USING_LOW_POWER_MODE true
+
// Override the default (and certainly not good) pins and port
// Only for boards other than ARDUINO_SAMD_MKRGSM1400
#if (ESP32)
@@ -75,44 +103,38 @@
#warning You must connect the Modem correctly and modify the pins / Serial port here
-#endif
-
-//////////////////////////////////////////////
-
-// Optional usage of GSM_RESETN and GSM_DTR. Need to be here only when true. Default is false
-
-//#define UBLOX_USING_RESET_PIN true
-//#define UBLOX_USING_LOW_POWER_MODE true
-
-//////////////////////////////////////////////
-
-#define GSM_MODEM_UBLOX true
-#define GSM_MODEM_SARAR4 false
+ //////////////////////////////////////////////
+
+ #define GSM_MODEM_UBLOX true
+ #define GSM_MODEM_SARAR4 false
+ #define GSM_MODEM_LARAR2 false
+
+ //////////////////////////////////////////////
+ // Not supported yet
+ #define GSM_MODEM_SIM800 false
+ #define GSM_MODEM_SIM808 false
+ #define GSM_MODEM_SIM868 false
+ #define GSM_MODEM_SIM900 false
+ #define GSM_MODEM_SIM5300 false
+ #define GSM_MODEM_SIM5320 false
+ #define GSM_MODEM_SIM5360 false
+ #define GSM_MODEM_SIM7000 false
+ #define GSM_MODEM_SIM7100 false
+ #define GSM_MODEM_SIM7500 false
+ #define GSM_MODEM_SIM7600 false
+ #define GSM_MODEM_SIM7800 false
+ #define GSM_MODEM_M95 false
+ #define GSM_MODEM_BG96 false
+ #define GSM_MODEM_A6 false
+ #define GSM_MODEM_A7 false
+ #define GSM_MODEM_M590 false
+ #define GSM_MODEM_MC60 false
+ #define GSM_MODEM_MC60E false
+ #define GSM_MODEM_XBEE false
+ #define GSM_MODEM_SEQUANS_MONARCH false
+ //////////////////////////////////////////////
-//////////////////////////////////////////////
-// Not supported yet
-#define GSM_MODEM_SIM800 false
-#define GSM_MODEM_SIM808 false
-#define GSM_MODEM_SIM868 false
-#define GSM_MODEM_SIM900 false
-#define GSM_MODEM_SIM5300 false
-#define GSM_MODEM_SIM5320 false
-#define GSM_MODEM_SIM5360 false
-#define GSM_MODEM_SIM7000 false
-#define GSM_MODEM_SIM7100 false
-#define GSM_MODEM_SIM7500 false
-#define GSM_MODEM_SIM7600 false
-#define GSM_MODEM_SIM7800 false
-#define GSM_MODEM_M95 false
-#define GSM_MODEM_BG96 false
-#define GSM_MODEM_A6 false
-#define GSM_MODEM_A7 false
-#define GSM_MODEM_M590 false
-#define GSM_MODEM_MC60 false
-#define GSM_MODEM_MC60E false
-#define GSM_MODEM_XBEE false
-#define GSM_MODEM_SEQUANS_MONARCH false
-//////////////////////////////////////////////
+#endif
// libraries
#include
diff --git a/examples/Advanced/GSM_MQTT_ThingStream/GSM_MQTT_ThingStream.ino b/examples/Advanced/GSM_MQTT_ThingStream/GSM_MQTT_ThingStream.ino
index f80c303..17274a6 100644
--- a/examples/Advanced/GSM_MQTT_ThingStream/GSM_MQTT_ThingStream.ino
+++ b/examples/Advanced/GSM_MQTT_ThingStream/GSM_MQTT_ThingStream.ino
@@ -17,16 +17,6 @@
of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program.
If not, see .
-
- Version: 1.5.0
-
- Version Modified By Date Comments
- ------- ----------- ---------- -----------
- 1.2.4 K Hoang 11/03/2021 Initial public release to add support to many boards / modules besides MKRGSM 1400 / SARA U201
- 1.3.0 K Hoang 31/03/2021 Add ThingStream MQTTS support. Fix SMS receive bug.
- 1.3.1 K Hoang 25/04/2021 Fix bug making ESP32 reset repeatedly.
- 1.4.0 K Hoang 28/06/2021 Add support to RP2040-based boards using Arduino mbed or Arduino-pico core
- 1.5.0 K Hoang 14/08/2021 Add support to Adafruit nRF52 core v0.22.0+
*****************************************************************************************************************************/
/*
Basic MQTT example (without SSL!)
diff --git a/examples/Advanced/GSM_MQTT_ThingStream/defines.h b/examples/Advanced/GSM_MQTT_ThingStream/defines.h
index 0a36568..fe13e91 100644
--- a/examples/Advanced/GSM_MQTT_ThingStream/defines.h
+++ b/examples/Advanced/GSM_MQTT_ThingStream/defines.h
@@ -35,7 +35,35 @@
//////////////////////////////////////////////
-#if !defined(ARDUINO_SAMD_MKRGSM1400)
+#if defined(ARDUINO_SAMD_MKRGSM1400)
+
+ // For original MKRGSM1400 => GSM_MODEM_UBLOX == true, GSM_MODEM_LARAR2 == false
+ // For modified MKRGSM1400 using LARA R2 => GSM_MODEM_UBLOX == false, GSM_MODEM_LARAR2 == true
+ #define GSM_MODEM_UBLOX false
+
+ #if GSM_MODEM_UBLOX
+ #define GSM_MODEM_LARAR2 false
+ #else
+ #define GSM_MODEM_LARAR2 true
+ #endif
+
+ #define UBLOX_USING_RESET_PIN true
+ #define UBLOX_USING_LOW_POWER_MODE true
+
+ #if GSM_MODEM_UBLOX
+ #warning Using MKRGSM1400 Configuration with SARA U201
+ #elif GSM_MODEM_LARAR2
+ #warning Using MKRGSM1400 Configuration with LARA R2xx
+ #else
+ #error Must select either GSM_MODEM_UBLOX or GSM_MODEM_LARAR2
+ #endif
+
+#else
+
+ // Optional usage of GSM_RESETN and GSM_DTR. Need to be here only when true. Default is false
+ #define UBLOX_USING_RESET_PIN true
+ #define UBLOX_USING_LOW_POWER_MODE true
+
// Override the default (and certainly not good) pins and port
// Only for boards other than ARDUINO_SAMD_MKRGSM1400
#if (ESP32)
@@ -75,44 +103,38 @@
#warning You must connect the Modem correctly and modify the pins / Serial port here
-#endif
-
-//////////////////////////////////////////////
-
-// Optional usage of GSM_RESETN and GSM_DTR. Need to be here only when true. Default is false
-
-//#define UBLOX_USING_RESET_PIN true
-//#define UBLOX_USING_LOW_POWER_MODE true
-
-//////////////////////////////////////////////
-
-#define GSM_MODEM_UBLOX true
-#define GSM_MODEM_SARAR4 false
+ //////////////////////////////////////////////
+
+ #define GSM_MODEM_UBLOX true
+ #define GSM_MODEM_SARAR4 false
+ #define GSM_MODEM_LARAR2 false
+
+ //////////////////////////////////////////////
+ // Not supported yet
+ #define GSM_MODEM_SIM800 false
+ #define GSM_MODEM_SIM808 false
+ #define GSM_MODEM_SIM868 false
+ #define GSM_MODEM_SIM900 false
+ #define GSM_MODEM_SIM5300 false
+ #define GSM_MODEM_SIM5320 false
+ #define GSM_MODEM_SIM5360 false
+ #define GSM_MODEM_SIM7000 false
+ #define GSM_MODEM_SIM7100 false
+ #define GSM_MODEM_SIM7500 false
+ #define GSM_MODEM_SIM7600 false
+ #define GSM_MODEM_SIM7800 false
+ #define GSM_MODEM_M95 false
+ #define GSM_MODEM_BG96 false
+ #define GSM_MODEM_A6 false
+ #define GSM_MODEM_A7 false
+ #define GSM_MODEM_M590 false
+ #define GSM_MODEM_MC60 false
+ #define GSM_MODEM_MC60E false
+ #define GSM_MODEM_XBEE false
+ #define GSM_MODEM_SEQUANS_MONARCH false
+ //////////////////////////////////////////////
-//////////////////////////////////////////////
-// Not supported yet
-#define GSM_MODEM_SIM800 false
-#define GSM_MODEM_SIM808 false
-#define GSM_MODEM_SIM868 false
-#define GSM_MODEM_SIM900 false
-#define GSM_MODEM_SIM5300 false
-#define GSM_MODEM_SIM5320 false
-#define GSM_MODEM_SIM5360 false
-#define GSM_MODEM_SIM7000 false
-#define GSM_MODEM_SIM7100 false
-#define GSM_MODEM_SIM7500 false
-#define GSM_MODEM_SIM7600 false
-#define GSM_MODEM_SIM7800 false
-#define GSM_MODEM_M95 false
-#define GSM_MODEM_BG96 false
-#define GSM_MODEM_A6 false
-#define GSM_MODEM_A7 false
-#define GSM_MODEM_M590 false
-#define GSM_MODEM_MC60 false
-#define GSM_MODEM_MC60E false
-#define GSM_MODEM_XBEE false
-#define GSM_MODEM_SEQUANS_MONARCH false
-//////////////////////////////////////////////
+#endif
// libraries
#include
diff --git a/examples/GPRSPing/GPRSPing.ino b/examples/GPRSPing/GPRSPing.ino
index ae93848..5572d40 100644
--- a/examples/GPRSPing/GPRSPing.ino
+++ b/examples/GPRSPing/GPRSPing.ino
@@ -17,16 +17,6 @@
of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program.
If not, see .
-
- Version: 1.5.0
-
- Version Modified By Date Comments
- ------- ----------- ---------- -----------
- 1.2.4 K Hoang 11/03/2021 Initial public release to add support to many boards / modules besides MKRGSM 1400 / SARA U201
- 1.3.0 K Hoang 31/03/2021 Add ThingStream MQTTS support. Fix SMS receive bug.
- 1.3.1 K Hoang 25/04/2021 Fix bug making ESP32 reset repeatedly.
- 1.4.0 K Hoang 28/06/2021 Add support to RP2040-based boards using Arduino mbed or Arduino-pico core
- 1.5.0 K Hoang 14/08/2021 Add support to Adafruit nRF52 core v0.22.0+
**********************************************************************************************************************************/
/*
diff --git a/examples/GPRSPing/defines.h b/examples/GPRSPing/defines.h
index b04f244..4d3ac57 100644
--- a/examples/GPRSPing/defines.h
+++ b/examples/GPRSPing/defines.h
@@ -48,7 +48,35 @@ unsigned long baudRateSerialGSM = 115200;
//////////////////////////////////////////////
-#if !defined(ARDUINO_SAMD_MKRGSM1400)
+#if defined(ARDUINO_SAMD_MKRGSM1400)
+
+ // For original MKRGSM1400 => GSM_MODEM_UBLOX == true, GSM_MODEM_LARAR2 == false
+ // For modified MKRGSM1400 using LARA R2 => GSM_MODEM_UBLOX == false, GSM_MODEM_LARAR2 == true
+ #define GSM_MODEM_UBLOX false
+
+ #if GSM_MODEM_UBLOX
+ #define GSM_MODEM_LARAR2 false
+ #else
+ #define GSM_MODEM_LARAR2 true
+ #endif
+
+ #define UBLOX_USING_RESET_PIN true
+ #define UBLOX_USING_LOW_POWER_MODE true
+
+ #if GSM_MODEM_UBLOX
+ #warning Using MKRGSM1400 Configuration with SARA U201
+ #elif GSM_MODEM_LARAR2
+ #warning Using MKRGSM1400 Configuration with LARA R2xx
+ #else
+ #error Must select either GSM_MODEM_UBLOX or GSM_MODEM_LARAR2
+ #endif
+
+#else
+
+ // Optional usage of GSM_RESETN and GSM_DTR. Need to be here only when true. Default is false
+ #define UBLOX_USING_RESET_PIN true
+ #define UBLOX_USING_LOW_POWER_MODE true
+
// Override the default (and certainly not good) pins and port
// Only for boards other than ARDUINO_SAMD_MKRGSM1400
#if (ESP32)
@@ -88,44 +116,38 @@ unsigned long baudRateSerialGSM = 115200;
#warning You must connect the Modem correctly and modify the pins / Serial port here
-#endif
-
-//////////////////////////////////////////////
-
-// Optional usage of GSM_RESETN and GSM_DTR. Need to be here only when true. Default is false
-
-//#define UBLOX_USING_RESET_PIN true
-//#define UBLOX_USING_LOW_POWER_MODE true
-
-//////////////////////////////////////////////
-
-#define GSM_MODEM_UBLOX false
-#define GSM_MODEM_SARAR4 false
+ //////////////////////////////////////////////
+
+ #define GSM_MODEM_UBLOX true
+ #define GSM_MODEM_SARAR4 false
+ #define GSM_MODEM_LARAR2 false
+
+ //////////////////////////////////////////////
+ // Not supported yet
+ #define GSM_MODEM_SIM800 false
+ #define GSM_MODEM_SIM808 false
+ #define GSM_MODEM_SIM868 false
+ #define GSM_MODEM_SIM900 false
+ #define GSM_MODEM_SIM5300 false
+ #define GSM_MODEM_SIM5320 false
+ #define GSM_MODEM_SIM5360 false
+ #define GSM_MODEM_SIM7000 false
+ #define GSM_MODEM_SIM7100 false
+ #define GSM_MODEM_SIM7500 false
+ #define GSM_MODEM_SIM7600 false
+ #define GSM_MODEM_SIM7800 false
+ #define GSM_MODEM_M95 false
+ #define GSM_MODEM_BG96 false
+ #define GSM_MODEM_A6 false
+ #define GSM_MODEM_A7 false
+ #define GSM_MODEM_M590 false
+ #define GSM_MODEM_MC60 false
+ #define GSM_MODEM_MC60E false
+ #define GSM_MODEM_XBEE false
+ #define GSM_MODEM_SEQUANS_MONARCH false
+ //////////////////////////////////////////////
-//////////////////////////////////////////////
-// Not supported yet
-#define GSM_MODEM_SIM800 false
-#define GSM_MODEM_SIM808 false
-#define GSM_MODEM_SIM868 false
-#define GSM_MODEM_SIM900 true
-#define GSM_MODEM_SIM5300 false
-#define GSM_MODEM_SIM5320 false
-#define GSM_MODEM_SIM5360 false
-#define GSM_MODEM_SIM7000 false
-#define GSM_MODEM_SIM7100 false
-#define GSM_MODEM_SIM7500 false
-#define GSM_MODEM_SIM7600 false
-#define GSM_MODEM_SIM7800 false
-#define GSM_MODEM_M95 false
-#define GSM_MODEM_BG96 false
-#define GSM_MODEM_A6 false
-#define GSM_MODEM_A7 false
-#define GSM_MODEM_M590 false
-#define GSM_MODEM_MC60 false
-#define GSM_MODEM_MC60E false
-#define GSM_MODEM_XBEE false
-#define GSM_MODEM_SEQUANS_MONARCH false
-//////////////////////////////////////////////
+#endif
// libraries
#include
diff --git a/examples/GPRSUdpNtpClient/GPRSUdpNtpClient.ino b/examples/GPRSUdpNtpClient/GPRSUdpNtpClient.ino
index 01a8bad..cd43455 100644
--- a/examples/GPRSUdpNtpClient/GPRSUdpNtpClient.ino
+++ b/examples/GPRSUdpNtpClient/GPRSUdpNtpClient.ino
@@ -17,16 +17,6 @@
of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program.
If not, see .
-
- Version: 1.5.0
-
- Version Modified By Date Comments
- ------- ----------- ---------- -----------
- 1.2.4 K Hoang 11/03/2021 Initial public release to add support to many boards / modules besides MKRGSM 1400 / SARA U201
- 1.3.0 K Hoang 31/03/2021 Add ThingStream MQTTS support. Fix SMS receive bug.
- 1.3.1 K Hoang 25/04/2021 Fix bug making ESP32 reset repeatedly.
- 1.4.0 K Hoang 28/06/2021 Add support to RP2040-based boards using Arduino mbed or Arduino-pico core
- 1.5.0 K Hoang 14/08/2021 Add support to Adafruit nRF52 core v0.22.0+
**********************************************************************************************************************************/
/*
diff --git a/examples/GPRSUdpNtpClient/defines.h b/examples/GPRSUdpNtpClient/defines.h
index c839115..78b7955 100644
--- a/examples/GPRSUdpNtpClient/defines.h
+++ b/examples/GPRSUdpNtpClient/defines.h
@@ -39,7 +39,35 @@
//////////////////////////////////////////////
-#if !defined(ARDUINO_SAMD_MKRGSM1400)
+#if defined(ARDUINO_SAMD_MKRGSM1400)
+
+ // For original MKRGSM1400 => GSM_MODEM_UBLOX == true, GSM_MODEM_LARAR2 == false
+ // For modified MKRGSM1400 using LARA R2 => GSM_MODEM_UBLOX == false, GSM_MODEM_LARAR2 == true
+ #define GSM_MODEM_UBLOX false
+
+ #if GSM_MODEM_UBLOX
+ #define GSM_MODEM_LARAR2 false
+ #else
+ #define GSM_MODEM_LARAR2 true
+ #endif
+
+ #define UBLOX_USING_RESET_PIN true
+ #define UBLOX_USING_LOW_POWER_MODE true
+
+ #if GSM_MODEM_UBLOX
+ #warning Using MKRGSM1400 Configuration with SARA U201
+ #elif GSM_MODEM_LARAR2
+ #warning Using MKRGSM1400 Configuration with LARA R2xx
+ #else
+ #error Must select either GSM_MODEM_UBLOX or GSM_MODEM_LARAR2
+ #endif
+
+#else
+
+ // Optional usage of GSM_RESETN and GSM_DTR. Need to be here only when true. Default is false
+ #define UBLOX_USING_RESET_PIN true
+ #define UBLOX_USING_LOW_POWER_MODE true
+
// Override the default (and certainly not good) pins and port
// Only for boards other than ARDUINO_SAMD_MKRGSM1400
#if (ESP32)
@@ -79,44 +107,38 @@
#warning You must connect the Modem correctly and modify the pins / Serial port here
-#endif
-
-//////////////////////////////////////////////
-
-// Optional usage of GSM_RESETN and GSM_DTR. Need to be here only when true. Default is false
-
-//#define UBLOX_USING_RESET_PIN true
-//#define UBLOX_USING_LOW_POWER_MODE true
-
-//////////////////////////////////////////////
-
-#define GSM_MODEM_UBLOX false
-#define GSM_MODEM_SARAR4 false
+ //////////////////////////////////////////////
+
+ #define GSM_MODEM_UBLOX true
+ #define GSM_MODEM_SARAR4 false
+ #define GSM_MODEM_LARAR2 false
+
+ //////////////////////////////////////////////
+ // Not supported yet
+ #define GSM_MODEM_SIM800 false
+ #define GSM_MODEM_SIM808 false
+ #define GSM_MODEM_SIM868 false
+ #define GSM_MODEM_SIM900 false
+ #define GSM_MODEM_SIM5300 false
+ #define GSM_MODEM_SIM5320 false
+ #define GSM_MODEM_SIM5360 false
+ #define GSM_MODEM_SIM7000 false
+ #define GSM_MODEM_SIM7100 false
+ #define GSM_MODEM_SIM7500 false
+ #define GSM_MODEM_SIM7600 false
+ #define GSM_MODEM_SIM7800 false
+ #define GSM_MODEM_M95 false
+ #define GSM_MODEM_BG96 false
+ #define GSM_MODEM_A6 false
+ #define GSM_MODEM_A7 false
+ #define GSM_MODEM_M590 false
+ #define GSM_MODEM_MC60 false
+ #define GSM_MODEM_MC60E false
+ #define GSM_MODEM_XBEE false
+ #define GSM_MODEM_SEQUANS_MONARCH false
+ //////////////////////////////////////////////
-//////////////////////////////////////////////
-// Not supported yet
-#define GSM_MODEM_SIM800 false
-#define GSM_MODEM_SIM808 false
-#define GSM_MODEM_SIM868 false
-#define GSM_MODEM_SIM900 true
-#define GSM_MODEM_SIM5300 false
-#define GSM_MODEM_SIM5320 false
-#define GSM_MODEM_SIM5360 false
-#define GSM_MODEM_SIM7000 false
-#define GSM_MODEM_SIM7100 false
-#define GSM_MODEM_SIM7500 false
-#define GSM_MODEM_SIM7600 false
-#define GSM_MODEM_SIM7800 false
-#define GSM_MODEM_M95 false
-#define GSM_MODEM_BG96 false
-#define GSM_MODEM_A6 false
-#define GSM_MODEM_A7 false
-#define GSM_MODEM_M590 false
-#define GSM_MODEM_MC60 false
-#define GSM_MODEM_MC60E false
-#define GSM_MODEM_XBEE false
-#define GSM_MODEM_SEQUANS_MONARCH false
-//////////////////////////////////////////////
+#endif
// libraries
#include
diff --git a/examples/GsmLocation/GsmLocation.ino b/examples/GsmLocation/GsmLocation.ino
index c8958c9..bdab388 100644
--- a/examples/GsmLocation/GsmLocation.ino
+++ b/examples/GsmLocation/GsmLocation.ino
@@ -17,16 +17,6 @@
of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program.
If not, see .
-
- Version: 1.5.0
-
- Version Modified By Date Comments
- ------- ----------- ---------- -----------
- 1.2.4 K Hoang 11/03/2021 Initial public release to add support to many boards / modules besides MKRGSM 1400 / SARA U201
- 1.3.0 K Hoang 31/03/2021 Add ThingStream MQTTS support. Fix SMS receive bug.
- 1.3.1 K Hoang 25/04/2021 Fix bug making ESP32 reset repeatedly.
- 1.4.0 K Hoang 28/06/2021 Add support to RP2040-based boards using Arduino mbed or Arduino-pico core
- 1.5.0 K Hoang 14/08/2021 Add support to Adafruit nRF52 core v0.22.0+
**********************************************************************************************************************************/
/*
diff --git a/examples/GsmLocation/defines.h b/examples/GsmLocation/defines.h
index cfefda4..7b0e3aa 100644
--- a/examples/GsmLocation/defines.h
+++ b/examples/GsmLocation/defines.h
@@ -34,7 +34,35 @@
//////////////////////////////////////////////
-#if !defined(ARDUINO_SAMD_MKRGSM1400)
+#if defined(ARDUINO_SAMD_MKRGSM1400)
+
+ // For original MKRGSM1400 => GSM_MODEM_UBLOX == true, GSM_MODEM_LARAR2 == false
+ // For modified MKRGSM1400 using LARA R2 => GSM_MODEM_UBLOX == false, GSM_MODEM_LARAR2 == true
+ #define GSM_MODEM_UBLOX false
+
+ #if GSM_MODEM_UBLOX
+ #define GSM_MODEM_LARAR2 false
+ #else
+ #define GSM_MODEM_LARAR2 true
+ #endif
+
+ #define UBLOX_USING_RESET_PIN true
+ #define UBLOX_USING_LOW_POWER_MODE true
+
+ #if GSM_MODEM_UBLOX
+ #warning Using MKRGSM1400 Configuration with SARA U201
+ #elif GSM_MODEM_LARAR2
+ #warning Using MKRGSM1400 Configuration with LARA R2xx
+ #else
+ #error Must select either GSM_MODEM_UBLOX or GSM_MODEM_LARAR2
+ #endif
+
+#else
+
+ // Optional usage of GSM_RESETN and GSM_DTR. Need to be here only when true. Default is false
+ #define UBLOX_USING_RESET_PIN true
+ #define UBLOX_USING_LOW_POWER_MODE true
+
// Override the default (and certainly not good) pins and port
// Only for boards other than ARDUINO_SAMD_MKRGSM1400
#if (ESP32)
@@ -74,44 +102,38 @@
#warning You must connect the Modem correctly and modify the pins / Serial port here
-#endif
-
-//////////////////////////////////////////////
-
-// Optional usage of GSM_RESETN and GSM_DTR. Need to be here only when true. Default is false
-
-//#define UBLOX_USING_RESET_PIN true
-//#define UBLOX_USING_LOW_POWER_MODE true
-
-//////////////////////////////////////////////
-
-#define GSM_MODEM_UBLOX true
-#define GSM_MODEM_SARAR4 false
+ //////////////////////////////////////////////
+
+ #define GSM_MODEM_UBLOX true
+ #define GSM_MODEM_SARAR4 false
+ #define GSM_MODEM_LARAR2 false
+
+ //////////////////////////////////////////////
+ // Not supported yet
+ #define GSM_MODEM_SIM800 false
+ #define GSM_MODEM_SIM808 false
+ #define GSM_MODEM_SIM868 false
+ #define GSM_MODEM_SIM900 false
+ #define GSM_MODEM_SIM5300 false
+ #define GSM_MODEM_SIM5320 false
+ #define GSM_MODEM_SIM5360 false
+ #define GSM_MODEM_SIM7000 false
+ #define GSM_MODEM_SIM7100 false
+ #define GSM_MODEM_SIM7500 false
+ #define GSM_MODEM_SIM7600 false
+ #define GSM_MODEM_SIM7800 false
+ #define GSM_MODEM_M95 false
+ #define GSM_MODEM_BG96 false
+ #define GSM_MODEM_A6 false
+ #define GSM_MODEM_A7 false
+ #define GSM_MODEM_M590 false
+ #define GSM_MODEM_MC60 false
+ #define GSM_MODEM_MC60E false
+ #define GSM_MODEM_XBEE false
+ #define GSM_MODEM_SEQUANS_MONARCH false
+ //////////////////////////////////////////////
-//////////////////////////////////////////////
-// Not supported yet
-#define GSM_MODEM_SIM800 false
-#define GSM_MODEM_SIM808 false
-#define GSM_MODEM_SIM868 false
-#define GSM_MODEM_SIM900 false
-#define GSM_MODEM_SIM5300 false
-#define GSM_MODEM_SIM5320 false
-#define GSM_MODEM_SIM5360 false
-#define GSM_MODEM_SIM7000 false
-#define GSM_MODEM_SIM7100 false
-#define GSM_MODEM_SIM7500 false
-#define GSM_MODEM_SIM7600 false
-#define GSM_MODEM_SIM7800 false
-#define GSM_MODEM_M95 false
-#define GSM_MODEM_BG96 false
-#define GSM_MODEM_A6 false
-#define GSM_MODEM_A7 false
-#define GSM_MODEM_M590 false
-#define GSM_MODEM_MC60 false
-#define GSM_MODEM_MC60E false
-#define GSM_MODEM_XBEE false
-#define GSM_MODEM_SEQUANS_MONARCH false
-//////////////////////////////////////////////
+#endif
// libraries
#include
diff --git a/examples/GsmSSLWebClient/GsmSSLWebClient.ino b/examples/GsmSSLWebClient/GsmSSLWebClient.ino
index cca50cd..75b5a48 100644
--- a/examples/GsmSSLWebClient/GsmSSLWebClient.ino
+++ b/examples/GsmSSLWebClient/GsmSSLWebClient.ino
@@ -17,16 +17,6 @@
of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program.
If not, see .
-
- Version: 1.5.0
-
- Version Modified By Date Comments
- ------- ----------- ---------- -----------
- 1.2.4 K Hoang 11/03/2021 Initial public release to add support to many boards / modules besides MKRGSM 1400 / SARA U201
- 1.3.0 K Hoang 31/03/2021 Add ThingStream MQTTS support. Fix SMS receive bug.
- 1.3.1 K Hoang 25/04/2021 Fix bug making ESP32 reset repeatedly.
- 1.4.0 K Hoang 28/06/2021 Add support to RP2040-based boards using Arduino mbed or Arduino-pico core
- 1.5.0 K Hoang 14/08/2021 Add support to Adafruit nRF52 core v0.22.0+
**********************************************************************************************************************************/
/*
Web client
diff --git a/examples/GsmSSLWebClient/defines.h b/examples/GsmSSLWebClient/defines.h
index f8cba20..845fa92 100644
--- a/examples/GsmSSLWebClient/defines.h
+++ b/examples/GsmSSLWebClient/defines.h
@@ -41,7 +41,35 @@
//////////////////////////////////////////////
-#if !defined(ARDUINO_SAMD_MKRGSM1400)
+#if defined(ARDUINO_SAMD_MKRGSM1400)
+
+ // For original MKRGSM1400 => GSM_MODEM_UBLOX == true, GSM_MODEM_LARAR2 == false
+ // For modified MKRGSM1400 using LARA R2 => GSM_MODEM_UBLOX == false, GSM_MODEM_LARAR2 == true
+ #define GSM_MODEM_UBLOX false
+
+ #if GSM_MODEM_UBLOX
+ #define GSM_MODEM_LARAR2 false
+ #else
+ #define GSM_MODEM_LARAR2 true
+ #endif
+
+ #define UBLOX_USING_RESET_PIN true
+ #define UBLOX_USING_LOW_POWER_MODE true
+
+ #if GSM_MODEM_UBLOX
+ #warning Using MKRGSM1400 Configuration with SARA U201
+ #elif GSM_MODEM_LARAR2
+ #warning Using MKRGSM1400 Configuration with LARA R2xx
+ #else
+ #error Must select either GSM_MODEM_UBLOX or GSM_MODEM_LARAR2
+ #endif
+
+#else
+
+ // Optional usage of GSM_RESETN and GSM_DTR. Need to be here only when true. Default is false
+ #define UBLOX_USING_RESET_PIN true
+ #define UBLOX_USING_LOW_POWER_MODE true
+
// Override the default (and certainly not good) pins and port
// Only for boards other than ARDUINO_SAMD_MKRGSM1400
#if (ESP32)
@@ -81,44 +109,38 @@
#warning You must connect the Modem correctly and modify the pins / Serial port here
-#endif
-
-//////////////////////////////////////////////
-
-// Optional usage of GSM_RESETN and GSM_DTR. Need to be here only when true. Default is false
-
-//#define UBLOX_USING_RESET_PIN true
-//#define UBLOX_USING_LOW_POWER_MODE true
-
-//////////////////////////////////////////////
-
-#define GSM_MODEM_UBLOX true
-#define GSM_MODEM_SARAR4 false
+ //////////////////////////////////////////////
+
+ #define GSM_MODEM_UBLOX false
+ #define GSM_MODEM_SARAR4 false
+ #define GSM_MODEM_LARAR2 true
+
+ //////////////////////////////////////////////
+ // Not supported yet
+ #define GSM_MODEM_SIM800 false
+ #define GSM_MODEM_SIM808 false
+ #define GSM_MODEM_SIM868 false
+ #define GSM_MODEM_SIM900 false
+ #define GSM_MODEM_SIM5300 false
+ #define GSM_MODEM_SIM5320 false
+ #define GSM_MODEM_SIM5360 false
+ #define GSM_MODEM_SIM7000 false
+ #define GSM_MODEM_SIM7100 false
+ #define GSM_MODEM_SIM7500 false
+ #define GSM_MODEM_SIM7600 false
+ #define GSM_MODEM_SIM7800 false
+ #define GSM_MODEM_M95 false
+ #define GSM_MODEM_BG96 false
+ #define GSM_MODEM_A6 false
+ #define GSM_MODEM_A7 false
+ #define GSM_MODEM_M590 false
+ #define GSM_MODEM_MC60 false
+ #define GSM_MODEM_MC60E false
+ #define GSM_MODEM_XBEE false
+ #define GSM_MODEM_SEQUANS_MONARCH false
+ //////////////////////////////////////////////
-//////////////////////////////////////////////
-// Not supported yet
-#define GSM_MODEM_SIM800 false
-#define GSM_MODEM_SIM808 false
-#define GSM_MODEM_SIM868 false
-#define GSM_MODEM_SIM900 false
-#define GSM_MODEM_SIM5300 false
-#define GSM_MODEM_SIM5320 false
-#define GSM_MODEM_SIM5360 false
-#define GSM_MODEM_SIM7000 false
-#define GSM_MODEM_SIM7100 false
-#define GSM_MODEM_SIM7500 false
-#define GSM_MODEM_SIM7600 false
-#define GSM_MODEM_SIM7800 false
-#define GSM_MODEM_M95 false
-#define GSM_MODEM_BG96 false
-#define GSM_MODEM_A6 false
-#define GSM_MODEM_A7 false
-#define GSM_MODEM_M590 false
-#define GSM_MODEM_MC60 false
-#define GSM_MODEM_MC60E false
-#define GSM_MODEM_XBEE false
-#define GSM_MODEM_SEQUANS_MONARCH false
-//////////////////////////////////////////////
+#endif
// libraries
#include
diff --git a/examples/GsmWebClient/GsmWebClient.ino b/examples/GsmWebClient/GsmWebClient.ino
index 3e2619d..e2d3e9a 100644
--- a/examples/GsmWebClient/GsmWebClient.ino
+++ b/examples/GsmWebClient/GsmWebClient.ino
@@ -17,16 +17,6 @@
of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program.
If not, see .
-
- Version: 1.5.0
-
- Version Modified By Date Comments
- ------- ----------- ---------- -----------
- 1.2.4 K Hoang 11/03/2021 Initial public release to add support to many boards / modules besides MKRGSM 1400 / SARA U201
- 1.3.0 K Hoang 31/03/2021 Add ThingStream MQTTS support. Fix SMS receive bug.
- 1.3.1 K Hoang 25/04/2021 Fix bug making ESP32 reset repeatedly.
- 1.4.0 K Hoang 28/06/2021 Add support to RP2040-based boards using Arduino mbed or Arduino-pico core
- 1.5.0 K Hoang 14/08/2021 Add support to Adafruit nRF52 core v0.22.0+
**********************************************************************************************************************************/
/*
diff --git a/examples/GsmWebClient/defines.h b/examples/GsmWebClient/defines.h
index 13a0836..48203f3 100644
--- a/examples/GsmWebClient/defines.h
+++ b/examples/GsmWebClient/defines.h
@@ -38,7 +38,35 @@
//////////////////////////////////////////////
-#if !defined(ARDUINO_SAMD_MKRGSM1400)
+#if defined(ARDUINO_SAMD_MKRGSM1400)
+
+ // For original MKRGSM1400 => GSM_MODEM_UBLOX == true, GSM_MODEM_LARAR2 == false
+ // For modified MKRGSM1400 using LARA R2 => GSM_MODEM_UBLOX == false, GSM_MODEM_LARAR2 == true
+ #define GSM_MODEM_UBLOX false
+
+ #if GSM_MODEM_UBLOX
+ #define GSM_MODEM_LARAR2 false
+ #else
+ #define GSM_MODEM_LARAR2 true
+ #endif
+
+ #define UBLOX_USING_RESET_PIN true
+ #define UBLOX_USING_LOW_POWER_MODE true
+
+ #if GSM_MODEM_UBLOX
+ #warning Using MKRGSM1400 Configuration with SARA U201
+ #elif GSM_MODEM_LARAR2
+ #warning Using MKRGSM1400 Configuration with LARA R2xx
+ #else
+ #error Must select either GSM_MODEM_UBLOX or GSM_MODEM_LARAR2
+ #endif
+
+#else
+
+ // Optional usage of GSM_RESETN and GSM_DTR. Need to be here only when true. Default is false
+ #define UBLOX_USING_RESET_PIN true
+ #define UBLOX_USING_LOW_POWER_MODE true
+
// Override the default (and certainly not good) pins and port
// Only for boards other than ARDUINO_SAMD_MKRGSM1400
#if (ESP32)
@@ -78,44 +106,38 @@
#warning You must connect the Modem correctly and modify the pins / Serial port here
-#endif
-
-//////////////////////////////////////////////
-
-// Optional usage of GSM_RESETN and GSM_DTR. Need to be here only when true. Default is false
-
-//#define UBLOX_USING_RESET_PIN true
-//#define UBLOX_USING_LOW_POWER_MODE true
-
-//////////////////////////////////////////////
-
-#define GSM_MODEM_UBLOX true
-#define GSM_MODEM_SARAR4 false
+ //////////////////////////////////////////////
+
+ #define GSM_MODEM_UBLOX false
+ #define GSM_MODEM_SARAR4 false
+ #define GSM_MODEM_LARAR2 true
+
+ //////////////////////////////////////////////
+ // Not supported yet
+ #define GSM_MODEM_SIM800 false
+ #define GSM_MODEM_SIM808 false
+ #define GSM_MODEM_SIM868 false
+ #define GSM_MODEM_SIM900 false
+ #define GSM_MODEM_SIM5300 false
+ #define GSM_MODEM_SIM5320 false
+ #define GSM_MODEM_SIM5360 false
+ #define GSM_MODEM_SIM7000 false
+ #define GSM_MODEM_SIM7100 false
+ #define GSM_MODEM_SIM7500 false
+ #define GSM_MODEM_SIM7600 false
+ #define GSM_MODEM_SIM7800 false
+ #define GSM_MODEM_M95 false
+ #define GSM_MODEM_BG96 false
+ #define GSM_MODEM_A6 false
+ #define GSM_MODEM_A7 false
+ #define GSM_MODEM_M590 false
+ #define GSM_MODEM_MC60 false
+ #define GSM_MODEM_MC60E false
+ #define GSM_MODEM_XBEE false
+ #define GSM_MODEM_SEQUANS_MONARCH false
+ //////////////////////////////////////////////
-//////////////////////////////////////////////
-// Not supported yet
-#define GSM_MODEM_SIM800 false
-#define GSM_MODEM_SIM808 false
-#define GSM_MODEM_SIM868 false
-#define GSM_MODEM_SIM900 false
-#define GSM_MODEM_SIM5300 false
-#define GSM_MODEM_SIM5320 false
-#define GSM_MODEM_SIM5360 false
-#define GSM_MODEM_SIM7000 false
-#define GSM_MODEM_SIM7100 false
-#define GSM_MODEM_SIM7500 false
-#define GSM_MODEM_SIM7600 false
-#define GSM_MODEM_SIM7800 false
-#define GSM_MODEM_M95 false
-#define GSM_MODEM_BG96 false
-#define GSM_MODEM_A6 false
-#define GSM_MODEM_A7 false
-#define GSM_MODEM_M590 false
-#define GSM_MODEM_MC60 false
-#define GSM_MODEM_MC60E false
-#define GSM_MODEM_XBEE false
-#define GSM_MODEM_SEQUANS_MONARCH false
-//////////////////////////////////////////////
+#endif
// libraries
#include
diff --git a/examples/GsmWebServer/GsmWebServer.ino b/examples/GsmWebServer/GsmWebServer.ino
index 2eaa6e7..d180f3b 100644
--- a/examples/GsmWebServer/GsmWebServer.ino
+++ b/examples/GsmWebServer/GsmWebServer.ino
@@ -17,16 +17,6 @@
of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program.
If not, see .
-
- Version: 1.5.0
-
- Version Modified By Date Comments
- ------- ----------- ---------- -----------
- 1.2.4 K Hoang 11/03/2021 Initial public release to add support to many boards / modules besides MKRGSM 1400 / SARA U201
- 1.3.0 K Hoang 31/03/2021 Add ThingStream MQTTS support. Fix SMS receive bug.
- 1.3.1 K Hoang 25/04/2021 Fix bug making ESP32 reset repeatedly.
- 1.4.0 K Hoang 28/06/2021 Add support to RP2040-based boards using Arduino mbed or Arduino-pico core
- 1.5.0 K Hoang 14/08/2021 Add support to Adafruit nRF52 core v0.22.0+
**********************************************************************************************************************************/
/*
GSM Web Server
diff --git a/examples/GsmWebServer/defines.h b/examples/GsmWebServer/defines.h
index 10031a6..2b578e1 100644
--- a/examples/GsmWebServer/defines.h
+++ b/examples/GsmWebServer/defines.h
@@ -34,7 +34,35 @@
//////////////////////////////////////////////
-#if !defined(ARDUINO_SAMD_MKRGSM1400)
+#if defined(ARDUINO_SAMD_MKRGSM1400)
+
+ // For original MKRGSM1400 => GSM_MODEM_UBLOX == true, GSM_MODEM_LARAR2 == false
+ // For modified MKRGSM1400 using LARA R2 => GSM_MODEM_UBLOX == false, GSM_MODEM_LARAR2 == true
+ #define GSM_MODEM_UBLOX false
+
+ #if GSM_MODEM_UBLOX
+ #define GSM_MODEM_LARAR2 false
+ #else
+ #define GSM_MODEM_LARAR2 true
+ #endif
+
+ #define UBLOX_USING_RESET_PIN true
+ #define UBLOX_USING_LOW_POWER_MODE true
+
+ #if GSM_MODEM_UBLOX
+ #warning Using MKRGSM1400 Configuration with SARA U201
+ #elif GSM_MODEM_LARAR2
+ #warning Using MKRGSM1400 Configuration with LARA R2xx
+ #else
+ #error Must select either GSM_MODEM_UBLOX or GSM_MODEM_LARAR2
+ #endif
+
+#else
+
+ // Optional usage of GSM_RESETN and GSM_DTR. Need to be here only when true. Default is false
+ #define UBLOX_USING_RESET_PIN true
+ #define UBLOX_USING_LOW_POWER_MODE true
+
// Override the default (and certainly not good) pins and port
// Only for boards other than ARDUINO_SAMD_MKRGSM1400
#if (ESP32)
@@ -74,44 +102,38 @@
#warning You must connect the Modem correctly and modify the pins / Serial port here
-#endif
-
-//////////////////////////////////////////////
-
-// Optional usage of GSM_RESETN and GSM_DTR. Need to be here only when true. Default is false
-
-//#define UBLOX_USING_RESET_PIN true
-//#define UBLOX_USING_LOW_POWER_MODE true
-
-//////////////////////////////////////////////
-
-#define GSM_MODEM_UBLOX true
-#define GSM_MODEM_SARAR4 false
+ //////////////////////////////////////////////
+
+ #define GSM_MODEM_UBLOX true
+ #define GSM_MODEM_SARAR4 false
+ #define GSM_MODEM_LARAR2 false
+
+ //////////////////////////////////////////////
+ // Not supported yet
+ #define GSM_MODEM_SIM800 false
+ #define GSM_MODEM_SIM808 false
+ #define GSM_MODEM_SIM868 false
+ #define GSM_MODEM_SIM900 false
+ #define GSM_MODEM_SIM5300 false
+ #define GSM_MODEM_SIM5320 false
+ #define GSM_MODEM_SIM5360 false
+ #define GSM_MODEM_SIM7000 false
+ #define GSM_MODEM_SIM7100 false
+ #define GSM_MODEM_SIM7500 false
+ #define GSM_MODEM_SIM7600 false
+ #define GSM_MODEM_SIM7800 false
+ #define GSM_MODEM_M95 false
+ #define GSM_MODEM_BG96 false
+ #define GSM_MODEM_A6 false
+ #define GSM_MODEM_A7 false
+ #define GSM_MODEM_M590 false
+ #define GSM_MODEM_MC60 false
+ #define GSM_MODEM_MC60E false
+ #define GSM_MODEM_XBEE false
+ #define GSM_MODEM_SEQUANS_MONARCH false
+ //////////////////////////////////////////////
-//////////////////////////////////////////////
-// Not supported yet
-#define GSM_MODEM_SIM800 false
-#define GSM_MODEM_SIM808 false
-#define GSM_MODEM_SIM868 false
-#define GSM_MODEM_SIM900 false
-#define GSM_MODEM_SIM5300 false
-#define GSM_MODEM_SIM5320 false
-#define GSM_MODEM_SIM5360 false
-#define GSM_MODEM_SIM7000 false
-#define GSM_MODEM_SIM7100 false
-#define GSM_MODEM_SIM7500 false
-#define GSM_MODEM_SIM7600 false
-#define GSM_MODEM_SIM7800 false
-#define GSM_MODEM_M95 false
-#define GSM_MODEM_BG96 false
-#define GSM_MODEM_A6 false
-#define GSM_MODEM_A7 false
-#define GSM_MODEM_M590 false
-#define GSM_MODEM_MC60 false
-#define GSM_MODEM_MC60E false
-#define GSM_MODEM_XBEE false
-#define GSM_MODEM_SEQUANS_MONARCH false
-//////////////////////////////////////////////
+#endif
// libraries
#include
diff --git a/examples/MakeVoiceCall/MakeVoiceCall.ino b/examples/MakeVoiceCall/MakeVoiceCall.ino
index f9e53d9..d4a34bc 100644
--- a/examples/MakeVoiceCall/MakeVoiceCall.ino
+++ b/examples/MakeVoiceCall/MakeVoiceCall.ino
@@ -17,16 +17,6 @@
of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program.
If not, see .
-
- Version: 1.5.0
-
- Version Modified By Date Comments
- ------- ----------- ---------- -----------
- 1.2.4 K Hoang 11/03/2021 Initial public release to add support to many boards / modules besides MKRGSM 1400 / SARA U201
- 1.3.0 K Hoang 31/03/2021 Add ThingStream MQTTS support. Fix SMS receive bug.
- 1.3.1 K Hoang 25/04/2021 Fix bug making ESP32 reset repeatedly.
- 1.4.0 K Hoang 28/06/2021 Add support to RP2040-based boards using Arduino mbed or Arduino-pico core
- 1.5.0 K Hoang 14/08/2021 Add support to Adafruit nRF52 core v0.22.0+
**********************************************************************************************************************************/
/*
Make Voice Call
diff --git a/examples/MakeVoiceCall/defines.h b/examples/MakeVoiceCall/defines.h
index cfefda4..7b0e3aa 100644
--- a/examples/MakeVoiceCall/defines.h
+++ b/examples/MakeVoiceCall/defines.h
@@ -34,7 +34,35 @@
//////////////////////////////////////////////
-#if !defined(ARDUINO_SAMD_MKRGSM1400)
+#if defined(ARDUINO_SAMD_MKRGSM1400)
+
+ // For original MKRGSM1400 => GSM_MODEM_UBLOX == true, GSM_MODEM_LARAR2 == false
+ // For modified MKRGSM1400 using LARA R2 => GSM_MODEM_UBLOX == false, GSM_MODEM_LARAR2 == true
+ #define GSM_MODEM_UBLOX false
+
+ #if GSM_MODEM_UBLOX
+ #define GSM_MODEM_LARAR2 false
+ #else
+ #define GSM_MODEM_LARAR2 true
+ #endif
+
+ #define UBLOX_USING_RESET_PIN true
+ #define UBLOX_USING_LOW_POWER_MODE true
+
+ #if GSM_MODEM_UBLOX
+ #warning Using MKRGSM1400 Configuration with SARA U201
+ #elif GSM_MODEM_LARAR2
+ #warning Using MKRGSM1400 Configuration with LARA R2xx
+ #else
+ #error Must select either GSM_MODEM_UBLOX or GSM_MODEM_LARAR2
+ #endif
+
+#else
+
+ // Optional usage of GSM_RESETN and GSM_DTR. Need to be here only when true. Default is false
+ #define UBLOX_USING_RESET_PIN true
+ #define UBLOX_USING_LOW_POWER_MODE true
+
// Override the default (and certainly not good) pins and port
// Only for boards other than ARDUINO_SAMD_MKRGSM1400
#if (ESP32)
@@ -74,44 +102,38 @@
#warning You must connect the Modem correctly and modify the pins / Serial port here
-#endif
-
-//////////////////////////////////////////////
-
-// Optional usage of GSM_RESETN and GSM_DTR. Need to be here only when true. Default is false
-
-//#define UBLOX_USING_RESET_PIN true
-//#define UBLOX_USING_LOW_POWER_MODE true
-
-//////////////////////////////////////////////
-
-#define GSM_MODEM_UBLOX true
-#define GSM_MODEM_SARAR4 false
+ //////////////////////////////////////////////
+
+ #define GSM_MODEM_UBLOX true
+ #define GSM_MODEM_SARAR4 false
+ #define GSM_MODEM_LARAR2 false
+
+ //////////////////////////////////////////////
+ // Not supported yet
+ #define GSM_MODEM_SIM800 false
+ #define GSM_MODEM_SIM808 false
+ #define GSM_MODEM_SIM868 false
+ #define GSM_MODEM_SIM900 false
+ #define GSM_MODEM_SIM5300 false
+ #define GSM_MODEM_SIM5320 false
+ #define GSM_MODEM_SIM5360 false
+ #define GSM_MODEM_SIM7000 false
+ #define GSM_MODEM_SIM7100 false
+ #define GSM_MODEM_SIM7500 false
+ #define GSM_MODEM_SIM7600 false
+ #define GSM_MODEM_SIM7800 false
+ #define GSM_MODEM_M95 false
+ #define GSM_MODEM_BG96 false
+ #define GSM_MODEM_A6 false
+ #define GSM_MODEM_A7 false
+ #define GSM_MODEM_M590 false
+ #define GSM_MODEM_MC60 false
+ #define GSM_MODEM_MC60E false
+ #define GSM_MODEM_XBEE false
+ #define GSM_MODEM_SEQUANS_MONARCH false
+ //////////////////////////////////////////////
-//////////////////////////////////////////////
-// Not supported yet
-#define GSM_MODEM_SIM800 false
-#define GSM_MODEM_SIM808 false
-#define GSM_MODEM_SIM868 false
-#define GSM_MODEM_SIM900 false
-#define GSM_MODEM_SIM5300 false
-#define GSM_MODEM_SIM5320 false
-#define GSM_MODEM_SIM5360 false
-#define GSM_MODEM_SIM7000 false
-#define GSM_MODEM_SIM7100 false
-#define GSM_MODEM_SIM7500 false
-#define GSM_MODEM_SIM7600 false
-#define GSM_MODEM_SIM7800 false
-#define GSM_MODEM_M95 false
-#define GSM_MODEM_BG96 false
-#define GSM_MODEM_A6 false
-#define GSM_MODEM_A7 false
-#define GSM_MODEM_M590 false
-#define GSM_MODEM_MC60 false
-#define GSM_MODEM_MC60E false
-#define GSM_MODEM_XBEE false
-#define GSM_MODEM_SEQUANS_MONARCH false
-//////////////////////////////////////////////
+#endif
// libraries
#include
diff --git a/examples/ReceiveSMS/ReceiveSMS.ino b/examples/ReceiveSMS/ReceiveSMS.ino
index 87bae31..5cd09fc 100644
--- a/examples/ReceiveSMS/ReceiveSMS.ino
+++ b/examples/ReceiveSMS/ReceiveSMS.ino
@@ -17,16 +17,6 @@
of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program.
If not, see .
-
- Version: 1.5.0
-
- Version Modified By Date Comments
- ------- ----------- ---------- -----------
- 1.2.4 K Hoang 11/03/2021 Initial public release to add support to many boards / modules besides MKRGSM 1400 / SARA U201
- 1.3.0 K Hoang 31/03/2021 Add ThingStream MQTTS support. Fix SMS receive bug.
- 1.3.1 K Hoang 25/04/2021 Fix bug making ESP32 reset repeatedly.
- 1.4.0 K Hoang 28/06/2021 Add support to RP2040-based boards using Arduino mbed or Arduino-pico core
- 1.5.0 K Hoang 14/08/2021 Add support to Adafruit nRF52 core v0.22.0+
**********************************************************************************************************************************/
/*
SMS receiver
diff --git a/examples/ReceiveSMS/defines.h b/examples/ReceiveSMS/defines.h
index cfefda4..7b0e3aa 100644
--- a/examples/ReceiveSMS/defines.h
+++ b/examples/ReceiveSMS/defines.h
@@ -34,7 +34,35 @@
//////////////////////////////////////////////
-#if !defined(ARDUINO_SAMD_MKRGSM1400)
+#if defined(ARDUINO_SAMD_MKRGSM1400)
+
+ // For original MKRGSM1400 => GSM_MODEM_UBLOX == true, GSM_MODEM_LARAR2 == false
+ // For modified MKRGSM1400 using LARA R2 => GSM_MODEM_UBLOX == false, GSM_MODEM_LARAR2 == true
+ #define GSM_MODEM_UBLOX false
+
+ #if GSM_MODEM_UBLOX
+ #define GSM_MODEM_LARAR2 false
+ #else
+ #define GSM_MODEM_LARAR2 true
+ #endif
+
+ #define UBLOX_USING_RESET_PIN true
+ #define UBLOX_USING_LOW_POWER_MODE true
+
+ #if GSM_MODEM_UBLOX
+ #warning Using MKRGSM1400 Configuration with SARA U201
+ #elif GSM_MODEM_LARAR2
+ #warning Using MKRGSM1400 Configuration with LARA R2xx
+ #else
+ #error Must select either GSM_MODEM_UBLOX or GSM_MODEM_LARAR2
+ #endif
+
+#else
+
+ // Optional usage of GSM_RESETN and GSM_DTR. Need to be here only when true. Default is false
+ #define UBLOX_USING_RESET_PIN true
+ #define UBLOX_USING_LOW_POWER_MODE true
+
// Override the default (and certainly not good) pins and port
// Only for boards other than ARDUINO_SAMD_MKRGSM1400
#if (ESP32)
@@ -74,44 +102,38 @@
#warning You must connect the Modem correctly and modify the pins / Serial port here
-#endif
-
-//////////////////////////////////////////////
-
-// Optional usage of GSM_RESETN and GSM_DTR. Need to be here only when true. Default is false
-
-//#define UBLOX_USING_RESET_PIN true
-//#define UBLOX_USING_LOW_POWER_MODE true
-
-//////////////////////////////////////////////
-
-#define GSM_MODEM_UBLOX true
-#define GSM_MODEM_SARAR4 false
+ //////////////////////////////////////////////
+
+ #define GSM_MODEM_UBLOX true
+ #define GSM_MODEM_SARAR4 false
+ #define GSM_MODEM_LARAR2 false
+
+ //////////////////////////////////////////////
+ // Not supported yet
+ #define GSM_MODEM_SIM800 false
+ #define GSM_MODEM_SIM808 false
+ #define GSM_MODEM_SIM868 false
+ #define GSM_MODEM_SIM900 false
+ #define GSM_MODEM_SIM5300 false
+ #define GSM_MODEM_SIM5320 false
+ #define GSM_MODEM_SIM5360 false
+ #define GSM_MODEM_SIM7000 false
+ #define GSM_MODEM_SIM7100 false
+ #define GSM_MODEM_SIM7500 false
+ #define GSM_MODEM_SIM7600 false
+ #define GSM_MODEM_SIM7800 false
+ #define GSM_MODEM_M95 false
+ #define GSM_MODEM_BG96 false
+ #define GSM_MODEM_A6 false
+ #define GSM_MODEM_A7 false
+ #define GSM_MODEM_M590 false
+ #define GSM_MODEM_MC60 false
+ #define GSM_MODEM_MC60E false
+ #define GSM_MODEM_XBEE false
+ #define GSM_MODEM_SEQUANS_MONARCH false
+ //////////////////////////////////////////////
-//////////////////////////////////////////////
-// Not supported yet
-#define GSM_MODEM_SIM800 false
-#define GSM_MODEM_SIM808 false
-#define GSM_MODEM_SIM868 false
-#define GSM_MODEM_SIM900 false
-#define GSM_MODEM_SIM5300 false
-#define GSM_MODEM_SIM5320 false
-#define GSM_MODEM_SIM5360 false
-#define GSM_MODEM_SIM7000 false
-#define GSM_MODEM_SIM7100 false
-#define GSM_MODEM_SIM7500 false
-#define GSM_MODEM_SIM7600 false
-#define GSM_MODEM_SIM7800 false
-#define GSM_MODEM_M95 false
-#define GSM_MODEM_BG96 false
-#define GSM_MODEM_A6 false
-#define GSM_MODEM_A7 false
-#define GSM_MODEM_M590 false
-#define GSM_MODEM_MC60 false
-#define GSM_MODEM_MC60E false
-#define GSM_MODEM_XBEE false
-#define GSM_MODEM_SEQUANS_MONARCH false
-//////////////////////////////////////////////
+#endif
// libraries
#include
diff --git a/examples/ReceiveVoiceCall/ReceiveVoiceCall.ino b/examples/ReceiveVoiceCall/ReceiveVoiceCall.ino
index 6ee6f80..42751f4 100644
--- a/examples/ReceiveVoiceCall/ReceiveVoiceCall.ino
+++ b/examples/ReceiveVoiceCall/ReceiveVoiceCall.ino
@@ -17,16 +17,6 @@
of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program.
If not, see .
-
- Version: 1.5.0
-
- Version Modified By Date Comments
- ------- ----------- ---------- -----------
- 1.2.4 K Hoang 11/03/2021 Initial public release to add support to many boards / modules besides MKRGSM 1400 / SARA U201
- 1.3.0 K Hoang 31/03/2021 Add ThingStream MQTTS support. Fix SMS receive bug.
- 1.3.1 K Hoang 25/04/2021 Fix bug making ESP32 reset repeatedly.
- 1.4.0 K Hoang 28/06/2021 Add support to RP2040-based boards using Arduino mbed or Arduino-pico core
- 1.5.0 K Hoang 14/08/2021 Add support to Adafruit nRF52 core v0.22.0+
**********************************************************************************************************************************/
/*
Receive Voice Call
diff --git a/examples/ReceiveVoiceCall/defines.h b/examples/ReceiveVoiceCall/defines.h
index cfefda4..7b0e3aa 100644
--- a/examples/ReceiveVoiceCall/defines.h
+++ b/examples/ReceiveVoiceCall/defines.h
@@ -34,7 +34,35 @@
//////////////////////////////////////////////
-#if !defined(ARDUINO_SAMD_MKRGSM1400)
+#if defined(ARDUINO_SAMD_MKRGSM1400)
+
+ // For original MKRGSM1400 => GSM_MODEM_UBLOX == true, GSM_MODEM_LARAR2 == false
+ // For modified MKRGSM1400 using LARA R2 => GSM_MODEM_UBLOX == false, GSM_MODEM_LARAR2 == true
+ #define GSM_MODEM_UBLOX false
+
+ #if GSM_MODEM_UBLOX
+ #define GSM_MODEM_LARAR2 false
+ #else
+ #define GSM_MODEM_LARAR2 true
+ #endif
+
+ #define UBLOX_USING_RESET_PIN true
+ #define UBLOX_USING_LOW_POWER_MODE true
+
+ #if GSM_MODEM_UBLOX
+ #warning Using MKRGSM1400 Configuration with SARA U201
+ #elif GSM_MODEM_LARAR2
+ #warning Using MKRGSM1400 Configuration with LARA R2xx
+ #else
+ #error Must select either GSM_MODEM_UBLOX or GSM_MODEM_LARAR2
+ #endif
+
+#else
+
+ // Optional usage of GSM_RESETN and GSM_DTR. Need to be here only when true. Default is false
+ #define UBLOX_USING_RESET_PIN true
+ #define UBLOX_USING_LOW_POWER_MODE true
+
// Override the default (and certainly not good) pins and port
// Only for boards other than ARDUINO_SAMD_MKRGSM1400
#if (ESP32)
@@ -74,44 +102,38 @@
#warning You must connect the Modem correctly and modify the pins / Serial port here
-#endif
-
-//////////////////////////////////////////////
-
-// Optional usage of GSM_RESETN and GSM_DTR. Need to be here only when true. Default is false
-
-//#define UBLOX_USING_RESET_PIN true
-//#define UBLOX_USING_LOW_POWER_MODE true
-
-//////////////////////////////////////////////
-
-#define GSM_MODEM_UBLOX true
-#define GSM_MODEM_SARAR4 false
+ //////////////////////////////////////////////
+
+ #define GSM_MODEM_UBLOX true
+ #define GSM_MODEM_SARAR4 false
+ #define GSM_MODEM_LARAR2 false
+
+ //////////////////////////////////////////////
+ // Not supported yet
+ #define GSM_MODEM_SIM800 false
+ #define GSM_MODEM_SIM808 false
+ #define GSM_MODEM_SIM868 false
+ #define GSM_MODEM_SIM900 false
+ #define GSM_MODEM_SIM5300 false
+ #define GSM_MODEM_SIM5320 false
+ #define GSM_MODEM_SIM5360 false
+ #define GSM_MODEM_SIM7000 false
+ #define GSM_MODEM_SIM7100 false
+ #define GSM_MODEM_SIM7500 false
+ #define GSM_MODEM_SIM7600 false
+ #define GSM_MODEM_SIM7800 false
+ #define GSM_MODEM_M95 false
+ #define GSM_MODEM_BG96 false
+ #define GSM_MODEM_A6 false
+ #define GSM_MODEM_A7 false
+ #define GSM_MODEM_M590 false
+ #define GSM_MODEM_MC60 false
+ #define GSM_MODEM_MC60E false
+ #define GSM_MODEM_XBEE false
+ #define GSM_MODEM_SEQUANS_MONARCH false
+ //////////////////////////////////////////////
-//////////////////////////////////////////////
-// Not supported yet
-#define GSM_MODEM_SIM800 false
-#define GSM_MODEM_SIM808 false
-#define GSM_MODEM_SIM868 false
-#define GSM_MODEM_SIM900 false
-#define GSM_MODEM_SIM5300 false
-#define GSM_MODEM_SIM5320 false
-#define GSM_MODEM_SIM5360 false
-#define GSM_MODEM_SIM7000 false
-#define GSM_MODEM_SIM7100 false
-#define GSM_MODEM_SIM7500 false
-#define GSM_MODEM_SIM7600 false
-#define GSM_MODEM_SIM7800 false
-#define GSM_MODEM_M95 false
-#define GSM_MODEM_BG96 false
-#define GSM_MODEM_A6 false
-#define GSM_MODEM_A7 false
-#define GSM_MODEM_M590 false
-#define GSM_MODEM_MC60 false
-#define GSM_MODEM_MC60E false
-#define GSM_MODEM_XBEE false
-#define GSM_MODEM_SEQUANS_MONARCH false
-//////////////////////////////////////////////
+#endif
// libraries
#include
diff --git a/examples/SSLCertificateManagement_Example/SSLCertificateManagement_Example.ino b/examples/SSLCertificateManagement_Example/SSLCertificateManagement_Example.ino
index cd4063d..d8bdd02 100644
--- a/examples/SSLCertificateManagement_Example/SSLCertificateManagement_Example.ino
+++ b/examples/SSLCertificateManagement_Example/SSLCertificateManagement_Example.ino
@@ -17,16 +17,6 @@
of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program.
If not, see .
-
- Version: 1.5.0
-
- Version Modified By Date Comments
- ------- ----------- ---------- -----------
- 1.2.4 K Hoang 11/03/2021 Initial public release to add support to many boards / modules besides MKRGSM 1400 / SARA U201
- 1.3.0 K Hoang 31/03/2021 Add ThingStream MQTTS support. Fix SMS receive bug.
- 1.3.1 K Hoang 25/04/2021 Fix bug making ESP32 reset repeatedly.
- 1.4.0 K Hoang 28/06/2021 Add support to RP2040-based boards using Arduino mbed or Arduino-pico core
- 1.5.0 K Hoang 14/08/2021 Add support to Adafruit nRF52 core v0.22.0+
**********************************************************************************************************************************/
/*
ArduinoMqttClient - SSLCertificateManagement_Example
diff --git a/examples/SSLCertificateManagement_Example/defines.h b/examples/SSLCertificateManagement_Example/defines.h
index c15f0cb..c4fc445 100644
--- a/examples/SSLCertificateManagement_Example/defines.h
+++ b/examples/SSLCertificateManagement_Example/defines.h
@@ -43,7 +43,35 @@
//////////////////////////////////////////////
-#if !defined(ARDUINO_SAMD_MKRGSM1400)
+#if defined(ARDUINO_SAMD_MKRGSM1400)
+
+ // For original MKRGSM1400 => GSM_MODEM_UBLOX == true, GSM_MODEM_LARAR2 == false
+ // For modified MKRGSM1400 using LARA R2 => GSM_MODEM_UBLOX == false, GSM_MODEM_LARAR2 == true
+ #define GSM_MODEM_UBLOX false
+
+ #if GSM_MODEM_UBLOX
+ #define GSM_MODEM_LARAR2 false
+ #else
+ #define GSM_MODEM_LARAR2 true
+ #endif
+
+ #define UBLOX_USING_RESET_PIN true
+ #define UBLOX_USING_LOW_POWER_MODE true
+
+ #if GSM_MODEM_UBLOX
+ #warning Using MKRGSM1400 Configuration with SARA U201
+ #elif GSM_MODEM_LARAR2
+ #warning Using MKRGSM1400 Configuration with LARA R2xx
+ #else
+ #error Must select either GSM_MODEM_UBLOX or GSM_MODEM_LARAR2
+ #endif
+
+#else
+
+ // Optional usage of GSM_RESETN and GSM_DTR. Need to be here only when true. Default is false
+ #define UBLOX_USING_RESET_PIN true
+ #define UBLOX_USING_LOW_POWER_MODE true
+
// Override the default (and certainly not good) pins and port
// Only for boards other than ARDUINO_SAMD_MKRGSM1400
#if (ESP32)
@@ -83,44 +111,38 @@
#warning You must connect the Modem correctly and modify the pins / Serial port here
-#endif
-
-//////////////////////////////////////////////
-
-// Optional usage of GSM_RESETN and GSM_DTR. Need to be here only when true. Default is false
-
-//#define UBLOX_USING_RESET_PIN true
-//#define UBLOX_USING_LOW_POWER_MODE true
-
-//////////////////////////////////////////////
-
-#define GSM_MODEM_UBLOX true
-#define GSM_MODEM_SARAR4 false
+ //////////////////////////////////////////////
+
+ #define GSM_MODEM_UBLOX true
+ #define GSM_MODEM_SARAR4 false
+ #define GSM_MODEM_LARAR2 false
+
+ //////////////////////////////////////////////
+ // Not supported yet
+ #define GSM_MODEM_SIM800 false
+ #define GSM_MODEM_SIM808 false
+ #define GSM_MODEM_SIM868 false
+ #define GSM_MODEM_SIM900 false
+ #define GSM_MODEM_SIM5300 false
+ #define GSM_MODEM_SIM5320 false
+ #define GSM_MODEM_SIM5360 false
+ #define GSM_MODEM_SIM7000 false
+ #define GSM_MODEM_SIM7100 false
+ #define GSM_MODEM_SIM7500 false
+ #define GSM_MODEM_SIM7600 false
+ #define GSM_MODEM_SIM7800 false
+ #define GSM_MODEM_M95 false
+ #define GSM_MODEM_BG96 false
+ #define GSM_MODEM_A6 false
+ #define GSM_MODEM_A7 false
+ #define GSM_MODEM_M590 false
+ #define GSM_MODEM_MC60 false
+ #define GSM_MODEM_MC60E false
+ #define GSM_MODEM_XBEE false
+ #define GSM_MODEM_SEQUANS_MONARCH false
+ //////////////////////////////////////////////
-//////////////////////////////////////////////
-// Not supported yet
-#define GSM_MODEM_SIM800 false
-#define GSM_MODEM_SIM808 false
-#define GSM_MODEM_SIM868 false
-#define GSM_MODEM_SIM900 false
-#define GSM_MODEM_SIM5300 false
-#define GSM_MODEM_SIM5320 false
-#define GSM_MODEM_SIM5360 false
-#define GSM_MODEM_SIM7000 false
-#define GSM_MODEM_SIM7100 false
-#define GSM_MODEM_SIM7500 false
-#define GSM_MODEM_SIM7600 false
-#define GSM_MODEM_SIM7800 false
-#define GSM_MODEM_M95 false
-#define GSM_MODEM_BG96 false
-#define GSM_MODEM_A6 false
-#define GSM_MODEM_A7 false
-#define GSM_MODEM_M590 false
-#define GSM_MODEM_MC60 false
-#define GSM_MODEM_MC60E false
-#define GSM_MODEM_XBEE false
-#define GSM_MODEM_SEQUANS_MONARCH false
-//////////////////////////////////////////////
+#endif
// libraries
#include
diff --git a/examples/SendSMS/SendSMS.ino b/examples/SendSMS/SendSMS.ino
index ba61808..db67964 100644
--- a/examples/SendSMS/SendSMS.ino
+++ b/examples/SendSMS/SendSMS.ino
@@ -17,16 +17,6 @@
of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program.
If not, see .
-
- Version: 1.5.0
-
- Version Modified By Date Comments
- ------- ----------- ---------- -----------
- 1.2.4 K Hoang 11/03/2021 Initial public release to add support to many boards / modules besides MKRGSM 1400 / SARA U201
- 1.3.0 K Hoang 31/03/2021 Add ThingStream MQTTS support. Fix SMS receive bug.
- 1.3.1 K Hoang 25/04/2021 Fix bug making ESP32 reset repeatedly.
- 1.4.0 K Hoang 28/06/2021 Add support to RP2040-based boards using Arduino mbed or Arduino-pico core
- 1.5.0 K Hoang 14/08/2021 Add support to Adafruit nRF52 core v0.22.0+
**********************************************************************************************************************************/
/*
SMS sender
diff --git a/examples/SendSMS/defines.h b/examples/SendSMS/defines.h
index cfefda4..7b0e3aa 100644
--- a/examples/SendSMS/defines.h
+++ b/examples/SendSMS/defines.h
@@ -34,7 +34,35 @@
//////////////////////////////////////////////
-#if !defined(ARDUINO_SAMD_MKRGSM1400)
+#if defined(ARDUINO_SAMD_MKRGSM1400)
+
+ // For original MKRGSM1400 => GSM_MODEM_UBLOX == true, GSM_MODEM_LARAR2 == false
+ // For modified MKRGSM1400 using LARA R2 => GSM_MODEM_UBLOX == false, GSM_MODEM_LARAR2 == true
+ #define GSM_MODEM_UBLOX false
+
+ #if GSM_MODEM_UBLOX
+ #define GSM_MODEM_LARAR2 false
+ #else
+ #define GSM_MODEM_LARAR2 true
+ #endif
+
+ #define UBLOX_USING_RESET_PIN true
+ #define UBLOX_USING_LOW_POWER_MODE true
+
+ #if GSM_MODEM_UBLOX
+ #warning Using MKRGSM1400 Configuration with SARA U201
+ #elif GSM_MODEM_LARAR2
+ #warning Using MKRGSM1400 Configuration with LARA R2xx
+ #else
+ #error Must select either GSM_MODEM_UBLOX or GSM_MODEM_LARAR2
+ #endif
+
+#else
+
+ // Optional usage of GSM_RESETN and GSM_DTR. Need to be here only when true. Default is false
+ #define UBLOX_USING_RESET_PIN true
+ #define UBLOX_USING_LOW_POWER_MODE true
+
// Override the default (and certainly not good) pins and port
// Only for boards other than ARDUINO_SAMD_MKRGSM1400
#if (ESP32)
@@ -74,44 +102,38 @@
#warning You must connect the Modem correctly and modify the pins / Serial port here
-#endif
-
-//////////////////////////////////////////////
-
-// Optional usage of GSM_RESETN and GSM_DTR. Need to be here only when true. Default is false
-
-//#define UBLOX_USING_RESET_PIN true
-//#define UBLOX_USING_LOW_POWER_MODE true
-
-//////////////////////////////////////////////
-
-#define GSM_MODEM_UBLOX true
-#define GSM_MODEM_SARAR4 false
+ //////////////////////////////////////////////
+
+ #define GSM_MODEM_UBLOX true
+ #define GSM_MODEM_SARAR4 false
+ #define GSM_MODEM_LARAR2 false
+
+ //////////////////////////////////////////////
+ // Not supported yet
+ #define GSM_MODEM_SIM800 false
+ #define GSM_MODEM_SIM808 false
+ #define GSM_MODEM_SIM868 false
+ #define GSM_MODEM_SIM900 false
+ #define GSM_MODEM_SIM5300 false
+ #define GSM_MODEM_SIM5320 false
+ #define GSM_MODEM_SIM5360 false
+ #define GSM_MODEM_SIM7000 false
+ #define GSM_MODEM_SIM7100 false
+ #define GSM_MODEM_SIM7500 false
+ #define GSM_MODEM_SIM7600 false
+ #define GSM_MODEM_SIM7800 false
+ #define GSM_MODEM_M95 false
+ #define GSM_MODEM_BG96 false
+ #define GSM_MODEM_A6 false
+ #define GSM_MODEM_A7 false
+ #define GSM_MODEM_M590 false
+ #define GSM_MODEM_MC60 false
+ #define GSM_MODEM_MC60E false
+ #define GSM_MODEM_XBEE false
+ #define GSM_MODEM_SEQUANS_MONARCH false
+ //////////////////////////////////////////////
-//////////////////////////////////////////////
-// Not supported yet
-#define GSM_MODEM_SIM800 false
-#define GSM_MODEM_SIM808 false
-#define GSM_MODEM_SIM868 false
-#define GSM_MODEM_SIM900 false
-#define GSM_MODEM_SIM5300 false
-#define GSM_MODEM_SIM5320 false
-#define GSM_MODEM_SIM5360 false
-#define GSM_MODEM_SIM7000 false
-#define GSM_MODEM_SIM7100 false
-#define GSM_MODEM_SIM7500 false
-#define GSM_MODEM_SIM7600 false
-#define GSM_MODEM_SIM7800 false
-#define GSM_MODEM_M95 false
-#define GSM_MODEM_BG96 false
-#define GSM_MODEM_A6 false
-#define GSM_MODEM_A7 false
-#define GSM_MODEM_M590 false
-#define GSM_MODEM_MC60 false
-#define GSM_MODEM_MC60E false
-#define GSM_MODEM_XBEE false
-#define GSM_MODEM_SEQUANS_MONARCH false
-//////////////////////////////////////////////
+#endif
// libraries
#include
diff --git a/examples/Tools/BandManagement/BandManagement.ino b/examples/Tools/BandManagement/BandManagement.ino
index 3c8de8c..9aa8b76 100644
--- a/examples/Tools/BandManagement/BandManagement.ino
+++ b/examples/Tools/BandManagement/BandManagement.ino
@@ -17,16 +17,6 @@
of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program.
If not, see .
-
- Version: 1.5.0
-
- Version Modified By Date Comments
- ------- ----------- ---------- -----------
- 1.2.4 K Hoang 11/03/2021 Initial public release to add support to many boards / modules besides MKRGSM 1400 / SARA U201
- 1.3.0 K Hoang 31/03/2021 Add ThingStream MQTTS support. Fix SMS receive bug.
- 1.3.1 K Hoang 25/04/2021 Fix bug making ESP32 reset repeatedly.
- 1.4.0 K Hoang 28/06/2021 Add support to RP2040-based boards using Arduino mbed or Arduino-pico core
- 1.5.0 K Hoang 14/08/2021 Add support to Adafruit nRF52 core v0.22.0+
**********************************************************************************************************************************/
/*
Band Management
@@ -57,7 +47,35 @@
//////////////////////////////////////////////
-#if !defined(ARDUINO_SAMD_MKRGSM1400)
+#if defined(ARDUINO_SAMD_MKRGSM1400)
+
+ // For original MKRGSM1400 => GSM_MODEM_UBLOX == true, GSM_MODEM_LARAR2 == false
+ // For modified MKRGSM1400 using LARA R2 => GSM_MODEM_UBLOX == false, GSM_MODEM_LARAR2 == true
+ #define GSM_MODEM_UBLOX false
+
+ #if GSM_MODEM_UBLOX
+ #define GSM_MODEM_LARAR2 false
+ #else
+ #define GSM_MODEM_LARAR2 true
+ #endif
+
+ #define UBLOX_USING_RESET_PIN true
+ #define UBLOX_USING_LOW_POWER_MODE true
+
+ #if GSM_MODEM_UBLOX
+ #warning Using MKRGSM1400 Configuration with SARA U201
+ #elif GSM_MODEM_LARAR2
+ #warning Using MKRGSM1400 Configuration with LARA R2xx
+ #else
+ #error Must select either GSM_MODEM_UBLOX or GSM_MODEM_LARAR2
+ #endif
+
+#else
+
+ // Optional usage of GSM_RESETN and GSM_DTR. Need to be here only when true. Default is false
+ #define UBLOX_USING_RESET_PIN true
+ #define UBLOX_USING_LOW_POWER_MODE true
+
// Override the default (and certainly not good) pins and port
// Only for boards other than ARDUINO_SAMD_MKRGSM1400
#if (ESP32)
@@ -97,44 +115,38 @@
#warning You must connect the Modem correctly and modify the pins / Serial port here
-#endif
-
-//////////////////////////////////////////////
-
-// Optional usage of GSM_RESETN and GSM_DTR. Need to be here only when true. Default is false
-
-//#define UBLOX_USING_RESET_PIN true
-//#define UBLOX_USING_LOW_POWER_MODE true
-
-//////////////////////////////////////////////
-
-#define GSM_MODEM_UBLOX false
-#define GSM_MODEM_SARAR4 false
+ //////////////////////////////////////////////
+
+ #define GSM_MODEM_UBLOX true
+ #define GSM_MODEM_SARAR4 false
+ #define GSM_MODEM_LARAR2 false
+
+ //////////////////////////////////////////////
+ // Not supported yet
+ #define GSM_MODEM_SIM800 false
+ #define GSM_MODEM_SIM808 false
+ #define GSM_MODEM_SIM868 false
+ #define GSM_MODEM_SIM900 false
+ #define GSM_MODEM_SIM5300 false
+ #define GSM_MODEM_SIM5320 false
+ #define GSM_MODEM_SIM5360 false
+ #define GSM_MODEM_SIM7000 false
+ #define GSM_MODEM_SIM7100 false
+ #define GSM_MODEM_SIM7500 false
+ #define GSM_MODEM_SIM7600 false
+ #define GSM_MODEM_SIM7800 false
+ #define GSM_MODEM_M95 false
+ #define GSM_MODEM_BG96 false
+ #define GSM_MODEM_A6 false
+ #define GSM_MODEM_A7 false
+ #define GSM_MODEM_M590 false
+ #define GSM_MODEM_MC60 false
+ #define GSM_MODEM_MC60E false
+ #define GSM_MODEM_XBEE false
+ #define GSM_MODEM_SEQUANS_MONARCH false
+ //////////////////////////////////////////////
-//////////////////////////////////////////////
-// Not supported yet
-#define GSM_MODEM_SIM800 false
-#define GSM_MODEM_SIM808 false
-#define GSM_MODEM_SIM868 false
-#define GSM_MODEM_SIM900 true
-#define GSM_MODEM_SIM5300 false
-#define GSM_MODEM_SIM5320 false
-#define GSM_MODEM_SIM5360 false
-#define GSM_MODEM_SIM7000 false
-#define GSM_MODEM_SIM7100 false
-#define GSM_MODEM_SIM7500 false
-#define GSM_MODEM_SIM7600 false
-#define GSM_MODEM_SIM7800 false
-#define GSM_MODEM_M95 false
-#define GSM_MODEM_BG96 false
-#define GSM_MODEM_A6 false
-#define GSM_MODEM_A7 false
-#define GSM_MODEM_M590 false
-#define GSM_MODEM_MC60 false
-#define GSM_MODEM_MC60E false
-#define GSM_MODEM_XBEE false
-#define GSM_MODEM_SEQUANS_MONARCH false
-//////////////////////////////////////////////
+#endif
// BaudRate to communicate to GSM/GPRS modem. If be limit to max 115200 inside modem
unsigned long baudRateSerialGSM = 115200;
diff --git a/examples/Tools/ChooseRadioAccessTechnology/ChooseRadioAccessTechnology.ino b/examples/Tools/ChooseRadioAccessTechnology/ChooseRadioAccessTechnology.ino
index cee4858..c4b6126 100644
--- a/examples/Tools/ChooseRadioAccessTechnology/ChooseRadioAccessTechnology.ino
+++ b/examples/Tools/ChooseRadioAccessTechnology/ChooseRadioAccessTechnology.ino
@@ -17,16 +17,6 @@
of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program.
If not, see .
-
- Version: 1.5.0
-
- Version Modified By Date Comments
- ------- ----------- ---------- -----------
- 1.2.4 K Hoang 11/03/2021 Initial public release to add support to many boards / modules besides MKRGSM 1400 / SARA U201
- 1.3.0 K Hoang 31/03/2021 Add ThingStream MQTTS support. Fix SMS receive bug.
- 1.3.1 K Hoang 25/04/2021 Fix bug making ESP32 reset repeatedly.
- 1.4.0 K Hoang 28/06/2021 Add support to RP2040-based boards using Arduino mbed or Arduino-pico core
- 1.5.0 K Hoang 14/08/2021 Add support to Adafruit nRF52 core v0.22.0+
**********************************************************************************************************************************/
/*
Radio Access Technology selection for GSM module
@@ -56,7 +46,35 @@
//////////////////////////////////////////////
-#if !defined(ARDUINO_SAMD_MKRGSM1400)
+#if defined(ARDUINO_SAMD_MKRGSM1400)
+
+ // For original MKRGSM1400 => GSM_MODEM_UBLOX == true, GSM_MODEM_LARAR2 == false
+ // For modified MKRGSM1400 using LARA R2 => GSM_MODEM_UBLOX == false, GSM_MODEM_LARAR2 == true
+ #define GSM_MODEM_UBLOX false
+
+ #if GSM_MODEM_UBLOX
+ #define GSM_MODEM_LARAR2 false
+ #else
+ #define GSM_MODEM_LARAR2 true
+ #endif
+
+ #define UBLOX_USING_RESET_PIN true
+ #define UBLOX_USING_LOW_POWER_MODE true
+
+ #if GSM_MODEM_UBLOX
+ #warning Using MKRGSM1400 Configuration with SARA U201
+ #elif GSM_MODEM_LARAR2
+ #warning Using MKRGSM1400 Configuration with LARA R2xx
+ #else
+ #error Must select either GSM_MODEM_UBLOX or GSM_MODEM_LARAR2
+ #endif
+
+#else
+
+ // Optional usage of GSM_RESETN and GSM_DTR. Need to be here only when true. Default is false
+ #define UBLOX_USING_RESET_PIN true
+ #define UBLOX_USING_LOW_POWER_MODE true
+
// Override the default (and certainly not good) pins and port
// Only for boards other than ARDUINO_SAMD_MKRGSM1400
#if (ESP32)
@@ -96,44 +114,38 @@
#warning You must connect the Modem correctly and modify the pins / Serial port here
-#endif
-
-//////////////////////////////////////////////
-
-// Optional usage of GSM_RESETN and GSM_DTR. Need to be here only when true. Default is false
-
-//#define UBLOX_USING_RESET_PIN true
-//#define UBLOX_USING_LOW_POWER_MODE true
-
-//////////////////////////////////////////////
-
-#define GSM_MODEM_UBLOX false
-#define GSM_MODEM_SARAR4 false
+ //////////////////////////////////////////////
+
+ #define GSM_MODEM_UBLOX true
+ #define GSM_MODEM_SARAR4 false
+ #define GSM_MODEM_LARAR2 false
+
+ //////////////////////////////////////////////
+ // Not supported yet
+ #define GSM_MODEM_SIM800 false
+ #define GSM_MODEM_SIM808 false
+ #define GSM_MODEM_SIM868 false
+ #define GSM_MODEM_SIM900 false
+ #define GSM_MODEM_SIM5300 false
+ #define GSM_MODEM_SIM5320 false
+ #define GSM_MODEM_SIM5360 false
+ #define GSM_MODEM_SIM7000 false
+ #define GSM_MODEM_SIM7100 false
+ #define GSM_MODEM_SIM7500 false
+ #define GSM_MODEM_SIM7600 false
+ #define GSM_MODEM_SIM7800 false
+ #define GSM_MODEM_M95 false
+ #define GSM_MODEM_BG96 false
+ #define GSM_MODEM_A6 false
+ #define GSM_MODEM_A7 false
+ #define GSM_MODEM_M590 false
+ #define GSM_MODEM_MC60 false
+ #define GSM_MODEM_MC60E false
+ #define GSM_MODEM_XBEE false
+ #define GSM_MODEM_SEQUANS_MONARCH false
+ //////////////////////////////////////////////
-//////////////////////////////////////////////
-// Not supported yet
-#define GSM_MODEM_SIM800 false
-#define GSM_MODEM_SIM808 false
-#define GSM_MODEM_SIM868 false
-#define GSM_MODEM_SIM900 true
-#define GSM_MODEM_SIM5300 false
-#define GSM_MODEM_SIM5320 false
-#define GSM_MODEM_SIM5360 false
-#define GSM_MODEM_SIM7000 false
-#define GSM_MODEM_SIM7100 false
-#define GSM_MODEM_SIM7500 false
-#define GSM_MODEM_SIM7600 false
-#define GSM_MODEM_SIM7800 false
-#define GSM_MODEM_M95 false
-#define GSM_MODEM_BG96 false
-#define GSM_MODEM_A6 false
-#define GSM_MODEM_A7 false
-#define GSM_MODEM_M590 false
-#define GSM_MODEM_MC60 false
-#define GSM_MODEM_MC60E false
-#define GSM_MODEM_XBEE false
-#define GSM_MODEM_SEQUANS_MONARCH false
-//////////////////////////////////////////////
+#endif
// BaudRate to communicate to GSM/GPRS modem. If be limit to max 115200 inside modem
unsigned long baudRateSerialGSM = 115200;
diff --git a/examples/Tools/FileUtilsHttpDownload/FileUtilsHttpDownload.ino b/examples/Tools/FileUtilsHttpDownload/FileUtilsHttpDownload.ino
index 98ad44f..acf4e35 100644
--- a/examples/Tools/FileUtilsHttpDownload/FileUtilsHttpDownload.ino
+++ b/examples/Tools/FileUtilsHttpDownload/FileUtilsHttpDownload.ino
@@ -17,16 +17,6 @@
of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program.
If not, see .
-
- Version: 1.5.0
-
- Version Modified By Date Comments
- ------- ----------- ---------- -----------
- 1.2.4 K Hoang 11/03/2021 Initial public release to add support to many boards / modules besides MKRGSM 1400 / SARA U201
- 1.3.0 K Hoang 31/03/2021 Add ThingStream MQTTS support. Fix SMS receive bug.
- 1.3.1 K Hoang 25/04/2021 Fix bug making ESP32 reset repeatedly.
- 1.4.0 K Hoang 28/06/2021 Add support to RP2040-based boards using Arduino mbed or Arduino-pico core
- 1.5.0 K Hoang 14/08/2021 Add support to Adafruit nRF52 core v0.22.0+
**********************************************************************************************************************************/
/*
Download large file and store it into the GSM module filesystem.
diff --git a/examples/Tools/FileUtilsHttpDownload/defines.h b/examples/Tools/FileUtilsHttpDownload/defines.h
index cfefda4..7b0e3aa 100644
--- a/examples/Tools/FileUtilsHttpDownload/defines.h
+++ b/examples/Tools/FileUtilsHttpDownload/defines.h
@@ -34,7 +34,35 @@
//////////////////////////////////////////////
-#if !defined(ARDUINO_SAMD_MKRGSM1400)
+#if defined(ARDUINO_SAMD_MKRGSM1400)
+
+ // For original MKRGSM1400 => GSM_MODEM_UBLOX == true, GSM_MODEM_LARAR2 == false
+ // For modified MKRGSM1400 using LARA R2 => GSM_MODEM_UBLOX == false, GSM_MODEM_LARAR2 == true
+ #define GSM_MODEM_UBLOX false
+
+ #if GSM_MODEM_UBLOX
+ #define GSM_MODEM_LARAR2 false
+ #else
+ #define GSM_MODEM_LARAR2 true
+ #endif
+
+ #define UBLOX_USING_RESET_PIN true
+ #define UBLOX_USING_LOW_POWER_MODE true
+
+ #if GSM_MODEM_UBLOX
+ #warning Using MKRGSM1400 Configuration with SARA U201
+ #elif GSM_MODEM_LARAR2
+ #warning Using MKRGSM1400 Configuration with LARA R2xx
+ #else
+ #error Must select either GSM_MODEM_UBLOX or GSM_MODEM_LARAR2
+ #endif
+
+#else
+
+ // Optional usage of GSM_RESETN and GSM_DTR. Need to be here only when true. Default is false
+ #define UBLOX_USING_RESET_PIN true
+ #define UBLOX_USING_LOW_POWER_MODE true
+
// Override the default (and certainly not good) pins and port
// Only for boards other than ARDUINO_SAMD_MKRGSM1400
#if (ESP32)
@@ -74,44 +102,38 @@
#warning You must connect the Modem correctly and modify the pins / Serial port here
-#endif
-
-//////////////////////////////////////////////
-
-// Optional usage of GSM_RESETN and GSM_DTR. Need to be here only when true. Default is false
-
-//#define UBLOX_USING_RESET_PIN true
-//#define UBLOX_USING_LOW_POWER_MODE true
-
-//////////////////////////////////////////////
-
-#define GSM_MODEM_UBLOX true
-#define GSM_MODEM_SARAR4 false
+ //////////////////////////////////////////////
+
+ #define GSM_MODEM_UBLOX true
+ #define GSM_MODEM_SARAR4 false
+ #define GSM_MODEM_LARAR2 false
+
+ //////////////////////////////////////////////
+ // Not supported yet
+ #define GSM_MODEM_SIM800 false
+ #define GSM_MODEM_SIM808 false
+ #define GSM_MODEM_SIM868 false
+ #define GSM_MODEM_SIM900 false
+ #define GSM_MODEM_SIM5300 false
+ #define GSM_MODEM_SIM5320 false
+ #define GSM_MODEM_SIM5360 false
+ #define GSM_MODEM_SIM7000 false
+ #define GSM_MODEM_SIM7100 false
+ #define GSM_MODEM_SIM7500 false
+ #define GSM_MODEM_SIM7600 false
+ #define GSM_MODEM_SIM7800 false
+ #define GSM_MODEM_M95 false
+ #define GSM_MODEM_BG96 false
+ #define GSM_MODEM_A6 false
+ #define GSM_MODEM_A7 false
+ #define GSM_MODEM_M590 false
+ #define GSM_MODEM_MC60 false
+ #define GSM_MODEM_MC60E false
+ #define GSM_MODEM_XBEE false
+ #define GSM_MODEM_SEQUANS_MONARCH false
+ //////////////////////////////////////////////
-//////////////////////////////////////////////
-// Not supported yet
-#define GSM_MODEM_SIM800 false
-#define GSM_MODEM_SIM808 false
-#define GSM_MODEM_SIM868 false
-#define GSM_MODEM_SIM900 false
-#define GSM_MODEM_SIM5300 false
-#define GSM_MODEM_SIM5320 false
-#define GSM_MODEM_SIM5360 false
-#define GSM_MODEM_SIM7000 false
-#define GSM_MODEM_SIM7100 false
-#define GSM_MODEM_SIM7500 false
-#define GSM_MODEM_SIM7600 false
-#define GSM_MODEM_SIM7800 false
-#define GSM_MODEM_M95 false
-#define GSM_MODEM_BG96 false
-#define GSM_MODEM_A6 false
-#define GSM_MODEM_A7 false
-#define GSM_MODEM_M590 false
-#define GSM_MODEM_MC60 false
-#define GSM_MODEM_MC60E false
-#define GSM_MODEM_XBEE false
-#define GSM_MODEM_SEQUANS_MONARCH false
-//////////////////////////////////////////////
+#endif
// libraries
#include
diff --git a/examples/Tools/FileUtilsJsonFile/FileUtilsJsonFile.ino b/examples/Tools/FileUtilsJsonFile/FileUtilsJsonFile.ino
index bec8e24..d42a5e1 100644
--- a/examples/Tools/FileUtilsJsonFile/FileUtilsJsonFile.ino
+++ b/examples/Tools/FileUtilsJsonFile/FileUtilsJsonFile.ino
@@ -17,16 +17,6 @@
of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program.
If not, see .
-
- Version: 1.5.0
-
- Version Modified By Date Comments
- ------- ----------- ---------- -----------
- 1.2.4 K Hoang 11/03/2021 Initial public release to add support to many boards / modules besides MKRGSM 1400 / SARA U201
- 1.3.0 K Hoang 31/03/2021 Add ThingStream MQTTS support. Fix SMS receive bug.
- 1.3.1 K Hoang 25/04/2021 Fix bug making ESP32 reset repeatedly.
- 1.4.0 K Hoang 28/06/2021 Add support to RP2040-based boards using Arduino mbed or Arduino-pico core
- 1.5.0 K Hoang 14/08/2021 Add support to Adafruit nRF52 core v0.22.0+
**********************************************************************************************************************************/
/*
Manage JSON configurations via GSM module filesystem.
@@ -51,7 +41,35 @@
//////////////////////////////////////////////
-#if !defined(ARDUINO_SAMD_MKRGSM1400)
+#if defined(ARDUINO_SAMD_MKRGSM1400)
+
+ // For original MKRGSM1400 => GSM_MODEM_UBLOX == true, GSM_MODEM_LARAR2 == false
+ // For modified MKRGSM1400 using LARA R2 => GSM_MODEM_UBLOX == false, GSM_MODEM_LARAR2 == true
+ #define GSM_MODEM_UBLOX false
+
+ #if GSM_MODEM_UBLOX
+ #define GSM_MODEM_LARAR2 false
+ #else
+ #define GSM_MODEM_LARAR2 true
+ #endif
+
+ #define UBLOX_USING_RESET_PIN true
+ #define UBLOX_USING_LOW_POWER_MODE true
+
+ #if GSM_MODEM_UBLOX
+ #warning Using MKRGSM1400 Configuration with SARA U201
+ #elif GSM_MODEM_LARAR2
+ #warning Using MKRGSM1400 Configuration with LARA R2xx
+ #else
+ #error Must select either GSM_MODEM_UBLOX or GSM_MODEM_LARAR2
+ #endif
+
+#else
+
+ // Optional usage of GSM_RESETN and GSM_DTR. Need to be here only when true. Default is false
+ #define UBLOX_USING_RESET_PIN true
+ #define UBLOX_USING_LOW_POWER_MODE true
+
// Override the default (and certainly not good) pins and port
// Only for boards other than ARDUINO_SAMD_MKRGSM1400
#if (ESP32)
@@ -91,44 +109,38 @@
#warning You must connect the Modem correctly and modify the pins / Serial port here
-#endif
-
-//////////////////////////////////////////////
-
-// Optional usage of GSM_RESETN and GSM_DTR. Need to be here only when true. Default is false
-
-//#define UBLOX_USING_RESET_PIN true
-//#define UBLOX_USING_LOW_POWER_MODE true
-
-//////////////////////////////////////////////
-
-#define GSM_MODEM_UBLOX true
-#define GSM_MODEM_SARAR4 false
+ //////////////////////////////////////////////
+
+ #define GSM_MODEM_UBLOX true
+ #define GSM_MODEM_SARAR4 false
+ #define GSM_MODEM_LARAR2 false
+
+ //////////////////////////////////////////////
+ // Not supported yet
+ #define GSM_MODEM_SIM800 false
+ #define GSM_MODEM_SIM808 false
+ #define GSM_MODEM_SIM868 false
+ #define GSM_MODEM_SIM900 false
+ #define GSM_MODEM_SIM5300 false
+ #define GSM_MODEM_SIM5320 false
+ #define GSM_MODEM_SIM5360 false
+ #define GSM_MODEM_SIM7000 false
+ #define GSM_MODEM_SIM7100 false
+ #define GSM_MODEM_SIM7500 false
+ #define GSM_MODEM_SIM7600 false
+ #define GSM_MODEM_SIM7800 false
+ #define GSM_MODEM_M95 false
+ #define GSM_MODEM_BG96 false
+ #define GSM_MODEM_A6 false
+ #define GSM_MODEM_A7 false
+ #define GSM_MODEM_M590 false
+ #define GSM_MODEM_MC60 false
+ #define GSM_MODEM_MC60E false
+ #define GSM_MODEM_XBEE false
+ #define GSM_MODEM_SEQUANS_MONARCH false
+ //////////////////////////////////////////////
-//////////////////////////////////////////////
-// Not supported yet
-#define GSM_MODEM_SIM800 false
-#define GSM_MODEM_SIM808 false
-#define GSM_MODEM_SIM868 false
-#define GSM_MODEM_SIM900 false
-#define GSM_MODEM_SIM5300 false
-#define GSM_MODEM_SIM5320 false
-#define GSM_MODEM_SIM5360 false
-#define GSM_MODEM_SIM7000 false
-#define GSM_MODEM_SIM7100 false
-#define GSM_MODEM_SIM7500 false
-#define GSM_MODEM_SIM7600 false
-#define GSM_MODEM_SIM7800 false
-#define GSM_MODEM_M95 false
-#define GSM_MODEM_BG96 false
-#define GSM_MODEM_A6 false
-#define GSM_MODEM_A7 false
-#define GSM_MODEM_M590 false
-#define GSM_MODEM_MC60 false
-#define GSM_MODEM_MC60E false
-#define GSM_MODEM_XBEE false
-#define GSM_MODEM_SEQUANS_MONARCH false
-//////////////////////////////////////////////
+#endif
// BaudRate to communicate to GSM/GPRS modem. If be limit to max 115200 inside modem
unsigned long baudRateSerialGSM = 115200;
diff --git a/examples/Tools/FileUtilsReadBlock/FileUtilsReadBlock.ino b/examples/Tools/FileUtilsReadBlock/FileUtilsReadBlock.ino
index 3a329cb..4b0689d 100644
--- a/examples/Tools/FileUtilsReadBlock/FileUtilsReadBlock.ino
+++ b/examples/Tools/FileUtilsReadBlock/FileUtilsReadBlock.ino
@@ -17,16 +17,6 @@
of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program.
If not, see .
-
- Version: 1.5.0
-
- Version Modified By Date Comments
- ------- ----------- ---------- -----------
- 1.2.4 K Hoang 11/03/2021 Initial public release to add support to many boards / modules besides MKRGSM 1400 / SARA U201
- 1.3.0 K Hoang 31/03/2021 Add ThingStream MQTTS support. Fix SMS receive bug.
- 1.3.1 K Hoang 25/04/2021 Fix bug making ESP32 reset repeatedly.
- 1.4.0 K Hoang 28/06/2021 Add support to RP2040-based boards using Arduino mbed or Arduino-pico core
- 1.5.0 K Hoang 14/08/2021 Add support to Adafruit nRF52 core v0.22.0+
**********************************************************************************************************************************/
/*
Read large files block-by-block from the GSM module filesystem.
@@ -53,7 +43,35 @@
//////////////////////////////////////////////
-#if !defined(ARDUINO_SAMD_MKRGSM1400)
+#if defined(ARDUINO_SAMD_MKRGSM1400)
+
+ // For original MKRGSM1400 => GSM_MODEM_UBLOX == true, GSM_MODEM_LARAR2 == false
+ // For modified MKRGSM1400 using LARA R2 => GSM_MODEM_UBLOX == false, GSM_MODEM_LARAR2 == true
+ #define GSM_MODEM_UBLOX false
+
+ #if GSM_MODEM_UBLOX
+ #define GSM_MODEM_LARAR2 false
+ #else
+ #define GSM_MODEM_LARAR2 true
+ #endif
+
+ #define UBLOX_USING_RESET_PIN true
+ #define UBLOX_USING_LOW_POWER_MODE true
+
+ #if GSM_MODEM_UBLOX
+ #warning Using MKRGSM1400 Configuration with SARA U201
+ #elif GSM_MODEM_LARAR2
+ #warning Using MKRGSM1400 Configuration with LARA R2xx
+ #else
+ #error Must select either GSM_MODEM_UBLOX or GSM_MODEM_LARAR2
+ #endif
+
+#else
+
+ // Optional usage of GSM_RESETN and GSM_DTR. Need to be here only when true. Default is false
+ #define UBLOX_USING_RESET_PIN true
+ #define UBLOX_USING_LOW_POWER_MODE true
+
// Override the default (and certainly not good) pins and port
// Only for boards other than ARDUINO_SAMD_MKRGSM1400
#if (ESP32)
@@ -93,44 +111,38 @@
#warning You must connect the Modem correctly and modify the pins / Serial port here
-#endif
-
-//////////////////////////////////////////////
-
-// Optional usage of GSM_RESETN and GSM_DTR. Need to be here only when true. Default is false
-
-//#define UBLOX_USING_RESET_PIN true
-//#define UBLOX_USING_LOW_POWER_MODE true
-
-//////////////////////////////////////////////
-
-#define GSM_MODEM_UBLOX true
-#define GSM_MODEM_SARAR4 false
+ //////////////////////////////////////////////
+
+ #define GSM_MODEM_UBLOX true
+ #define GSM_MODEM_SARAR4 false
+ #define GSM_MODEM_LARAR2 false
+
+ //////////////////////////////////////////////
+ // Not supported yet
+ #define GSM_MODEM_SIM800 false
+ #define GSM_MODEM_SIM808 false
+ #define GSM_MODEM_SIM868 false
+ #define GSM_MODEM_SIM900 false
+ #define GSM_MODEM_SIM5300 false
+ #define GSM_MODEM_SIM5320 false
+ #define GSM_MODEM_SIM5360 false
+ #define GSM_MODEM_SIM7000 false
+ #define GSM_MODEM_SIM7100 false
+ #define GSM_MODEM_SIM7500 false
+ #define GSM_MODEM_SIM7600 false
+ #define GSM_MODEM_SIM7800 false
+ #define GSM_MODEM_M95 false
+ #define GSM_MODEM_BG96 false
+ #define GSM_MODEM_A6 false
+ #define GSM_MODEM_A7 false
+ #define GSM_MODEM_M590 false
+ #define GSM_MODEM_MC60 false
+ #define GSM_MODEM_MC60E false
+ #define GSM_MODEM_XBEE false
+ #define GSM_MODEM_SEQUANS_MONARCH false
+ //////////////////////////////////////////////
-//////////////////////////////////////////////
-// Not supported yet
-#define GSM_MODEM_SIM800 false
-#define GSM_MODEM_SIM808 false
-#define GSM_MODEM_SIM868 false
-#define GSM_MODEM_SIM900 false
-#define GSM_MODEM_SIM5300 false
-#define GSM_MODEM_SIM5320 false
-#define GSM_MODEM_SIM5360 false
-#define GSM_MODEM_SIM7000 false
-#define GSM_MODEM_SIM7100 false
-#define GSM_MODEM_SIM7500 false
-#define GSM_MODEM_SIM7600 false
-#define GSM_MODEM_SIM7800 false
-#define GSM_MODEM_M95 false
-#define GSM_MODEM_BG96 false
-#define GSM_MODEM_A6 false
-#define GSM_MODEM_A7 false
-#define GSM_MODEM_M590 false
-#define GSM_MODEM_MC60 false
-#define GSM_MODEM_MC60E false
-#define GSM_MODEM_XBEE false
-#define GSM_MODEM_SEQUANS_MONARCH false
-//////////////////////////////////////////////
+#endif
// BaudRate to communicate to GSM/GPRS modem. If be limit to max 115200 inside modem
unsigned long baudRateSerialGSM = 115200;
diff --git a/examples/Tools/GsmScanNetworks/GsmScanNetworks.ino b/examples/Tools/GsmScanNetworks/GsmScanNetworks.ino
index 1bc6cbf..e23f6b5 100644
--- a/examples/Tools/GsmScanNetworks/GsmScanNetworks.ino
+++ b/examples/Tools/GsmScanNetworks/GsmScanNetworks.ino
@@ -17,16 +17,6 @@
of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program.
If not, see .
-
- Version: 1.5.0
-
- Version Modified By Date Comments
- ------- ----------- ---------- -----------
- 1.2.4 K Hoang 11/03/2021 Initial public release to add support to many boards / modules besides MKRGSM 1400 / SARA U201
- 1.3.0 K Hoang 31/03/2021 Add ThingStream MQTTS support. Fix SMS receive bug.
- 1.3.1 K Hoang 25/04/2021 Fix bug making ESP32 reset repeatedly.
- 1.4.0 K Hoang 28/06/2021 Add support to RP2040-based boards using Arduino mbed or Arduino-pico core
- 1.5.0 K Hoang 14/08/2021 Add support to Adafruit nRF52 core v0.22.0+
**********************************************************************************************************************************/
/*
diff --git a/examples/Tools/GsmScanNetworks/defines.h b/examples/Tools/GsmScanNetworks/defines.h
index 86a7db8..b37a386 100644
--- a/examples/Tools/GsmScanNetworks/defines.h
+++ b/examples/Tools/GsmScanNetworks/defines.h
@@ -34,7 +34,35 @@
//////////////////////////////////////////////
-#if !defined(ARDUINO_SAMD_MKRGSM1400)
+#if defined(ARDUINO_SAMD_MKRGSM1400)
+
+ // For original MKRGSM1400 => GSM_MODEM_UBLOX == true, GSM_MODEM_LARAR2 == false
+ // For modified MKRGSM1400 using LARA R2 => GSM_MODEM_UBLOX == false, GSM_MODEM_LARAR2 == true
+ #define GSM_MODEM_UBLOX false
+
+ #if GSM_MODEM_UBLOX
+ #define GSM_MODEM_LARAR2 false
+ #else
+ #define GSM_MODEM_LARAR2 true
+ #endif
+
+ #define UBLOX_USING_RESET_PIN true
+ #define UBLOX_USING_LOW_POWER_MODE true
+
+ #if GSM_MODEM_UBLOX
+ #warning Using MKRGSM1400 Configuration with SARA U201
+ #elif GSM_MODEM_LARAR2
+ #warning Using MKRGSM1400 Configuration with LARA R2xx
+ #else
+ #error Must select either GSM_MODEM_UBLOX or GSM_MODEM_LARAR2
+ #endif
+
+#else
+
+ // Optional usage of GSM_RESETN and GSM_DTR. Need to be here only when true. Default is false
+ #define UBLOX_USING_RESET_PIN true
+ #define UBLOX_USING_LOW_POWER_MODE true
+
// Override the default (and certainly not good) pins and port
// Only for boards other than ARDUINO_SAMD_MKRGSM1400
#if (ESP32)
@@ -74,44 +102,38 @@
#warning You must connect the Modem correctly and modify the pins / Serial port here
-#endif
-
-//////////////////////////////////////////////
-
-// Optional usage of GSM_RESETN and GSM_DTR. Need to be here only when true. Default is false
-
-//#define UBLOX_USING_RESET_PIN true
-//#define UBLOX_USING_LOW_POWER_MODE true
-
-//////////////////////////////////////////////
-
-#define GSM_MODEM_UBLOX false
-#define GSM_MODEM_SARAR4 false
+ //////////////////////////////////////////////
+
+ #define GSM_MODEM_UBLOX true
+ #define GSM_MODEM_SARAR4 false
+ #define GSM_MODEM_LARAR2 false
+
+ //////////////////////////////////////////////
+ // Not supported yet
+ #define GSM_MODEM_SIM800 false
+ #define GSM_MODEM_SIM808 false
+ #define GSM_MODEM_SIM868 false
+ #define GSM_MODEM_SIM900 false
+ #define GSM_MODEM_SIM5300 false
+ #define GSM_MODEM_SIM5320 false
+ #define GSM_MODEM_SIM5360 false
+ #define GSM_MODEM_SIM7000 false
+ #define GSM_MODEM_SIM7100 false
+ #define GSM_MODEM_SIM7500 false
+ #define GSM_MODEM_SIM7600 false
+ #define GSM_MODEM_SIM7800 false
+ #define GSM_MODEM_M95 false
+ #define GSM_MODEM_BG96 false
+ #define GSM_MODEM_A6 false
+ #define GSM_MODEM_A7 false
+ #define GSM_MODEM_M590 false
+ #define GSM_MODEM_MC60 false
+ #define GSM_MODEM_MC60E false
+ #define GSM_MODEM_XBEE false
+ #define GSM_MODEM_SEQUANS_MONARCH false
+ //////////////////////////////////////////////
-//////////////////////////////////////////////
-// Not supported yet
-#define GSM_MODEM_SIM800 false
-#define GSM_MODEM_SIM808 false
-#define GSM_MODEM_SIM868 false
-#define GSM_MODEM_SIM900 true
-#define GSM_MODEM_SIM5300 false
-#define GSM_MODEM_SIM5320 false
-#define GSM_MODEM_SIM5360 false
-#define GSM_MODEM_SIM7000 false
-#define GSM_MODEM_SIM7100 false
-#define GSM_MODEM_SIM7500 false
-#define GSM_MODEM_SIM7600 false
-#define GSM_MODEM_SIM7800 false
-#define GSM_MODEM_M95 false
-#define GSM_MODEM_BG96 false
-#define GSM_MODEM_A6 false
-#define GSM_MODEM_A7 false
-#define GSM_MODEM_M590 false
-#define GSM_MODEM_MC60 false
-#define GSM_MODEM_MC60E false
-#define GSM_MODEM_XBEE false
-#define GSM_MODEM_SEQUANS_MONARCH false
-//////////////////////////////////////////////
+#endif
// libraries
#include
diff --git a/examples/Tools/HttpUtilsGet/HttpUtilsGet.ino b/examples/Tools/HttpUtilsGet/HttpUtilsGet.ino
index 8fca7e7..9bfb5d7 100644
--- a/examples/Tools/HttpUtilsGet/HttpUtilsGet.ino
+++ b/examples/Tools/HttpUtilsGet/HttpUtilsGet.ino
@@ -17,16 +17,6 @@
of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program.
If not, see .
-
- Version: 1.5.0
-
- Version Modified By Date Comments
- ------- ----------- ---------- -----------
- 1.2.4 K Hoang 11/03/2021 Initial public release to add support to many boards / modules besides MKRGSM 1400 / SARA U201
- 1.3.0 K Hoang 31/03/2021 Add ThingStream MQTTS support. Fix SMS receive bug.
- 1.3.1 K Hoang 25/04/2021 Fix bug making ESP32 reset repeatedly.
- 1.4.0 K Hoang 28/06/2021 Add support to RP2040-based boards using Arduino mbed or Arduino-pico core
- 1.5.0 K Hoang 14/08/2021 Add support to Adafruit nRF52 core v0.22.0+
**********************************************************************************************************************************/
/*
This sketch Shows how to use the HTTP command to makes http request and stores the result in the
diff --git a/examples/Tools/HttpUtilsGet/defines.h b/examples/Tools/HttpUtilsGet/defines.h
index f8cba20..5911bd9 100644
--- a/examples/Tools/HttpUtilsGet/defines.h
+++ b/examples/Tools/HttpUtilsGet/defines.h
@@ -41,7 +41,35 @@
//////////////////////////////////////////////
-#if !defined(ARDUINO_SAMD_MKRGSM1400)
+#if defined(ARDUINO_SAMD_MKRGSM1400)
+
+ // For original MKRGSM1400 => GSM_MODEM_UBLOX == true, GSM_MODEM_LARAR2 == false
+ // For modified MKRGSM1400 using LARA R2 => GSM_MODEM_UBLOX == false, GSM_MODEM_LARAR2 == true
+ #define GSM_MODEM_UBLOX false
+
+ #if GSM_MODEM_UBLOX
+ #define GSM_MODEM_LARAR2 false
+ #else
+ #define GSM_MODEM_LARAR2 true
+ #endif
+
+ #define UBLOX_USING_RESET_PIN true
+ #define UBLOX_USING_LOW_POWER_MODE true
+
+ #if GSM_MODEM_UBLOX
+ #warning Using MKRGSM1400 Configuration with SARA U201
+ #elif GSM_MODEM_LARAR2
+ #warning Using MKRGSM1400 Configuration with LARA R2xx
+ #else
+ #error Must select either GSM_MODEM_UBLOX or GSM_MODEM_LARAR2
+ #endif
+
+#else
+
+ // Optional usage of GSM_RESETN and GSM_DTR. Need to be here only when true. Default is false
+ #define UBLOX_USING_RESET_PIN true
+ #define UBLOX_USING_LOW_POWER_MODE true
+
// Override the default (and certainly not good) pins and port
// Only for boards other than ARDUINO_SAMD_MKRGSM1400
#if (ESP32)
@@ -81,44 +109,38 @@
#warning You must connect the Modem correctly and modify the pins / Serial port here
-#endif
-
-//////////////////////////////////////////////
-
-// Optional usage of GSM_RESETN and GSM_DTR. Need to be here only when true. Default is false
-
-//#define UBLOX_USING_RESET_PIN true
-//#define UBLOX_USING_LOW_POWER_MODE true
-
-//////////////////////////////////////////////
-
-#define GSM_MODEM_UBLOX true
-#define GSM_MODEM_SARAR4 false
+ //////////////////////////////////////////////
+
+ #define GSM_MODEM_UBLOX true
+ #define GSM_MODEM_SARAR4 false
+ #define GSM_MODEM_LARAR2 false
+
+ //////////////////////////////////////////////
+ // Not supported yet
+ #define GSM_MODEM_SIM800 false
+ #define GSM_MODEM_SIM808 false
+ #define GSM_MODEM_SIM868 false
+ #define GSM_MODEM_SIM900 false
+ #define GSM_MODEM_SIM5300 false
+ #define GSM_MODEM_SIM5320 false
+ #define GSM_MODEM_SIM5360 false
+ #define GSM_MODEM_SIM7000 false
+ #define GSM_MODEM_SIM7100 false
+ #define GSM_MODEM_SIM7500 false
+ #define GSM_MODEM_SIM7600 false
+ #define GSM_MODEM_SIM7800 false
+ #define GSM_MODEM_M95 false
+ #define GSM_MODEM_BG96 false
+ #define GSM_MODEM_A6 false
+ #define GSM_MODEM_A7 false
+ #define GSM_MODEM_M590 false
+ #define GSM_MODEM_MC60 false
+ #define GSM_MODEM_MC60E false
+ #define GSM_MODEM_XBEE false
+ #define GSM_MODEM_SEQUANS_MONARCH false
+ //////////////////////////////////////////////
-//////////////////////////////////////////////
-// Not supported yet
-#define GSM_MODEM_SIM800 false
-#define GSM_MODEM_SIM808 false
-#define GSM_MODEM_SIM868 false
-#define GSM_MODEM_SIM900 false
-#define GSM_MODEM_SIM5300 false
-#define GSM_MODEM_SIM5320 false
-#define GSM_MODEM_SIM5360 false
-#define GSM_MODEM_SIM7000 false
-#define GSM_MODEM_SIM7100 false
-#define GSM_MODEM_SIM7500 false
-#define GSM_MODEM_SIM7600 false
-#define GSM_MODEM_SIM7800 false
-#define GSM_MODEM_M95 false
-#define GSM_MODEM_BG96 false
-#define GSM_MODEM_A6 false
-#define GSM_MODEM_A7 false
-#define GSM_MODEM_M590 false
-#define GSM_MODEM_MC60 false
-#define GSM_MODEM_MC60E false
-#define GSM_MODEM_XBEE false
-#define GSM_MODEM_SEQUANS_MONARCH false
-//////////////////////////////////////////////
+#endif
// libraries
#include
diff --git a/examples/Tools/HttpUtilsSSLGet/HttpUtilsSSLGet.ino b/examples/Tools/HttpUtilsSSLGet/HttpUtilsSSLGet.ino
index 83f2a20..5087ac6 100644
--- a/examples/Tools/HttpUtilsSSLGet/HttpUtilsSSLGet.ino
+++ b/examples/Tools/HttpUtilsSSLGet/HttpUtilsSSLGet.ino
@@ -17,16 +17,6 @@
of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program.
If not, see .
-
- Version: 1.5.0
-
- Version Modified By Date Comments
- ------- ----------- ---------- -----------
- 1.2.4 K Hoang 11/03/2021 Initial public release to add support to many boards / modules besides MKRGSM 1400 / SARA U201
- 1.3.0 K Hoang 31/03/2021 Add ThingStream MQTTS support. Fix SMS receive bug.
- 1.3.1 K Hoang 25/04/2021 Fix bug making ESP32 reset repeatedly.
- 1.4.0 K Hoang 28/06/2021 Add support to RP2040-based boards using Arduino mbed or Arduino-pico core
- 1.5.0 K Hoang 14/08/2021 Add support to Adafruit nRF52 core v0.22.0+
**********************************************************************************************************************************/
/*
This sketch Shows how to use the HTTP command to makes http request to the https end point and stores
diff --git a/examples/Tools/HttpUtilsSSLGet/defines.h b/examples/Tools/HttpUtilsSSLGet/defines.h
index 24ab7f1..d977ffb 100644
--- a/examples/Tools/HttpUtilsSSLGet/defines.h
+++ b/examples/Tools/HttpUtilsSSLGet/defines.h
@@ -44,7 +44,35 @@
//////////////////////////////////////////////
-#if !defined(ARDUINO_SAMD_MKRGSM1400)
+#if defined(ARDUINO_SAMD_MKRGSM1400)
+
+ // For original MKRGSM1400 => GSM_MODEM_UBLOX == true, GSM_MODEM_LARAR2 == false
+ // For modified MKRGSM1400 using LARA R2 => GSM_MODEM_UBLOX == false, GSM_MODEM_LARAR2 == true
+ #define GSM_MODEM_UBLOX false
+
+ #if GSM_MODEM_UBLOX
+ #define GSM_MODEM_LARAR2 false
+ #else
+ #define GSM_MODEM_LARAR2 true
+ #endif
+
+ #define UBLOX_USING_RESET_PIN true
+ #define UBLOX_USING_LOW_POWER_MODE true
+
+ #if GSM_MODEM_UBLOX
+ #warning Using MKRGSM1400 Configuration with SARA U201
+ #elif GSM_MODEM_LARAR2
+ #warning Using MKRGSM1400 Configuration with LARA R2xx
+ #else
+ #error Must select either GSM_MODEM_UBLOX or GSM_MODEM_LARAR2
+ #endif
+
+#else
+
+ // Optional usage of GSM_RESETN and GSM_DTR. Need to be here only when true. Default is false
+ #define UBLOX_USING_RESET_PIN true
+ #define UBLOX_USING_LOW_POWER_MODE true
+
// Override the default (and certainly not good) pins and port
// Only for boards other than ARDUINO_SAMD_MKRGSM1400
#if (ESP32)
@@ -84,44 +112,38 @@
#warning You must connect the Modem correctly and modify the pins / Serial port here
-#endif
-
-//////////////////////////////////////////////
-
-// Optional usage of GSM_RESETN and GSM_DTR. Need to be here only when true. Default is false
-
-//#define UBLOX_USING_RESET_PIN true
-//#define UBLOX_USING_LOW_POWER_MODE true
-
-//////////////////////////////////////////////
-
-#define GSM_MODEM_UBLOX true
-#define GSM_MODEM_SARAR4 false
+ //////////////////////////////////////////////
+
+ #define GSM_MODEM_UBLOX true
+ #define GSM_MODEM_SARAR4 false
+ #define GSM_MODEM_LARAR2 false
+
+ //////////////////////////////////////////////
+ // Not supported yet
+ #define GSM_MODEM_SIM800 false
+ #define GSM_MODEM_SIM808 false
+ #define GSM_MODEM_SIM868 false
+ #define GSM_MODEM_SIM900 false
+ #define GSM_MODEM_SIM5300 false
+ #define GSM_MODEM_SIM5320 false
+ #define GSM_MODEM_SIM5360 false
+ #define GSM_MODEM_SIM7000 false
+ #define GSM_MODEM_SIM7100 false
+ #define GSM_MODEM_SIM7500 false
+ #define GSM_MODEM_SIM7600 false
+ #define GSM_MODEM_SIM7800 false
+ #define GSM_MODEM_M95 false
+ #define GSM_MODEM_BG96 false
+ #define GSM_MODEM_A6 false
+ #define GSM_MODEM_A7 false
+ #define GSM_MODEM_M590 false
+ #define GSM_MODEM_MC60 false
+ #define GSM_MODEM_MC60E false
+ #define GSM_MODEM_XBEE false
+ #define GSM_MODEM_SEQUANS_MONARCH false
+ //////////////////////////////////////////////
-//////////////////////////////////////////////
-// Not supported yet
-#define GSM_MODEM_SIM800 false
-#define GSM_MODEM_SIM808 false
-#define GSM_MODEM_SIM868 false
-#define GSM_MODEM_SIM900 false
-#define GSM_MODEM_SIM5300 false
-#define GSM_MODEM_SIM5320 false
-#define GSM_MODEM_SIM5360 false
-#define GSM_MODEM_SIM7000 false
-#define GSM_MODEM_SIM7100 false
-#define GSM_MODEM_SIM7500 false
-#define GSM_MODEM_SIM7600 false
-#define GSM_MODEM_SIM7800 false
-#define GSM_MODEM_M95 false
-#define GSM_MODEM_BG96 false
-#define GSM_MODEM_A6 false
-#define GSM_MODEM_A7 false
-#define GSM_MODEM_M590 false
-#define GSM_MODEM_MC60 false
-#define GSM_MODEM_MC60E false
-#define GSM_MODEM_XBEE false
-#define GSM_MODEM_SEQUANS_MONARCH false
-//////////////////////////////////////////////
+#endif
// libraries
#include
diff --git a/examples/Tools/PhoneBookManagement/PhoneBookManagement.ino b/examples/Tools/PhoneBookManagement/PhoneBookManagement.ino
index b30129d..b2fbbc9 100644
--- a/examples/Tools/PhoneBookManagement/PhoneBookManagement.ino
+++ b/examples/Tools/PhoneBookManagement/PhoneBookManagement.ino
@@ -17,16 +17,6 @@
of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program.
If not, see .
-
- Version: 1.5.0
-
- Version Modified By Date Comments
- ------- ----------- ---------- -----------
- 1.2.4 K Hoang 11/03/2021 Initial public release to add support to many boards / modules besides MKRGSM 1400 / SARA U201
- 1.3.0 K Hoang 31/03/2021 Add ThingStream MQTTS support. Fix SMS receive bug.
- 1.3.1 K Hoang 25/04/2021 Fix bug making ESP32 reset repeatedly.
- 1.4.0 K Hoang 28/06/2021 Add support to RP2040-based boards using Arduino mbed or Arduino-pico core
- 1.5.0 K Hoang 14/08/2021 Add support to Adafruit nRF52 core v0.22.0+
**********************************************************************************************************************************/
#define DEBUG_GSM_GENERIC_PORT Serial
@@ -40,7 +30,35 @@ const char PINNUMBER[] = "12345678";
//////////////////////////////////////////////
-#if !defined(ARDUINO_SAMD_MKRGSM1400)
+#if defined(ARDUINO_SAMD_MKRGSM1400)
+
+ // For original MKRGSM1400 => GSM_MODEM_UBLOX == true, GSM_MODEM_LARAR2 == false
+ // For modified MKRGSM1400 using LARA R2 => GSM_MODEM_UBLOX == false, GSM_MODEM_LARAR2 == true
+ #define GSM_MODEM_UBLOX false
+
+ #if GSM_MODEM_UBLOX
+ #define GSM_MODEM_LARAR2 false
+ #else
+ #define GSM_MODEM_LARAR2 true
+ #endif
+
+ #define UBLOX_USING_RESET_PIN true
+ #define UBLOX_USING_LOW_POWER_MODE true
+
+ #if GSM_MODEM_UBLOX
+ #warning Using MKRGSM1400 Configuration with SARA U201
+ #elif GSM_MODEM_LARAR2
+ #warning Using MKRGSM1400 Configuration with LARA R2xx
+ #else
+ #error Must select either GSM_MODEM_UBLOX or GSM_MODEM_LARAR2
+ #endif
+
+#else
+
+ // Optional usage of GSM_RESETN and GSM_DTR. Need to be here only when true. Default is false
+ #define UBLOX_USING_RESET_PIN true
+ #define UBLOX_USING_LOW_POWER_MODE true
+
// Override the default (and certainly not good) pins and port
// Only for boards other than ARDUINO_SAMD_MKRGSM1400
#if (ESP32)
@@ -80,44 +98,38 @@ const char PINNUMBER[] = "12345678";
#warning You must connect the Modem correctly and modify the pins / Serial port here
-#endif
-
-//////////////////////////////////////////////
-
-// Optional usage of GSM_RESETN and GSM_DTR. Need to be here only when true. Default is false
-
-//#define UBLOX_USING_RESET_PIN true
-//#define UBLOX_USING_LOW_POWER_MODE true
-
-//////////////////////////////////////////////
-
-#define GSM_MODEM_UBLOX true
-#define GSM_MODEM_SARAR4 false
+ //////////////////////////////////////////////
+
+ #define GSM_MODEM_UBLOX true
+ #define GSM_MODEM_SARAR4 false
+ #define GSM_MODEM_LARAR2 false
+
+ //////////////////////////////////////////////
+ // Not supported yet
+ #define GSM_MODEM_SIM800 false
+ #define GSM_MODEM_SIM808 false
+ #define GSM_MODEM_SIM868 false
+ #define GSM_MODEM_SIM900 false
+ #define GSM_MODEM_SIM5300 false
+ #define GSM_MODEM_SIM5320 false
+ #define GSM_MODEM_SIM5360 false
+ #define GSM_MODEM_SIM7000 false
+ #define GSM_MODEM_SIM7100 false
+ #define GSM_MODEM_SIM7500 false
+ #define GSM_MODEM_SIM7600 false
+ #define GSM_MODEM_SIM7800 false
+ #define GSM_MODEM_M95 false
+ #define GSM_MODEM_BG96 false
+ #define GSM_MODEM_A6 false
+ #define GSM_MODEM_A7 false
+ #define GSM_MODEM_M590 false
+ #define GSM_MODEM_MC60 false
+ #define GSM_MODEM_MC60E false
+ #define GSM_MODEM_XBEE false
+ #define GSM_MODEM_SEQUANS_MONARCH false
+ //////////////////////////////////////////////
-//////////////////////////////////////////////
-// Not supported yet
-#define GSM_MODEM_SIM800 false
-#define GSM_MODEM_SIM808 false
-#define GSM_MODEM_SIM868 false
-#define GSM_MODEM_SIM900 false
-#define GSM_MODEM_SIM5300 false
-#define GSM_MODEM_SIM5320 false
-#define GSM_MODEM_SIM5360 false
-#define GSM_MODEM_SIM7000 false
-#define GSM_MODEM_SIM7100 false
-#define GSM_MODEM_SIM7500 false
-#define GSM_MODEM_SIM7600 false
-#define GSM_MODEM_SIM7800 false
-#define GSM_MODEM_M95 false
-#define GSM_MODEM_BG96 false
-#define GSM_MODEM_A6 false
-#define GSM_MODEM_A7 false
-#define GSM_MODEM_M590 false
-#define GSM_MODEM_MC60 false
-#define GSM_MODEM_MC60E false
-#define GSM_MODEM_XBEE false
-#define GSM_MODEM_SEQUANS_MONARCH false
-//////////////////////////////////////////////
+#endif
// BaudRate to communicate to GSM/GPRS modem. If be limit to max 115200 inside modem
unsigned long baudRateSerialGSM = 115200;
diff --git a/examples/Tools/PinManagement/PinManagement.ino b/examples/Tools/PinManagement/PinManagement.ino
index a4ffedc..01ccc4b 100644
--- a/examples/Tools/PinManagement/PinManagement.ino
+++ b/examples/Tools/PinManagement/PinManagement.ino
@@ -17,16 +17,6 @@
of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program.
If not, see .
-
- Version: 1.5.0
-
- Version Modified By Date Comments
- ------- ----------- ---------- -----------
- 1.2.4 K Hoang 11/03/2021 Initial public release to add support to many boards / modules besides MKRGSM 1400 / SARA U201
- 1.3.0 K Hoang 31/03/2021 Add ThingStream MQTTS support. Fix SMS receive bug.
- 1.3.1 K Hoang 25/04/2021 Fix bug making ESP32 reset repeatedly.
- 1.4.0 K Hoang 28/06/2021 Add support to RP2040-based boards using Arduino mbed or Arduino-pico core
- 1.5.0 K Hoang 14/08/2021 Add support to Adafruit nRF52 core v0.22.0+
**********************************************************************************************************************************/
/*
@@ -49,7 +39,35 @@
//////////////////////////////////////////////
-#if !defined(ARDUINO_SAMD_MKRGSM1400)
+#if defined(ARDUINO_SAMD_MKRGSM1400)
+
+ // For original MKRGSM1400 => GSM_MODEM_UBLOX == true, GSM_MODEM_LARAR2 == false
+ // For modified MKRGSM1400 using LARA R2 => GSM_MODEM_UBLOX == false, GSM_MODEM_LARAR2 == true
+ #define GSM_MODEM_UBLOX false
+
+ #if GSM_MODEM_UBLOX
+ #define GSM_MODEM_LARAR2 false
+ #else
+ #define GSM_MODEM_LARAR2 true
+ #endif
+
+ #define UBLOX_USING_RESET_PIN true
+ #define UBLOX_USING_LOW_POWER_MODE true
+
+ #if GSM_MODEM_UBLOX
+ #warning Using MKRGSM1400 Configuration with SARA U201
+ #elif GSM_MODEM_LARAR2
+ #warning Using MKRGSM1400 Configuration with LARA R2xx
+ #else
+ #error Must select either GSM_MODEM_UBLOX or GSM_MODEM_LARAR2
+ #endif
+
+#else
+
+ // Optional usage of GSM_RESETN and GSM_DTR. Need to be here only when true. Default is false
+ #define UBLOX_USING_RESET_PIN true
+ #define UBLOX_USING_LOW_POWER_MODE true
+
// Override the default (and certainly not good) pins and port
// Only for boards other than ARDUINO_SAMD_MKRGSM1400
#if (ESP32)
@@ -89,44 +107,38 @@
#warning You must connect the Modem correctly and modify the pins / Serial port here
-#endif
-
-//////////////////////////////////////////////
-
-// Optional usage of GSM_RESETN and GSM_DTR. Need to be here only when true. Default is false
-
-//#define UBLOX_USING_RESET_PIN true
-//#define UBLOX_USING_LOW_POWER_MODE true
-
-//////////////////////////////////////////////
-
-#define GSM_MODEM_UBLOX false
-#define GSM_MODEM_SARAR4 false
+ //////////////////////////////////////////////
+
+ #define GSM_MODEM_UBLOX true
+ #define GSM_MODEM_SARAR4 false
+ #define GSM_MODEM_LARAR2 false
+
+ //////////////////////////////////////////////
+ // Not supported yet
+ #define GSM_MODEM_SIM800 false
+ #define GSM_MODEM_SIM808 false
+ #define GSM_MODEM_SIM868 false
+ #define GSM_MODEM_SIM900 false
+ #define GSM_MODEM_SIM5300 false
+ #define GSM_MODEM_SIM5320 false
+ #define GSM_MODEM_SIM5360 false
+ #define GSM_MODEM_SIM7000 false
+ #define GSM_MODEM_SIM7100 false
+ #define GSM_MODEM_SIM7500 false
+ #define GSM_MODEM_SIM7600 false
+ #define GSM_MODEM_SIM7800 false
+ #define GSM_MODEM_M95 false
+ #define GSM_MODEM_BG96 false
+ #define GSM_MODEM_A6 false
+ #define GSM_MODEM_A7 false
+ #define GSM_MODEM_M590 false
+ #define GSM_MODEM_MC60 false
+ #define GSM_MODEM_MC60E false
+ #define GSM_MODEM_XBEE false
+ #define GSM_MODEM_SEQUANS_MONARCH false
+ //////////////////////////////////////////////
-//////////////////////////////////////////////
-// Not supported yet
-#define GSM_MODEM_SIM800 false
-#define GSM_MODEM_SIM808 false
-#define GSM_MODEM_SIM868 false
-#define GSM_MODEM_SIM900 true
-#define GSM_MODEM_SIM5300 false
-#define GSM_MODEM_SIM5320 false
-#define GSM_MODEM_SIM5360 false
-#define GSM_MODEM_SIM7000 false
-#define GSM_MODEM_SIM7100 false
-#define GSM_MODEM_SIM7500 false
-#define GSM_MODEM_SIM7600 false
-#define GSM_MODEM_SIM7800 false
-#define GSM_MODEM_M95 false
-#define GSM_MODEM_BG96 false
-#define GSM_MODEM_A6 false
-#define GSM_MODEM_A7 false
-#define GSM_MODEM_M590 false
-#define GSM_MODEM_MC60 false
-#define GSM_MODEM_MC60E false
-#define GSM_MODEM_XBEE false
-#define GSM_MODEM_SEQUANS_MONARCH false
-//////////////////////////////////////////////
+#endif
// BaudRate to communicate to GSM/GPRS modem. If be limit to max 115200 inside modem
unsigned long baudRateSerialGSM = 115200;
diff --git a/examples/Tools/SerialGSMPassthrough/SerialGSMPassthrough.ino b/examples/Tools/SerialGSMPassthrough/SerialGSMPassthrough.ino
index a9993e9..aff2443 100644
--- a/examples/Tools/SerialGSMPassthrough/SerialGSMPassthrough.ino
+++ b/examples/Tools/SerialGSMPassthrough/SerialGSMPassthrough.ino
@@ -17,16 +17,6 @@
of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program.
If not, see .
-
- Version: 1.5.0
-
- Version Modified By Date Comments
- ------- ----------- ---------- -----------
- 1.2.4 K Hoang 11/03/2021 Initial public release to add support to many boards / modules besides MKRGSM 1400 / SARA U201
- 1.3.0 K Hoang 31/03/2021 Add ThingStream MQTTS support. Fix SMS receive bug.
- 1.3.1 K Hoang 25/04/2021 Fix bug making ESP32 reset repeatedly.
- 1.4.0 K Hoang 28/06/2021 Add support to RP2040-based boards using Arduino mbed or Arduino-pico core
- 1.5.0 K Hoang 14/08/2021 Add support to Adafruit nRF52 core v0.22.0+
**********************************************************************************************************************************/
/*
SerialGSMPassthrough sketch
@@ -51,7 +41,35 @@
//////////////////////////////////////////////
-#if !defined(ARDUINO_SAMD_MKRGSM1400)
+#if defined(ARDUINO_SAMD_MKRGSM1400)
+
+ // For original MKRGSM1400 => GSM_MODEM_UBLOX == true, GSM_MODEM_LARAR2 == false
+ // For modified MKRGSM1400 using LARA R2 => GSM_MODEM_UBLOX == false, GSM_MODEM_LARAR2 == true
+ #define GSM_MODEM_UBLOX false
+
+ #if GSM_MODEM_UBLOX
+ #define GSM_MODEM_LARAR2 false
+ #else
+ #define GSM_MODEM_LARAR2 true
+ #endif
+
+ #define UBLOX_USING_RESET_PIN true
+ #define UBLOX_USING_LOW_POWER_MODE true
+
+ #if GSM_MODEM_UBLOX
+ #warning Using MKRGSM1400 Configuration with SARA U201
+ #elif GSM_MODEM_LARAR2
+ #warning Using MKRGSM1400 Configuration with LARA R2xx
+ #else
+ #error Must select either GSM_MODEM_UBLOX or GSM_MODEM_LARAR2
+ #endif
+
+#else
+
+ // Optional usage of GSM_RESETN and GSM_DTR. Need to be here only when true. Default is false
+ #define UBLOX_USING_RESET_PIN true
+ #define UBLOX_USING_LOW_POWER_MODE true
+
// Override the default (and certainly not good) pins and port
// Only for boards other than ARDUINO_SAMD_MKRGSM1400
#if (ESP32)
@@ -91,44 +109,38 @@
#warning You must connect the Modem correctly and modify the pins / Serial port here
-#endif
-
-//////////////////////////////////////////////
-
-// Optional usage of GSM_RESETN and GSM_DTR. Need to be here only when true. Default is false
-
-//#define UBLOX_USING_RESET_PIN true
-//#define UBLOX_USING_LOW_POWER_MODE true
-
-//////////////////////////////////////////////
-
-#define GSM_MODEM_UBLOX true
-#define GSM_MODEM_SARAR4 false
+ //////////////////////////////////////////////
+
+ #define GSM_MODEM_UBLOX true
+ #define GSM_MODEM_SARAR4 false
+ #define GSM_MODEM_LARAR2 false
+
+ //////////////////////////////////////////////
+ // Not supported yet
+ #define GSM_MODEM_SIM800 false
+ #define GSM_MODEM_SIM808 false
+ #define GSM_MODEM_SIM868 false
+ #define GSM_MODEM_SIM900 false
+ #define GSM_MODEM_SIM5300 false
+ #define GSM_MODEM_SIM5320 false
+ #define GSM_MODEM_SIM5360 false
+ #define GSM_MODEM_SIM7000 false
+ #define GSM_MODEM_SIM7100 false
+ #define GSM_MODEM_SIM7500 false
+ #define GSM_MODEM_SIM7600 false
+ #define GSM_MODEM_SIM7800 false
+ #define GSM_MODEM_M95 false
+ #define GSM_MODEM_BG96 false
+ #define GSM_MODEM_A6 false
+ #define GSM_MODEM_A7 false
+ #define GSM_MODEM_M590 false
+ #define GSM_MODEM_MC60 false
+ #define GSM_MODEM_MC60E false
+ #define GSM_MODEM_XBEE false
+ #define GSM_MODEM_SEQUANS_MONARCH false
+ //////////////////////////////////////////////
-//////////////////////////////////////////////
-// Not supported yet
-#define GSM_MODEM_SIM800 false
-#define GSM_MODEM_SIM808 false
-#define GSM_MODEM_SIM868 false
-#define GSM_MODEM_SIM900 false
-#define GSM_MODEM_SIM5300 false
-#define GSM_MODEM_SIM5320 false
-#define GSM_MODEM_SIM5360 false
-#define GSM_MODEM_SIM7000 false
-#define GSM_MODEM_SIM7100 false
-#define GSM_MODEM_SIM7500 false
-#define GSM_MODEM_SIM7600 false
-#define GSM_MODEM_SIM7800 false
-#define GSM_MODEM_M95 false
-#define GSM_MODEM_BG96 false
-#define GSM_MODEM_A6 false
-#define GSM_MODEM_A7 false
-#define GSM_MODEM_M590 false
-#define GSM_MODEM_MC60 false
-#define GSM_MODEM_MC60E false
-#define GSM_MODEM_XBEE false
-#define GSM_MODEM_SEQUANS_MONARCH false
-//////////////////////////////////////////////
+#endif
// libraries
#include
diff --git a/examples/Tools/TestGPRS/TestGPRS.ino b/examples/Tools/TestGPRS/TestGPRS.ino
index 11e7e2a..87d941d 100644
--- a/examples/Tools/TestGPRS/TestGPRS.ino
+++ b/examples/Tools/TestGPRS/TestGPRS.ino
@@ -17,16 +17,6 @@
of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program.
If not, see .
-
- Version: 1.5.0
-
- Version Modified By Date Comments
- ------- ----------- ---------- -----------
- 1.2.4 K Hoang 11/03/2021 Initial public release to add support to many boards / modules besides MKRGSM 1400 / SARA U201
- 1.3.0 K Hoang 31/03/2021 Add ThingStream MQTTS support. Fix SMS receive bug.
- 1.3.1 K Hoang 25/04/2021 Fix bug making ESP32 reset repeatedly.
- 1.4.0 K Hoang 28/06/2021 Add support to RP2040-based boards using Arduino mbed or Arduino-pico core
- 1.5.0 K Hoang 14/08/2021 Add support to Adafruit nRF52 core v0.22.0+
**********************************************************************************************************************************/
/*
diff --git a/examples/Tools/TestGPRS/defines.h b/examples/Tools/TestGPRS/defines.h
index 0332b01..f9801b1 100644
--- a/examples/Tools/TestGPRS/defines.h
+++ b/examples/Tools/TestGPRS/defines.h
@@ -39,7 +39,35 @@
//////////////////////////////////////////////
-#if !defined(ARDUINO_SAMD_MKRGSM1400)
+#if defined(ARDUINO_SAMD_MKRGSM1400)
+
+ // For original MKRGSM1400 => GSM_MODEM_UBLOX == true, GSM_MODEM_LARAR2 == false
+ // For modified MKRGSM1400 using LARA R2 => GSM_MODEM_UBLOX == false, GSM_MODEM_LARAR2 == true
+ #define GSM_MODEM_UBLOX false
+
+ #if GSM_MODEM_UBLOX
+ #define GSM_MODEM_LARAR2 false
+ #else
+ #define GSM_MODEM_LARAR2 true
+ #endif
+
+ #define UBLOX_USING_RESET_PIN true
+ #define UBLOX_USING_LOW_POWER_MODE true
+
+ #if GSM_MODEM_UBLOX
+ #warning Using MKRGSM1400 Configuration with SARA U201
+ #elif GSM_MODEM_LARAR2
+ #warning Using MKRGSM1400 Configuration with LARA R2xx
+ #else
+ #error Must select either GSM_MODEM_UBLOX or GSM_MODEM_LARAR2
+ #endif
+
+#else
+
+ // Optional usage of GSM_RESETN and GSM_DTR. Need to be here only when true. Default is false
+ #define UBLOX_USING_RESET_PIN true
+ #define UBLOX_USING_LOW_POWER_MODE true
+
// Override the default (and certainly not good) pins and port
// Only for boards other than ARDUINO_SAMD_MKRGSM1400
#if (ESP32)
@@ -79,44 +107,38 @@
#warning You must connect the Modem correctly and modify the pins / Serial port here
-#endif
-
-//////////////////////////////////////////////
-
-// Optional usage of GSM_RESETN and GSM_DTR. Need to be here only when true. Default is false
-
-//#define UBLOX_USING_RESET_PIN true
-//#define UBLOX_USING_LOW_POWER_MODE true
-
-//////////////////////////////////////////////
-
-#define GSM_MODEM_UBLOX false
-#define GSM_MODEM_SARAR4 false
+ //////////////////////////////////////////////
+
+ #define GSM_MODEM_UBLOX true
+ #define GSM_MODEM_SARAR4 false
+ #define GSM_MODEM_LARAR2 false
+
+ //////////////////////////////////////////////
+ // Not supported yet
+ #define GSM_MODEM_SIM800 false
+ #define GSM_MODEM_SIM808 false
+ #define GSM_MODEM_SIM868 false
+ #define GSM_MODEM_SIM900 false
+ #define GSM_MODEM_SIM5300 false
+ #define GSM_MODEM_SIM5320 false
+ #define GSM_MODEM_SIM5360 false
+ #define GSM_MODEM_SIM7000 false
+ #define GSM_MODEM_SIM7100 false
+ #define GSM_MODEM_SIM7500 false
+ #define GSM_MODEM_SIM7600 false
+ #define GSM_MODEM_SIM7800 false
+ #define GSM_MODEM_M95 false
+ #define GSM_MODEM_BG96 false
+ #define GSM_MODEM_A6 false
+ #define GSM_MODEM_A7 false
+ #define GSM_MODEM_M590 false
+ #define GSM_MODEM_MC60 false
+ #define GSM_MODEM_MC60E false
+ #define GSM_MODEM_XBEE false
+ #define GSM_MODEM_SEQUANS_MONARCH false
+ //////////////////////////////////////////////
-//////////////////////////////////////////////
-// Not supported yet
-#define GSM_MODEM_SIM800 false
-#define GSM_MODEM_SIM808 false
-#define GSM_MODEM_SIM868 false
-#define GSM_MODEM_SIM900 true
-#define GSM_MODEM_SIM5300 false
-#define GSM_MODEM_SIM5320 false
-#define GSM_MODEM_SIM5360 false
-#define GSM_MODEM_SIM7000 false
-#define GSM_MODEM_SIM7100 false
-#define GSM_MODEM_SIM7500 false
-#define GSM_MODEM_SIM7600 false
-#define GSM_MODEM_SIM7800 false
-#define GSM_MODEM_M95 false
-#define GSM_MODEM_BG96 false
-#define GSM_MODEM_A6 false
-#define GSM_MODEM_A7 false
-#define GSM_MODEM_M590 false
-#define GSM_MODEM_MC60 false
-#define GSM_MODEM_MC60E false
-#define GSM_MODEM_XBEE false
-#define GSM_MODEM_SEQUANS_MONARCH false
-//////////////////////////////////////////////
+#endif
// libraries
#include
diff --git a/examples/Tools/TestModem/TestModem.ino b/examples/Tools/TestModem/TestModem.ino
index 121d4c8..dc97b3c 100644
--- a/examples/Tools/TestModem/TestModem.ino
+++ b/examples/Tools/TestModem/TestModem.ino
@@ -17,16 +17,6 @@
of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program.
If not, see .
-
- Version: 1.5.0
-
- Version Modified By Date Comments
- ------- ----------- ---------- -----------
- 1.2.4 K Hoang 11/03/2021 Initial public release to add support to many boards / modules besides MKRGSM 1400 / SARA U201
- 1.3.0 K Hoang 31/03/2021 Add ThingStream MQTTS support. Fix SMS receive bug.
- 1.3.1 K Hoang 25/04/2021 Fix bug making ESP32 reset repeatedly.
- 1.4.0 K Hoang 28/06/2021 Add support to RP2040-based boards using Arduino mbed or Arduino-pico core
- 1.5.0 K Hoang 14/08/2021 Add support to Adafruit nRF52 core v0.22.0+
**********************************************************************************************************************************/
/*
@@ -50,7 +40,35 @@
//////////////////////////////////////////////
-#if !defined(ARDUINO_SAMD_MKRGSM1400)
+#if defined(ARDUINO_SAMD_MKRGSM1400)
+
+ // For original MKRGSM1400 => GSM_MODEM_UBLOX == true, GSM_MODEM_LARAR2 == false
+ // For modified MKRGSM1400 using LARA R2 => GSM_MODEM_UBLOX == false, GSM_MODEM_LARAR2 == true
+ #define GSM_MODEM_UBLOX false
+
+ #if GSM_MODEM_UBLOX
+ #define GSM_MODEM_LARAR2 false
+ #else
+ #define GSM_MODEM_LARAR2 true
+ #endif
+
+ #define UBLOX_USING_RESET_PIN true
+ #define UBLOX_USING_LOW_POWER_MODE true
+
+ #if GSM_MODEM_UBLOX
+ #warning Using MKRGSM1400 Configuration with SARA U201
+ #elif GSM_MODEM_LARAR2
+ #warning Using MKRGSM1400 Configuration with LARA R2xx
+ #else
+ #error Must select either GSM_MODEM_UBLOX or GSM_MODEM_LARAR2
+ #endif
+
+#else
+
+ // Optional usage of GSM_RESETN and GSM_DTR. Need to be here only when true. Default is false
+ #define UBLOX_USING_RESET_PIN true
+ #define UBLOX_USING_LOW_POWER_MODE true
+
// Override the default (and certainly not good) pins and port
// Only for boards other than ARDUINO_SAMD_MKRGSM1400
#if (ESP32)
@@ -90,44 +108,38 @@
#warning You must connect the Modem correctly and modify the pins / Serial port here
-#endif
-
-//////////////////////////////////////////////
-
-// Optional usage of GSM_RESETN and GSM_DTR. Need to be here only when true. Default is false
-
-//#define UBLOX_USING_RESET_PIN true
-//#define UBLOX_USING_LOW_POWER_MODE true
-
-//////////////////////////////////////////////
-
-#define GSM_MODEM_UBLOX false
-#define GSM_MODEM_SARAR4 false
+ //////////////////////////////////////////////
+
+ #define GSM_MODEM_UBLOX true
+ #define GSM_MODEM_SARAR4 false
+ #define GSM_MODEM_LARAR2 false
+
+ //////////////////////////////////////////////
+ // Not supported yet
+ #define GSM_MODEM_SIM800 false
+ #define GSM_MODEM_SIM808 false
+ #define GSM_MODEM_SIM868 false
+ #define GSM_MODEM_SIM900 false
+ #define GSM_MODEM_SIM5300 false
+ #define GSM_MODEM_SIM5320 false
+ #define GSM_MODEM_SIM5360 false
+ #define GSM_MODEM_SIM7000 false
+ #define GSM_MODEM_SIM7100 false
+ #define GSM_MODEM_SIM7500 false
+ #define GSM_MODEM_SIM7600 false
+ #define GSM_MODEM_SIM7800 false
+ #define GSM_MODEM_M95 false
+ #define GSM_MODEM_BG96 false
+ #define GSM_MODEM_A6 false
+ #define GSM_MODEM_A7 false
+ #define GSM_MODEM_M590 false
+ #define GSM_MODEM_MC60 false
+ #define GSM_MODEM_MC60E false
+ #define GSM_MODEM_XBEE false
+ #define GSM_MODEM_SEQUANS_MONARCH false
+ //////////////////////////////////////////////
-//////////////////////////////////////////////
-// Not supported yet
-#define GSM_MODEM_SIM800 false
-#define GSM_MODEM_SIM808 false
-#define GSM_MODEM_SIM868 false
-#define GSM_MODEM_SIM900 true
-#define GSM_MODEM_SIM5300 false
-#define GSM_MODEM_SIM5320 false
-#define GSM_MODEM_SIM5360 false
-#define GSM_MODEM_SIM7000 false
-#define GSM_MODEM_SIM7100 false
-#define GSM_MODEM_SIM7500 false
-#define GSM_MODEM_SIM7600 false
-#define GSM_MODEM_SIM7800 false
-#define GSM_MODEM_M95 false
-#define GSM_MODEM_BG96 false
-#define GSM_MODEM_A6 false
-#define GSM_MODEM_A7 false
-#define GSM_MODEM_M590 false
-#define GSM_MODEM_MC60 false
-#define GSM_MODEM_MC60E false
-#define GSM_MODEM_XBEE false
-#define GSM_MODEM_SEQUANS_MONARCH false
-//////////////////////////////////////////////
+#endif
#if GSM_USING_SOFTWARE_SERIAL
// BaudRate to communicate to GSM/GPRS modem. If be limit to max 115200 inside modem
diff --git a/examples/Tools/TestWebServer/TestWebServer.ino b/examples/Tools/TestWebServer/TestWebServer.ino
index 36bc31b..56269d3 100644
--- a/examples/Tools/TestWebServer/TestWebServer.ino
+++ b/examples/Tools/TestWebServer/TestWebServer.ino
@@ -17,16 +17,6 @@
of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program.
If not, see .
-
- Version: 1.5.0
-
- Version Modified By Date Comments
- ------- ----------- ---------- -----------
- 1.2.4 K Hoang 11/03/2021 Initial public release to add support to many boards / modules besides MKRGSM 1400 / SARA U201
- 1.3.0 K Hoang 31/03/2021 Add ThingStream MQTTS support. Fix SMS receive bug.
- 1.3.1 K Hoang 25/04/2021 Fix bug making ESP32 reset repeatedly.
- 1.4.0 K Hoang 28/06/2021 Add support to RP2040-based boards using Arduino mbed or Arduino-pico core
- 1.5.0 K Hoang 14/08/2021 Add support to Adafruit nRF52 core v0.22.0+
**********************************************************************************************************************************/
/*
Basic Web Server
diff --git a/examples/Tools/TestWebServer/defines.h b/examples/Tools/TestWebServer/defines.h
index cfefda4..7b0e3aa 100644
--- a/examples/Tools/TestWebServer/defines.h
+++ b/examples/Tools/TestWebServer/defines.h
@@ -34,7 +34,35 @@
//////////////////////////////////////////////
-#if !defined(ARDUINO_SAMD_MKRGSM1400)
+#if defined(ARDUINO_SAMD_MKRGSM1400)
+
+ // For original MKRGSM1400 => GSM_MODEM_UBLOX == true, GSM_MODEM_LARAR2 == false
+ // For modified MKRGSM1400 using LARA R2 => GSM_MODEM_UBLOX == false, GSM_MODEM_LARAR2 == true
+ #define GSM_MODEM_UBLOX false
+
+ #if GSM_MODEM_UBLOX
+ #define GSM_MODEM_LARAR2 false
+ #else
+ #define GSM_MODEM_LARAR2 true
+ #endif
+
+ #define UBLOX_USING_RESET_PIN true
+ #define UBLOX_USING_LOW_POWER_MODE true
+
+ #if GSM_MODEM_UBLOX
+ #warning Using MKRGSM1400 Configuration with SARA U201
+ #elif GSM_MODEM_LARAR2
+ #warning Using MKRGSM1400 Configuration with LARA R2xx
+ #else
+ #error Must select either GSM_MODEM_UBLOX or GSM_MODEM_LARAR2
+ #endif
+
+#else
+
+ // Optional usage of GSM_RESETN and GSM_DTR. Need to be here only when true. Default is false
+ #define UBLOX_USING_RESET_PIN true
+ #define UBLOX_USING_LOW_POWER_MODE true
+
// Override the default (and certainly not good) pins and port
// Only for boards other than ARDUINO_SAMD_MKRGSM1400
#if (ESP32)
@@ -74,44 +102,38 @@
#warning You must connect the Modem correctly and modify the pins / Serial port here
-#endif
-
-//////////////////////////////////////////////
-
-// Optional usage of GSM_RESETN and GSM_DTR. Need to be here only when true. Default is false
-
-//#define UBLOX_USING_RESET_PIN true
-//#define UBLOX_USING_LOW_POWER_MODE true
-
-//////////////////////////////////////////////
-
-#define GSM_MODEM_UBLOX true
-#define GSM_MODEM_SARAR4 false
+ //////////////////////////////////////////////
+
+ #define GSM_MODEM_UBLOX true
+ #define GSM_MODEM_SARAR4 false
+ #define GSM_MODEM_LARAR2 false
+
+ //////////////////////////////////////////////
+ // Not supported yet
+ #define GSM_MODEM_SIM800 false
+ #define GSM_MODEM_SIM808 false
+ #define GSM_MODEM_SIM868 false
+ #define GSM_MODEM_SIM900 false
+ #define GSM_MODEM_SIM5300 false
+ #define GSM_MODEM_SIM5320 false
+ #define GSM_MODEM_SIM5360 false
+ #define GSM_MODEM_SIM7000 false
+ #define GSM_MODEM_SIM7100 false
+ #define GSM_MODEM_SIM7500 false
+ #define GSM_MODEM_SIM7600 false
+ #define GSM_MODEM_SIM7800 false
+ #define GSM_MODEM_M95 false
+ #define GSM_MODEM_BG96 false
+ #define GSM_MODEM_A6 false
+ #define GSM_MODEM_A7 false
+ #define GSM_MODEM_M590 false
+ #define GSM_MODEM_MC60 false
+ #define GSM_MODEM_MC60E false
+ #define GSM_MODEM_XBEE false
+ #define GSM_MODEM_SEQUANS_MONARCH false
+ //////////////////////////////////////////////
-//////////////////////////////////////////////
-// Not supported yet
-#define GSM_MODEM_SIM800 false
-#define GSM_MODEM_SIM808 false
-#define GSM_MODEM_SIM868 false
-#define GSM_MODEM_SIM900 false
-#define GSM_MODEM_SIM5300 false
-#define GSM_MODEM_SIM5320 false
-#define GSM_MODEM_SIM5360 false
-#define GSM_MODEM_SIM7000 false
-#define GSM_MODEM_SIM7100 false
-#define GSM_MODEM_SIM7500 false
-#define GSM_MODEM_SIM7600 false
-#define GSM_MODEM_SIM7800 false
-#define GSM_MODEM_M95 false
-#define GSM_MODEM_BG96 false
-#define GSM_MODEM_A6 false
-#define GSM_MODEM_A7 false
-#define GSM_MODEM_M590 false
-#define GSM_MODEM_MC60 false
-#define GSM_MODEM_MC60E false
-#define GSM_MODEM_XBEE false
-#define GSM_MODEM_SEQUANS_MONARCH false
-//////////////////////////////////////////////
+#endif
// libraries
#include