1 Risposta
- Più recenti
- Maggior numero di voti
- Maggior numero di commenti
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
Contenuto pertinente
- AWS UFFICIALEAggiornata un anno fa
- AWS UFFICIALEAggiornata 3 anni fa
- AWS UFFICIALEAggiornata 2 anni fa
- AWS UFFICIALEAggiornata un anno fa