Monogoto
Back to Monogoto website
  • Welcome
  • Getting Started
    • Quick Start
    • Device Configurations
      • IoT Modules
        • NORDIC nRF9160 DK
        • Quectel BG95-MX
        • Quectel BG96
        • Murata LBAD0XX1SC-DM
          • Satellite NTN Network
        • Sierra Wireless WP7607
        • Sierra Wireless WP7610
        • Sierra Wireless MC7700
        • SIMCom SIM7070G
          • Waveshare SIM7070G
        • SIMCom SIM7600G-H
          • Waveshare SIM7600G-H
        • Telit HE910
        • Thales Cinterion TX62
        • u-blox SARA R4
          • SODAQ SARA R41XM
        • Cellular Devices
          • Openwrt EG95
          • ProView 4GPro-W
          • Teltonika RUT240
          • Teltonika FMB920
          • InHand IR302
          • Provision-ISR PR-LTE01W
          • Sierra Wireless RV50 AirLink
          • Smart Cash Register Configuration to Use Cellular SIM as WiFi Backup
          • Nayax Nova 40
      • iPhone Device
      • Android Device
      • Raspberry Pi
    • Monogoto SIM
      • IoT SIM card
      • Embedded SIM
      • eSIM
      • iSIM
        • Murata LBAD0XX1SC
        • Quectel BG770A-SN
      • SGP.32
        • Kigen Pulse
      • Monogoto SIM Tool Kit (MTK)
    • Cellular Identities in Monogoto
    • Coverage Lists
      • Identity B Coverage
      • Identity C Coverage
      • Identity E Coverage
      • Identity F Coverage
      • Identity P Coverage
      • Identity U Coverage
      • NTN Satellite Coverage
      • LP-WAN Coverage
    • Features List
    • Community Forum
  • FAQ
  • Hub
    • Intro
      • Signup
      • Login
      • Logout
      • Users
        • Create a new user
        • Delete a user
        • Manage users
        • User password reset
      • General Elements
    • Dashboards
      • Active SIMs and Data Usage
        • Daily Active Things
        • Daily Data Usage
        • Top Consuming Things
        • Top Profiles in Use
        • Top Groups by Data Usage
        • Top Networks by Data Usage
        • Top Groups by Active Things
        • Top Networks by Active Things
      • Data Flows
        • Data Transfer
        • Top Destinations
        • Breakout
        • Services
        • Protocols
        • TCP Flags
        • Top Things (upload/download)
    • Things
      • Thing details
        • Understanding OPLMN and FPLMN on the Thing details page
      • Quality of Service
        • Thing QoS tests for public connectivity
        • Thing QoS monitoring for private connectivity
      • SMS
        • Incoming SMS
        • Outgoing SMS
        • SMS Monitoring
      • Location Service
      • NetFlow
    • Campaigns
      • Campaigns Table
      • Campaign Details
      • SMS Campaign
    • Private Networks
      • Backhaul
      • Edge
        • Edge Events
          • Time
          • Messages
          • msg-type
          • Node
          • Direction
          • Interface
          • Type
      • Radio
    • Inbox
    • Integrations
      • Slack
      • Zapier
      • Webhook
        • Webhook CDRs
          • Webhook SMS CDR
          • Webhook DATA CDR
      • Email
    • Captures
      • Basics on How to Read a Packet Capture File
    • Orders
      • Create a new order
    • Payments
  • Advanced Console
    • Intro
    • Security
    • Network
      • Create new Network
      • Edit Network Settings
      • Apply Network Settings
      • Delete Network
      • Add Network NAT
      • Edit Network NAT
      • Delete Network NAT
      • Add Network Route
      • Edit Network Route
      • Delete Network Route
      • Add Network VPN
      • Network VPN status
      • Edit Network VPN
      • Delete Network VPN
      • Download Network VPN configuration
      • Reconnect Network VPN
      • Ping Network VPN
      • How Devices in The Same Network Can Communicate with Each Other?
    • Things Groups
      • Create Things Group
      • Assign Things to Group
      • Edit Things Group
      • Delete Things Group
      • Override Roaming Policy
    • Things
      • Define Thing Status
      • Edit Things Details
      • Refresh Connection
    • Alerts
      • Alert Metrics (types)
      • Create New Alert
      • Disable/Enable Alert
      • Edit Alert
      • Delete Alert
    • Global Pools
    • Price Plans
    • Webhooks
      • Outgoing (MO) SMS Webhook
      • Incoming (MT) SMS Webhook
      • Outgoing (MO) Voice Webhook
      • Incoming (MT) Voice Webhook
      • Triggered Alert Webhook
  • Developer
    • API
      • Authentication
      • Things
        • Get Things List
        • Get Thing Information
        • Get Thing State
        • Update Thing State
        • Update Thing Name
        • Update Thing Description
        • Get Thing Data Session Status
        • Get Thing ICCID using IMSI
        • Get Thing Lifetime Data Usage
        • Get Thing Events Logs
        • Ping Thing IP Address
        • Lock Thing to IMEI
        • Download Thing PCAP File
        • Refresh Thing Network Connection
        • Get Things Services Usage Report
      • Things Groups
        • Get Things Group List
        • Move Thing to Different Things Group
        • Get Things Group Information
        • Lock Things Group to IMEI range (TAC)
      • eSIM
        • Get an eSIM
        • Cancel an eSIM
        • Download an eSIM
      • Alerts
        • Get Triggered Alerts
      • SMS
        • Check if MT SMS was Received
        • Send SMS to Thing
      • Pricing
        • Get Pricing Plan Information
      • Get Roaming Policy
    • Cloud Integrations
      • AWS IoT Core
      • Ubidots
  • Private Networks
    • Intro
      • Getting Started
      • Spectrum Allocation
    • Monogoto Edge
      • 4G Edge Components
      • 5G Edge Components
      • Edge NUC
      • Edge API
        • Authentication
        • Get Edge Configuration
        • Get Edge ID
        • Get Edge CID
        • Get MME S6A And AMF AUSF Status
        • Get Radio List
        • Get Subscriber Information
        • Get Subscription Status
        • Patch Subscription Status
        • Get IMSI IP Mapping
        • Patch IMSI IP Mapping
        • Delete IMSI IP Mapping
        • Get PLMN
        • Post PLMN
        • Get Network Operator Name
        • Patch Network Operator Name
        • Get APN
        • Get APN IP Pool Mapping
        • Get CDR Logs
        • Post PING
        • Get iperf
        • Patch iperf
        • Get Speed Test
        • Get Data Speed
        • Get Capture
        • Post Capture
    • eNodeB
      • Airspan AirVelocity 1500
      • Baicells Nova 227
      • Baicells Nova 442i
      • Baicells Neutrino 430
      • Baicells Nova 230i
      • BreezeCOMPACT 1000
      • Foxconn T99B226
      • Ubiik goRAN
      • Ubiik FreeRAN
      • T&W N02008
      • Mosolabs SCE4255W
      • Mosolabs SCO4255P
    • gNodeB
      • Mosolabs SCE5164
      • Baicells Stellar 227
    • CPE & UE
      • Airspan AirSpot 5410
      • Sierra Wireless EM7565
      • DG505G CBRS 5G USB Dongle
      • DG10 CBRS USB Dongle
      • D-Link DWP-1010W CPE
      • D-Link DWM-311-G 5G M2M
      • D-Link G530 Router
      • IPC SCB800 CBRS Camera
      • Telit LM960A9-P
      • Moxa 5G CCG-1510-US-T
      • InHand 5G ODU2000
      • Peplink MAX BR1 Mini 5G
      • T&W 5G Router
      • Telit LM960A18
      • Baicells EG7010C-M11 CPE
      • Baicells EG7035E-M11 CPE
      • Baicells EG8015G-M11 CPE
      • Telrad 9000 CPE
      • SRW620 CPE
      • Amit IDG500-0GT01
      • Jacs TD0231 Router
  • NTN Satellite Networks
    • NTN Satellite Coverage
    • NTN Billing
    • NB-IoT: Signaling NIDD vs IP Connectivity
    • VPNs in NTN
    • UDP Communication in NTN
    • How to Order NTN Developer Kit?
    • NTN Certified Devices
      • NTN Certified Modules
        • Murata LBAD0XX1SC-DM Satellite NTN Network
        • Quectel BG95-S5 Satellite NTN Network
        • Quectel BG770A-SN Satellite NTN Network
        • Quectel CC660D-LS Satellite NTN Network
        • SIMCom 7070G-HP-S Satellite NTN Network
        • Murata ALT1250 Satellite NTN Network
      • NTN Certified Chipsets
  • University
    • AT Commands
      • What AT Commands Should I Use to Debug a Connectivity Issue?
      • How to Send AT Commands to a Teltonika Router?
    • LTE bands
    • RAT Type (Radio Access Technology)
    • Low Power Modes: eDRX & PSM
    • What is MCC/MNC?
    • Glossary
Powered by GitBook
On this page
  • Quick Navigation
  • Prerequisites
  • Getting Started with the SODAQ SARA
  • Install SODAQ SARA board manager
  • Upload Passthrough sketch
  • Establish a connection with the u-blox modem
  • Connect the u-blox modem to Monogoto
  • Build an end-to-end tracking application
  • Prerequisites
  • Install the AllThingsTalk Arduino library
  • Register your device in AllThingsTalk Maker
  • Start tracking your assets
  • Useful Link

Was this helpful?

  1. Getting Started
  2. Device Configurations
  3. IoT Modules
  4. u-blox SARA R4

SODAQ SARA R41XM

Get started with the SODAQ SARA R41XM

Previousu-blox SARA R4NextCellular Devices

Last updated 4 months ago

Was this helpful?

Get started with the SODAQ SARA R410M/R412M SFF or AFF, an Arduino-based development board with an embedded u-blox SARA R41X LTE-M, NB-IoT and GPRS modem. The device comes with an integrated GPS, Accelerometer and Magnetometer.

Quick Navigation

  • Getting Started with the SODAQ SARA

Prerequisites

  • Monogoto SIM

Getting Started with the SODAQ SARA

Install SODAQ SARA board manager

Open up the Arduino IDE and select Arduino > Preferences from the menu bar. Paste the following URL in the field next to Additional Boards Manager URLs:

http://downloads.sodaq.net/package_sodaq_samd_index.json

Go to Tools > Board > Board Manager, search for SODAQ SAMD and install the latest version.

Upload Passthrough sketch

The Passthrough sketch allows you to send AT commands to the u-blox modem.

Start by connecting the LTE antenna

Add the Monogoto SIM

Connect the battery

Connect the SODAQ SARA to your computer using the micro USB port next to the SIM card slot, an LED will light up yellow.

Make sure to connect the USB cable to the micro USB port next to the SIM card slot. When connecting the cable to the second USB port it is not possible to upload the Arduino sketch.

Select the right board in the Arduino IDE via Tools > Board > SODAQ SAMD Boards > SODAQ SARA AFF/SFF

Select the right port via Tools > Port

SODAQ SARA AFF passthrough Arduino Sketch:
// Passthrough Arduino sketch
// Source: https://learn.sodaq.com/Boards/Sara_AFF/Examples/passthrough/

#include <Arduino.h>

#define R4XX // Comment out when you use the u-blox R2XX module

#if defined(ARDUINO_SODAQ_SARA)
#define DEBUG_STREAM SerialUSB
#define MODEM_STREAM Serial1
#define powerPin SARA_ENABLE
#define enablePin SARA_TX_ENABLE

#else
#error "Please select the SODAQ SARA as your board via Tools > Board:"
#endif

#if defined(R4XX)
unsigned long baud = 115200;  //start at 115200 allow the USB port to change the Baudrate
#else
unsigned long baud = 9600;  //start at 9600 allow the USB port to change the Baudrate
#endif

void setup()
{
#ifdef powerPin
  // Turn the nb-iot module on
  pinMode(powerPin, OUTPUT);
  digitalWrite(powerPin, HIGH);
#endif

#ifdef enablePin
  // Set state to active
  pinMode(enablePin, OUTPUT);
  digitalWrite(enablePin, HIGH);
#endif // enablePin

#if defined(R4XX)
    pinMode(SARA_R4XX_TOGGLE, OUTPUT);
    digitalWrite(SARA_R4XX_TOGGLE, LOW);
    delay(2000);
    pinMode(SARA_R4XX_TOGGLE, INPUT);
#endif

  // Start communication
  DEBUG_STREAM.begin(baud);
  MODEM_STREAM.begin(baud);
}

// Forward every message to the other serial
void loop()
{
  while (DEBUG_STREAM.available())
  {
    MODEM_STREAM.write(DEBUG_STREAM.read());
  }

  while (MODEM_STREAM.available())
  {
    DEBUG_STREAM.write(MODEM_STREAM.read());
  }

  // check if the USB virtual serial wants a new baud rate
  // This will be used by the UEUpdater to flash new software
  if (DEBUG_STREAM.baud() != baud) {
    baud = DEBUG_STREAM.baud();
    MODEM_STREAM.begin(baud);
  }
}
SODAQ SARA SFF passthrough Arduino Sketch:
// Passthrough Arduino sketch
// Source: https://learn.sodaq.com/Boards/Sara_SFF/examples/passthrough/

#include <Arduino.h>

#define R4XX // Comment out when you use the u-blox R3XX or R2XX module
//#define N3XX // Uncomment when you use the ublox N3XX module

#define DEBUG_STREAM SerialUSB
#define MODEM_STREAM Serial1

#if defined(R4XX)
unsigned long baud = 115200;  //start at 115200 allow the USB port to change the Baudrate
#elif defined(N3XX)
unsigned long baud = 57600;  //start at 57600 allow the USB port to change the Baudrate
#else
unsigned long baud = 9600;  //start at 9600 allow the USB port to change the Baudrate
#endif

void setup()
{
  // Turn the power to the SARA module on.
  // we have a powerswitch on board to switch the power to the SARA on/of when needed
  // in most applications we keep the power on all the time  
  pinMode(SARA_ENABLE, OUTPUT);  
  digitalWrite(SARA_ENABLE, HIGH);

#if defined(R4XX) || defined(N3XX)
    // Turn the nb-iot module on
    // The R4XX module has an on/off pin. You can toggle this pin or keep it low to
    // switch on the module
    pinMode(SARA_R4XX_TOGGLE, OUTPUT);
    digitalWrite(SARA_R4XX_TOGGLE, LOW);
    delay(2000);
    pinMode(SARA_R4XX_TOGGLE, INPUT);
#endif

  // Start communication
  DEBUG_STREAM.begin(baud);
  MODEM_STREAM.begin(baud);
}

// Forward every message to the other serial
void loop()
{
  while (DEBUG_STREAM.available())
  {
    MODEM_STREAM.write(DEBUG_STREAM.read());
  }

  while (MODEM_STREAM.available())
  {
    DEBUG_STREAM.write(MODEM_STREAM.read());
  }

  // check if the USB virtual serial wants a new baud rate
  // This will be used by the UEUpdater to flash new software
  if (DEBUG_STREAM.baud() != baud) {
    baud = DEBUG_STREAM.baud();
    MODEM_STREAM.begin(baud);
  }
}

Establish a connection with the u-blox modem

Open up the Serial Monitor from the Arduino IDE by clicking the Serial Monitor-button in the top right corner.

Set the baud rate to 115200 and enter AT in the Serial Monitor. If the connection with the u-blox modem has been established, the board will answer with OK.

If you don’t see OK click the reset button on the SODAQ SARA and try again.

Next up, disable PSM (Power Saving Mode) and eDRX (Extended Discontinuous Reception). When these features are enabled the modeqm goes to sleep automatically and stops responding to AT Commands.

Disable PSM:

AT+CPSMS=0

Disable eDRX:

AT+CEDRXS=0

Disable Power saving control:

AT+UPSV=0

Connect the u-blox modem to Monogoto

Visit the u-blox SARA R4 documentation for a detailed guide on connecting the modem to Monogoto.

Build an end-to-end tracking application

Prerequisites

  • Monogoto SIM

Install the AllThingsTalk Arduino library

Open your Arduino IDE and install the AllThingsTalk LTE-M SDK library via Sketch > Include library > Manage Libraries.

Open the sketch GuardAndTrackAssets: File > Examples > AllThingsTalk LTE-M SDK > SDK Examples > GuardAndTrackAssets

Register your device in AllThingsTalk Maker

Click the CONNECT A DEVICE button and select the LTE-M Rapid Development Kit. Skip the step for selecting a NB-IoT/LTE-M network provider.

Click on Settings and Authentication to find your Device ID and Device Token.

In your Arduino sketch click the tab keys.h. Add the authentication credentials and update the APN settings to data.mono.

Upload the sketch to the SODAQ SARA and wait for the onboard LED to turn green.

Did the LED turn green? Congratulations! The device is connected to both Monogoto and AllThingsTalk 🙌

Start tracking your assets

Place your device outside or next to a window so it can receive GPS signals.

Go back to the AllThingsTalk Maker, select your asset and click on the actuator Lock, scroll down to the section State and enter.

{
    "value": "false"
}

Next up, click on the Lock actuator again, scroll down to the section Command and enter:

{
    "value": "true"
}

When shaking the device, an alert is triggered and the device starts sending GPS data regularly. Visit the Debug tab to see the GPS data appear.

Useful Link

/

Guard your valuable assets, get notified if any assets move without your consent and keep track of their real-time GPS location. Source:

/

Create a

Visit to the

Great work! 👏 You managed to build an end-to-end LTE-M application. You can now start playing around with to visualize your GPS data in AllThingsTalk or to create to trigger actions based on sensor data.

Connect the u-blox to Monogoto
Arduino IDE
u-blox SARA R4
AllThingsTalk
SODAQ SARA R412M
R410M
Arduino IDE
Account on AllThingsTalk
free account on AllThingsTalk
AllThingsTalk Maker portal
widgets
rules
AllThingsTalk documentation
u-blox AT commands
u-blox Product page
SODAQ Documentation
SODAQ Shop
Build an end-to-end tracking application
Useful links
SODAQ SARA R412M
R410M
Arduino SARA AFF
Arduino SARA SFF
AllThingsTalk Maker