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.

 * SODAQ UBEE - Serial Passthrough
 * This sketch is tested with the UBEE with the N2 and the R4 module in combination with a SODAQ Autonomo and SODAQ Mbili
 * The UBEE will work on every board with a (x)bee pinout.
 * The Mbili does not wok with the R4 module, it can't handle the fast baudrate.
 * If you have questions about this sketch you can ask them on forum.sodaq.com
#include <Arduino.h>

// #define R4XX // Uncomment when you use the ublox R4XX module

#define DEBUG_STREAM SerialUSB
#define MODEM_STREAM Serial1
#define powerPin BEE_VCC
#define enablePin BEEDTR
#define powerTogglePin BEERTS

#define DEBUG_STREAM Serial
#define MODEM_STREAM Serial1
#define powerPin 20
#define enablePin BEEDTR
#define powerTogglePin BEERTS

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

#ifdef R4XX
unsigned long baud = 115200;  //start at 115200 allow the USB port to change the Baudrate
unsigned long baud = 9600;  //start at 9600 allow the USB port to change the Baudrate

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

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

#ifdef R4XX
    // The R4XX module has an on/off pin. 
    // You can toggle this pin or keep it low to switch on the module.
    pinMode(powerTogglePin, OUTPUT);
    digitalWrite(powerTogglePin, LOW);


  // Start communication


// Forward every message to the other serial
void loop() 
  while (DEBUG_STREAM.available())

  while (MODEM_STREAM.available())

Note: The Mbili can not handle the high baudrate of the R4 module.


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.


Revision 1


Firmware updates

Ubees with SARA N2 modules can be updated through the serial interface.
Note: You need a board who can handle the 115200 baudrate.

Ubees with SARA R4 modules can be updated with soldering an usb cable to the usb pins and turning the module on.

All other Ubees shouldn’t require an firmware update.