B4J Question Problem to start an example file

Status
Not open for further replies.

TomKluz

Active Member
Licensed User
Hello,
I am a biginner to write any software.
I would like to open and start an axample like this:

https://www.b4x.com/android/forum/threads/jbluetooth-library.60184/#content

to get a kind a PC bluetooth terminal.
I have install B4J, loaded an above example, created addilional libraries folder stc. Everything due to Mr Erel receipt, but example didnt want to start. I am getting this info like on the picture.

May I ask to give me an advice, what is wrong ?

Thamk you in advance.

TomKluz
 

Attachments

  • Jbluetooth_problem.jpg
    Jbluetooth_problem.jpg
    110.4 KB · Views: 217

TomKluz

Active Member
Licensed User
Yes, I have made everything you have mentioned. jBluetooth.jar and jBluetooth.xml files are in AdditionalLibraries folder
and blucove-2.1.1-SNAPSHOT.jar in Library folder.
Is it right ?
 
Upvote 0

TomKluz

Active Member
Licensed User
What do you mean jBluetooth is checked in Libraries folder ?
Does it mean that jBluetooth library (blucove-2.1.1-SNAPSHOT.jar file) is there ?

Which example do you recomend to start with jSerial library ?

Tomasz
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
Upvote 0

TomKluz

Active Member
Licensed User
I have went throw already B4JBegginersGuideV1_0.pdf and also seen video tutorials at etp.html but I can't find explanation for this case.
Do I have wrong blucove-2.1.1-SNAPSHOT.jar file ?
Obviously I will start to investigate JSerial example immediately.
Tomasz
 
Upvote 0

TomKluz

Active Member
Licensed User
Unfortunatelly in case of jSerial problem is the same. Seems to be that IDE cannot find right library.
I have really set an additional path in IDE.
I have no idea what is wrong.
 
Upvote 0

TomKluz

Active Member
Licensed User
Solved, for the moment.
Mr Klaus was right. I didn't check library manager and didn't mark jBluetooth or jSerial library.
That was wrong. Now both examples starts.
Thank you very much for your suport.
Tomasz
 
Upvote 0

TomKluz

Active Member
Licensed User
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
 
Upvote 0

TomKluz

Active Member
Licensed User
Dear Mr Erel,
I have suspect your suggestion (not prefix mode on PC) and have seen already suggested tutorial. Unfortunatelly in this case to see doesn't mean to understand.
I will study it more carefully again to catch what is necesarry and will be back here in few days. I am really a beginner and shame to ask such basic questions.
Anyway, I will be back. Thank you very much.
Tomasz
 
Upvote 0

TomKluz

Active Member
Licensed User
Hello,
I have tryed to initialize a global value astream in normal (not prefix mode) and I got a reaponse at last, but this is only on sign 'b" and nothing more.
What about AsyncStreamText ? When I tryed to use it I got an info that I am missing flibrary reference.
Which library contains AsyncStreamText type ?
Where I can find a manual or eaven a description about readind(sendind) text nessages by RS232 like in my case ?

Thanks for reply
Tomasz
 
Upvote 0
Status
Not open for further replies.
Top