I'm using astreams to receive data over a Bluetooth link.
If the comms gets out of sync I need to clear the buffer, before I send another request for data. but I can't see how to clear the buffer, the astreams_newdata only fires when new data is received, if there is data in the buffer I want to discard how can I read this ?
I think I get characters in the buffer when the app pauses and resumes, or when I kill and restart it, so there are characters in the buffer but the event doesn't fire. I need some way of clearing the buffer before I request new data, otherwise I guess I could code in a dummy request that causes a dummy return to fore the event.