What does the NB-IoT DevKit Development Kit consist of?

The set was released in early June. He will help you understand the benefits of the NB-IoT Internet of Things network and teach you how to work with it. The kit includes hardware, connectivity, that is, access to the NB-IoT network and access to IoT platforms. The main “feature” of DevKit is a demo firmware that allows you to practice to understand how the system works. This article will take a closer look at DevKit and its features.

Who needs this?

When we started to deploy the NB-IoT network (you can read more about the NB-IoT network here), various questions rained down on us from all sides. Large manufacturers that have been working in the M2M device market for many years, startups, novice developers and just amateurs, were interested in network operating modes, data transfer protocols, even radio control of AT commands. We were asked what frequencies (band) are used, how the power save mode works, how the device and the network agree on the appropriate timers, how, using the UDP transport layer protocol, to achieve guaranteed message delivery, how to set APN and select a specific band (frequency range). And many other questions.

During the tests, we also noticed that many devices are not adapted for operation in the NB-IoT network and as a result do not work correctly. For example, the use of a data transfer protocol with a transport layer of TCP leads to a high volume of transmitted traffic, as well as to difficulties when working in difficult radio conditions. Another common problem is the use of the radio module in the default mode, in which the module itself turns on eDRX: this misleads the user, since he cannot receive data at any time.

Universities specializing in telecommunications began to contact us, who are interested in learning LPWAN technologies on real devices, including NB-IoT, and amateur developers who want to experiment and create their own IoT solution for a smart home or even a smart city.

We decided that the best way to answer all these questions is to create a development kit on which you can learn to work with the Internet of things network as quickly as possible.

What does the kit consist of?

We made a decision with which you can immediately start working without purchasing anything additional. As mentioned above, the kit includes hardware, connectivity, that is, access to the NB-IoT network, and access to IoT platforms.

The hardware includes the Ublox SARA-R410 radio module, the STM32L152RE microcontroller, cables, antennas and a programmer. An accelerometer and a temperature sensor are installed on the main board. The expansion board in the Arduino-shield form factor contains a GNSS module.

The network identification module is included in the basic set and is designed as a NB-IoT SIM chip with unlimited traffic for a year. The user does not need to spend time connecting a SIM card and choosing a tariff, in addition, the SIM chip provides greater reliability: it is not subject to temperature changes, humidity and vibration. Also, with the kit, the user receives a ready-made account on the IoT platform with customized widgets and the ability to flexibly configure widgets on their own – you do not need to additionally receive and pay an account.

Also, upon request, it is possible to activate the NIDD functionality and the ability to work through the SCEF (Service Capability Exposure Function) node of the NB-IoT MTS network. The service removes the need for device identification and authentication from the developer and provides the ability for client application servers (Application Server) to receive data and manage devices through a single API. In Russia, no other Internet of Things operator provides such an opportunity.

Demo firmware features

The demo firmware contains a functional menu that allows beginners to get started right away. It is enough to connect the board and get registration data. The firmware implements a functional menu, access to which we get by connecting through any terminal program. You can use the familiar PuTTY. We also recommend a convenient and free utility from Ublox: m-center

The menu looks like this:

*** Welcome to MTS NB-IoT Development Kit service menu ***
Firmware version: 2.3 beta 2, 05/28/2020

Current settings found in EEPROM:

Target IP: 195.34.49.22
Target port: 6683
Target URL: / api / v1 / devkitNIDDtest03 / telemetry
NIDD APN: devkit.nidd
Use NIDD for telemetry: 1
Board mode on startup: service menu
Telemetry interval
(in logger mode): 1000 ms
GNSS privacy mode: 0

Type in a function number from a list below and press enter.

Target server setup:
1 – set the URL of the resource JSON data will be transmitted to
2 – set the IP address
3 – set the port
4 – set an APN for NIDD access or turn NIDD mode ON or OFF
System functions:
5 – force send telemetry packet
6 – wait for incoming NIDD data during specified timeout
7 – enter direct AT-command mode
8 – enter true direct mode to access the RF module
CAUTION: to exit this mode you will have to reboot the board physically
9 – show ICCID, IMEI, IMSI and MCU serial number
10 – show network information
11 – set telemetry transmission interval
12 – set GNSS privacy mode
(hide actual location data when transmitting on server)
13 – set firmware startup mode (setup or logger)
14 – read on-board sensors and try to acquire GNSS data
15 – reboot MCU
16 – reboot RF module
17 – factory setup & test
(do not use this unless you really know what you want)

The first four menu items allow you to configure the platform connection parameters (URI-path, IP, port, NIDD parameters). The fifth item allows you to send a packet containing data from sensors on the board.

An example of what the result of sending a packet over the CoAP protocol looks like:

Using IP method.
Sending data to iotsandbox.mts.ru:6683/api/v1/devkitNIDDtest03/telemetry
Telemetry:
{‘interface’: ‘telemetry’, ‘ICCID’: ‘89701012417915117807’, ‘Tamb_degC’: 24, ‘aX’: – 14, ‘aY’: 23, ‘aZ’: 244, ‘RSSI_dBm’: – 81, ‘ latitude ‘: 55.768848,’ longitude ‘: 37.715088,’ GNSS_data_valid ‘: 1}
(184 bytes)
Raw CoAP data (225 bytes):
5102000000B36170690276310D036465766B69744E4944447465737430330974656C656D65747279FF7B27696E74657266616365273A2774656C656D65747279272C20274943434944273A273839373031303132343137393135313137383037272C202754616D625F64656743273A32342C20276158273A2D31342C20276159273A32332C2027615A273A3234342C2027525353495F64426D273A2D38312C20276C61746974756465273A35352E3736383834382C20276C6F6E676974756465273A33372E3731353038382C2027474E53535F646174615F76616C6964273A317D
Server response code: 2.03, response time = 664 ms.
Server response dump:
5143067000

We see the transmitted data on the platform:

Menu item 14 allows you to read data from sensors on the main board and on the expansion board, here is an example of what we will see:

On-board sensors data:
temperature: 23

accelerometer: X = -3 Y = 4 Z = 249
Accelerometer signature value is correct.

Testing GNSS option …
GNSS string:
$ GNGLL, 5546.12120, N, 03742.89412, E, 133220.00, A, D * 75
Parsed data:
latitude = 55.768687
longitude = 37.714902

You can read the identifiers of the radio module and microcontroller using item 7 of the menu. In this case, the answer will be:

Board identification data
SIM card ICCID: 89701012417915117807
AT + CCID

+ CCID: 89701012417915117807

Ok
RF module IMEI: 359215103260015
AT + CGSN

359215103260015

Ok
IMSI:
AT + CIMI

250011791511780

Ok
MCU serial number:
0x393533307473832200

Using menu item 10, you can read the NB-IoT network parameters, here is an example output:

RSSI = -75 dBm (valid range is -111 to -51 dBm)
SNR = 22 dB
RSRP = -83 dBm (valid range is -141 to -44 dBm)
Cell ID = 753621
EARFCN = 1711

You can also switch to the direct control mode of the radio module using AT commands using menu item 8. This function sets the Development kit to the debug board mode of the radio module. Below is an example of direct control of a radio module with commands for exchanging data between a device and a server in NIDD mode:

Entering true direct mode.
From now on everything you type into a terminal will be transferred to the RF module as is
(and similarly in reverse direction).
NOTICE: No special commands supported here, for nothing is between you and the RF module.
YOU NEED TO REBOOT THE BOARD PHYSICALLY TO EXIT THIS MODE.

at + cereg?
+ CEREG: 0.1
Ok

AT + COPS?
+ COPS: 0,0, “MTS RUS MTS RUS”, 9
Ok

at + cgdcont?
+ CGDCONT: 1, “NONIP”, “devkit.nidd”, “0.0.0.0”, 0,0,0,0
Ok

AT + CRTDCP = 1
Ok

AT + CSODCP = 1.16, “{‘test’: ‘hello’}”
Ok

+ CRTDCP: 1.5, “Hi hi”

The demo firmware menu also allows you to enable the continuous sending of data from sensors with a given frequency, implements a reverse data channel and other functions.

For “advanced” users, the firmware source codes are open, you can evaluate the logic of the device at the code level, make changes and experiment. From the cloud platform, tools for processing data are available: widgets, control panels, Integration tools that allow you to receive data in any format in UDP, TCP and Non-IP protocols. The “Data Converter” tool allows you to bring the resulting data stream to an understandable platform.

DevKit and Arduino

Despite the critical attitude of some professionals towards Arduino, which indicate non-optimal code and that the libraries were not written by professional developers, we initially wanted to make DevKit compatible with Arduino. Arduino IDE is popular among amateur developers, and can also be used in educational programs by universities.

DevKit is fully compatible with the Arduino R3 in spirit, architecture, and connectors. All related support files were developed for the device, so it is installed in the Arduino IDE in a regular way.

The package for the Arduino IDE includes the necessary tools and libraries, as well as a number of examples with source texts. Software compatibility with other Arduino boards based on STM32 allows you to use the libraries written for them, as well as download working sketches with virtually no changes. To program DevKit from the Arduino IDE, you must install the STMCubeProgrammer software, which can be downloaded from the STM website. Our developers continue to populate the Arduino package with new libraries and examples.

As a simple example of working with the Arduino IDE, consider loading the Blink example (LED blinking). In the image below you can see the result of downloading and compiling this sketch from the File menu – Examples – 01.Basics

Supported Integrated Development Environments

The development of the demo firmware was carried out in the integrated environment Em :: Bitz. The sample code is designed to compile with GCC. Any IDE that supports the STM32L15x family of microcontrollers is suitable for developing custom code. For example, Arduino IDE, IAR Embedded Workbench, Keil uVision MDK ARM and others.

Functionality extension

Functionality can be expanded both with the help of shields, and by connecting any discrete sensors.

Installing a GNSS shield turns DevKit into a GPS / GLONASS tracker.

Add another shield and get the additional ability to write data to the memory card and real-time clock.

You can connect a special shield and add Ethernet functionality and a memory card.

By connecting wind speed and direction sensors, we get a NB-IoT weather station

We connect an ultrasonic sensor and a pump control relay – we get an automatic control of the liquid level in the tank.

In the next article, we will show in practice how to assemble an Internet of Things device based on NB-IoT DevKit. You can order NB-IoT Development Kit right now on our website.

Authors:
IoT Network Planning Group Senior Manager Vitaliy Bachuk
MTS Leading Expert Viktor Luchansky
IoT Network Planning Team Leader Andrey Plavich

Similar Posts

Leave a Reply