Android Question AsyncStreams - when is data sent?

Creideiki

Active Member
Licensed User
Longtime User
Hi,

I use AsyncStreams with BT and a BT/Serial converter. The other (serial) device needs an accurate timing.
How can I get the point where AsyncStream has sent his buffer? I could calculate the time with the serial parameters, but if I had an event, whenever the send buffer is empty, I think it would be more reliable.
 

Creideiki

Active Member
Licensed User
Longtime User
There isn't any such event. Try to do some measurements. Do you see any significant latencies?
Latencies? I don't care about latencies at the moment...

I have 528 bytes 0x55 as a wakeup sequence. After they are sent I have min. 13 ms and max. 130ms to send the request. So I should aim carefully to hit this target.

Well... I will have to calculate the timing myself... when AsyncStreams are done sending the sequence the BT/Serial-Adapter could still have some bytes in his buffer...
 
Upvote 0

KitCarlson

Active Member
Licensed User
Longtime User
I have used a logic analyzer to capture rx, tx on the embedded side UART. I can not remember exact timing numbers, but they were suitable for my user interface. Some may depend on the baud rate, and the point of reference for the time measurement, by the command processor.
 
Upvote 0
Top