If you are asking a question, please follow this template:
- My goal is: I am trying to connect aws iot core but getting MQTT disconnect. I am using ESP32-WROOM-32.
- My actions are:
step-1 : cmd connected to aws configure, able to get things list.
setp-2 : connected to wifi , status showing connected …
step-3 : created policy , here is my policy , policy name “device-policy”
{
“Version”: “2012-10-17”,
“Statement”: [
{
“Effect”: “Allow”,
“Action”: “iot:",
“Resource”: "”
}
]
}
step4 : try to connect aws iot core : mos aws-iot-setup --aws-region us-east-1 --aws-iot-policy device-policy
my mos.yml config
config_schema:
- [“temperature”, “o”, {title: “Temperature related configurations”}]
- [“temperature.basis”, “d”, 107, {title: “Ambient temperature to act as reference:”}]
- [“temperature.unit”, “s”, “Fahrenheit”, {title: “Temperature unit:”}]
- [“led”, “o”, {title: “LED configurations”}]
- [“led.gpio”, “i”, 2, {title: “Built-in LED GPIO:”}]
- [“sleep_duration”, “d”, 10, {title: “Time in minutes after for which the device should (deep) sleep:”}]
- [“mqtt.enable”, “b”, true, {title: “Enable MQTT service:”}]
- [“mqtt.server”, “s”, “a2kjz65eoad---------dasdasd-ats.iot.us-east-1.amazonaws.com”, {title: “MQTT server to publish to.”}]
- [“mqtt.ssl_ca_cert”, “s”, “ca.pem”, {title: “Path to trusted CA certificate, relative to ‘fs’.”}]
= > ca certificate is inside fs/ca.pem
- The result I see is: I am getting MQTT disconnected
- My expectation & question is: I am not able to figure out how , how to connect . I am very much struggling to find out it . Please help me to connect to aws iot core. Thanks