SIMCom SIM7000 topic

Introduction

The SIMCom SIM7000 Tri-Band LTE-FDD and Dual-Band GPRS/EDGE module solution in a SMT type which supports LTE CAT-M1(eMTC) and NB-IoT up to 375kbps data transfer.

There are breakouts of several variants made by AND Technologies or Botletics.

Connecting a SIM7000 to a Mayfly

To my knowledge, there are not any SIM7000 modules available that can directly connect to a Mayfly.

Manufacturer Documentation

The module datasheet and AT commands are available here: https://simcom.ee/modules/iot/sim7000e/

Modem Constructor

SIMComSIM7000::SIMComSIM7000(Stream* modemStream, int8_t powerPin, int8_t statusPin, int8_t modemResetPin, int8_t modemSleepRqPin, const char* apn)

Construct a new SIMComSIM7000 object The constuctor initializes all of the provided member variables, constructs a loggerModem parent class with the appropriate timing for the module, calls the constructor for a TinyGSM modem on the provided modemStream, and creates a TinyGSM Client linked to the modem.

Parameters
modemStream The Arduino stream instance for serial communication.
powerPin The digital pin number of the mcu pin controlling power to the modem (active HIGH).
statusPin The digital pin number of the mcu pin connected to the modem status output pin.
modemResetPin The digital pin number of the pin on the mcu attached the the hard or panic reset pin of the modem.
modemSleepRqPin The digital pin number of a pin on the mcu used to request the modem enter its lowest possible power state.
apn The Access Point Name (APN) for the SIM card.

Should be set to a negative number if the modem should be continuously powered or the power cannot be controlled by the MCU. Should be set to a negative number if the modem status pin cannot be read. This is the pin labeled STATUS in SIMCom's integration guide. Should be set to a negative number if the modem reset pin is not connected to the MCU. This is the pin labeled RESET in SIMCom's integration guide. Should be set to a negative number if there is no pin usable for deep sleep modes or it is not accessible to the MCU. This is the pin labeled PWRKEY in SIMCom's integration guide.



Example Code

The SIM7000 is used in the menu a la carte example.

1// For almost anything based on the SIMCom SIM7000
2#include <modems/SIMComSIM7000.h>
3
4// NOTE: Extra hardware and software serial ports are created in the "Settings
5// for Additional Serial Ports" section
6const int32_t modemBaud = 9600; // SIM7000 does auto-bauding by default
7
8// Modem Pins - Describe the physical pin connection of your modem to your board
9// NOTE: Use -1 for pins that do not apply
10const int8_t modemVccPin = 18; // MCU pin controlling modem power
11const int8_t modemStatusPin = 19; // MCU pin used to read modem status
12const int8_t modemResetPin = A5; // MCU pin connected to modem reset pin
13const int8_t modemSleepRqPin = 23; // MCU pin for modem sleep/wake request
14const int8_t modemLEDPin = redLED; // MCU pin connected an LED to show modem
15 // status
16
17// Network connection information
18const char* apn = "xxxxx"; // APN for GPRS connection
19
20// Create the modem object
21SIMComSIM7000 modem7000(&modemSerial, modemVccPin, modemStatusPin,
22 modemResetPin, modemSleepRqPin, apn);
23// Create an extra reference to the modem by a generic name
24SIMComSIM7000 modem = modem7000;

Classes

class SIMComSIM7000
The loggerModem subclass for Botletics, And1, and other modules based on the SIMCOM SIM7000.

Modem Pin Settings and Timing

The timing and pin level settings for a SIMCom SIM7000

#define SIM7000_STATUS_LEVEL = HIGH
The loggerModem::_statusLevel.
#define SIM7000_STATUS_TIME_MS = 5000L
The loggerModem::_statusTime_ms.
#define SIM7000_RESET_LEVEL = LOW
The loggerModem::_resetLevel.
#define SIM7000_RESET_PULSE_MS = 300
The loggerModem::_resetPulse_ms.
#define SIM7000_WAKE_LEVEL = LOW
The loggerModem::_wakeLevel.
#define SIM7000_WAKE_PULSE_MS = 1100
The loggerModem::_wakePulse_ms.
#define SIM7000_WAKE_DELAY_MS = 1000L
The loggerModem::_wakeDelayTime_ms.
#define SIM7000_ATRESPONSE_TIME_MS = 4500
The loggerModem::_max_atresponse_time_ms.
#define SIM7000_DISCONNECT_TIME_MS = 7000L
The loggerModem::_disconnetTime_ms.

Define documentation

#define SIM7000_STATUS_LEVEL = HIGH

The loggerModem::_statusLevel.

Status of the SIM7000 should be monitored on the STATUS pin, which is at a high level when the module has powered on and the firmware goes ready.

Time after end pulse until status pin becomes active is >4.5sec.


#define SIM7000_STATUS_TIME_MS = 5000L

The loggerModem::_statusTime_ms.

Status of the SIM7000 should be monitored on the STATUS pin, which is at a high level when the module has powered on and the firmware goes ready.

Time after end pulse until status pin becomes active is >4.5sec.


#define SIM7000_RESET_LEVEL = LOW

The loggerModem::_resetLevel.

The active low level time impulse on RESET pin to reset SIM7000 is miniumum 252ms.


#define SIM7000_RESET_PULSE_MS = 300

The loggerModem::_resetPulse_ms.

The active low level time impulse on RESET pin to reset SIM7000 is miniumum 252ms.


#define SIM7000_WAKE_LEVEL = LOW

The loggerModem::_wakeLevel.

The SIM7000 Module is switched on by a >1 second LOW pulse on the PWRKEY pin.


#define SIM7000_WAKE_PULSE_MS = 1100

The loggerModem::_wakePulse_ms.

The SIM7000 Module is switched on by a >1 second LOW pulse on the PWRKEY pin.


#define SIM7000_WAKE_DELAY_MS = 1000L

The loggerModem::_wakeDelayTime_ms.

Time after power on before PWRKEY on SIM7000 can be used is undocumented. Using 1s.


#define SIM7000_ATRESPONSE_TIME_MS = 4500

The loggerModem::_max_atresponse_time_ms.

Time after end pulse until serial port on SIM7000 becomes active is >4.5sec.


#define SIM7000_DISCONNECT_TIME_MS = 7000L

The loggerModem::_disconnetTime_ms.

SIM7000 power down (gracefully) takes 1.8-6.9 sec.