Orange NB-IoT Rapid Development Kit

This article explains how you can connect your Orange NB-IoT Rapid Development Kit to AllThingsTalk Maker, and run the first example.

You can buy Orange NB-IoT Rapid Development Kit here.

What you will need

Assemble your hardware

  • Insert the MicroSIM card in the NB-IoT radio module as indicated on the image below

Insert the MicroSIM in the NB-IoT Radio Module

  • Attach NB-IoT radio module & antenna (without the range is very limited). If attached properly you will notice that one UBee pin VBAT 2G/3G is not inserted in the MBili Bee Socket
  • Connect the Sodaq Mbili to your computer over USB
  • Make sure the Mbili board is powered up by flipping the power switch SW2 to ON

SW2 switch on Mobile board

Write your first program

Load the example sketch

  • Open your Arduino IDE
  • Go to Tools > Board and select the SODAQ Mbili board as indicated on the image below
  • Under Tools > Port select the USB port automatically assigned by your computer to which your device is connected

Choose Sodaq Mbili board and port

  • In your Arduino IDE, go to and open File > Examples > arduino-nbiot-sdk-master > counter.

Setup device credentials

  • Browse and open the keys.h file located in the arduino-nbiot-sdk-master Library folder, by default you can find it in:
    • Mydocuments/Arduino/Libraries/Arduino-nbiot-sdk-master folder for Windows
    • Documents/Arduino/Libraries/Arduino-nbiot-sdk-master folder for MacOS
  • Change the DeviceID and DeviceToken values with the values that can be found under Device Settings > Authentication section of your device in the Maker Application. In the keys.h file you will notice that the APN is already pre configured and should not be changed.

AllThingsTalk Device ID and Token

/****
* Enter your AllThingsTalk device credentials below
*/
#ifndef KEYS_h
#define KEYS_h
const char* DEVICE_ID = "LA1Sn4yuYx16YBAABqQQnSan";
const char* DEVICE_TOKEN = "maker:4VyRL0fr22kOm01qFyHqw3gE91MahfK1Q3zEfRg0";
const char* APN = "starter.att.iot";
#endif

 

Run the example

Simply hit the upload icon in the Arduino IDE. This will save the sketch, compile it and upload it to your Arduino.

Run example sketch

NOTE: After uploading, you might need to flip the power switch SW2 on the Sodaq Mbili OFF and back ON to make sure the Mbili reboots and starts up our sketch.

Now your device should increase the value of a counter and send each 10 seconds its state to AllThingsTalk. This will be represented by an incrementing Asset “Counter” in the Maker application.

On first use it can take some time (up to 1,5min) to set up the NB-IoT connection.

Alternatively, you can also open the Tools > Serial monitor of the Arduino IDE. This can be very useful when debugging your own sketches. Make sure you select the correct COM port to listen (under Tools > Port ). When the monitor is open, make sure the Baud rate is set to 57600*

More examples

As a next step, please try these basic experiments connecting the Grove sensors from the kit

Notes

The SDK supports either CBOR or our custom ABCL language file to code and decode your messages. You can add multiple sensor values into 1 payload. Please read how to work with binary payloads for more information about CBOR and ABCL language files. Below is an example how to send a simple boolean value in a binary format.