1回答
- 新しい順
- 投票が多い順
- コメントが多い順
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
関連するコンテンツ
- AWS公式更新しました 1年前
- AWS公式更新しました 2年前
- AWS公式更新しました 1年前