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

ThingShadowEcho example problems #34

Closed eczajk1 closed 7 years ago

eczajk1 commented 7 years ago

Trying to adapt the "ThingShadow" example, but I keep getting these errors:

AWS IoT SDK Version(dev) 2.2.0-

root@Seeed:~/AWS-IoT-Python-Runtime/runtime# 
/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
/bin/ash: 1: not found
/bin/ash: /root: Permission denied
Linux
/

Later (I think when I expect the sketch to get shadow), I get this:

Exception in thread Thread-4 (most likely raised during interpr
Yield failed.
/bin/ash: 1: not found
/bin/ash: z: not found
Yield failed.

How best to diagnose these?

liuszeng commented 7 years ago

Hi @eczajk1 ,

You can manually turn on the logging and write the logs into a file on embedded Linux. You will need to add the following lines after this line:

logging.basicConfig(filename=srcLogDirectory + "yunPy.log", level=logging.DEBUG)

Note that the Python runtime package has a dedicated directory for logs: AWS-IoT-Python-Runtime/log/, which is the default value configured as srcLogDirectory. Once configured, you should be able to see log files in that directory for debugging purpose.

Also note that, without an SD card, logging to a file will be consuming Yun's on-board memory, which has a limited number of writes. Be aware of the file writes you are about to perform when you enable the logging.

Hope the above helps.

Thanks, Liusu

eczajk1 commented 7 years ago

Thanks. This helps.

I'll close as I think my error is related to something I introduced.