Closed nbc-pet-task closed 4 years ago
I did reinstall mosquitto latest version. so I got same message in your Youtube video.
Installed lib my packages are..
openssl version OpenSSL 1.0.1t 3 May 2016 aws-cli/1.18.20 Python/2.7.9 Linux/4.9.35-v7+ botocore/1.15.20 mosquitto version 1.6.8
$ mosquitto_pub --cafile root.cert --cert deviceCertAndCACert.crt --key deviceCert.key -p 8883 -q 1 -t foo/bar -i anyclientID --tls-version tlsv1.2 -m "Hello" -d -h a1inzd6lczlz6f-ats.iot.us-east-1.amazonaws.com Client anyclientID sending CONNECT Error: The connection was lost.
But when I run simulator I got same issue.
~/simulator $ sed -i -e 's/REPLACE_HERE/123456789-abcde/g' config.js ~/simulator $ npm start
smart-product-demo-simulator@0.0.1 start /home/pi/simulator node simulator.js
Connecting to AWS IoT...
????? Stopping........
Um.. I tried that make key and certificate on AWS IoT web console. And then I copied files to Raspberry Pi. also attached policy & thing using web console.
At result... Working well!! :)
@nbc-pet-task I'm sorry for your inconvenience. I think the implementation guide one step to change HOSTNAME
to the actual AWS IoT endpoint in config.js
file.
sed -i -e 's/HOSTNAME/'$HOST'/' config.js
HOST
can be a1inzd61czlz6f-ats.iot.us-east-1.amazonaws.com in your case.
I'm happy that you succeeded to connect to the simulator, but I would like to make sure that you have changed host configuration.
Just hard coding [host] in config.js file :)
thanks!!
I am watching and following a Youtube video and tutorial. https://www.youtube.com/watch?v=kgXYO5Iqklo&t=1894s https://docs.aws.amazon.com/solutions/latest/smart-product-solution/deployment.html
However I got a issue follow..
pi@raspberrypi:~/aws_SmartProductSolutionsSample $ mosquitto_pub --cafile root.cert --cert deviceCertAndCACert.crt --key deviceCert.key -p 8883 -q 1 -t foo/bar -i anyclientID --tls-version tlsv1.2 -m "Hello" -d -h a1inzd6lczlz6f-ats.iot.us-east-1.amazonaws.com Client anyclientID sending CONNECT OpenSSL Error: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed Error: Success
So I can't running simulator.js below..
Did I do something wrong?