Sodaq GPRSBee module
Introduction
This is for the Sodaq GPRSBee R6 and higher. This board is based on the SIMCom SIM800H, but adds an extra transistor to the PWR_KEY
so it is turned on and off in a different way. For earlier Sodaq GPRSBee's, use the standard SIM800 constructor.
The modem constructor follows the typical modem pattern, except that the Sodaq GPRSBee's do not expose the SIM800's reset pin or its sleep request (PWRKEY
) pin. The SIM800H's PWRKEY
is always held at the inverse of the main power. It cannot be controlled. Thus the GPRSBeeR6 can only be "put to sleep" by cutting the power to the SIM800H.
If you are capable of controlling the voltage reference pin (Bee socket pin 1) of the GPRSBee, you can set that pin using the function setVRefPin(int8_t vRefPin)
.
Manufacturer Documentation
The GPRSBee schematics are available here: https:/
Modem Constructor
Construct a new Sodaq 2GBee R6 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
Sodaq2GBeeR6(Stream* modemStream,
int8_t powerPin,
int8_t statusPin,
const char* apn)
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.
apn
The Access Point Name (APN) for the SIM card.
STATUS
in Sodaq (and SIMCom)'s documentation.
Example Code
The GPRSBee is used in the menu a la carte example.
// For the Sodaq 2GBee R6 and R7 based on the SIMCom SIM800 // NOTE: The Sodaq GPRSBee doesn't expose the SIM800's reset pin #include <modems/Sodaq2GBeeR6.h> // NOTE: Extra hardware and software serial ports are created in the "Settings // for Additional Serial Ports" section const int32_t modemBaud = 9600; // SIM800 does auto-bauding by default // Modem Pins - Describe the physical pin connection of your modem to your board // NOTE: Use -1 for pins that do not apply // Example pins are for a Sodaq GPRSBee R6 or R7 with a Mayfly 0.x const int8_t modemVccPin = 23; // MCU pin controlling modem power const int8_t modemStatusPin = 19; // MCU pin used to read modem status const int8_t modemResetPin = -1; // MCU pin connected to modem reset pin const int8_t modemSleepRqPin = -1; // MCU pin for modem sleep/wake request const int8_t modemLEDPin = redLED; // MCU pin connected an LED to show modem // status // Network connection information const char* apn = "xxxxx"; // APN for GPRS connection // Create the modem object Sodaq2GBeeR6 modem2GB(&modemSerial, modemVccPin, modemStatusPin, apn); // Create an extra reference to the modem by a generic name Sodaq2GBeeR6 modem = modem2GB;
Classes
- class Sodaq2GBeeR6
- The loggerModem subclass for the Sodaq 2GBee revisions 6 and higher based on the SIMCOM SIM800H.
Defines
- #define S2GBR6_WAKE_DELAY_MS = 0
- The loggerModem::
_wakeDelayTime_ms. The GPRSBee R6+ has the
PWR_KEY
tied to the input voltage, so there is no warm-up time needed