Android Tutorial Discovering iBeacon devices with BLE2 library

luke2012

Well-Known Member
Licensed User
Longtime User
Within my app I wish to track only a specific beacon selected by the user (for example when the user start the app for the first time).
Is it possible using this library?

thanks in advance for your reply
 

luke2012

Well-Known Member
Licensed User
Longtime User
B4X:
If beacon1.BeaconType = 0 Then
    key = 22
    If AdvertisingData.ContainsKey(key) Then
        For Each b() As Byte In Starter.BLE2Mgr.GetRecordsFromAdvertisingData(AdvertisingData, key)
            Log(bc.HexFromBytes(b))
            If CompareBytes(b, Array As Byte(0xAA, 0xFE), 0) Then
                'Eddystone
                tx = ParseEddystone(beacon1, b, 0)
            End If
       Next
    End If
End If

Hi all,
what is the value "0A181204CC1E0000" Log(bc.HexFromBytes(b)) printed to the log ?
 

luke2012

Well-Known Member
Licensed User
Longtime User
I'm testing it with two iBeacon. I'm logging the uniqueid when the _DeviceFound event will be raised.
But I can see always the same uniqueid.

I suppose that each iBeacon have a different uniqueid value right?
My final target is to set the uniqueid within the code in order to process only a specific iBeacon device also if the BLE Manager found other Beacons or devices.

Within the B4A log I can see only this uniqueid: FDA50693A4E24FB1AFCFC6EB0764782500010001
 
Last edited:

luke2012

Well-Known Member
Licensed User
Longtime User
Hi all,
which is the best solution (using this class / sample code) to track only a specific iBeacon using the uniqueid?

1) Set an uniqueid passed by the the user (input dialog) the at the first app installation (for ex. user can read a printed uniqueid on his iBeacon) ?
2) Show a dialog that display the discovered iBeacon and let the user choose the uniqueid related to his iBeacon ?

Thanks in advance for your reply
 

luke2012

Well-Known Member
Licensed User
Longtime User
How many beacons do you expect there to be near the user? I think that it is better to show all and let the user filter if he likes.

I think few iBeacons (less than 5).
I'm planning an app that implement a "pairing" with only one specific iBeacon that is set by the user at the first installation.
 
Last edited:

luke2012

Well-Known Member
Licensed User
Longtime User
Hi.Which is the BLE working range (10 meters) ?
How to say to the user that the beacon is out of range considering that the device isn't connected to the device?
 
Last edited:
Cookies are required to use this site. You must accept them to continue using the site. Learn more…