1 Answer
- Newest
- Most votes
- Most comments
0
The output of your mosquitto_pub command only confirms that the message was successfully published to your local mqtt broker, to verify that your RPI can connect to AWS IoT and publish messages, run the following command to directly connect to AWS IoT Core using the credentials and keys your generated by following your guide:
mosquitto_pub -h xxxxxxxxxxxxxxx-ats.iot.<region>.amazonaws.com -p 8883 --key /etc/mosquitto/certs/private.key --cert /etc/mosquitto/certs/cert.crt --cafile /etc/mosquitto/certs/rootCA.pem -t mytopic -m '{"hello" : "test"}' -i myclientid -d
If you succeed to publish a message with this command, your problem is probably related to a configuration issues with mosquitto server, check your mosquitto server log files.
If this command fails:
- Activate CloudWatch Logs in
Debug
level to diagnose connection attempts - Follow the Diagnosing connectivity issues guide to troubleshoot your connectivity issue.
Hope that helps
Relevant content
- asked a year ago
- Accepted Answerasked 2 years ago
- asked 9 months ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 7 months ago
- AWS OFFICIALUpdated 3 years ago
- AWS OFFICIALUpdated 5 months ago