Is this the right layout for detecting iBeacons with AltBeacon’s Android Beacon Library?

I successfully modified the Android Beacon Library link comparison application using the following beacon layout so that it detects the iBeacon device that I have:

public class MainActivity extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); BeaconManager beaconManager = BeaconManager.getInstanceForApplication(this); beaconManager.getBeaconParsers().add(new BeaconParser(). setBeaconLayout("m:0-3=4c000215,i:4-19,i:20-21,i:22-23,p:24-24")); beaconManager.bind(this); } } 

Being new to internal BLE packages, I'm not sure if this is the right layout to use. The library supports the AltBeacon standard, and its documentation does not mention how to detect iBeacon devices.

  • Will all iBeacon devices detect this code? that is, the m: prefix m: too restrictive or is it a right-byte sequence that matches the iBeacon specification?
  • Similarly, the rest of the layout exactly matches the iBeacon specification?

Link:

  • Example iBeacon package mapped to SO
+85
ibeacon-android altbeacon
Jul 30 '14 at 2:46
source share
2 answers

It worked for me too!

I don’t think you need to match part 4c00 because it’s the manufacturer’s identifier, so you can leave this and start with m: 2-3 = 0215 Everything else looks right and it looks like it works.

+59
Jul 31 '14 at 2:20
source share

You can download the iBeacon specification (click "Download Artwork and Specifications").

In the current version, the company identifier should be 0x4C00 , and the beacon type should be 0x0215 . All other fields are required and, as you indicated.

So, you are surely true and find all compatible iBeacons.

OT: he also points out that the ad interval should be 100 ms, but I seriously doubt that all iBeacons adhere to this.

+2
Nov 03 '15 at 16:02
source share



All Articles