Connecting the nRF9160 DK to the A1 Digital IoT Platform
In this tutorial, you will learn how to connect your nRF9160 DK to the A1 Digital IoT Platform with LWM2M using a precompiled firmware.
- nRF9160 DK
A1 Digital NB-IoT nano SIM card
Software applications and online services
- A1 Digital IoT Platform
- nRF Connect for Deskop
- Precompiled firmware for nRF9160 DK
Open an editor and create a new CSV text file with the following contents:
ID;IDTYPE;CREDENTIALS;NAME;TYPE;SHELL;c8y_GenericUi;com_cumulocity_model_Agent;endpoint id;lwm2m server uri;securityMode
Where ############### is the IMEI number of your nRF9160 DK. You can find the IMEI printed on the label on the bottom side of your nRF9160 DK.
Please alter the CREDENTIALS fields to a new password that cannot be easily guessed by a potential attacker. The content of this field is not used by the LWM2M feature. However, this field is still mandatory. Accessing Cumulocity IoT devices usually requires a password (the value of the “Credentials” field in the CSV file) by the inventory. However, the LWM2M agent has its own way of authenticating devices and hence the "Credentials" field is not used by the LWM2M agent but is used by the platform as a mandatory parameter. The credentials must contain a minimum of 12 characters with an uppercase letter, a lowercase letter, a digit, and a special character.
More details about device registration can be found in the official platform documentation.
Get a demo tenant on the A1 Digital IoT Platform. For more details see the following tutorial.
Access the A1 Digital IoT Platform via the "Acces Demo" button in your confirmation email.
Open the "Device management" application:
Select "Registration" from the "Devices" menu:
Press "Register device" from the center of the screen:
Select "Bulk device registration" and press "Select file to upload" and choose the file you created at the beginning of this tutorial.
After reloading the page you will see your newly created device showing up in the list of all devices:
There is a possibility to remove the newly created device by selecting "Delete device" on the right side of "All devices" table. In that case please do not forget to select the option "Also delete associated device owner device_nrf-###############" in the next "Device delete" pop-up window. Otherwise, you will not be able to re-register your device with the same credentials.
Get and install the latest version of nRF Connect for Desktop from the Nordic Semiconductors website.
Insert the A1 Digital nano SIM card in the nRF9160 DK.
Activate the A1 Digital nano SIM card. For more details see the following tutorial.
Connect the nRF9160 DK to your PC using the USB cable and turn the device on using the onboard switch.
Download our precompiled "A1 Digital LWM2M Client" application as a .hex file: a1d_lwm2m_iotstg.hex
Open "nRF Connect" and select the "Programmer":
Select the nRF9160 DK from the dropdown menu:
Select "Add HEX file" and pick the previously downloaded .hex file.
Press "Erase & write" to flash the .hex file.
You can use the LTE Link Monitor of the nRF Connect suite or any other Serial Port Monitor (e.g. TeraTerm or GTKTerm) to evaluate the output:
It works if it runs the "A1 Digital LWM2M Client" application and displays "Registration complete".
You can now watch the LWM2M events incoming on the A1 Digital IoT Platform.
Select the device in the "Device Management" application. The "Device Status" is now "online".
Select "Events" in the menu to see the LWM2M messages that come from the nRF9160DK to the A1 Digital IoT Platform:
Congratulations! You have just connected the nRF9160 DK to the A1 Digital IoT Platform. Learn how to use the platform and display data and send commands to the device in the next tutorial.