Skip to content

Product Configuration Commands

Product Configuration Command Overview

AT CommandDescriptionNote
AT+QIOTCFGConfigure Optional ParametersOptional 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+QIOTREGConfigure Connection Mode
AT+QIOTSTATEQuery Connection Status
AT+QIOTMCUVERConfigure 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

    c
    AT+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",(1864000)
    +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

      c
      AT+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:

      c
      OK

      If there is any error:

      c
      ERROR

    • 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.)

      c
      AT+QIOTCFG="productinfo","p****n","RMW**********Dlt"
      
      OK


  • Query/Configure server information
    • Issue

      c
      AT+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:

      c
      OK

      If there is any error:

      c
      ERROR

    • 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".
        regionserver URL
        Non-encrypted in Chinacoap://iot-south.quectelcn.com:5683
        Encryption in Chinacoaps://iot-south.quectelcn.com:5684
        Non-encrypted in Europecoap://iot-south.acceleronix.io:5683
        Encryption in Europecoaps://iot-south.acceleronix.io.5684
    • NOTE

      • This command is supported in SDK versions 2.1.2 and above.

    • Example (Set server information.)

      c
      AT+QIOTCFG="server",0,"coap://iot-south.acceleronix.io:5683"
      
      OK


  • Query/Configure the lifetime of device
    • Issue

      c
      AT+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:

      c
      OK

      If there is any error:

      c
      ERROR

    • 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.)

      c
      AT+QIOTCFG="lifetime",86400
      
      OK


    • Issue

      c
      AT+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:

      c
      OK

      If there is any error:

      c
      ERROR

    • Parameter

      • <buffer_mode> Integer type. Enable or disable buffer mode for downlink data.
        • 0 : Disable
        • 1 : Enable
    • NOTE

      • This command is supported in SDK versions 2.1.2 and above.

    • Example (Enable the buffer mode of downlink data.)
    c
    AT+QIOTCFG="buffer",1
    
    OK


  • Query/Configure PDP context ID
    • Issue

      c
      AT+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:

      c
      OK

      If there is any error:

      c
      ERROR

    • 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.)

      c
      AT+QIOTCFG="act",1
      
      OK


  • Query/Configure TSL data format
    • Issue

      c
      AT+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:

      c
      OK

      If there is any error:

      c
      ERROR

    • Parameter

      • <tsl_mode> Integer type. TSL data format.
        • 0 : TTLV
        • 1 : 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

      c
      AT+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:

      c
      OK

      If only <dk> is specified and is not empty, customize the DeviceKey (then the device starts authentication process):

      c
      OK

      If the optional parameters are specified and are not empty, customize the DeviceKey and DeviceSecret:

      c
      OK

      If the optional parameters are specified and are empty strings, remove the customized DeviceKey and DeviceSecret:

      c
      OK

      If there is any error:

      c
      ERROR

    • 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

      c
      AT+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:

      c
      OK

      If the optional parameter is specified and are not empty, configure the device Pre-Shared Key:

      c
      OK

      If there is any error:

      c
      ERROR

    • 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

    c
    AT+QIOTREG=?
  • Response

    Return the range of supported connection mode.

    c
    +QIOTREG: (range of supported <reg_mode>s)
    
    OK

Read Command

  • Issue

    c
    AT+QIOTREG?
  • Response

    Return the range of supported connection mode.

    c
    +QIOTREG: <reg_mode>
    
    OK

Write Command

  • Issue

    c
    AT+QIOTREG=<reg_mode>
  • Response

    If the command is executed successfully:

    c
    OK

    If there is any error:

    c
    ERROR

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

    c
    AT+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: Uninitialized
    • 1: Initialized
    • 2: Authenticating
    • 3: Authenticated
    • 4: Authentication failed
    • 5: Registering
    • 6: Registered and waiting to subscribe
    • 7: Registration failed
    • 8: Subscribed and data can be sent
    • 9: Subscription failed
    • 10: Deregistering
    • 11: Deregistered
    • 12: 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

    c
    AT+QIOTMCUVER=?
  • Response

    Return whether the command is supported.

    c
    +QIOTMCUVER: <MCU_number>,<MCU_version>
    
    OK

Read Command

  • Issue

    c
    AT+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:

    c
    ERROR

Write Command

  • Issue

    c
    AT+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:

    c
    OK

    If there is any error:

    c
    ERROR

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