at command MQTT
Posted: Sun May 15, 2022 3:10 pm
Hi everybody,
I'm trying to get connected to cloudMQTT using AT commands and as long as I simply connect using TCP it works just fine. When it comes to certificate I start having troubles.
I have three certificates tested using MQTT.fx therefore I consider them valid and correct.
The list of commands I'm using:
AT+MQTTUSERCFG=0,3,"publisher","user-id","password",0,0,"" (parameter "scheme" can be either 3,4 or 5)
AT+MQTTUSERCFG=0,3,"subscriber","user-id","password",0,0,"" (parameter "scheme" can be either 3,4 or 5)
AT+MQTTCONN=0,"m24.cloudmqtt.com",29768,1
I'm getting "error" message all the time.
The certificates have been loaded using
AT+SYSFLASH=2,"mqtt_cert",0,2054
AT+SYSFLASH=2,"mqtt_ca",0,2208
AT+SYSFLASH=2,"mqtt_key",0,3308
I have loaded the certificates either in plain text or converted in .bin using ATPKI.py with no success.
I also use these command to get date and time for certificate validity check
AT+CIPSNTPCFG=1,8,"ntp1.aliyun.com"
AT+CIPSNTPTIME?
I'm obviously missing something but after days of trial I can't figure out what is wrong.
Any bit of help will be appreciate.
I'm trying to get connected to cloudMQTT using AT commands and as long as I simply connect using TCP it works just fine. When it comes to certificate I start having troubles.
I have three certificates tested using MQTT.fx therefore I consider them valid and correct.
The list of commands I'm using:
AT+MQTTUSERCFG=0,3,"publisher","user-id","password",0,0,"" (parameter "scheme" can be either 3,4 or 5)
AT+MQTTUSERCFG=0,3,"subscriber","user-id","password",0,0,"" (parameter "scheme" can be either 3,4 or 5)
AT+MQTTCONN=0,"m24.cloudmqtt.com",29768,1
I'm getting "error" message all the time.
The certificates have been loaded using
AT+SYSFLASH=2,"mqtt_cert",0,2054
AT+SYSFLASH=2,"mqtt_ca",0,2208
AT+SYSFLASH=2,"mqtt_key",0,3308
I have loaded the certificates either in plain text or converted in .bin using ATPKI.py with no success.
I also use these command to get date and time for certificate validity check
AT+CIPSNTPCFG=1,8,"ntp1.aliyun.com"
AT+CIPSNTPTIME?
I'm obviously missing something but after days of trial I can't figure out what is wrong.
Any bit of help will be appreciate.