Wasn't sure where to put this message since it is more of a heads up than a question. Using the new B4A BlueTooth Chat example Here I couldn't connect to B4J JBlueTooth Here after playing around I found that Two B4As connected OK but if I sent a message from B4A to B4J nothing happened -
While looking at the code I found this note in the new B4A:
Then, in comparing the lines in both programs:
I found that one is set for BigEndian (true) and the other for LittleEndian (False).
Making them both True solved the problem but it does bring up the question.
If you are trying to communicate with an unknown device is there a protocol for establishing the protocol?
AStream_NewData
never fired. If I sent from B4J then B4A would fail with no error just the message "connection is broken".While looking at the code I found this note in the new B4A:
B4X:
'prefix mode! Change to non-prefix mode if communicating with non-B4X device.
Then, in comparing the lines in both programs:
B4X:
AStream.InitializePrefix(serial.InputStream, False, serial.OutputStream, "astream")
Making them both True solved the problem but it does bring up the question.
If you are trying to communicate with an unknown device is there a protocol for establishing the protocol?
Last edited: