Android Beacon Library

Hi I'm trying to use Android Beacon Library (ABL) to access a MetaWear device as an iBeacon. I can't get ABL to detect my MetaWear device. I'm wondering what beacon standard MetaWear adheres to when you set the MetaWear into beacon mode. From ABL docs, they say that they automatically work with AltBeacon. When I search the web for "setBeaconLayout" and MetaWear I can't find any information.

What is the byte layout format for MetaWear's beacon? 

// By default the AndroidBeaconLibrary will only find AltBeacons. If you wish to make it
// find a different type of beacon, you must specify the byte layout for that beacon's
// advertisement with a line like below. The example shows how to find a beacon with the
// same byte layout as AltBeacon but with a beaconTypeCode of 0xaabb. To find the proper
// layout expression for other beacon types, do a web search for "setBeaconLayout"
// including the quotes.
//
//beaconManager.getBeaconParsers().clear();
//beaconManager.getBeaconParsers().add(new BeaconParser().
// setBeaconLayout("m:2-3=beac,i:4-19,i:20-21,i:22-23,p:24-24,d:25-25"));

Comments

  • I found the following byte layout for MetaWear iBeacon works with the Android Beacon Library:
    beaconManager.getBeaconParsers().add(new BeaconParser().setBeaconLayout("m:0-3=4c000215,i:4-19,i:20-21,i:22-23,p:24-24"));
  • That's the standard for all I-Beacons.  Due to some licensing issues the maintainers of that Android Beacon library could not publish the I-Beacon header,  but it's available on the Interwebs....;)
  • Thank you. Yes I understood that was the case. Just took a lot of grep'n the Interwebs to find the layout. Hope this comment saves time for other MetaWearers.
This discussion has been closed.