Android Question (Solved) BLE example from B4R

f0raster0

Well-Known Member
Licensed User
Longtime User
Hey guys,

I'm using this demo
with my nRF modules, it works just super perfect in my iPhone (connect super fast ), but I can't make it work (..yet) in Android

from example B4i, I just changed the serviceId and charId
B4X:
'    serviceId = UUID("ffe0")
'    charId = UUID("ffe1")
    serviceId = UUID("FFFFFFF-FFFF-FFFF-FFFF-FFFFFFFFFFFF")
    charId = UUID("FFFFFF1-FFFF-FFFF-FFFF-FFFFFFFFFFFF")

the question: What do I have to change in the b4a example below: ?
I don't have errors, just can't connect to the device.
B4X:
Sub Service_Create
    manager.Initialize("manager")
'    serviceId = UUID("ffe0") 'original example b4a
'    charId = UUID("ffe1") 'original example b4a
    serviceId = UUID("FFFFFFF-FFFF-FFFF-FFFF-FFFFFFFFFFFF")
    charId = UUID("FFFFFF1-FFFF-FFFF-FFFF-FFFFFFFFFFFF")

End Sub

Private Sub UUID(id As String) As String
#if B4A
   ' Return "0000" & id.ToLowerCase & "-0000-1000-8000-00805f9b34fb" 'original example b4a
     Return id.ToLowerCase
#else if B4I
    Return id.ToUpperCase
#End If
End Sub


thanks you all

EDIT: after reset everything laptop, iPhone and Androids, it works!! :p
 
Last edited:
Top