Hi Julio,
I will write in English as it could help anyone else.
When you perform tests with your device, there al some "PUBLIC" UUID's that the device will broadcast. Be sure to list all those UUIDS and take note. You can log them out from the
Connected event. (Services as Map)
In our case we are using V.BTTN device from vsnmobil.com. This device broadcasts UUID's 1802, 1803 and 1804. In iOS then we should call the scan as:
Dim BLEM as BLEManager
BLEM.initialize("BLEM")
Dim UUID As List
UUID.Initialize
UUID.Add("1802")
UUID.Add("1803")
UUID.Add("1804")
BLE.Scan(UUID)
Once you have aquierd the device, you should connect to it. Depending on the type of devices, some requieres an activation key to be written as a characteristic in order to establish (booking) the BLE service. My BLE device waits for 30 seconds for the phone to write the characteristic and a key.
At this point, once connection (and verification key) has been done, Bluetooth Central takes care of the rest. If the device goes out of range, and the APP is in the background, it should reconnect automatically (watch for the BLE
StateChanged and
BLEConnected event to log when the device comes into range.
Forget about this if your phone is restarted, as the application cannot start as a service as we can acomplish in B4A. Phone restart, means the user
MUST start the APP before iOS can take care of finding a "friend" BLE Device.
Whats projects are you developing? just iOS o Android too?
Cheers
FBP