SIMCom SIM7080 topic

Introduction

The SIMCom SIM7080G is a Multi-Band CAT-M and NB-IoT module solution in a SMT type.

Manufacturer Documentation

The module datasheet and AT commands are available here: http://www.simcom.com/product/SIM7080G.html

Modem Constructor

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

Construct a new SIMComSIM7080 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.
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 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 SIM7080 is used in the menu a la carte example.

1// For almost anything based on the SIMCom SIM7080G
2#include <modems/SIMComSIM7080.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 =
7 9600; // SIM7080 does auto-bauding by default, but I set mine to 9600
8
9// Modem Pins - Describe the physical pin connection of your modem to your board
10// NOTE: Use -1 for pins that do not apply
11// and-global breakout bk-7080a
12const int8_t modemVccPin = 18; // MCU pin controlling modem power
13const int8_t modemStatusPin = 19; // MCU pin used to read modem status
14const int8_t modemSleepRqPin = 23; // MCU pin for modem sleep/wake request
15const int8_t modemLEDPin = redLED; // MCU pin connected an LED to show modem
16 // status
17
18// Network connection information
19const char* apn = "xxxxx"; // APN for GPRS connection
20
21// Create the modem object
22SIMComSIM7080 modem7080(&modemSerial, modemVccPin, modemStatusPin,
23 modemSleepRqPin, apn);
24// Create an extra reference to the modem by a generic name
25SIMComSIM7080 modem = modem7080;

Classes

class SIMComSIM7080
The loggerModem subclass for modules based on the SIMCOMSIM7080".

Modem Pin Settings and Timing

The timing and pin level settings for a SIMCom SIM7080

#define SIM7080_STATUS_LEVEL = HIGH
The loggerModem::_statusLevel.
#define SIM7080_STATUS_TIME_MS = 1800L
The loggerModem::_statusTime_ms.
#define SIM7080_RESET_LEVEL = LOW
The loggerModem::_resetLevel.
#define SIM7080_RESET_PULSE_MS = 12600L
The loggerModem::_resetPulse_ms.
#define SIM7080_WAKE_LEVEL = LOW
The loggerModem::_wakeLevel.
#define SIM7080_WAKE_PULSE_MS = 1100
The loggerModem::_wakePulse_ms.
#define SIM7080_WAKE_DELAY_MS = 1000L
The loggerModem::_wakeDelayTime_ms.
#define SIM7080_ATRESPONSE_TIME_MS = 1800
The loggerModem::_max_atresponse_time_ms.
#define SIM7080_DISCONNECT_TIME_MS = 2000L
The loggerModem::_disconnetTime_ms.

Define documentation

#define SIM7080_STATUS_LEVEL = HIGH

The loggerModem::_statusLevel.

Status of the SIM7080G 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 start of pulse until status pin becomes active is >1.8sec.


#define SIM7080_STATUS_TIME_MS = 1800L

The loggerModem::_statusTime_ms.

Status of the SIM7080G 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 start of pulse until status pin becomes active is >1.8sec.


#define SIM7080_RESET_LEVEL = LOW

The loggerModem::_resetLevel.

The SIM7080G is reset using the PWRKEY NOT a separate RESET pin!

To reset the module, the PWRKEY is held low for 12.6s.


#define SIM7080_RESET_PULSE_MS = 12600L

The loggerModem::_resetPulse_ms.

The SIM7080G is reset using the PWRKEY NOT a separate RESET pin!

To reset the module, the PWRKEY is held low for 12.6s.


#define SIM7080_WAKE_LEVEL = LOW

The loggerModem::_wakeLevel.

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


#define SIM7080_WAKE_PULSE_MS = 1100

The loggerModem::_wakePulse_ms.

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


#define SIM7080_WAKE_DELAY_MS = 1000L

The loggerModem::_wakeDelayTime_ms.

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


#define SIM7080_ATRESPONSE_TIME_MS = 1800

The loggerModem::_max_atresponse_time_ms.

Time after end pulse until serial port on SIM7080 becomes active is >1.8sec.


#define SIM7080_DISCONNECT_TIME_MS = 2000L

The loggerModem::_disconnetTime_ms.

SIM7080 power down (gracefully) takes 1.8-2 sec.