This repository has been archived by the owner on Jan 29, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7
/
defines.h
146 lines (114 loc) · 5.56 KB
/
defines.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
/*********************************************************************************************************************************
defines.h
For ESP8266, ESP32, SAMD21/SAMD51, nRF52, SAM DUE, Teensy and STM32 with GSM modules
GSM_Generic is a library for the ESP8266, ESP32, SAMD21/SAMD51, nRF52, SAM DUE, Teensy and STM32 with GSM modules
Based on and modified from MKRGSM Library (https://github.com/arduino-libraries/MKRGSM)
Built by Khoi Hoang https://github.com/khoih-prog/GSM_Generic
Licensed under GNU Lesser General Public License
Copyright (C) 2017 Arduino AG (http://www.arduino.cc/)
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License
as published by the Free Software Foundation, either version 2.1 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty
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/>.
**********************************************************************************************************************************/
#ifndef defines_h
#define defines_h
#define DEBUG_GSM_GENERIC_PORT Serial
// Debug Level from 0 to 5. Level 5 is to print out AT commands and responses
#define _GSM_GENERIC_LOGLEVEL_ 5
#define SECRET_PINNUMBER ""
//#define SECRET_GPRS_APN "GPRS_APN" // replace your GPRS APN
//#define SECRET_GPRS_APN "rogers-core-appl1.apn" // replace your GPRS APN
//#define SECRET_GPRS_APN "Fido-core-appl1.apn"; // FIDO APN
//#define SECRET_GPRS_APN "LTEMOBILE.APN"; // FIDO LTE APN
#define SECRET_GPRS_APN "ltedata.apn"; // FIDO LTE APN
#define SECRET_GPRS_LOGIN "" // replace with your GPRS login
#define SECRET_GPRS_PASSWORD "" // replace with your GPRS password
//////////////////////////////////////////////
#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)
#define GSM_RESETN (33u)
#define GSM_DTR (34u)
#elif (ESP8266)
#define GSM_RESETN (D3)
#define GSM_DTR (D4)
#else
#define GSM_RESETN (10u)
#define GSM_DTR (11u)
#endif
#if ESP8266
// Using Software Serial for ESP8266, as Serial1 is TX only
#define GSM_USING_SOFTWARE_SERIAL true
#else
// Optional Software Serial here for other boards, but not advised if HW Serial available
#define GSM_USING_SOFTWARE_SERIAL false
#endif
#if GSM_USING_SOFTWARE_SERIAL
#warning Using default SerialGSM = SoftwareSerial
#define D8 (15)
#define D7 (13)
#include <SoftwareSerial.h>
SoftwareSerial swSerial(D7, D8); // (D7, D8, false, 256); // (RX, TX, false, 256);
#define SerialGSM swSerial
#else
#warning Using default SerialGSM = HardwareSerial Serial1
#define SerialGSM Serial1
#endif // GSM_USING_SOFTWARE_SERIAL
#warning You must connect the Modem correctly and modify the pins / Serial port here
//////////////////////////////////////////////
#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
//////////////////////////////////////////////
#endif
// libraries
#include <GSM_Generic_Main.h>
#endif //defines_h