Closed silverage01 closed 6 years ago
Hi @stephenalbright ,
Thank you very much for using AWS IoT Arduino Yun SDK.
From the logs, it seems like the SDK is not able to cd into /root/AWS-IoT-Python-Runtime/runtime/
and therefore run.py
cannot be found and start the Python runtime on AR9331.
Can you ssh into the board and do a ls -R ~
and attach the output? I would like to see the folder structure on AR9331 after the installation.
Thanks, Liusu
File attached with the directory structure.
Hi Liusu,
The directory structure is attached to a comment here:
https://github.com/aws/aws-iot-device-sdk-arduino-yun/issues/63
Thanks,
Steve
Sent: Tuesday, January 23, 2018 at 1:14 PM From: "Liusu Zeng" notifications@github.com To: aws/aws-iot-device-sdk-arduino-yun aws-iot-device-sdk-arduino-yun@noreply.github.com Mention mention@noreply.github.com Subject: Re: [aws/aws-iot-device-sdk-arduino-yun] GroveWithAWSIot.ino sketch - [ERR] command: setup code: -1 (#63)
Hi,
Thank you very much for using AWS IoT Arduino Yun SDK.
From the logs, it seems like the SDK is not able to cd into /root/AWS-IoT-Python-Runtime/runtime/ and therefore run.py cannot be found and start the Python runtime on AR9331.
Can you ssh into the board and do a ls -R ~ and attach the output? I would like to see the folder structure on AR9331 after the installation.
Thanks, Liusu
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.
Hi @stephenalbright ,
Thank you very much for providing the information.
It seems like you have installed the Python runtime part of the SDK library to directory /
. Can you try reinstall the library to directory /root
instead? If you followed the installation instructions correctly before, for now you can simply copy paste /AWS-IoT-Python-Runtime
into /root
.
cd /
cp -r ./AWS-IoT-Python-Runtime /root/
After that, let's do another list view of directory /root/AWS-IoT-Python-Runtime/
and see if we have everything in the right place:
cd /root/
ls ./AWS-IoT-Python-Runtime
Thanks, Liusu
Ok, I copied the directory as you instructed. Here is what it looks like now (not sure why the text is being struck through in this text editor):
root@Seeed:~# ls AWS-IoT-Python-Runtime root@Seeed:~# cd /root/ root@Seeed:~# ls ./AWS-IoT-Python-Runtime certs lib log runtime root@Seeed:~# cd .. root@Seeed:/# ls AWS-IoT-Python-Runtime output.txt sys bin overlay tmp dev proc usr etc rom var lib root www mnt sbin root@Seeed:/#
When I run the sketch now, there are some errors in the serial monitor, but the shadow is being updated in AWS IoT. Here is the output from the serial monitor:
AWS IoT SDK Version(dev) 2.2.0-
root@Seeed:~/AWS-IoT-Python-Runtime/runtime# 1 /bin/ash: /root: Permission denied /bin/ash: 1: not found /bin/ash: /root: Permission denied /bin/ash: 1: not found /bin/ash: /root: Permission denied /bin/ash: 1: not found /bin/ash: /root: Permission denied Linux /
I T [LOG] command: setup completed.
G T [LOG] command: config completed.
C T [LOG] command: connect completed.
SI T [LOG] command: shadow init completed.
S_RD T [LOG] command: register thing shadow delta function completed. Current temperature is -273.15
Ticket updated here:
https://github.com/aws/aws-iot-device-sdk-arduino-yun/issues/63
Sent: Tuesday, January 23, 2018 at 11:13 PM From: "Liusu Zeng" notifications@github.com To: aws/aws-iot-device-sdk-arduino-yun aws-iot-device-sdk-arduino-yun@noreply.github.com Mention mention@noreply.github.com Subject: Re: [aws/aws-iot-device-sdk-arduino-yun] GroveWithAWSIot.ino sketch - [ERR] command: setup code: -1 (#63)
Hi,
Thank you very much for providing the information.
It seems like you have installed the Python runtime part of the SDK library to directory /. Can you try reinstall the library to directory /root/ instead? If you followed the installation instructions correctly before, for now you can simply copy paste /AWS-IoT-Python-Runtime into /root.
cd / cp -r ./AWS-IoT-Python-Runtime /root/
After that, let's do another list view of directory /root/AWS-IoT-Python-Runtime/ and see if we have everything in the right place:
cd /root/ ls ./AWS-IoT-Python-Runtime
Thanks, Liusu
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.
Hi @stephenalbright ,
Those lines of "not found" and "permission denied" are expected. They are the result of the testing commands to skip over the welcoming prompt on AR9331 and ensure that the serial1 communication is actually working for passing commands from your sketch to the Python runtime. More details can be found in the following line of code: https://github.com/aws/aws-iot-device-sdk-arduino-yun/blob/master/AWS-IoT-Arduino-Yun-Library/aws_iot_mqtt.cpp#L862
You should now get your sketch and SDK working correctly.
Thanks, Liusu
If I let the sketch run long enough, here is the kind of output I see in the serial monitor. Is this normal behavior as well?
SU T [LOG] command: shadow update completed.
Z T
Y 2 0 JSON-288
Y F: No messages. Current temperature is 347.68
SU3F: Invalid JSON payload. [ERR] command: shadow update code: -31
Z T
Y 1 0 JSON-291
Y F: No messages. Current temperature is -273.15
Hi @stephenalbright ,
The error code -31 (or "SU3F" you see) means that there is an value error when invoking the shadow update. Mostly like there is a JSON parsing error in processing the outgoing request payload. This could be caused in difference scenarios, e.g., invalid input JSON in the sketch or the input JSON is corrupted when communicating from ATmega 32u4 to AR9331. For more details, you can take a look at the following line in the Python runtime code: https://github.com/aws/aws-iot-device-sdk-arduino-yun/blob/master/AWS-IoT-Python-Runtime/lib/command/commandShadowUpdate.py#L63
You can always perform retries to ensure that your shadow update actually reaches to the cloud.
Thanks, Liusu
Closing the issue due to inactivity.
Getting an error when trying to run GroveWithAWSIot.ino on my board. Here are the errors I am seeing in Serial Monitor on COM9:
I am following the instructions here: http://wiki.seeed.cc/Seeeduino_Cloud_and_Grove_IoT_Starter_Kit_Powered_by_AWS/
Here are my aws_iot_config.h contents: