Hello I follow the “example of MQTT Operation with SSL” into document “BG96_MQTT_App_note_v1.1.pdf” but it don’t works
well my problem is that ever I do:
AT+QMTOPEN=,<aws_host>,8883
+QMTOPEN 0,3 means:
+QMTOPEN <TCPConnectID>, <err_code>
from documentation: errr_code is 3
- Check whether the inputted user name and password are correct. NOT APPLY
- Make sure the client ID is not used. NOT APPLY because i have a variable tcpConnectID
- Reopen MQTT connection and try to send CONNECT packet to server again. OPEN again when same result…
Also I added the full trace of commands with a posible error at documentation of “Quectel_MQTT_Application_Note_V1.1.pdf” at AT+QSSLCFG=“ignorelocaltime”,1
// boot
resp: RDY (RDY)
AT0
resp: ATE0
resp: OK (ATE0)
AT+CMEE=2
resp: OK (AT+CMEE=2)
AT+COPS=2
resp: OK (COPS=2)
AT+QGPS=1
resp: +QGPS: 0 OK (QGPS?)
resp: ERROR (QGPS)
/////////////////////////////////
// certs upload
resp: OK (QFDEL)
resp: +CME ERROR: Fail to list the file (QFLST)
resp: CONNECT
resp: +QFUPL: 1758,384a
resp: OK (QFUPL)
resp: OK (QFDEL)
resp: +CME ERROR: Fail to list the file (QFLST)
resp: CONNECT
resp: +QFUPL: 1220,3504
resp: OK (QFUPL)
resp: OK (QFDEL)
resp: +CME ERROR: Fail to list the file (QFLST)
resp: CONNECT
resp: +QFUPL: 1675,45d
resp: OK (QFUPL)
/////////////////////////////////
// start gps
AT+QGPS?
resp: +QGPS: 1 OK (GPS?)
resp: APP RDY (APP RDY)
/////////////////////////////////
// GSM
AT+CPIN?
resp: +CPIN: READY (CPIN)
AT+QCFG="band",00000000F,80000,80000,1
resp OK (QCFG)
AT+QCF="nwscanmode",0,1
resp OK (nwscanmode)
AT+QCFG="nwscanseq",030201,1
resp OK (nwscanseq)
AT+QCFG="iotopmode",2,1
resp OK (iotopmode)
AT+CFUN=1
resp OK (CFUN)
AT+CGDCONT=1,"IP","wlapn.com"
resp OK (CGDCONT)
AT+COPS=0,2
resp OK (COPS)
AT+CEREG?
resp +CEREG: 0,4 OK
AT+CSQ=?
resp +CSQ: (0-31,99),(0-7,99) OK
AT+CGATT?
resp +CGATT: 0 OK
AT+COPS=?
resp +COPS: (1,"Orange SP","ESPRT","21403",0),(1,"Movistar","Movistar","21407",0),(1,"vodafone ES","voda ES","21401",9)
/////////////////////////////////
//// SSL configuration
//AT+QMTCFG="ssl",<TCPConnectID>,<sslenable>,<ssl_ctx_id>
AT+QMTCFG="ssl",0,1,2
resp: OK (mqttssl)
// IMPORTANT:
// TCPConnectID = 0
// ssl_ctx_id = 2
AT+QSSLCFG="cacert",2,"ca.pem"
resp: OK (cacert)
AT+QSSLCFG="clientcert",2,"cc.crt"
resp: OK (clientcrt)
AT+QSSLCFG="clientkey",2,"ck.pem"
resp: OK (clientkey)
AT+QSSLCFG="seclevel",2,2
resp: OK (seclevel)
AT+QSSLCFG="sslversion",2,4
resp: OK (sslversion)
AT+QSSLCFG="ciphersuite",2,0xffff
resp: OK (ciphersuite)
// ALTERNATIVE BOTH TESTED WITHOUT SUCCESS
[
// SAME THAT PDF MQTT (is right?)
//AT+QSSLCFG="ignorelocaltime",<ssl_ctx_id>,<ignoretlime>
> if <ignoreltime> is omitted, query whether the validity check for certification is ignored for
> the specified SSL context
// POSIBLE ERROR IT SHOULD BE 2 ?
AT+QSSLCFG="ignorelocaltime",1
resp: +QSSLCFG: "ignorelocaltime",1,1 OK (ignorelocaltime)
// SAME PDF SSL
//AT+QSSLCFG="ignorelocaltime",<ssl_ctx_id>,<ignoreltime>
> if <ignoreltime> is not omitted, set whether or not to ignore
> certification validity check for the specified SSL context
AT+QSSLCFG="ignorelocaltime",2,1
]
//AT+QMTCFG="version",<TCPConnectID>,<MQTT_VERSION>
AT+QMTCFG="version",0,4
resp: OK (mqttversion)
//AT+QMTOPEN=<TCPConnectID>,<host>,<port>
AT+QMTOPEN=0,<aws>,8883
resp: OK +QMTOPEN: 0,3 (qmtopen,1)
resp: OK +QMTOPEN: 0,3 (qmtopen,2)
resp: OK +QMTOPEN: 0,3 (qmtopen,3)
resp: OK +QMTOPEN: 0,3 (qmtopen,4)
resp: OK +QMTOPEN: 0,3 (qmtopen,5)
resp: OK +QMTOPEN: 0,3 (qmtopen,6)
resp: OK +QMTOPEN: 0,3 (qmtopen,7)
resp: OK +QMTOPEN: 0,3 (qmtopen,8)
resp: OK +QMTOPEN: 0,3 (qmtopen,9)
resp: OK +QMTOPEN: 0,3 (qmtopen,10)
resp: OK +QMTOPEN: 0,3 (qmtopen,11)
resp: OK +QMTOPEN: 0,3 (qmtopen,12)
resp: OK +QMTOPEN: 0,3 (qmtopen,13)
resp: OK +QMTOPEN: 0,3 (qmtopen,14)
resp: OK +QMTOPEN: 0,3 (qmtopen,15)
resp: OK +QMTOPEN: 0,3 (qmtopen,16)
resp: OK +QMTOPEN: 0,3 (qmtopen,17)
resp: OK +QMTOPEN: 0,3 (qmtopen,18)
resp: OK +QMTOPEN: 0,3 (qmtopen,19)
resp: OK +QMTOPEN: 0,3 (qmtopen,20)
resp: OK +QMTOPEN: 0,3 (qmtopen,21)
resp: OK +QMTOPEN: 0,3 (qmtopen,22)
resp: OK +QMTOPEN: 0,3 (qmtopen,23)
resp: OK +QMTOPEN: 0,3 (qmtopen,24)
resp: OK +QMTOPEN: 0,3 (qmtopen,25)
resp: OK +QMTOPEN: 0,3 (qmtopen,26)
resp: OK +QMTOPEN: 0,3 (qmtopen,27)
resp: OK +QMTOPEN: 0,3 (qmtopen,28)
resp: OK +QMTOPEN: 0,3 (qmtopen,29)
resp: OK +QMTOPEN: 0,3 (qmtopen,30)
resp: OK +QMTOPEN: 0,3 (qmtopen,31)
resp: OK +QMTOPEN: 0,3 (qmtopen,32)
resp: OK +QMTOPEN: 0,3 (qmtopen,33)
resp: OK +QMTOPEN: 0,3 (qmtopen,34)
resp: OK +QMTOPEN: 0,3 (qmtopen,35)
resp: OK +QMTOPEN: 0,3 (qmtopen,36)
resp: OK +QMTOPEN: 0,-1 (qmtopen,37)
resp: OK +QMTOPEN: 0,-1 (qmtopen,38)
resp: OK +QMTOPEN: 0,-1 (qmtopen,39)
resp: OK +QMTOPEN: 0,-1 (qmtopen,40)
resp: OK +QMTOPEN: 0,-1 (qmtopen,41)
Thanks in advanced