B4R Question [Solved] How to remove Control Characters with HC-05 and readstring

Yayou49

Active Member
Licensed User
Hi,

Using a nano and a HC-05 module, when in B4A sending a text with :
B4X:
Starter.Manager.SendMessage("Hello") 'BluetoothManager
In arduino Serial Monitor, when receiving data (readstring), I can see some control characters.
I don't know how to remove them.

In the same time, if I try to use
B4X:
Serial.println(Data.indexOf("Hello"))
, return is -1. Like if "Hello" is not reachable.

My final goal is to catch the message and plug different functions according to the value.

Any idea ?
 

Yayou49

Active Member
Licensed User
Problem solved with
B4X:
AStreams.Initialize(Main.Serial1.InputStream, Main.Serial1.OutputStream, "AStreams")
 
Upvote 0
Top