I had recently purchased an Adruino Yun to test the features of Amazon's new AWS IOT service.
I have performed all the installation documented at GitHub - aws/aws-iot-device-sdk-arduino-yun: SDK for connecting to AWS IoT from an Arduino Yún. .
I uploaded the example at aws-iot-device-sdk-arduino-yun/AWS-IoT-Arduino-Yun-Library/examples/BasicPubSub at master · aws/aws-iot-device-sdk-arduino-yun · GitHub .
I changed the example to use the Console instead of Serial.
The sketch either fails or stalls at the line:
"if((rc = myClient.setup(AWS_IOT_CLIENT_ID)) == 0) {"
How can I debug the failure? Where are the setup() failures logged to?
sonnyyu
November 25, 2015, 9:20am
2
Use:
ssh root@ yourYunsName.local 'telnet localhost 6571'
Make sure get :
"curr_version"
...
#include "aws_iot_config.h"
#include <Console.h>
...
...
void setup() {
// Start Serial for print-out and wait until it's ready
Bridge.begin();
Console.begin();
while(!Console);
...
...
//
char curr_version[80];
sprintf(curr_version, "AWS IoT SDK Version(dev) %d.%d.%d-%s\n", VERSION_MAJOR, VERSION_MINOR, VERSION_PATCH, VERSION_TAG);
Console.println(curr_version);
// Set up the client
if((rc = myClient.setup(AWS_IOT_CLIENT_ID)) == 0) {
...
Afternoon
I also purchased the Arduino YUN and was able to use the example BasicPubSub to connect to AWS and publish data. Worked perfectly!
Because of the limitations of the YUN only having one UART and it is occupied, I purchased the Yun shield (dragino V1.1) and the Arduino Due.
I used the same software to configure the Yun and the Arduino, following the same steps (GitHub - aws/aws-iot-device-sdk-arduino-yun: SDK for connecting to AWS IoT from an Arduino Yún. ).
It does not work: the Arduino keep returning "Setup failed! - 5".
Possible problem is that the Due cannot use the Bridge. Looking at webpage http://wiki.dragino.com/index.php?title=Yun_Shield
under topic: "Can i use the Yun Shield with Arduino Due?"
What I do not understand is that the example is not using the bridge and therefore should work. It is the same sketch and the same
Would it be possible to connect to AWS (not using bridge) using the BasicPuSub example and the combination of the Drgino shield and Arduino Due?
The example I used BasicPubSub is the same as above: