aws / aws-iot-device-sdk-arduino-yun

SDK for connecting to AWS IoT from an Arduino Yún.
Apache License 2.0
163 stars 77 forks source link

Received error code -1 #64

Closed gideonmugo closed 6 years ago

gideonmugo commented 6 years ago

screen_shot_20180129_at_20750_pm i followed the tutorial and sketches in this link https://www.hackster.io/ben-eagan/alexa-controlled-leds-through-arduino-yun-ac1171, and i got this error [ERR] command: setup...code:-1 given by arduino yun when trying to communicate with the thing/lamdba. How can i solve this problem?

hedeshianaws commented 6 years ago

Thank you for trying the AWS IoT Yun samples.

This looks like the setup routine is returning "General Error" since it is receiving garbage over the serial connection. (https://github.com/aws/aws-iot-device-sdk-arduino-yun/blob/master/AWS-IoT-Arduino-Yun-Library/aws_iot_mqtt.cpp#L85) This is usually caused by your yun not being set up correctly.

Please take a look at the following issues as other users were having similar issues: https://github.com/aws/aws-iot-device-sdk-arduino-yun/issues/25 https://github.com/aws/aws-iot-device-sdk-arduino-yun/issues/28 https://github.com/aws/aws-iot-device-sdk-arduino-yun/issues/63

gideonmugo commented 6 years ago

@hedeshianaws

Thanks for your help. I followed #25 #28 and #63 . I got this result:

screen_shot_20180131_at_120119_pm

it says that no such file or directory. What could be the issue

fengsongAWS commented 6 years ago

Hi @gideonmugo , I saw you already have AWS-IoT-Python-Runtime under root directory. What is the problem you are having with Arduino SDK?

gideonmugo commented 6 years ago

Hi fengsongAWS, The arduino SDK had some issues, but i have handled that and now the program is running well. Thanks everyone for your help.