Hello,
I have took Mr Erel suggestion to study recomended example of jSerial library (a Chat).
Unfortunattelly after few days I have to say that eaven this case is not simple enaugh to me.
My target is to have a kind of Android bluetooth monitor of data caming from Arduino device.
For now I would like to start only with PC (B4J) and cable connection Arduino-PC.
Arduino sends data and accept simple commands as text. For example it is sending a data like -12.45 as text by Serial.println(Value) where Value = "-12.34".
I have check it on Arduino serial monitor and also on Android Bluetooth terminal using module HC-05 (works fine).
I was trying to use a part of Chat example for BrJ using only cable connection with virtual Com port. Example starts but don't accept a data from Arduino.
I am getting this info from a log area, immediately after opening a com port:
java.lang.RuntimeException: Message size too large. Prefix mode can only work if both sides of the connection follow the 'prefix' protocol.
at anywheresoftware.b4a.randomaccessfile.AsyncStreams$AIN.run(AsyncStreams.java:220)
at java.lang.Thread.run(Thread.java:748)
Error: (RuntimeException) java.lang.RuntimeException: Message size too large. Prefix mode can only work if both sides of the connection follow the 'prefix' protocol.
Connection is broken.
May I ask you for suggestion what is wrong ?
Tomasz