gezueb Active Member Licensed User Longtime User Jun 8, 2015 #1 I have a problem with a bluetooth com using AsyncStreamText. The instream from bluetooth is continous. It works perfectly until i try to write an outstream using astream.write. Then the instream is corrupted. Thanks for your help!
I have a problem with a bluetooth com using AsyncStreamText. The instream from bluetooth is continous. It works perfectly until i try to write an outstream using astream.write. Then the instream is corrupted. Thanks for your help!
Erel B4X founder Staff member Licensed User Longtime User Jun 8, 2015 #2 There is no relation between the output stream and the input stream. Unless something is broken in the Bluetooth driver. Upvote 0
There is no relation between the output stream and the input stream. Unless something is broken in the Bluetooth driver.
gezueb Active Member Licensed User Longtime User Jun 8, 2015 #3 Thats what I was assuming. But is it possible that they use the same listener (newdata or new-text) or would it be wise to stop input listening while sending a response? Upvote 0
Thats what I was assuming. But is it possible that they use the same listener (newdata or new-text) or would it be wise to stop input listening while sending a response?
Erel B4X founder Staff member Licensed User Longtime User Jun 8, 2015 #4 Bluetooth is full duplex. It should support both incoming and outgoing communication. AsyncStreams itself keeps each "stream" separately. You should make sure that there is only one AsyncStreams object managing the connection. Upvote 0
Bluetooth is full duplex. It should support both incoming and outgoing communication. AsyncStreams itself keeps each "stream" separately. You should make sure that there is only one AsyncStreams object managing the connection.
gezueb Active Member Licensed User Longtime User Jun 8, 2015 #5 Solved the problem! It was my "write" that disturbed the device and changed the way it sent the stream so my parsing went haywire. B4a works like a charm. Thanks for your help! Georg Upvote 0
Solved the problem! It was my "write" that disturbed the device and changed the way it sent the stream so my parsing went haywire. B4a works like a charm. Thanks for your help! Georg