AWS Shadow application issue

akolamb1's picture

Platform: BCM94343W_AVN

WICED SDK: 3.5.2


I was able to build and run AWS IoT Shadow application successfully. On SW2 press, Publish succeeds everytime, turning LED ON and OFF and updating Shadow State on AWS IoT Console.


However, when i try to update Shadow from AWS IoT Console, i am able to turn LED OFF (or ON) as expected, but only once. But after that, i get a Publish FAILED message on Tera Term and application seems to hang (Pressing SW2 has no more effect, even on LED of hardware). Below is the activity from TeraTerm.


Thing Name: starterkit_1517
Shadow State Topic: $aws/things/starterkit_1517/shadow/update
Shadow Delta Topic: $aws/things/starterkit_1517/shadow/update/delta
Reading the certificate and private key from DCT...
[MQTT] Connecting to MQTT Broker...
[MQTT] Successfully connected MQTT Broker
Publish SUCCEEDED for topic [$aws/things/starterkit_1517/shadow/update]
Subscribe SUCCEEDED for topic [$aws/things/starterkit_1517/shadow/update/delta]
Button is pressed
Publish SUCCEEDED for topic [$aws/things/starterkit_1517/shadow/update]
[MQTT] Received {"version":185,"timestamp":1472483694,"state":{"status":"OFF"},"metadata":{"status":{"timestamp":1472483694}}}  for TOPIC : $aws/things/starterkit_1517/shadow/update/delta

child->string [version]
child->string [timestamp]
child->string [state]
Requested LED State[OFF] Current LED State [ON]
Publish FAILED for topic [$aws/things/starterkit_1517/shadow/update]


What might be going on? Symptoms are same even when i download the latest AWS Platform files from CloudConnectKits · GitHub

rcnmartell's picture

I have the exact issue. I dug into the JSON parser and it was fine on the first publisher. It seems to hang getting ready for the next publish from the AWS. I know the publish gets on the queue , as it can be seem in the AWS MQTT console. If you code out the publish on the LED updates, up can get the LED state to change which eliminates that as the problem. You can switch back and forth and still get the buttom interurpts ( so they are not disabled ).

With this coded out, the next shadow publish will 100% take down the system. I am stalled too