Skip to contentSkip to navigationSkip to topbar
Rate this page:
On this page

Narrowband: The Breakout SDK for Massive IoT


The Breakout SDK for Massive IoT enables developers to exchange data between low-powered devices and their services running in the cloud. The SDK abstracts complex elements of Narrowband IoT (NB-IoT) deployment and removes development barriers by handling tasks such as network registration on your behalf.

The SDK is built to be cross-platform. It currently supports three modems: the u-blox SARA-R410 and SARA-N410(link takes you to an external page) and the Quectel BG96(link takes you to an external page) . The SDK supports sending data over TCP and UDP, and using the modems' internal MQTT and TLS implementations.


Download the SDK

download-the-sdk page anchor

The SDK repository(link takes you to an external page) can be downloaded from GitHub.


Using the Massive IoT SDK on your device

using-the-massive-iot-sdk-on-your-device page anchor

First, a few platform-specific functions need to be implemented as is described in the porting section of the Read Me(link takes you to an external page). After that you can write the code in either blocking or non-blocking style (see the example).

If you are working in multithreaded environment, please note that the Breakout SDK is not thread-safe, so it should either be owned by a single thread, or protected by a mutex.

Working with Massive SDK - BG96

working-with-massive-sdk---bg96 page anchor

_32
#include "modem/OwlModemBG96"
_32
_32
OwlModemBG96 *modem;
_32
int socket;
_32
_32
void init(MySerialInterface* interface) {
_32
modem = new OwlModemBG96(interface)l
_32
_32
modem->initModem();
_32
modem->waitForNetworkRegistration();
_32
_32
modem->mqtt.openConnection("my.mqtt.broker", 1883);
_32
modem->mqtt.login("BG96 Device", nullptr, nullptr);
_32
modem->mqtt.subscribe("some_topic", 1);
_32
}
_32
_32
void on_message(str topic, str message) {
_32
// process incoming message
_32
}
_32
_32
void do_work() {
_32
str buf;
_32
buf.s = new char[512];
_32
buf.len = 0;
_32
for (;;) {
_32
// publish data
_32
if (should_send) {
_32
modem->mqtt.publish("another_topic",
_32
{.s = ..., .len = ...});
_32
}
_32
}
_32
}

Working with Massive SDK - SARA-R410/SARA-N10

working-with-massive-sdk---sara-r410sara-n10 page anchor

_33
#include "modem/OwlModemRN4"
_33
_33
OwlModemRN4 *modem;
_33
int socket;
_33
_33
void init(MySerialInterface* interface) {
_33
modem = new OwlModemRN4(interface)l
_33
_33
modem->initModem();
_33
modem->waitForNetworkRegistration("test");
_33
_33
modem->socket.open(AT_USO_Protocol__UDP, OUT_PORT, &socket);
_33
}
_33
_33
void do_work() {
_33
str buf;
_33
buf.s = new char[512];
_33
buf.len = 0;
_33
for (;;) {
_33
// receive part
_33
modem->socket.receiveUDP(socket, 512, &buf, 512);
_33
if (buf.len != 0) {
_33
// received data, process it
_33
}
_33
_33
// transmit part
_33
if (should_send) {
_33
int sent;
_33
modem->socket.sendUDP(socket, {.s = ..., .len = ...}, &sent);
_33
}
_33
}
_33
}
_33
}


Rate this page: