Sodaq GPRSBee topic

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://support.sodaq.com/sodaq-one/gprsbee-5/

Modem Constructor

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

Construct a new Sodaq 2GBee R6 object.

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.

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 STATUS in Sodaq (and SIMCom)'s documentation.



Example Code

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

1// For the Sodaq 2GBee R6 and R7 based on the SIMCom SIM800
2// NOTE: The Sodaq GPRSBee doesn't expose the SIM800's reset pin
3#include <modems/Sodaq2GBeeR6.h>
4
5// NOTE: Extra hardware and software serial ports are created in the "Settings
6// for Additional Serial Ports" section
7const int32_t modemBaud = 9600; // SIM800 does auto-bauding by default
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// Example pins are for a Sodaq GPRSBee R6 or R7 with a Mayfly 0.x
12const int8_t modemVccPin = 23; // MCU pin controlling modem power
13const int8_t modemStatusPin = 19; // MCU pin used to read modem status
14const int8_t modemResetPin = -1; // MCU pin connected to modem reset pin
15const int8_t modemSleepRqPin = -1; // MCU pin for modem sleep/wake request
16const int8_t modemLEDPin = redLED; // MCU pin connected an LED to show modem
17 // status
18
19// Network connection information
20const char* apn = "xxxxx"; // APN for GPRS connection
21
22// Create the modem object
23Sodaq2GBeeR6 modem2GB(&modemSerial, modemVccPin, modemStatusPin, apn);
24// Create an extra reference to the modem by a generic name
25Sodaq2GBeeR6 modem = modem2GB;

Classes

class Sodaq2GBeeR6
The loggerModem subclass for the Sodaq 2GBee revisions 6 and higher based on the SIMCOM SIM800H.

Modem Pin Settings and Timing

The timing and pin level settings for a GPRSBee

#define S2GBR6_WAKE_DELAY_MS = 0
The loggerModem::_wakeDelayTime_ms.

Define documentation

#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