Android AltBeacon library: how to find the beacon

2019-04-29 21:26发布

问题:

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.

回答1:

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.



回答2:

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.