6

I'm testing with a new type of beacon, and this is what I got from the debug:

onScanResult() - ScanResult{mDevice=20:73:2A:09:3E:41, mScanRecord=ScanRecord [mAdvertiseFlags=26, mServiceUuids=null, mManufacturerSpecificData={76=[2, 21, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 0, 5, 0, 10, -40]}, mServiceData={}, mTxPowerLevel=-2147483648, mDeviceName=null], mRssi=-55, mTimestampNanos=23541956038874}

After playing around with many beacon layout in SO, I still can't detect it for my app. From the debug above, how to find out the beacon parser. Is there a "universal" beacon layout for all types of beacons? Locate Beacon apps can detect my beacon. Any body knows the pattern?

Thanks.

Caten
  • 169
  • 1
  • 3
  • 12

2 Answers2

25

Here is a list of the main beacon layouts -

ALTBEACON   "m:2-3=beac,i:4-19,i:20-21,i:22-23,p:24-24,d:25-25"

EDDYSTONE  TLM  "x,s:0-1=feaa,m:2-2=20,d:3-3,d:4-5,d:6-7,d:8-11,d:12-15"

EDDYSTONE  UID  "s:0-1=feaa,m:2-2=00,p:3-3:-41,i:4-13,i:14-19"

EDDYSTONE  URL  "s:0-1=feaa,m:2-2=10,p:3-3:-41,i:4-20v"

IBEACON  "m:2-3=0215,i:4-19,i:20-21,i:22-23,p:24-24"

A reference list here.

Aniket Thakur
  • 58,991
  • 35
  • 252
  • 267
Weber
  • 425
  • 5
  • 9
1

If the Locate Beacon app can detect your beacon, you can see all the beacon layouts it to uses by going to the settings screen. You can copy the layout expressions from there.

Unfortunately, there is no "universal" layout for beacons. This would require predicting new inventions people have not come up with yet.

davidgyoung
  • 59,109
  • 12
  • 105
  • 181
  • Thanks David. In the Settings screen, I see many layouts, but don't know which one is the right one. These are the beacon I detect [link](https://www.dropbox.com/s/uglw6bmqch9pak8/Screenshot_2015-09-11-10-24-20.png?dl=0) and these are the layout I see [link](https://www.dropbox.com/s/ugpuzevt99wec9a/Screenshot_2015-09-11-10-23-02.png?dl=0). I want to detect the custom beacon with "ugly" UUID like the 111111... – Caten Sep 11 '15 at 17:34
  • I know they are not Samsung, not EddyStone, not AltBeacon. The first layout is probably them, but they are marked with *** – Caten Sep 11 '15 at 17:40
  • Sorry to not be able to help more directly, but I suspect you are referring to the proprietary iBeacon format. Due to intellectual property restrictions we cannot publish the format. Doing a Google search for its layout will surely find you the answer. – davidgyoung Sep 11 '15 at 21:06
  • Thanks, yes I googled "setBeaconLayout" but came up with other layout. The proprietary beacon is the new hardware I'm testing with (the hardware manufacturer sent them to me). Can I put a breakpoint at your layout parser to get the *** string you return? – Caten Sep 11 '15 at 23:00
  • You really do not need to bother with a breakpoint... I assure you the information you want is easily available via a Google search. What makes you day the "other" layout you found is incorrect? Did you try it? The beacon may be new, but the layout is likely unchanged. – davidgyoung Sep 12 '15 at 06:54
  • Hi David, After searching from Google, the beacon layouts I use in the code are String layout1 = "m:2-3=0215,i:4-19,i:20-21,i:22-23,p:24-24,d:25-25"; String layout2 = "m:2-3=beac,i:4-19,i:20-21,i:22-23,p:24-24,d:25-25"; String layout3 = "m:2-3=0203,i:4-19l,d:10-13,p:9-9"; mBeaconManager.getBeaconParsers().add(new BeaconParser().setBeaconLayout(layout1)); Only layout 1 can detect the proprietary beacons, but it also detects SenionLab beacons. Layout 2 and 3 can't detect anything. Any search term other than "setBeaconLayout" I should try? Thanks a lot. – Caten Sep 14 '15 at 20:41
  • Why is it a problem that the fist layout also detects the SenionLab beacon? It is common for beacons from multiple manufacturers to share the same layout. You should not expect them to necessarily be different. – davidgyoung Sep 15 '15 at 00:54
  • I don't see a problem when the first layout detects SenionLab beacons. Just don't know how to differentiate between SenionLab and the new one... – Caten Sep 16 '15 at 21:43
  • It may very well be that there is no way to detect the difference -- the data transmitted might be identical. You can, of course, set the identifiers on each beacon to be different so you know how to differentiate them. – davidgyoung Sep 17 '15 at 01:48
  • I'd like to reopen this question as I could not find the layout for a new beacon provider. It's proprietary but the Locate app could still detect it (showing as ***). Could you show me how to use the BeaconParser class to get the layout? The manufacturer beacon's typical message the following hex-string: 0201061AFF4C0002156E42F68AD0D1467BA23E9D11FA746E43000A0001C51508303030313030306136653432663638616430643107FFBC010003A9150000 I've tried with both "m:2-3=beac,i:4-19,i:20-21,i:22-23,p:24-24,d:25-25" and "m:2-3=0215,i:4-19,i:20-21,i:22-23,p:24-24" but none worked. – Caten May 04 '16 at 16:10
  • Double check that the second layout does not work. If tgat fails, please open a new question. – davidgyoung May 04 '16 at 16:56
  • The second layout indeed works. It didn't work before because I added many different BeaconParser to use (beaconManager.getBeaconParsers().add(...)). When I removed them all but the second layout the beacons showed up. One thing I notice in logcat is that even if I only add the second layout, the first layout is always added by default. – Caten May 04 '16 at 17:36