SIMCom SIM800 topic
- Introduction
- Manufacturer Documentation
- Modem Constructor
- Example Code
- Reference
- Detailed Descriptions
Introduction
There are a multitude of boards available that feature a variant of the SIMCom SIM800 or the nearly identical SIM900, including the Adafruit Fona Mini cellular GSM breakout. Almost all of those boards should work with ModularSensors as a generic SIM800. The one exception is the Sodaq GPRSBee R6 and higher, which has its own constructor. The earlier Sodaq GPRSBee's (ie, R4) do use this version.
The SIM800 consumes up to 2A of power while connecting to the network. That is 4x what a typical USB or Arduino board can supply, so expect to give the module it's own independent power source.
The Adafruit 3G Fona is not currently supported.
Manufacturer Documentation
The module datasheet and AT commands are available here: https:/
Modem Constructor
Construct a new SIMComSIM800 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. 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
SIMComSIM800::
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.
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 SIM800 is used in the menu a la carte example.
Classes
- class SIMComSIM800
- The loggerModem subclass for the Adafruit Fona 2G, the Sodaq GPRSBeeR4 and almost any other module based on the SIMCOM SIM800 or SIM900 modules andthier variants".
Modem Pin Settings and Timing
The timing and pin level settings for a SIMCom SIM800
- #define SIM800_STATUS_LEVEL = HIGH
- The loggerModem::
_statusLevel. - #define SIM800_STATUS_TIME_MS = 3000
- The loggerModem::
_statusTime_ms. - #define SIM800_RESET_LEVEL = LOW
- The loggerModem::
_resetLevel. - #define SIM800_RESET_PULSE_MS = 105
- The loggerModem::
_resetPulse_ms. - #define SIM800_WAKE_LEVEL = LOW
- The loggerModem::
_wakeLevel. - #define SIM800_WAKE_PULSE_MS = 1100
- The loggerModem::
_wakePulse_ms. - #define SIM800_WAKE_DELAY_MS = 450
- The loggerModem::
_wakeDelayTime_ms. - #define SIM800_ATRESPONSE_TIME_MS = 3000
- The loggerModem::
_max_atresponse_time_ms. - #define SIM800_DISCONNECT_TIME_MS = 15000L
- The loggerModem::
_disconnetTime_ms.
Define documentation
#define SIM800_STATUS_LEVEL = HIGH
#include <src/modems/SIMComSIM800.h>
The loggerModem::
SIM800 status can be monitored on the STATUS
pin which is active HIGH
Time after end pulse until status pin becomes active:
- SIM800 - >3sec from start of 1s pulse
- SIM900 - >2.2sec from end of pulse
#define SIM800_STATUS_TIME_MS = 3000
#include <src/modems/SIMComSIM800.h>
The loggerModem::
SIM800 status can be monitored on the STATUS
pin which is active HIGH
Time after end pulse until status pin becomes active:
- SIM800 - >3sec from start of 1s pulse
- SIM900 - >2.2sec from end of pulse
#define SIM800_RESET_LEVEL = LOW
#include <src/modems/SIMComSIM800.h>
SIM800 is reset with a >105ms low pulse on the RESET_N
pin
#define SIM800_RESET_PULSE_MS = 105
#include <src/modems/SIMComSIM800.h>
The loggerModem::
SIM800 is reset with a >105ms low pulse on the RESET_N
pin
#define SIM800_WAKE_LEVEL = LOW
#include <src/modems/SIMComSIM800.h>
The SIM800 is switched on by a > 1 second LOW
pulse on the PWR_ON
pin. Module is switched on by a 1-3 second LOW
pulse on the PWR_ON
pin.
#define SIM800_WAKE_PULSE_MS = 1100
#include <src/modems/SIMComSIM800.h>
The loggerModem::
The SIM800 is switched on by a > 1 second LOW
pulse on the PWR_ON
pin. Module is switched on by a 1-3 second LOW
pulse on the PWR_ON
pin.
#define SIM800_WAKE_DELAY_MS = 450
#include <src/modems/SIMComSIM800.h>
The loggerModem::
Time after power on before PWRKEY
on SIM800 can be used is >0.4sec.
#define SIM800_ATRESPONSE_TIME_MS = 3000
#include <src/modems/SIMComSIM800.h>
The loggerModem::
Time after end pulse until serial port becomes active on SIM800 is >3sec from start of 1s pulse.
#define SIM800_DISCONNECT_TIME_MS = 15000L
#include <src/modems/SIMComSIM800.h>
The loggerModem::
SIM800 power down (gracefully) takes >3sec. We allow up to 15sec for shutdown in case it is not monitored.