Bluetooth Chat

todh

Member
Licensed User
Longtime User
Has anyone been able to use the information about creating the Bluetooth chat example and gotten it to work? I have started over three times and have struck out. Is there a Bluetooth chat .zip example?:sign0163:
 

todh

Member
Licensed User
Longtime User
Blurtooth Chat

Erel,
Thanks for moving my issue. I am able to get the Bluetooth example to work but the replies are in Hex not ASCII. I am trying to get the Chat example working but progress is slow. Is there a way to alter the BT example to read the messages in Hex?:sign0188:
 
Upvote 0

Beja

Expert
Licensed User
Longtime User
Hi Todh

you are lucky because you are receiving something.. I am sending but not receiving any data in any form.. working on this though...
Regarding your question, and if I am to put my two cents, then I believe the receiving side, that's your code is responsible to convert the received string back to byte type. I think all radio transmissions are string type even if you packaged the transmitted data in byte array.
 
Last edited:
Upvote 0

KitCarlson

Active Member
Licensed User
Longtime User
The bluetooth tutorial example worked for me. My android device is a SGT2 7.0. For the remote end I am using a KCwirefree BT radio connected to a FTDI USB to rx, tx converter from a PC.

I made two changes to the bluetooth example code, one for non-prefix mode, the other for connect insecure. Both of these changes can be found in B4A posts. I will migrate to prefix mode, once my programming skills improve. For now progress is good, and learning quickly.

I have used TeraTerm on PC to verify duplex communications. I will also be working with embedded application. To reduce hardware devices, and improve debugging, I am using VB6 application to emulate the embedded system communications dialog. VB6 communications also works using MSCOMM, in text mode.
 
Last edited:
Upvote 0

todh

Member
Licensed User
Longtime User
Bluetooth Chat issues

I have the Bluetooth example working as well with the following change:
AStream.Initialize(Main.serial1.InputStream, Main.serial1.OutputStream, "AStream")
I now have the byte converter working as well, you must "Dim Conv As ByteConverter" in the Chat Activity area before using the conversion utility. Much like VB.NET.
msg2(1) = Conv.HexFromBytes(Buffer) is working but needs adjustment to get the correct values. Coding is a tough sport! Especially for the novice.
I have yet to get the Bluetooth Chat example working but I may not need it now. :D
 
Upvote 0

todh

Member
Licensed User
Longtime User
It took a while and learning how to speak b4a. I now have the Bluetooth Chat example working and communicating with my tri-axial accelerometer. Finally I can begin coding. I needed ASCII tables to get the correct hex requests to send. :sign0060:
 
Upvote 0
Top