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

Connect Failed! (-1) issue using BasicPubSub #54

Closed ciaowecia81 closed 6 years ago

ciaowecia81 commented 7 years ago

Hello, I am trying to connect my YUN (with OpenWrt) to AWS IoT using this SDK. I have followed every step carefully, when I try using BasicPubSub Example . When teh sketch runs I receive a response "Connect failed" with code "-1". I read the issue #28, but my problem is not solved. I use the Windows platform to update the YUn system. Thanks

hedeshianaws commented 7 years ago

Thank you for your interest in AWS IoT. Can you elaborate on what steps from issue #28 you've tried and what the results were?

ciaowecia81 commented 7 years ago

Hi, I add the row Serial.println(rw_buf); in the file aws_iot_mqtt.cpp#L851 to investigate the problem, but the arduino monitor doesn't write anything. Can you help me abiut this ? Thanks

liuszeng commented 7 years ago

Hi @ciaowecia81 ,

Thank you very much for using AWS IoT Arduino Yun SDK.

To further debug the issue, can you confirm that you have installed AWSIoTPythonSDK v1.0.0 on your OpenWRT during the installation steps for Yun SDK? To check that, you can use the following command:

pip show AWSIoTPythonSDK

You should be able to see the following output:

Name: AWSIoTPythonSDK
Version: 1.0.0
Summary: SDK for connecting to AWS IoT using Python.
Home-page: https://github.com/aws/aws-iot-device-sdk-python.git
Author: Amazon Web Service
Author-email: UNKNOWN
License: UNKNOWN
Location: /Library/Python/2.7/site-packages
Requires: 

Thanks, Liusu

ciaowecia81 commented 7 years ago

Hi Liusu, yes I able to see what you write

Name: AWSIoTPythonSDK Version: 1.0.0 Summary: SDK for connecting to AWS IoT using Python. Home-page: https://github.com/aws/aws-iot-device-sdk-python.git Author: Amazon Web Service Author-email: UNKNOWN License: UNKNOWN Location: /Library/Python/2.7/site-packages Requires:

liuszeng commented 7 years ago

Hi @ciaowecia81 ,

Thank you very much for providing the information.

Can you try to clone down the examples for Python SDK v1.0.0 from the following link onto the OpenWRT? https://github.com/aws/aws-iot-device-sdk-python/tree/v1.0.0

After that, can you try to run the Python SDK sample using the same credentials you use in Yun SDK and see if there is any issue?

Thanks, Liusu

vareddy-zz commented 6 years ago

Hi @ciaowecia81 , We haven't heard back from you in a long time so we are closing this issue. Please create a new issue if you have any questions about the Arduino SDK. Thanks! Varun