Hi,
I would like to confirm with you whether your MQTT server has SSL or not?
You can send us your detailed steps and we’ll check if there’s anything wrong.
Here is an example of an mqtts with two-way authentication connection:
//Configure MQTT session into SSL mode.
AT+QMTCFG=“SSL”,0,1,2
OK
//If SSL authentication mode is “server and client authentication”, store server root CA certificate to RAM.
AT+QSECWRITE=“RAM:cacert.pem”,1758,100
CONNECT
<Input the cacert.pem data, the size is 1758 bytes>
+QSECWRITE: 1758,384a
OK
//If SSL authentication mode is “server and client authentication”, store CC certificate to RAM.
AT+QSECWRITE=“RAM:client.pem”,1220,100
CONNECT
<Input the client.pem data, the size is 1220 bytes>
+QSECWRITE: 1220,2d53
OK
//If SSL authentication mode is “server and client authentication”, store CK certificate to RAM.
AT+QSECWRITE=“RAM:user_key.pem”,1679,100
CONNECT
<Input the user_key.pem data, the size is 1679 bytes>
+QSECWRITE: 1679,335f
OK
//Configure server root CA certificate.
AT+QSSLCFG=“cacert”,2,“RAM:cacert.pem”
OK
//Configure CC certificate.
AT+QSSLCFG=“clientcert”,2,“RAM:client.pem”
OK
GSM/GPRS/GNSS Module Series
GSM MQTT Application Note
GSM_MQTT_Application_Note 26 / 29
//Configure CK certificate.
AT+QSSLCFG=“clientkey”,2,“RAM:user_key.pem”
OK
//Configure SSL parameters.
AT+QSSLCFG=“seclevel”,2,2
OK
AT+QSSLCFG=“sslversion”,2,4
OK //SSL authentication mode: server and client authentication
//SSL authentication version
AT+QSSLCFG=“ciphersuite”,2,“0xFFFF” //Cipher suite
OK
AT+QSSLCFG=“ignorertctime”,1
OK //Ignore the time of authentication.
//Start MQTT SSL connection.
AT+QMTOPEN=0,“a1zgnxur10j8ux.iot.us-east-1.amazonaws.com”,8883
OK
+QMTOPEN: 0,0
//Connect to MQTT server.
AT+QMTCONN=0,“M35_0206”
OK
+QMTCONN: 0,0,0