Closed ricksondpenha closed 7 years ago
yess its working now... just added a vTaskdelay before aws_iot_mqtt_connect.
Hi @ricksondpenha
Would you mind posting your modifications? I am still encountering the same issue you described above despite adding the vTaskdelay before aws_iot_mqtt_connect. Thanks!
Same issue here. Tracked it down to:
rc = aws_iot_mqtt_internal_wait_for_read(pClient, CONNACK, &connect_timer);
in file: components/awsiot/src/aws_iot_mqtt_client_connect.c
, function: _aws_iot_mqtt_internal_connect
It timesout. I've increased the mqttCommandTimeout_ms
to no avail.
Any ideas?
For anyone else getting to this point - the key was in the policies. You must have a policy which allows iot:Connect to any resource as so:
{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "iot:Connect" ], "Resource": [ "*" ] } ] }
Hi @edge0701
Where to set this policies.
and also i am getting a different error using latest esp idf . Connected to AP V (5328) intr_alloc: esp_intr_alloc_intrstatus (cpu 0): checking args V (5328) intr_alloc: esp_intr_alloc_intrstatus (cpu 0): Args okay. Resulting flags 0xE D (5336) intr_alloc: Connected src 51 to int 12 (cpu 0) abort() was called at PC 0x401062e7 Guru Meditation Error: Core 0 panic'ed (abort)
Backtrace: 0x4010772e:0x3ffca590 0x40082fec:0x3ffca5b0
Rebooting...
after debugging using gdb
Remote debugging using COM9
0x40107af6 in aws_iot_mqtt_connect (pClient=0x3ffca900,
pConnectParams=
The policy must be created under AWS IoT -> Security -> Policies. The policy then needs be linked with the certificate you are using for authentication. To do that, go to the certificate, click "Actions", and then "Attach policy".
Hi, Thank you for the reply. I had small query . Is there an API to disable exponential back off when network disconnects.
Thank you Paul
Hi Carson, I tried to compile the template with the latest esp-idf release and I'm getting a task watchdog trigger and couldn't get any further. I have checked with the certificates and policies but couldn't debug what exactly is causing this error. Could you please provide a feedback.