Post by gooseberry on Mar 10, 2024 12:51:35 GMT
I seem to have gotten an issue with trying to connect to the Amazon AWS MQTT server. I have follows the commands exactly but get the same error as shown at the bottom. I believe the issue has come from the certificate, CA and key files. When uploading the originals they would not be accepted (AT+CSSLCFG=convert,1 and 2). After seeing a post about it being an issue with the newline characters (0A) in hex, I removed these and reuploaded the files as one line which got accepted.
However the connection has not being accepted. To test I used MQTTX using the same configurations I was easily able to connect. I have tried different configurations in regards to the MQTT packet settings (QoS, Will Message etc). I'm just wondering if me removing these characters would cause them to be invalid as trying the edited files on MQTTX resulted in a CONNECTION REFUSED. The connection isn't immediately refused it seems to timeout, any help at all will be accepted as been a long time issue. Just to confirm as well, my private key starts with -----BEGIN RSA PRIVATE KEY----- so it is in the correct format I believe.
AT+CPIN?
+CPIN: READY
OK
AT+CSQ
+CSQ: 12,99
OK
AT+CGREG?
+CGREG: 0,1
OK
AT+COPS?
+COPS: 0,0,"vodafone UK",3
OK
AT+CGNAPN
+CGNAPN: 0,""
OK
AT+CNACT=1,"pp.vodafone.co.uk"
OK
+APP PDP: ACTIVE
AT+CGDCONT=1,"IP","pp.vodafone.co.uk"
OK
AT+CNACT?
+CNACT: 1,"10.120.184.34"
OK
at+csslcfg=convert,2,CA1edit.pem
OK
AT+CSSLCFG="convert",1,"certificateedit.crt","privateedit.key"
OK
AT+CSSLCFG="sslversion",0,3
OK
AT+SMSSL=1,CA1edit.pem,certificateedit.crt
OK
AT+SMCONF="URL","XXXXXXXXXXXX-ats.iot.eu-west-2.amazonaws.com",8883
OK
AT+SMCONF="CLIENTID","Tracker"
OK
AT+SMCONF="KEEPTIME",60
OK
AT+CCLK?
+CCLK: "24/03/08,17:14:29+00"
OK
AT+SMCONN
+CME ERROR: operation not allowed
However the connection has not being accepted. To test I used MQTTX using the same configurations I was easily able to connect. I have tried different configurations in regards to the MQTT packet settings (QoS, Will Message etc). I'm just wondering if me removing these characters would cause them to be invalid as trying the edited files on MQTTX resulted in a CONNECTION REFUSED. The connection isn't immediately refused it seems to timeout, any help at all will be accepted as been a long time issue. Just to confirm as well, my private key starts with -----BEGIN RSA PRIVATE KEY----- so it is in the correct format I believe.
AT+CPIN?
+CPIN: READY
OK
AT+CSQ
+CSQ: 12,99
OK
AT+CGREG?
+CGREG: 0,1
OK
AT+COPS?
+COPS: 0,0,"vodafone UK",3
OK
AT+CGNAPN
+CGNAPN: 0,""
OK
AT+CNACT=1,"pp.vodafone.co.uk"
OK
+APP PDP: ACTIVE
AT+CGDCONT=1,"IP","pp.vodafone.co.uk"
OK
AT+CNACT?
+CNACT: 1,"10.120.184.34"
OK
at+csslcfg=convert,2,CA1edit.pem
OK
AT+CSSLCFG="convert",1,"certificateedit.crt","privateedit.key"
OK
AT+CSSLCFG="sslversion",0,3
OK
AT+SMSSL=1,CA1edit.pem,certificateedit.crt
OK
AT+SMCONF="URL","XXXXXXXXXXXX-ats.iot.eu-west-2.amazonaws.com",8883
OK
AT+SMCONF="CLIENTID","Tracker"
OK
AT+SMCONF="KEEPTIME",60
OK
AT+CCLK?
+CCLK: "24/03/08,17:14:29+00"
OK
AT+SMCONN
+CME ERROR: operation not allowed