AT Command

Description

AT+SMCONF command is used to setup the MQTT parameters in Simcom modules that support the MQTT feature.


Support

Simcom Module Tutorial

Examples

KeywordsAT+SMCONF syntax, examples, parameters, error, input, response.

Try the below script in the AT Command Tester tool

//Script: at!daftmact.at
//This AT command is used to put Sierra Wireless modems in Factory Test Mode.

//Script: at+cmconf
//The AT commands in this script are applicable for Simcom modules only
//Check SIMCOM Module AT Command documentaiton

//Get the support list for the command
AT+SMCONF=?

//Wait
WAIT=1

//Get the current MQTT parameter values
AT+SMCONF?

//Wait
WAIT=1

//Configure the client id
AT+SMCONF="CLIENTID","id"

//Wait
WAIT=1

//Configure the keeptime
AT+SMCONF="KEEPTIME",60

//Wait
WAIT=1

//Configure the MQTT keeptime
AT+SMCONF="URL","test.mosquitto.org","1883"

//Wait
WAIT=1

//Session clean
AT+SMCONF="CLEANSS",1

//Wait
WAIT=1

//Quality of service
AT+SMCONF="QOS",1

//Wait
WAIT=1

//Publish topic name
AT+SMCONF="TOPIC","will topic"

//Wait
WAIT=1

//Public message
AT+SMCONF="MESSAGE","will message"

//Wait
WAIT=1

/Retain identification
AT+SMCONF="RETAIN",1

Output of the above script in the AT Command Tester tool

AT+SMCONF=?

+SMCONF: "CLIENTID",(0-128)

+SMCONF: "URL",246,(0-65535)

+SMCONF: "KEEPTIME",(60-180)

+SMCONF: "USERNAME",256

+SMCONF: "PASSWORD",128

+SMCONF: "CLEANSS",(0,1)

+SMCONF: "QOS",(0-2)

+SMCONF: "TOPIC",128

+SMCONF: "MESSAGE",1024

+SMCONF: "RETAIN",(0,1)

OK
AT+SMCONF?

+SMCONF: 

CLIENTID: "id"

URL: "test.mosquitto.org",1883

KEEPTIME: 60

USERNAME: ""

PASSWORD: ""

CLEANSS: 1

QOS: 1

TOPIC: "will topic"

MESSAGE: "will message"

RETAIN: 1

OK
AT+SMCONF="CLIENTID","id"

OK
AT+SMCONF="KEEPTIME",60

OK
AT+SMCONF="URL","test.mosquitto.org","1883"

OK
AT+SMCONF="CLEANSS",1

OK
AT+SMCONF="QOS",1

OK
AT+SMCONF="TOPIC","will topic"

OK
AT+SMCONF="MESSAGE","will message"

OK
AT+SMCONF="RETAIN",1

OK
AT+SMCONF?

+SMCONF: 

CLIENTID: "id"

URL: "test.mosquitto.org",1883

KEEPTIME: 60

USERNAME: ""

PASSWORD: ""

CLEANSS: 1

QOS: 1

TOPIC: "will topic"

MESSAGE: "will message"

RETAIN: 1

OK