0

I would like to user AltBeacon lib, but the blueBar beacons arn't recognized has AltBeacon, below the logcat output :

01-08 11:28:11.577    8876-12231/com.pdavid.android.widget.bulb D/BluetoothLeScanner﹕ onScanResult() - ScanResult{mDevice=00:07:80:79:18:6C, mScanRecord=ScanRecord [mAdvertiseFlags=6, mServiceUuids=null, mManufacturerSpecificData={76=[2, 21, 61, -99, 76, 102, -5, 15, 17, -29, -85, 100, -56, 42, 20, 51, 20, -42, -128, 121, 24, 108, -74]}, mServiceData={}, mTxPowerLevel=-2147483648, mDeviceName=BlueBar Beacon 883314E57808], mRssi=-61, mTimestampNanos=521250993399662}
01-08 11:28:11.583    8876-8876/com.pdavid.android.widget.bulb D/CycledLeScanner﹕ got record
01-08 11:28:11.592    8876-9225/com.pdavid.android.widget.bulb D/BeaconParser﹕ This is not a matching Beacon advertisement.  (Was expecting be ac.  The bytes I see are: 0201061aff4c0002153d9d4c66fb0f11e3ab64c82a143314d68079186cb61c09426c756542617220426561636f6e20383833333134453537383038000000

I searched for the advertising packet scheme for blueBar beacons, but no luck.

ScanResult{mDevice=00:07:80:79:18:6C, mScanRecord=ScanRecord [mAdvertiseFlags=6, mServiceUuids=null, mManufacturerSpecificData={76=[2, 21, 61, -99, 76, 102, -5, 15, 17, -29, -85, 100, -56, 42, 20, 51, 20, -42, -128, 121, 24, 108, -74]}, mServiceData={}, mTxPowerLevel=-2147483648, mDeviceName=BlueBar Beacon 883314E57808], mRssi=-61, mTimestampNanos=521250993399662}

    beaconManager.getBeaconParsers().add(new BeaconParser().
            setBeaconLayout("???????????????????????????????????"));

Thanks

Edit :

I added the following code in my Application subclass:

    beaconManager.getBeaconParsers()
        .add(new BeaconParser()
             .setBeaconLayout("m:2-3=0215,i:4-19,i:20-21,i:22-23,p:24-24,d:25-25"));

    String blueBarUuid = "A0B13730-3A9A-11E3-AA6E-0800200C9A66";
    // wake up the app when a beacon is seen
    Region region = new Region("backgroundRegion",
                               Identifier.parse(blueBarUuid), null, null);
    regionBootstrap = new RegionBootstrap(this, region);
    BeaconManager.debug = true;

Seams to work now. Without that I get " This is not a matching Beacon advertisement. "

more output :

beacon detected multiple times in scan cycle :id1: 3d9d4c66-fb0f-11e3-ab64-c82a143314d6 id2: 32889 id3: 6252
beacon detected :id1: 3d9d4c66-fb0f-11e3-ab64-c82a143314d6 id2: 32889 id3: 6252
This region does not match: id1: a0b13730-3a9a-11e3-aa6e-0800200c9a66 id2: null id3: null


This is not a matching Beacon advertisement.  (Was expecting be ac.  The bytes I see are: 0201061aff4c0002153d9d4c66fb0f11e3ab64c82a143314d68079186cb61c09426c7565426172
This is a recognized beacon advertisement -- 0215 seen
Byte array is size 2
index is 0
calculatedValue for position 0 with positionValue 1 and byteValue 121 is 121
index is 1
calculatedValue for position 1 with positionValue 256 and byteValue 128 is 32768
Byte array is size 2
index is 0
calculatedValue for position 0 with positionValue 1 and byteValue 108 is 108
index is 1
calculatedValue for position 1 with positionValue 256 and byteValue 24 is 6144
Byte array is size 1
index is 0
calculatedValue for position 0 with positionValue 1 and byteValue 28 is 28
parsing found data field 0
Byte array is size 1
index is 0
calculatedValue for position 0 with positionValue 1 and byteValue 182 is 182
Byte array is size 2
index is 0
calculatedValue for position 0 with positionValue 1 and byteValue 21 is 21
index is 1
calculatedValue for position 1 with positionValue 256 and byteValue 2 is 512
Byte array is size 2
index is 0
calculatedValue for position 0 with positionValue 1 and byteValue 76 is 76
index is 1
calculatedValue for position 1 with positionValue 256 and byteValue 0 is 0
beacon detected multiple times in scan cycle :id1: 3d9d4c66-fb0f-11e3-ab64-c82a143314d6 id2: 32889 id3: 6252
beacon detected :id1: 3d9d4c66-fb0f-11e3-ab64-c82a143314d6 id2: 32889 id3: 6252
This region does not match: id1: a0b13730-3a9a-11e3-aa6e-0800200c9a66 id2: null id3: null
Philippe David
  • 8,814
  • 3
  • 24
  • 35

1 Answers1

1

According to the documentation, BlueBar beacons use the same layout as iBeacon:

Key features of the BlueBar Beacon are as follows: - Fully iBeacon technology compatible – tested and works with the iPhone (4S and later) as well as the iPad

Source: http://bluesensenetworks.com/announcing-bluebar-beacon/

So the answer is essentially a duplicate of: Is this the correct layout to detect iBeacons with AltBeacon's Android Beacon Library?

Community
  • 1
  • 1
davidgyoung
  • 63,876
  • 14
  • 121
  • 204