Android Question asyncstreams & bluetooth

atiaust

Active Member
Licensed User
Longtime User
Hi Erel,

I have a B4A app using a Bluetooth connection connected to an arduino board with an app written in B4R.
When I send a text massage to the Arduino board it initiates a response back to the B4A app but only the first response is recieved as one line : ie You: Recieved
all following responses appear as 2 lines ie
You: R
You: ecieved

I am using

B4X:
Sub AStream_NewData (Buffer() As Byte)
    LogMessage("You", BytesToString(Buffer, 0, Buffer.Length, "UTF8"))
    Log("buffer lenght = " & Buffer.Length)
End Sub

I have read all the tutorials and issues relating to asyncstreams but can't see a straight forward way to fix.

Any help appreciated.

Thanks
 

atiaust

Active Member
Licensed User
Longtime User
Sorry, did not mean to neglect the rest of the community.

How do I add byte 10 to the message when you can't concatenate.. I understand this is part B4R question.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…