|
2 | 2 | // RegEx Replace: \#define\sSARA\_R5\_([A-Z0-9_]+).* \#define SARA\_R5\_$+ UBLOX\_AT\_$+
|
3 | 3 |
|
4 | 4 | /*
|
5 |
| - Arduino library for the u-blox SARA-R5 LTE-M / NB-IoT modules with secure cloud, as used on the SparkFun MicroMod Asset Tracker |
6 |
| - By: Paul Clark |
7 |
| - October 19th 2020 |
| 5 | + Arduino library for the u-blox SARA-R5 LTE-M / NB-IoT modules with secure cloud, as used on the SparkFun MicroMod |
| 6 | + Asset Tracker By: Paul Clark October 19th 2020 |
8 | 7 |
|
9 | 8 | Based extensively on the:
|
10 | 9 | Arduino Library for the SparkFun LTE CAT M1/NB-IoT Shield - SARA-R4
|
|
34 | 33 | #define SARA_R5_3_MIN_TIMEOUT 180000
|
35 | 34 | #define SARA_R5_SET_BAUD_TIMEOUT 500
|
36 | 35 | #define SARA_R5_POWER_OFF_PULSE_PERIOD 3200 // Hold PWR_ON low for this long to power the module off
|
37 |
| -#define SARA_R5_POWER_ON_PULSE_PERIOD 100 // Hold PWR_ON low for this long to power the module on (SARA-R510M8S) |
38 |
| -#define SARA_R5_RESET_PULSE_PERIOD 23000 // Used to perform an abrupt emergency hardware shutdown. 23 seconds... (Yes, really!) |
| 36 | +#define SARA_R5_POWER_ON_PULSE_PERIOD 100 // Hold PWR_ON low for this long to power the module on (SARA-R510M8S) |
| 37 | +#define SARA_R5_RESET_PULSE_PERIOD \ |
| 38 | + 23000 // Used to perform an abrupt emergency hardware shutdown. 23 seconds... (Yes, really!) |
39 | 39 | #define SARA_R5_POWER_OFF_TIMEOUT 40000 // Datasheet says 40 seconds...
|
40 | 40 | #define SARA_R5_IP_CONNECT_TIMEOUT 130000
|
41 | 41 | #define SARA_R5_POLL_DELAY 1
|
|
141 | 141 | #define SARA_R5_SEC_PROFILE UBX_CELL_SEC_PROFILE
|
142 | 142 | #define SARA_R5_SEC_MANAGER UBX_CELL_SEC_MANAGER
|
143 | 143 |
|
144 |
| - |
145 | 144 | // ### URC strings
|
146 | 145 | #define SARA_R5_READ_SOCKET_URC UBX_CELL_READ_SOCKET_URC
|
147 | 146 | #define SARA_R5_READ_UDP_SOCKET_URC UBX_CELL_READ_UDP_SOCKET_URC
|
|
167 | 166 | #define SARA_R5_NUM_SOCKETS 6
|
168 | 167 |
|
169 | 168 | #define SARA_R5_NUM_SUPPORTED_BAUD 6
|
170 |
| -const unsigned long SARA_R5_SUPPORTED_BAUD[SARA_R5_NUM_SUPPORTED_BAUD] = |
171 |
| - { |
172 |
| - 115200, |
173 |
| - 9600, |
174 |
| - 19200, |
175 |
| - 38400, |
176 |
| - 57600, |
177 |
| - 230400}; |
| 169 | +const unsigned long SARA_R5_SUPPORTED_BAUD[SARA_R5_NUM_SUPPORTED_BAUD] = {115200, 9600, 19200, 38400, 57600, 230400}; |
178 | 170 | #define SARA_R5_DEFAULT_BAUD_RATE 115200
|
179 | 171 |
|
180 | 172 | // Flow control definitions for AT&K
|
@@ -244,13 +236,13 @@ const unsigned long SARA_R5_SUPPORTED_BAUD[SARA_R5_NUM_SUPPORTED_BAUD] =
|
244 | 236 | #define SARA_R5_SIM_NOT_OPERATIONAL UBX_CELL_SIM_NOT_OPERATIONAL
|
245 | 237 | #define SARA_R5_SIM_RESTRICTED UBX_CELL_SIM_RESTRICTED
|
246 | 238 | #define SARA_R5_SIM_OPERATIONAL UBX_CELL_SIM_OPERATIONAL
|
247 |
| -//SARA_R5_SIM_PHONEBOOK_READY, // Not reported by SARA-R5 |
248 |
| -//SARA_R5_SIM_USIM_PHONEBOOK_READY, // Not reported by SARA-R5 |
249 |
| -//SARA_R5_SIM_TOOLKIT_REFRESH_SUCCESSFUL, // Not reported by SARA-R5 |
250 |
| -//SARA_R5_SIM_TOOLKIT_REFRESH_UNSUCCESSFUL, // Not reported by SARA-R5 |
251 |
| -//SARA_R5_SIM_PPP_CONNECTION_ACTIVE, // Not reported by SARA-R5 |
252 |
| -//SARA_R5_SIM_VOICE_CALL_ACTIVE, // Not reported by SARA-R5 |
253 |
| -//SARA_R5_SIM_CSD_CALL_ACTIVE // Not reported by SARA-R5 |
| 239 | +// SARA_R5_SIM_PHONEBOOK_READY, // Not reported by SARA-R5 |
| 240 | +// SARA_R5_SIM_USIM_PHONEBOOK_READY, // Not reported by SARA-R5 |
| 241 | +// SARA_R5_SIM_TOOLKIT_REFRESH_SUCCESSFUL, // Not reported by SARA-R5 |
| 242 | +// SARA_R5_SIM_TOOLKIT_REFRESH_UNSUCCESSFUL, // Not reported by SARA-R5 |
| 243 | +// SARA_R5_SIM_PPP_CONNECTION_ACTIVE, // Not reported by SARA-R5 |
| 244 | +// SARA_R5_SIM_VOICE_CALL_ACTIVE, // Not reported by SARA-R5 |
| 245 | +// SARA_R5_SIM_CSD_CALL_ACTIVE // Not reported by SARA-R5 |
254 | 246 |
|
255 | 247 | #define SARA_R5_NUM_PSD_PROFILES 6 // Number of supported PSD profiles
|
256 | 248 | #define SARA_R5_NUM_PDP_CONTEXT_IDENTIFIERS 11 // Number of supported PDP context identifiers
|
@@ -335,14 +327,14 @@ const unsigned long SARA_R5_SUPPORTED_BAUD[SARA_R5_NUM_SUPPORTED_BAUD] =
|
335 | 327 |
|
336 | 328 | #define SARA_R5_PSD_CONFIG_PARAM_PROTOCOL UBX_CELL_PSD_CONFIG_PARAM_PROTOCOL
|
337 | 329 | #define SARA_R5_PSD_CONFIG_PARAM_APN UBX_CELL_PSD_CONFIG_PARAM_APN
|
338 |
| -//SARA_R5_PSD_CONFIG_PARAM_USERNAME, // Not allowed on SARA-R5 |
339 |
| -//SARA_R5_PSD_CONFIG_PARAM_PASSWORD, // Not allowed on SARA-R5 |
| 330 | +// SARA_R5_PSD_CONFIG_PARAM_USERNAME, // Not allowed on SARA-R5 |
| 331 | +// SARA_R5_PSD_CONFIG_PARAM_PASSWORD, // Not allowed on SARA-R5 |
340 | 332 | #define SARA_R5_PSD_CONFIG_PARAM_DNS1 UBX_CELL_PSD_CONFIG_PARAM_DNS1
|
341 | 333 | #define SARA_R5_PSD_CONFIG_PARAM_DNS2 UBX_CELL_PSD_CONFIG_PARAM_DNS2
|
342 |
| -//SARA_R5_PSD_CONFIG_PARAM_AUTHENTICATION, // Not allowed on SARA-R5 |
343 |
| -//SARA_R5_PSD_CONFIG_PARAM_IP_ADDRESS, // Not allowed on SARA-R5 |
344 |
| -//SARA_R5_PSD_CONFIG_PARAM_DATA_COMPRESSION, // Not allowed on SARA-R5 |
345 |
| -//SARA_R5_PSD_CONFIG_PARAM_HEADER_COMPRESSION, // Not allowed on SARA-R5 |
| 334 | +// SARA_R5_PSD_CONFIG_PARAM_AUTHENTICATION, // Not allowed on SARA-R5 |
| 335 | +// SARA_R5_PSD_CONFIG_PARAM_IP_ADDRESS, // Not allowed on SARA-R5 |
| 336 | +// SARA_R5_PSD_CONFIG_PARAM_DATA_COMPRESSION, // Not allowed on SARA-R5 |
| 337 | +// SARA_R5_PSD_CONFIG_PARAM_HEADER_COMPRESSION, // Not allowed on SARA-R5 |
346 | 338 | #define SARA_R5_PSD_CONFIG_PARAM_MAP_TO_CID UBX_CELL_PSD_CONFIG_PARAM_MAP_TO_CID
|
347 | 339 |
|
348 | 340 | #define SARA_R5_PSD_PROTOCOL_IPV4 UBX_CELL_PSD_PROTOCOL_IPV4
|
@@ -388,4 +380,4 @@ const unsigned long SARA_R5_SUPPORTED_BAUD[SARA_R5_NUM_SUPPORTED_BAUD] =
|
388 | 380 | #define SARA_R5_SEC_MANAGER_CLIENT_KEY UBX_CELL_SEC_MANAGER_CLIENT_KEY
|
389 | 381 | #define SARA_R5_SEC_MANAGER_SERVER_CERT UBX_CELL_SEC_MANAGER_SERVER_CERT
|
390 | 382 |
|
391 |
| -#endif //SPARKFUN_SARA_R5_ARDUINO_LIBRARY_H |
| 383 | +#endif // SPARKFUN_SARA_R5_ARDUINO_LIBRARY_H |
0 commit comments