Sodaq UBee 2G, 3G, and other u-blox 2G and 3G Modules topic
- Introduction
- Manufacturer Documentation
- Modem Constructor
- Example Code
- Reference
- Detailed Descriptions
Introduction
There are a several of boards available that feature a variant of the u-blox 2G and 3G modules, including a Sodaq UBee based on the SARA U201 and another based on the SARA G3.
The default baud rate for the SARA U201 is 9600.
Power draw for most 2G and 3G modules is up to 2A. The Sodaq UBee's provide extra battery sockets to supply the additional power. These MUST be used.
Manufacturer Documentation
The module datasheet and AT commands for the SARA U2 series are available here: https:/
Modem Constructor
Construct a new Sodaq UBee U201 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. For the Sodaq UBee, this is the pin labeled
SodaqUBeeU201::
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.
ON/OFF
; pin 9 on the bee socket. The fact that this pin controls the power to the u-blox module is not clear in the Sodaq documentation.
Should be set to a negative number if the modem status pin cannot be read. This is the pin labeled V_INT
in the u-blox integration guide. It is (misleadingly) called CTS
in some of the Sodaq UBee documentation because Sodaq wired the V_INT
from the u-blox to the pin usually reserved for CTS
on the bee socket.
Should be set to a negative number if the modem reset pin is not connected to the MCU. This is the pin labeled RESET_N
in both u-blox and Sodaq documentation.
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 PWR_ON
in both u-blox and Sodaq documentation.
Example Code
The SARA U201 based UBee is used in the menu a la carte example.
Classes
- class SodaqUBeeU201
- The loggerModem subclass for the 2G/
3G Sodaq UBee based on the u-blox SARA U201 2G/3G cellular module.
Modem Pin Settings and Timing
The timing and pin level settings for a Sodaq UBee U201
- #define U201_STATUS_LEVEL = HIGH
- The loggerModem::
_statusLevel. - #define U201_STATUS_TIME_MS = 100
- The loggerModem::
_statusTime_ms. - #define U201_RESET_LEVEL = LOW
- The loggerModem::
_resetLevel. - #define U201_RESET_PULSE_MS = 75
- The loggerModem::
_resetPulse_ms. - #define U201_WAKE_LEVEL = LOW
- The loggerModem::
_wakeLevel. - #define U201_WAKE_PULSE_MS = 1
- The loggerModem::
_wakePulse_ms. - #define U201_WAKE_DELAY_MS = 0
- The loggerModem::
_wakeDelayTime_ms. - #define U201_ATRESPONSE_TIME_MS = 6000L
- The loggerModem::
_max_atresponse_time_ms. - #define U201_DISCONNECT_TIME_MS = 15000L
- The loggerModem::
_disconnetTime_ms.
Define documentation
#define U201_STATUS_LEVEL = HIGH
#include <src/modems/SodaqUBeeU201.h>
The loggerModem::
Status of the U201 should be monitored on the V_INT
pin. The time after end of wake pulse until V_INT
becomes active is unspecified in documentation; we use the value from the Lisa U2, which is 100ms.
#define U201_STATUS_TIME_MS = 100
#include <src/modems/SodaqUBeeU201.h>
The loggerModem::
Status of the U201 should be monitored on the V_INT
pin. The time after end of wake pulse until V_INT
becomes active is unspecified in documentation; we use the value from the Lisa U2, which is 100ms.
#define U201_RESET_LEVEL = LOW
#include <src/modems/SodaqUBeeU201.h>
U201 is reset with a >50ms low pulse on the RESET_N
pin
#define U201_RESET_PULSE_MS = 75
#include <src/modems/SodaqUBeeU201.h>
The loggerModem::
U201 is reset with a >50ms low pulse on the RESET_N
pin
#define U201_WAKE_LEVEL = LOW
#include <src/modems/SodaqUBeeU201.h>
The SARA U201 is switched on by a 50-80 MICRO second LOW
pulse on the PWR_ON
pin.
#define U201_WAKE_PULSE_MS = 1
#include <src/modems/SodaqUBeeU201.h>
The loggerModem::
The SARA U201 is switched on by a 50-80 MICRO second LOW
pulse on the PWR_ON
pin.
#define U201_WAKE_DELAY_MS = 0
#include <src/modems/SodaqUBeeU201.h>
The loggerModem::
The SARA U201 turns on when power is applied - the level of PWR_ON
then is irrelevant. No separate pulse or other wake is needed.
#define U201_ATRESPONSE_TIME_MS = 6000L
#include <src/modems/SodaqUBeeU201.h>
The loggerModem::
Time until system and digital pins are operational is 6 sec typical for SARA U201.
#define U201_DISCONNECT_TIME_MS = 15000L
#include <src/modems/SodaqUBeeU201.h>
The loggerModem::
Power down time for u-blox modules "can largely vary depending on the
application / network settings and the concurrent module activities." The V_INT
pin should be monitored and power not withdrawn until that pin reads low. We allow up to 15 seconds for shutdown in case it is not monitored.