AltBeacon setLayout для маяков BlueBar

Я хотел бы использовать библиотеку AltBeacon, но маяки blueBar не распознаются, имеют AltBeacon, ниже вывода logcat:

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

Я искал схему рекламного пакета для маяков blueBar, но безрезультатно.

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("???????????????????????????????????"));

Спасибо

Редактировать :

Я добавил следующий код в свой подкласс Application:

    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;

Теперь все работает. Без этого я получаю «Это не соответствующая реклама маяка».

больше выхода:

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

person Philippe David    schedule 08.01.2015    source источник


Ответы (1)


Согласно документации, маяки BlueBar используют тот же макет, что и iBeacon:

Ключевые особенности BlueBar Beacon: - Полная совместимость с технологией iBeacon – проверено и работает с iPhone (4S и новее), а также с iPad.

Источник: http://bluesensenetworks.com/announcing-bluebar-beacon/

Таким образом, ответ, по сути, является дубликатом: li">Правильный ли это макет для обнаружения iBeacons с помощью библиотеки Android Beacon AltBeacon?

person davidgyoung    schedule 08.01.2015