Question

I have been trying to write an application to detect iBeacons. (I set up my iPhone 5 as iBeacon) I slightly changed the fromScanData method to return only proximity UUID String. I have no idea how the pattern detection works. It always Logs "This is not an iBeacon advertisement". I am not using the whole IBeacon class. I am using the method alone. I am calling it from my onLeScan and passing the byte array scanRecord, rssi value and the BluetoothDevice object. Once I have my proximity UUID for each ble device, I can filter the ones I want. Please help. Thanks in advance.

The Log

04-17 14:44:29.828: D/BLEScan(28549): This is not an iBeacon advertisment (no 0215 seen in bytes 4-7).The bytes I see are :02011a0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000

Was it helpful?

Solution

The debug line says it all. Those bytes do not indicate a valid iBeacon advertisement. Are you sure your iPhone transmitter is really working properly? Can you detect the iBeacon using a different tool like the Android iBeacon Locate app?

I don't know how you set up the transmitter but you might also try Locate for iBeacon iOS app or EZ Beacon iOS app, which are known to transmit properly formed iBeacon advertisements that work with this code. The same Android code is inside the iBeacon Locate app.

Finally, make sure your iPhone transmitter is in the foreground. iOS devices cannot transmit as iBeacons in the background.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top