ARMmbed / mbed-os-example-for-aws

Mbed OS example to connect to AWS IoT Core
Apache License 2.0
15 stars 21 forks source link

Unexpected revc length error #9

Closed Hphipps closed 4 years ago

Hphipps commented 4 years ago

When I try to run the AWS example program on the DISCO-L475VG-IOT01A board, this error shows up and I'm unable to figure out how to solve this issue. The AWS console reports that the device successfully connected but then the error shows up and it does not send or receive an mqtt message.

AwsError

Hphipps commented 4 years ago

Looks like this line is causing the error. Does anyone know how to fix this? auto connect_status = IotMqtt_Connect(&network_info, &connect_info, /* timeout ms */ MQTT_TIMEOUT_MS, &connection);

boraozgen commented 4 years ago

This seems to be a issue with your AWS IoT policy. Test if it works with a less strict policy, such as:

{
   "Effect": "Allow",
   "Action": "iot:*",
   "Resource": "*"
}
Hphipps commented 4 years ago

Looks like that fixed the issue. Thanks for the help.