Yayou49 Active Member Licensed User Dec 20, 2018 #1 Hi, Using a nano and a HC-05 module, when in B4A sending a text with : Code: Copy 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 Code: Copy 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 ?
Hi, Using a nano and a HC-05 module, when in B4A sending a text with : Code: Copy 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 Code: Copy 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 ?
Erel B4X founder Staff member Licensed User Longtime User Dec 21, 2018 #2 Yayou49 said: Any idea ? Click to expand... You are most probably using prefix mode in one of the sides only. Best option is to initialize AsyncStreams in prefix mode in both sides. Upvote 0
Yayou49 said: Any idea ? Click to expand... You are most probably using prefix mode in one of the sides only. Best option is to initialize AsyncStreams in prefix mode in both sides.
Yayou49 Active Member Licensed User Dec 24, 2018 #3 Problem solved with Code: Copy AStreams.Initialize(Main.Serial1.InputStream, Main.Serial1.OutputStream, "AStreams") Upvote 0
Problem solved with Code: Copy AStreams.Initialize(Main.Serial1.InputStream, Main.Serial1.OutputStream, "AStreams")