Android Tutorial Android Bluetooth / BluetoothAdmin Tutorial

Status
Not open for further replies.

GMan

Well-Known Member
Licensed User
Longtime User
But still nothing is transferred...the RX-Led blinks, but the format should be wrong.
 

karthikeyan

New Member
hello friends,
am new to b4c. i tried this blutooth admin tutorial. i have installed this apk to my tablet. when i am trying to connect the found device, i received an error message like- unable to start service discovery. please help me to fix this issue. am using the code provided in this tutorial. thank you
 

GMan

Well-Known Member
Licensed User
Longtime User
Hoi,
which BT-Modul are you using and what is the version of your Android-OS ?
 

pin71

Member
Licensed User
Longtime User
Hi Erel,

Is it possible to have 3 devices connected?
1 master and 2 slaves?

Thanks
 
Last edited:

pin71

Member
Licensed User
Longtime User
Yes. You need to create a Serial object for each connection.
Thank you, but should I use only ListenInsecure setting a different Port for each connection, or can I use the regular Listen?

Thanks
 

pablan

Member
Hi,
is there a way to skip automatically the passkey step for pairing to a specific device which has a default passkey (1234)?
Thank you
 

Flosch

Member
Licensed User
Longtime User
I want to talk to a Bluetooth Device and I have to send:
6 214 0 171 15 66 7 (as Byte) to get the device Status.

I tried your Lib and modified your code:

B4X:
Sub btnSend_Click
 
    Dim Poll(7) As Byte
   
    Poll(0) = 6
    Poll(1) = 214
    Poll(2) = 0
    Poll(3) = 171
    Poll(4) = 15
    Poll(5) = 66
    Poll(6) = 7
   
    AStream.Write(Poll)
    LogMessage("Me", " Pol-CMD Send")
 
End Sub

But I didn't received an answer from the device.
I checked the received code with an oscilloscope and figuerd out I will allways send

0 0 7 6 214 0 171 15 66 7

So there is a 0 0 7 in front.

I connected my android to a PC and tried it with H-Term. There is also the 007 in front.
How can I get rid of the 0 0 7?
 

cubetennis

Member
Licensed User
Longtime User
Hi Erel
Where is the new thread for this question?
Could you give me a example how can I send binary data via bleutooth.
Thank you
 

GMan

Well-Known Member
Licensed User
Longtime User
Hoi,
can i shorten the search time when discovering ?
 

GMan

Well-Known Member
Licensed User
Longtime User
OK, i want to stop it after 4 Seconds searching...how can i do that ?
 

GMan

Well-Known Member
Licensed User
Longtime User
Hoi Erel,
thx - that works !
 

GMan

Well-Known Member
Licensed User
Longtime User
Hoi Erel,

did not - the searching stops and teh found device was shown, but cant connect.
I think that the admin.CancelDiscovery returns false ?
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…