B4J Question astreams questions

Scenario 1. I have a byte beacon that sends exactly N bytes (say N=90) from a bluetooth device (HC-05). That byte beacon is running BEFORE my B4X project starts. If I use asynchstreams in prefix mode (N=90) I get an error that the message is too long. Which makes perfect sense since my computer's receive buffer is gathering data up to when asynchstreams fires (on whatever it reads as the stream length) so when the asyncstreams first fires I get an error.
Q1. Can I start in non-prefix mode, have asynchstreams fire a couple of times to purge my computer's receive buffer and THEN switch to prefix mode????

Scenario 2. I have asynchstreams running in prefix mode. Data is coming in nicely (as it does). Then a transmission error occurs. and I don't fire on the Nth beacon byte (but some number of bytes later).
Q2. The next prefix integer is then screwed up. How can I get asynchstreams "synched" back to using N bytes?

Q3. If I can switch between prefix mode and non-prefix mode when my B4X app is running can I keep re-synching it back into prefix mode?

Q4. Am I totally and completely lost here? I can successfully use asynchstreams in either mode but pre-fix is soooooooo much better if I can avoid initialization and re-synch options.

Q5. Can I purge asynchstreams when it is in prefix mode by sending 00h's a whole bunch of times?

Q6. Can I Switch asynchstreams read event on and off. If so, I could just send my beacon a start signal and then turn READ on.
 
Top