Community news, upcoming events and general discussions
Threads: 36 Posts: 88
Get technical support from the community
Threads: 1427 Posts: 7608
Threads: 18 Posts: 64
Tell us how to make XDK better!
Threads: 36 Posts: 119
Share and discuss community member projects
Threads: 81 Posts: 350
I keep getting the same error (RETCODE_MQTT_CONNECT_FAILED, picture 1) with AwsSendDataOverMQTT, spent all day, tried multiple times to create new things in AWS IoT, but still didn't achieve anything. I followed up this guideline:
Also tried adding a policy to a certificate, but this also made no difference.
I know that there were many threads about this example, but I did not find out anything amongst all of them, that could fix my issue.
Things I've done:
1) Created a thing in AWS IoT
2) Changed config.txt (part of mqtt is in picture 2) and copied it to SD card
3) Using openssl converted the private key and the certificates (root CA and the thing certificate) and copied them to SD card
Maybe I am missing something?
Try the Server Url without the "-ats".
Thank you for your answer, but it did not help in my case, still having the same error :(
I tried also removing "-ats" from clientId and keeping it, still the same result.
Here is my config Maybe it helps. Did you download the correct certificate of Aws?
I have downloaded:
1) Private key -- 65f656cd6e-private.pem.key
2) Certificate of a thing -- 65f656cd6e-certificate.pem.crt
3) VeriSign RootCA -- Amazon_VeriSign.pem
After that, I used the followings in terminal to convert them into .der formats:
1) openssl rsa -outform der -in 65f656cd6e-private.pem.key -out xdk-priv.der
2) openssl x509 -outform der -in 65f656cd6e-certificate.pem.crt -out xdk-cert.der
3) openssl x509 -outform der -in Amazon_VeriSign.pem -out rootCA.der
Then, I moved these files into SD card with config.txt. Did I do everything correct?
Hi Yeah, I sort of solved that right away. Did you activate the certificate on the aws?
and what does your corresponding policy say in the aws?
I was testing your suggestion about removing "-ats" from URL only for a thing without any policies, now I have tested for another thing that has a policy, and now everything works.
Thank you very much for your help!