ubee

Overview

Passthrough

With the passthrough sketch you can send AT commands (NB-IoT) to the ublox module on the ubee.

Follow the steps on the Mbili or Autonomo support pages to install the required board files.

This example doesn’t require any additional libraries. Simply plug the bee into your Mbili or Autonomo and upload the example code.

#include <Arduino.h>

#if defined(ARDUINO_SODAQ_AUTONOMO)
/* SODAQ AUTONOMO + SODAQ NB-IoT Bee */
#define DEBUG_STREAM SerialUSB
#define MODEM_STREAM Serial1
#define powerPin BEE_VCC
#define enablePin BEEDTR

#elif defined(ARDUINO_AVR_SODAQ_MBILI)
/* SODAQ MBILI + SODAQ NB-IoT Bee */
#define DEBUG_STREAM Serial
#define MODEM_STREAM Serial1
#define enablePin BEEDTR

#else
#error "Please use one of the listed boards or add your board."
#endif

unsigned long baud = 9600;

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

  // 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());
  }
}

Library

Click on Sketch > Include Libraries > Manage Libraries…

Search for Sodaq_nbIOT or Sodaq_3Gbee(2G/GPRS and 3G) depending on your module.
Click on the bar to show the install button and install the library.

Click on File > Examples > [library name] to see more example codes.

Schematics

Revision 1