Closed dsandi closed 7 years ago
Hi @dsandi ,
Thank you very much for providing the information.
Error code -5 (SERIAL1_COMMUNICATION_ERROR) means that the ATmega is not able to retrieve the expected response from embedded Linux on AAR9331. This might be caused either by an unsupported serial baud rate or a failure in serial1 communication. From the output of cat /proc/cmdline
, we know that the baud rate configuration of your board is 250K, which is supported. You can try the following:
Run "YunSerialTerminal" example provided along with the Arduino IDE and see if you can get it working correctly. With a proper baud rate configuration and a successful serial1 communication, you should be able to use the Serial monitor as a terminal on embedded Linux.
Do a power cycle for the board and try to unload the sketch again. Note that the board will need 80-90 seconds to get ready for sketch upload.
Thanks, Liusu
Hi,
I could run the YunSerialTerminal succesfully
Speed set to 57600
Speed set to 115200
Speed set to 250000
Speed set to 500000
Sending bridge's shutdown command
��
I also did the power cycle and re run the sketch and I got this output:
AWS IoT SDK Version(dev) 2.2.0-
root@gorillayun2:~/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
/
I T
G T
Connect failed!
-1
And this out put when removed the extra Serial.println we added here
AWS IoT SDK Version(dev) 2.2.0-
Connect failed!
-1
Hi @dsandi ,
Thank you very much for providing the information.
Now the sample fails in connect. Can you double check the credentials you are using to connect to AWS IoT?
Thanks, Liusu
I missed the policies!
So I guess it would be idea to run the YunSerialTerminal example successfully before running the sdk examples. Maybe we could add that to the read.me
Hi @dsandi ,
Glad that it works.
Normally, it should not require running the YunSerialTerminal example first to get the SDK samples working. YunSerialTerminal example just verifies the Serial1 connection between ATmega and AR9331 works fine. Yun board is a little bit fragile. A better practice here is to flush an empty sketch after you finished using it to avoid unpredictable things (blocking Serial1 connection, for example) next time the board powers up.
Thanks, Liusu
Hi,
I'm having the same issue described on other closed issues. When running this basic example I get:
I added the line
Serial.println(rw_buf);
after this one and the output was:
I also run
cat /proc/cmdline
on the board and the out put was:board=linino-yun console=ttyATH0,250000 mtdparts=spi0.0:256k(u-boot)ro,64k(u-boot-env),14656k(rootfs),1280k(kernel),64k(nvram),64k(art),15936k@0x50000(firmware) rootfstype=squashfs,jffs2 noinitrd mem=64M rootfstype=squashfs,jffs2 noinitrd
I also confirmed having an internet connection by doing ping:
I'm using WiFi and I cannot use the Ethernet port to test.