Quectel EC2xEG9xEG2x-G Series LwM2M Application Note V1.0
Quectel EC2xEG9xEG2x-G Series LwM2M Application Note V1.0
Version: 1.0
Date: 2020-10-12
Status: Released
www.quectel.com
LTE Standard Module Series
EC2x&EG9x&EG2x-G Series LwM2M Application Note
Our aim is to provide customers with timely and comprehensive service. For any assistance,
please contact our company headquarters:
General Notes
Quectel offers the information as a service to its customers. The information provided is based upon
customers’ requirements. Quectel makes every effort to ensure the quality of the information it makes
available. Quectel does not make any warranty as to the information contained herein, and does not
accept any liability for any injury, loss or damage of any kind incurred by use of or reliance upon the
information. All information supplied herein is subject to change without prior notice.
Disclaimer
While Quectel has made efforts to ensure that the functions and features under development are free
from errors, it is possible that these functions and features could contain errors, inaccuracies and
omissions. Unless otherwise provided by valid agreement, Quectel makes no warranties of any kind,
implied or express, with respect to the use of features and functions under development. To the maximum
extent permitted by law, Quectel excludes all liability for any loss or damage suffered in connection with
the use of the functions and features under development, regardless of whether such loss or damage
may have been foreseeable.
Duty of Confidentiality
The Receiving Party shall keep confidential all documentation and information provided by Quectel,
except when the specific permission has been granted by Quectel. The Receiving Party shall not access
or use Quectel’s documentation and information for any purpose except as expressly provided herein.
Furthermore, the Receiving Party shall not disclose any of the Quectel's documentation and information
to any third party without the prior written consent by Quectel. For any noncompliance to the above
requirements, unauthorized use, or other illegal or malicious use of the documentation and information,
Quectel will reserve the right to take legal action.
EC2x&EG9x&EG2x-G_Series_LwM2M_Application_Note 1 / 23
LTE Standard Module Series
EC2x&EG9x&EG2x-G Series LwM2M Application Note
Copyright
The information contained here is proprietary technical information of Quectel Wireless Solutions Co., Ltd.
Transmitting, reproducing, disseminating and editing this document as well as using the content without
permission are forbidden. Offenders will be held liable for payment of damages. All rights are reserved in
the event of a patent grant or registration of a utility model or design.
Copyright © Quectel Wireless Solutions Co., Ltd. 2020. All rights reserved.
EC2x&EG9x&EG2x-G_Series_LwM2M_Application_Note 2 / 23
LTE Standard Module Series
EC2x&EG9x&EG2x-G Series LwM2M Application Note
Revision History
EC2x&EG9x&EG2x-G_Series_LwM2M_Application_Note 3 / 23
LTE Standard Module Series
EC2x&EG9x&EG2x-G Series LwM2M Application Note
Contents
1 Introduction ......................................................................................................................................... 6
1.1. Applicable Modules .................................................................................................................... 6
4 Examples ........................................................................................................................................... 20
4.1. Login to the LwM2M Server ..................................................................................................... 20
5 Appendix A References.................................................................................................................... 23
EC2x&EG9x&EG2x-G_Series_LwM2M_Application_Note 4 / 23
LTE Standard Module Series
EC2x&EG9x&EG2x-G Series LwM2M Application Note
Table Index
EC2x&EG9x&EG2x-G_Series_LwM2M_Application_Note 5 / 23
LTE Standard Module Series
EC2x&EG9x&EG2x-G Series LwM2M Application Note
1 Introduction
OMA Lightweight M2M (LwM2M) is a device management protocol designed for sensor networks and the
demands of a machine-to-machine (M2M) environment. The LwM2M protocol, designed for remote
management of M2M devices and related service enablement, features a modern architectural design
based on REST, defines an extensible resource and data model and builds on an efficient secure data
transfer standard called the Constrained Application Protocol (CoAP).
This document mainly introduces how to use the LwM2M feature with the following Quectel LTE standard
modules through AT commands.
EC21 series
EC20 R2.1
EG91 series
EG9x series
EG95 series
EG21-G
EG2x-G
EG25-G
EC2x&EG9x&EG2x-G_Series_LwM2M_Application_Note 6 / 23
LTE Standard Module Series
EC2x&EG9x&EG2x-G Series LwM2M Application Note
2.1.1. Definitions
The AT or at prefix must be added at the beginning of each command line. Entering <CR> will terminate a
command line. Commands are usually followed by a response that includes
<CR><LF><response><CR><LF>. Throughout this document, only the response <response> will be
presented, <CR><LF> are omitted intentionally.
EC2x&EG9x&EG2x-G_Series_LwM2M_Application_Note 7 / 23
LTE Standard Module Series
EC2x&EG9x&EG2x-G Series LwM2M Application Note
OK
Write Command Response
Read/configure the LwM2M If the optional parameters are omitted, query the current
server property configuration:
AT+QLWCFG="security"[,<serv +QLWCFG: "security",<serverID>,<SSID>,<server_addr>,<boo
erID>[,<SSID>,<server_addr>,< tstrap>,<security_mode>
bootstrap>,<security_mode>[,< …
pskID>,<psk_key>]]]
OK
EC2x&EG9x&EG2x-G_Series_LwM2M_Application_Note 8 / 23
LTE Standard Module Series
EC2x&EG9x&EG2x-G Series LwM2M Application Note
EC2x&EG9x&EG2x-G_Series_LwM2M_Application_Note 9 / 23
LTE Standard Module Series
EC2x&EG9x&EG2x-G Series LwM2M Application Note
Or
ERROR
Write Command Response
Read/configure the startup mode If the optional parameter is omitted, query the current configuration:
of LwM2M client +QLWCFG: "startup",<auto_startup>
AT+QLWCFG="startup"[,<auto_
startup>] OK
OK
EC2x&EG9x&EG2x-G_Series_LwM2M_Application_Note 10 / 23
LTE Standard Module Series
EC2x&EG9x&EG2x-G Series LwM2M Application Note
<upgrade_time>]]]]]]]]
If the optional parameters are specified, configure host device
information:
OK
Or
ERROR
Execution Command Response
Erase LwM2M client running OK
record Or
AT+QLWCFG="reset" ERROR
Write Command Response
Read/configure the net type of If the optional parameter is omitted, query the current configuration:
LwM2M client +QLWCFG: "nettype",<net_type>
AT+QLWCFG="nettype"[,<net_t
ype>] OK
OK
EC2x&EG9x&EG2x-G_Series_LwM2M_Application_Note 11 / 23
LTE Standard Module Series
EC2x&EG9x&EG2x-G Series LwM2M Application Note
Or
ERROR
Maximum Response Time /
The commands take effect immediately.
Characteristics The configurations will be saved automatically while the <net_t
ype> will not be saved.
Parameter
EC2x&EG9x&EG2x-G_Series_LwM2M_Application_Note 12 / 23
LTE Standard Module Series
EC2x&EG9x&EG2x-G Series LwM2M Application Note
EC2x&EG9x&EG2x-G_Series_LwM2M_Application_Note 13 / 23
LTE Standard Module Series
EC2x&EG9x&EG2x-G Series LwM2M Application Note
Parameter
EC2x&EG9x&EG2x-G_Series_LwM2M_Application_Note 14 / 23
LTE Standard Module Series
EC2x&EG9x&EG2x-G Series LwM2M Application Note
OK
Or
ERROR
Parameter
EC2x&EG9x&EG2x-G_Series_LwM2M_Application_Note 15 / 23
LTE Standard Module Series
EC2x&EG9x&EG2x-G Series LwM2M Application Note
The activation result of PDP. The PDP should be activated before sending register request to the LwM2M
server.
Parameter
The initialization result of connection between client and the LwM2M server.
Parameter
EC2x&EG9x&EG2x-G_Series_LwM2M_Application_Note 16 / 23
LTE Standard Module Series
EC2x&EG9x&EG2x-G Series LwM2M Application Note
This URC is reported to indicate the DTLS handshake result if the encryption method is used.
Parameter
EC2x&EG9x&EG2x-G_Series_LwM2M_Application_Note 17 / 23
LTE Standard Module Series
EC2x&EG9x&EG2x-G Series LwM2M Application Note
Parameter
This URC will be reported when the client is registering on the LwM2M server.
This URC is reported to indicate the registration result after sending the register request to the LwM2M
server.
Parameter
EC2x&EG9x&EG2x-G_Series_LwM2M_Application_Note 18 / 23
LTE Standard Module Series
EC2x&EG9x&EG2x-G Series LwM2M Application Note
"successfully"
"failed"
<SSID> Integer type. Short server ID.
0 All servers
Others Specified servers
This URC is reported to indicate the update result after sending the update request to the LwM2M server.
Parameter
This URC is reported to indicate the deregistration result after sending deregister request to the LwM2M
server.
Parameter
EC2x&EG9x&EG2x-G_Series_LwM2M_Application_Note 19 / 23
LTE Standard Module Series
EC2x&EG9x&EG2x-G Series LwM2M Application Note
4 Examples
This chapter gives the examples to explain how to use LwM2M related AT commands.
AT+QLWCFG=?
+QLWCFG: "security",(0-3),(1-65535),<server_addr>,(0,1),(0,3),<pskID>,<psk_key>
+QLWCFG: "server",(0-3),(1-86400),(1-86400),(1-86400),(1-86400),(0,1),("U","UQ","S","SQ","US""U
QS")
+QLWCFG: "epname/mode",(3,6,7,8)
+QLWCFG: "urc",(0,1)
+QLWCFG: "startup",(0,1)
+QLWCFG: "fota",(0,1),(0,1)
+QLWCFG: "hostdevice",(0,1),<deviceID>,<manufacturer>,<model>,<sw_version>,<fw_version>,
<hw_version>,<upgrade_time>
+QLWCFG: "reset"
+QLWCFG: "nettype",(0-2)
+QLWCFG: "maxreconntime",(1-86400),(2-86400),(0-86400)
+QLWCFG: "apnretry",(0,1),(0-16),(0-86400)
OK
AT+QLWCFG="security",0,100,"coaps://InteropBootstrap.dm.iot.att.com:5694",1,0,"urn:imei:8644
30010001095","313233343536"
OK
AT+QLWCFG="security"
+QLWCFG: "security",0,100,"coaps://InteropBootstrap.dm.iot.att.com:5694",1,0
OK
AT+QLWCFG="epname/mode",3
OK
AT+QLWCFG="epname/mode"
+QLWCFG: "epname/mode",3
OK
AT+QLWCFG="urc",1
EC2x&EG9x&EG2x-G_Series_LwM2M_Application_Note 20 / 23
LTE Standard Module Series
EC2x&EG9x&EG2x-G Series LwM2M Application Note
OK
AT+QLWCFG="urc"
+QLWCFG: "urc",1
OK
AT+QLWCFG="startup",1
OK
AT+QLWCFG="startup"
+QLWCFG: "startup",1
OK
AT+QLWCFG="fota",1,1
OK
AT+QLWCFG="fota"
+QLWCFG: "fota",1,1
OK
AT+QLWCFG="hostdevice",0,"HUID0","HMAN0","HMOD0","HSW0" //Configure host device
information if the network is not
Verizon.
OK
AT+QLWCFG="hostdevice" //Read host device information if the network is not Verizon.
+QLWCFG: "hostdevice",0,"HUID0","HMAN0","HMOD0","HSW0"
+QLWCFG: "hostdevice",1,"HUID1","HMAN1","HMOD1","HSW1"
OK
AT+QLWCFG="reset"
OK
AT+QLWCFG="nettype",2
OK
AT+QLWCFG="nettype"
+QLWCFG: "nettype",2
OK
AT+QLWSTAT?
+QLWSTAT: 0
OK
AT+QLWREG
OK
+QLWURC: "initial","successfully",100
EC2x&EG9x&EG2x-G_Series_LwM2M_Application_Note 21 / 23
LTE Standard Module Series
EC2x&EG9x&EG2x-G Series LwM2M Application Note
+QLWURC: "dtls","successfully",100
+QLWURC: "bootstraping"
+QLWURC: "bootstrap","successfully",100
+QLWURC: "initial","successfully",1
+QLWURC: "dtls","successfully",1
+QLWURC: "registering"
+QLWURC: "ready","successfully",1
AT+QLWUPDATE=0
OK
+QLWURC: "update","successfully",1
AT+QLWSTAT?
+QLWSTAT: 2
OK
AT+QLWDEREG
OK
+QLWURC: "deregister",0
AT+QLWSTAT?
+QLWSTAT: 0
OK
EC2x&EG9x&EG2x-G_Series_LwM2M_Application_Note 22 / 23
LTE Standard Module Series
EC2x&EG9x&EG2x-G Series LwM2M Application Note
5 Appendix A References
Abbreviation Description
DM Device Management
EC2x&EG9x&EG2x-G_Series_LwM2M_Application_Note 23 / 23