I am having some trouble with an Amazon SNS project I am doing with YUN. Arduino 1.5.6-r2 on Mac OS X.
Basically, after I close the AWS connection, I still get a pile of characters coming at me across the bridge, so I can't do other commands like Process.begin("date"); Process.run().
Anyway, I thought I'd try resetting the Bridge by ending it and beginning again. However, there is no Bridge.end(), even though the Library documentation says there is.
How can I reset the bridge and get back to a clean state?
After I receive HTTP/1.1 200 OK
from AWS, there should be nothing else in the connection. And yet I constantly read what appears to be repeating garbage. I don't think Amazon is sending this stuff. I would have thought YunClient.flush() would get rid of any more chars in the bridge channel, but it doesn't seem to.
Different runs of the program give different transaction IDs. It's just that the response data gets stuck in Linux and keeps getting sent back to me no matter what I do.
The code I posted is pretty much the whole story. I can't post the entire working code since its pretty large and contains my secret amazon keys.
The main issue is that closing the connection somehow does not flush out all the buffers in the bridge and I can't get them cleaned out.