SIM7000X establish AWS MQTT via AT command issue

26 Views Asked by At

Here are the specific details of my configuration and the issue at hand:

Device: SIM7000X module Connectivity: I am using SIM7000X to connect to AWS IoT Core for MQTT communication. Configuration: I have configured the SIM7000X module with the necessary parameters including the AWS IoT Core endpoint URL, port number (8883 for MQTT over TLS), client ID, and security settings. Testing: The module is able to establish a connection successfully when using a test MQTT broker (e.g., test.mosquitto.org). However, when attempting to connect to AWS IoT Core using the provided endpoint URL (XXXXXXXXXXXX.iot.us-east-1.amazonaws.com), the connection is not successful. URL Used: a1hk1jl5lyheoa.iot.us-east-1.amazonaws.com

Additionally, I want to emphasize that I have successfully established connections to AWS IoT Core using the same certificates and credentials when utilizing the Python SDK. Hence, it appears that the issue lies specifically with the SIM7000X module's connection to AWS IoT Core.

I have performed several troubleshooting steps including:

Verifying the correctness of the AWS IoT Core endpoint URL, port number, and client ID. Ensuring that the SIM7000X module has access to the internet and that there are no firewall or network configuration issues blocking the connection. Configuring TLS/SSL with appropriate certificates, including the AmazonRootCA12.pem and device-specific certificate files. Despite these efforts, the connection to AWS IoT Core is not established successfully. When attempting to publish a message, the module returns an error.

Here is an excerpt of the commands and responses [test.mosquitto.org]:

[at+cnact?, +CNACT: 1,"10.193.154.101", OK]
[AT+SNPING4="XXXXXXXXXXXXX.iot.us-east-1.amazonaws.com",3,20,100, +SNPING4: 1,52.71.21.145,60000, +SNPING4: 2,52.71.21.145,60000, +SNPING4: 3,52.71.21.145,60000, OK]
[AT+SAPBR=2,1, +SAPBR: 1,3,"0.0.0.0", OK]
[AT+SMCONF="URL","test.mosquitto.org","1883", OK]
[+O"EM", OK, ATSMCNF=KEPTIE,60, ERROR, ATSMCNF=KEPTIE,60, ERROR, ATSMCNF=KEPTIE,60, ERROR, ATSMCNF=KEPTIE,60, ERROR, ATSMCNF=KEPTIE,60, ERROR, ATSMCNF=KEPTIE,60, ERROR, ATSMCNF=KEPTIE,60, ERROR, ATSMCNF=KEPTIE,60, ERROR, ATSMCNF=KEPTIE,60, ERROR, ATSMCNF=KEPTIE,60, ATSMCNF=KEPTIE,60, ERROR, ATSMCNF=KEPTIE,60, ERROR, ATSMCNF=KEPTIE,60, ERROR, ATSMCNF=KEPTIE,60, ERROR]
[AT+SMCONF="CLIENTID","iotconsole-84806066-427c-4179-a875-92148ce075c6", OK]
[AT+SMCONF="CLEANSS",1, OK]
[AT+SMCONF="QOS",1, OK]
[AT+SMCONF="TOPIC","sdk/test/python", OK]
[AT+SMCONF?, +SMCONF , CLIENTID: "iotconsole-84806066-427c-4179-a875-92148ce075c6", URL: "test.mosquitto.org:1883", KEEPTIME: 60, USERNAME: "", PASSWORD: "", CLEANSS: 1, QOS: 1, TOPIC: "sdk/test/python", MESSAGE: "", RETAIN: 0, OK]
[AT+SMSSL=1,"AmazonRootCA12.pem","certificate.crt", OK]
[AT+CSSLCFG="convert",2,"AmazonRootCA12.pem", OK]
[AT+CSSLCFG="convert",1,"certificate.crt","private.key", OK]
[AT+CSSLCFG="protocol",0,1, OK]
[AT+CSSLCFG="ignorertctime",0,1, OK]
[AT+CSSLCFG?, OK]
[T+CSSLCFG="sslversion",0,3, OK]
[T+NIG4"1kj-.mnw.o,,010]
[AT+SMCONN, OK]
[]
[AT+SMPUB="sdk/test/python","5",1,1, ERROR]
[]
[AT+SMDISC, OK]

serial closed!

I have also attached a log file containing detailed commands and responses for your reference [AWS end point].

[AT+SNPING4="XXXXXXXXXXXXXXXXX.iot.us-east-1.amazonaws.com",3,20,100, +SNPING4: 1,54.208.232.218,60000, +SNPING4: 2,54.208.232.218,60000, +SNPING4: 3,54.208.232.218,60000, OK]
[AT+SAPBR=2,1, +SAPBR: 1,3,"0.0.0.0", OK]
[AT+SMCONF="URL","XXXXXXXXXXXXXXXXX.iot.us-east-1.amazonaws.com","8883", OK]
[AT+SMCONF="KEEPTIME",60, OK]
[AT+SMCONF="CLIENTID","iotconsole-84806066-427c-4179-a875-92148ce075c6", OK]
[AT+SMCONF="CLEANSS",1, OK]
[A+SMCONF="QOS",1, OK]
[A+MOF"TPC,dtpyhn, O]
[AT+SMCONF?, +SMCONF , CLIENTID: "iotconsole-84806066-427c-4179-a875-92148ce075c6", URL: "XXXXXXXXXXX.iot.us-east-1.amazonaws.com:8883", KEEPTIME: 60, USERNAME: "", PASSWORD: "", CLEANSS: 1, QOS: 1, TOPIC: "sdk/test/python", MESSAGE: "", RETAIN: 0, OK]
[A+SMSSL=1,"AmazonRootCA12.pem","certificate.crt", OK]
[A+CSSLCFG="convert",2,"AmazonRootCA12.pem", OK]
[ACSSLCFG="convert",1,"certificate.crt","private.key", OK]
[A+CSC=pooo"01, OK]
[+C]
[AT+CSSLCFG?, OK]
[AT+CSSLCFG="sslversion",0,3, OK]
[AT+SNPING4="XXXXXXXXXXXX.iot.us-east-1.amazonaws.com",3,20,100, +SNPING4: 1,52.20.89.239,60000, +SNPING4: 2,52.20.89.239,60000, +SNPING4: 3,52.20.89.239,60000, OK]
[AT+SMCONN, ERROR]
[]
[AT+SMPUB="sdk/test/python","5",1,1, ERROR]
[]
[A+SMDISC, ERROR]

serial closed!

Could you please assist me in diagnosing and resolving this issue? Any guidance, suggestions, or insights you can provide would be greatly appreciated.

I tried many others configs to establish the conncetion between SIM7000X and AWS IoT Core, I used a software (Windows-based) and could to successfully establish the connection w/o certs too.

0

There are 0 best solutions below