BG96 LwM2M Client Setup

1.0 Overview

This guide is a step to step guide on how to configure the LwM2M client, load the files on the file system and connect to a LwM2M server. For the shake of simplicity we shall connect using a non secure connection.

Faqs

There is a command that allows me to look up the options of the settings? For example, what does the command “select”,(0-3) provides? I couldn’t do a command something like “AT+QLWM2M?”

The AT+QLWM2M? will list all the available commands for LwM2M. For example lets take the command: +QLWM2M: “bootstrap”,(0-4)[,<instance>] on page 18 from LwM2M User Guide. Looking at page 19-20 category is 0-4 and then the instance. Lets say that you want to set the LwM2M registration or bootstrap server address and port you shall send the following command: 

AT+QLWM2M="bootstrap",1,"coap://13.237.19.148:5683"

2.0 Prerequisites

Please download the zip file below and extract it’s contents. We shall use the files later on.

Network OperatorTelstra
APNtelstra.internet
Leshan Server http://13.237.19.148:8080
Coap Port5683

To self generate the required files please send the following AT commands to the module:

  1. AT+QLWM2M=? (will display the available commands)
  2. AT+QLWM2M=”select”,0 (select Leshan test server for now; this will help generate the files you need)
  3. AT+QLWM2M=”qcli_en”,1
  4. AT+QLWM2M=”enable”,1
  5. AT+QLWM2M=”reset”,1

Reboot the module and check that the files have been generated in datatx folder. Also verify tha you are able to see the debug messages related to LwM2M.

3.0 QEFS Explorer

Open the QEFS Explorer program and connect to the file system of the module. Go to the /datatx folder.

4.0 Load the configuration files

The LwM2M client uses a number of files in order to connect and configure the endpoints. Place the files we have provided in section 2.0 Prerequisites in the folder /datatx.

5.0 LwM2M Client Setup

To enable the LwM2M client to start automatically:

AT+QLWM2M="enable",1

5.1 Non Secure Mode

Set the client not use the security mode; that is:

AT+QLWM2M="bootstrap",4,3

6.0 Enable Debug Output

The logs are outputted to the serial port labeled as COM (DEBUG) on the LTE OPEN EVB KIT.

  1. You need to connect a RS232 to USB cable and open PUTTY terminal. Set the bad rate to 115200 (see image below).
  2. Add the qcli_config file in the datatx directory and reboot the module. This will enable the debug.

7.0 Connect to the LwM2M Server

Reboot the module and at the COM Debug port you shall see the following output:

At this time you shall see your device connected as a client on the server http://13.237.19.148:8080/#/clients