Appearance
Product Configuration Commands
Product Configuration Command Overview
AT Command | Description | Note |
---|---|---|
AT+QIOTCFG | Configure Optional Parameters | Optional Parameters : ● Query/Configure product information ● Query/Configure server information ● Query/Configure the lifetime of device ● Query/Configure the buffer mode of downlink data ● Query/Configure PDP context ID ● Query/Configure TSL data format ● Query/Configure custom DeviceKey and DeviceSecret ● Query/Configure device Pre-Shared Key |
AT+QIOTREG | Configure Connection Mode | |
AT+QIOTSTATE | Query Connection Status | |
AT+QIOTMCUVER | Configure MCU Version Number |
AT Command Description
AT+QIOTCFG (Configure Optional Parameters)
- Description: This command configures optional parameters.
- Maximum Response Time: 300 ms.
- Characteristics: The command takes effect immediately. The configurations are saved automatically.
Test Command
Issue
cAT+QIOTCFG=?
Response
c+QIOTCFG: "productinfo",<pk>,<ps> +QIOTCFG: "server",(list of supported <server_type>s),<server_URL> +QIOTCFG: "lifetime",(range of supproted <lifetime>s) +QIOTCFG: "buffer",(list of supported <buffer_mode>s) +QIOTCFG: "act",(range of supported <contextID>s) +QIOTCFG: "tsl",(list of supported <tsl_mode>s) +QIOTCFG: "dk_ds",<dk>[,<ds>] +QIOTCFG: "psk"[,<psk>] OK
Example (Query configurable information and range)
After the module is powered up, if no parameter is configured, execute AT+QIOTCFG=? to query the configurable information and ranges.
c[TX]AT+QIOTCFG=? [RX]+QIOTCFG: "productinfo",<pk>,<ps> +QIOTCFG: "server",1,<server_URL> +QIOTCFG: "lifetime",(1–864000) +QIOTCFG: "buffer",(0,1) +QIOTCFG: "act",(1-15) +QIOTCFG: "tsl",(0,1) +QIOTCFG: "dk_ds",<dk>,<ds> +QIOTCFG: "psk"[,<psk>] [RX] OK
Write Command
Query/Configure product information
Issue
cAT+QIOTCFG="productinfo"[,\<pk\>,\<ps\>]
Response
If the optional parameters are omitted, query the current setting:
c+QIOTCFG: "productinfo",<pk>,<ps>,<ver> OK
If the optional parameters are specified, Configure the product information:
cOK
If there is any error:
cERROR
Parameter
<pk>
String type. ProductKey generated when a product is created.<ps>
String type. ProductSecret generated when a product is created.<ver>
String type. Protocol version used for device authentication.
NOTE
- This command is supported in SDK versions 2.1.2 and above.
Example (Initialize product information.)
cAT+QIOTCFG="productinfo","p****n","RMW**********Dlt" OK
Query/Configure server information
Issue
cAT+QIOTCFG="server"[,<server_type>,<server_URL>]
Response
If the optional parameter is omitted, query the current setting:
c+QIOTCFG:"server",<server_type>,<server_URL> OK
If the optional parameter is specified, configure the server information:
cOK
If there is any error:
cERROR
Parameter
<server_type>
Integer type. Supported protocol type.0
: LwM2M
<server_URL>
String type. Server URL (domain name and port of Developer Center).- Default:
"coap://iot-south.quectelcn.com:5683"
.
region server URL Non-encrypted in China coap://iot-south.quectelcn.com:5683 Encryption in China coaps://iot-south.quectelcn.com:5684 Non-encrypted in Europe coap://iot-south.acceleronix.io:5683 Encryption in Europe coaps://iot-south.acceleronix.io.5684 - Default:
NOTE
- This command is supported in SDK versions 2.1.2 and above.
Example (Set server information.)
cAT+QIOTCFG="server",0,"coap://iot-south.acceleronix.io:5683" OK
Query/Configure the lifetime of device
Issue
cAT+QIOTCFG="lifetime"[,<lifetime>]
Response
If the optional parameter is omitted, query the current setting:
c+QIOTCFG: "lifetime",<lifetime> OK
If the optional parameter is specified, configure the lifetime of the device:
cOK
If there is any error:
cERROR
Parameter
<lifetime>
Integer type. Device lifetime. Range: 1–864000. Default: 86400. Unit: second.
NOTE
- This command is supported in SDK versions 2.1.2 and above.
Example (Configure the lifetime of device.)
cAT+QIOTCFG="lifetime",86400 OK
Query/Configure the buffer mode of downlink data
Issue
cAT+QIOTCFG="buffer"[,<buffer_mode>]
Response
If the optional parameter is omitted, query the current setting:
c+QIOTCFG: "buffer",<buffer_mode> OK
If the optional parameter is specified, configure the buffer mode of downlink data:
cOK
If there is any error:
cERROR
Parameter
<buffer_mode>
Integer type. Enable or disable buffer mode for downlink data.0
: Disable1
: Enable
NOTE
- This command is supported in SDK versions 2.1.2 and above.
- Example (Enable the buffer mode of downlink data.)
cAT+QIOTCFG="buffer",1 OK
Query/Configure PDP context ID
Issue
cAT+QIOTCFG="act"[,<contextID>]
Response
If the optional parameter is omitted, query the current setting:
c+QIOTCFG: "act",<contextID> OK
If the optional parameter is specified, configure the PDP context ID used for device to connect to Developer Center:
cOK
If there is any error:
cERROR
Parameter
<contextID>
Integer type. PDP context ID. Range: 1–15. The actual range is subject to the specific module model.
NOTE
- This command is supported in SDK versions 2.1.2 and above.
Example (Configure the PDP context ID used for device connecting to Developer Center.)
cAT+QIOTCFG="act",1 OK
Query/Configure TSL data format
Issue
cAT+QIOTCFG="tsl"[,<tsl_mode>]
Response
If the optional parameter is omitted, query the current setting:
c+QIOTCFG: "tsl",<tsl_mode> OK
If the optional parameter is specified, configure TSL data format:
cOK
If there is any error:
cERROR
Parameter
<tsl_mode>
Integer type. TSL data format.0
: TTLV1
: JSON
NOTE
- This command is supported in SDK versions 2.1.2 and above.
- Example (Set TSL data format to JSON)c
AT+QIOTCFG="tsl",1 OK
Query/Configure custom DeviceKey and DeviceSecret
Issue
cAT+QIOTCFG="dk_ds",[<dk>[,<ds>]]
Response
If the optional parameter is omitted, query the custom DeviceKey and DeviceSecret (only the DeviceKey and DeviceSecret customized by this command can be queried):
c+QIOTCFG:"dk_ds",<dk>,<ds> OK
If only <dk> is specified and is an empty string, delete the customized <dk> and <ds>, and default configuration is used:
cOK
If only <dk> is specified and is not empty, customize the DeviceKey (then the device starts authentication process):
cOK
If the optional parameters are specified and are not empty, customize the DeviceKey and DeviceSecret:
cOK
If the optional parameters are specified and are empty strings, remove the customized DeviceKey and DeviceSecret:
cOK
If there is any error:
cERROR
Parameter
<dk>
: String type. DeviceKey, i.e., the customized unique identifier for the device. Cellular modules use IMEI as the default identifier, while wireless modules, such as Wi-Fi modules, use MAC address.<ds>
: String type. DeviceSecret generated after device authentication.
NOTE
- This command is supported in SDK versions 2.1.2 and above.
- Example (Configure custom DeviceKey)c
AT+QIOTCFG="dk_ds","12345678" OK
Query/Configure device Pre-Shared Key
Query/Configure device Pre-Shared Key
Issue
cAT+QIOTCFG="psk",[<psk>]
Response
If the optional parameter is omitted, query the current Pre-Shared Key:
c+QIOTCFG:"psk",<psk> OK
If the optional parameter is specified and are empty strings, remove the Pre-Shared Key:
cOK
If the optional parameter is specified and are not empty, configure the device Pre-Shared Key:
cOK
If there is any error:
cERROR
Parameter
<psk>
String type. Device Pre-Shared Key. Maximum length: 32 bytes.
NOTE
- This command is supported in SDK versions 2.1.2 and above.
Example (Configure device Pre-Shared Key)
c[TX]AT+QIOTCFG="psk","1234567890" [RX]OK
AT+QIOTREG (Configure Connection Mode)
- Description: This command configures the connection mode.
- Maximum Response Time: 300 ms.
- Characteristics: The command takes effect immediately. The configuration is saved automatically.
Test Command
Issue
cAT+QIOTREG=?
Response
Return the range of supported connection mode.
c+QIOTREG: (range of supported <reg_mode>s) OK
Read Command
Issue
cAT+QIOTREG?
Response
Return the range of supported connection mode.
c+QIOTREG: <reg_mode> OK
Write Command
Issue
cAT+QIOTREG=<reg_mode>
Response
If the command is executed successfully:
cOK
If there is any error:
cERROR
Parameter
<reg_mode>
Integer type. Connection mode.0
: De-register Developer Center and disable QuecThing.1
: Enable QuecThing manually. ERROR is returned if ProductKey, ProductSecret and domain name and port of Developer Center are not configured.2
: Enable QuecThing automatically. The device connects to Developer Center automatically after powered on. ERROR is returned if ProductKey, ProductSecret and domain name and port of Developer Center are not configured.
NOTE
- This command is supported in SDK versions 2.1.2 and above.
Example
Example 1 (Query connection mode.)
c
AT+QIOTREG?
+QIOTREG: 0
OK
Example 2 (Enable QuecThing manually.)
c
AT+QIOTREG=1
OK
AT+QIOTSTATE (Query Connection Status)
- Description: This command queries the status of the connection between the device and Developer Center.
- Maximum Response Time: 300 ms.
Read Command
Issue
cAT+QIOTSTATE?
Response
Return the status of the connection between the device and Developer Center.
c+QIOTSTATE: <state> OK
Parameter
<state>
Integer type. Connection status.0
: Uninitialized1
: Initialized2
: Authenticating3
: Authenticated4
: Authentication failed5
: Registering6
: Registered and waiting to subscribe7
: Registration failed8
: Subscribed and data can be sent9
: Subscription failed10
: Deregistering11
: Deregistered12
: Deregistration failed
NOTE
- This command is supported in SDK versions 2.1.2 and above.
Example
Example 1 (Query Connection Status)
Return 8: The device has connected to Developer Center and can communicate with Developer Center.
c
AT+QIOTSTATE?
+QIOTSTATE: 8
OK
AT+QIOTMCUVER (Configure MCU Version Number)
- Description: This command configures MCU version.
- Maximum Response Time: 300 ms.
- Characteristics: The command takes effect immediately. The configurations are saved automatically.
Test Command
Issue
cAT+QIOTMCUVER=?
Response
Return whether the command is supported.
c+QIOTMCUVER: <MCU_number>,<MCU_version> OK
Read Command
Issue
cAT+QIOTMCUVER?
Response
Return the configured MCU ID and corresponding version:
c+QIOTMCUVER: <MCU_number1>,<MCU_version1> [+QIOTMCUVER: <MCU_number2>,<MCU_version2>] […] OK
If there is any error:
cERROR
Write Command
Issue
cAT+QIOTMCUVER=<MCU_number>[, <MCU_number_version>]
Response
If the optional parameter is omitted, query the current setting:
c+QIOTMCUVER: <MCU_number>,<MCU_version> OK
If the optional parameter is specified, configure MCU version number:
cOK
If there is any error:
cERROR
Parameter
<MCU_numberN>
: String type. MCU ID.<MCU_versionN>
: String type. MCU version.
NOTE
- This command is supported in SDK versions 2.1.2 and above.
Example
Example 1 (Query current MCU ID)
Response: MCU1; MCU version number: 1.0.0.
c
AT+QIOTMCUVER?
+QIOTMCUVER: "MCU1","1.0.0"
OK
Example 2 (Configure MCU ID and version number)
Set the current MCU ID to MCU1 and MCU1 version number to 1.0.1.
c
AT+QIOTMCUVER="MCU1","1.0.1"
OK