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
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.
thanks you all
EDIT: after reset everything laptop, iPhone and Androids, it works!!
I'm using this demo
Connecting to Arduino with BLE (Bluetooth Low Energy)
In the previous example we broadcasted a single byte as part of the advertising data: https://www.b4x.com/android/forum/threads/ble-hm-10-module-broadcasting-a-single-byte.65785/ In this example the Android or iOS device (only one at a time) will connect to the BLE peripheral and read and write...
www.b4x.com
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!!
Last edited: