Skip to content
This repository has been archived by the owner on Jan 29, 2023. It is now read-only.

Commit

Permalink
v1.6.0 to add support to LARA-R2xx
Browse files Browse the repository at this point in the history
### Release v1.6.0

1. Add support to u-blox LARA-R2xx LTE Cat 1 Modem
  • Loading branch information
khoih-prog authored Aug 31, 2021
1 parent 5fd32ec commit 596cb8c
Show file tree
Hide file tree
Showing 57 changed files with 1,922 additions and 1,548 deletions.
10 changes: 0 additions & 10 deletions examples/Advanced/GSM_Blynk/BlynkSimpleGSM_Generic.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 <https://www.gnu.org/licenses/>.
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
Expand Down
10 changes: 0 additions & 10 deletions examples/Advanced/GSM_Blynk/GSM_Blynk.ino
Original file line number Diff line number Diff line change
Expand Up @@ -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 <https://www.gnu.org/licenses/>.
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:
Expand Down
102 changes: 62 additions & 40 deletions examples/Advanced/GSM_Blynk/defines.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand Down
10 changes: 0 additions & 10 deletions examples/Advanced/GSM_MQTT/GSM_MQTT.ino
Original file line number Diff line number Diff line change
Expand Up @@ -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 <https://www.gnu.org/licenses/>.
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
Expand Down
98 changes: 60 additions & 38 deletions examples/Advanced/GSM_MQTT/defines.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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 <GSM_Generic_Main.h>
Expand Down
10 changes: 0 additions & 10 deletions examples/Advanced/GSM_MQTTClient_Auth/GSM_MQTTClient_Auth.ino
Original file line number Diff line number Diff line change
Expand Up @@ -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 <https://www.gnu.org/licenses/>.
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+
*****************************************************************************************************************************/

/*
Expand Down
Loading

0 comments on commit 596cb8c

Please sign in to comment.