Go Down

Topic: Yún and AWS SDK & Console (Read 173 times) previous topic - next topic

rekter

Nov 15, 2018, 02:06 am Last Edit: Nov 16, 2018, 02:05 am by rekter
Has anyone been working with amazon cloud? I know I am and now I have a little problem. Problem isn't with network or with AWS but communicating between processors using conflicting Bridge and AWS libraries..
I'm willing to use Arduino IDE's serial console over WiFi, but I can't use Bridge and AWS libraries same time, because they both use hardwareserial to communicate.
So I wondered has anyone else encountered this and how it might be solved.

I have narrowed to few options:


Extend AWS -python API so I can use serial monitor like with Bridge-library
Q: Serial monitor uses ssh?
Q: Does it communicate with Bridge -python API?


Switch serial between Bridge and AWS
Q: Use AWS only when publishing message?
Q: How do I start and end using connections? Bridge has end-function, but I don't know how to recover serial with AWS library yet.  


Do some redesigning and create webUI and insert values through AWS sdk to mcu
Q: ??
A: IMO least coding with this option..



I have forked AWS library already to get timestamp from linux to mcu and to create independent publish queue same time as I use it for publishing messages to AWS, for cases like Yún could be multiple days or even weeks without network and send all cached data to AWS when online.
I noticed that there is new library called Ciao, but that doesn't support authentication methods?

Any suggestions? or experience with this?


Edit:

I decided implement my own "Console" to AWS's libarary. It kind of works now, but I don't know how to properly write socket with python. I want daemonize my socket listener when it is called, otherwise I can't do much when It is receiving. I already tried threading, but that didn't end well.. Maybe I should write seperate daemon for listening socket and then just pipe the data to other program?

But for this I figured a solution, 'Extend AWS -python API so I can use serial monitor like with Bridge-library'. 

Links to libraries:
https://github.com/aws/aws-iot-device-sdk-arduino-yun
https://github.com/arduino-libraries/Bridge
https://github.com/arduino/YunBridge/tree/master/bridge

Go Up