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.
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:
Please download the zip file below and extract it’s contents. We shall use the files later on.
To self generate the required files please send the following AT commands to the module:
- AT+QLWM2M=? (will display the available commands)
- AT+QLWM2M=”select”,0 (select Leshan test server for now; this will help generate the files you need)
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:
5.1 Non Secure Mode
Set the client not use the security mode; that is:
6.0 Enable Debug Output
The logs are outputted to the serial port labeled as COM (DEBUG) on the LTE OPEN EVB KIT.
- You need to connect a RS232 to USB cable and open PUTTY terminal. Set the bad rate to 115200 (see image below).
- 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://126.96.36.199:8080/#/clients