0

I am trying to read red bear beacon advertisement by alt beacon library. I am able to detect the beacon by:

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

But in advertisement I am getting nothing.

fredtantini
  • 15,966
  • 8
  • 49
  • 55
suvi
  • 1
  • 1

1 Answers1

2

Although it has been a long time since this question was posted, this might help someone else.

Red Bear's BLE Mini beacon firmware follows Apple's iBeacon definition. The format of advertising should be

00~01 : Manufacturer's company identifier code. (0x4C00)
02~03 : iBeacon advertisement indicator (0x0215)
04~19 : UUID (Default : E2C56DB5-DFFB-48D2-B060-D0F5A71096E0)
20~21 : Major ID (Default : 0)
22~23 : Minor ID (Default : 0)
24 : Tx Power

You could set format as follows,

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

Ref :

  1. Bluetooth Core Spec v4.2 p2081 "Advertising and Scan response data format"
  2. AltBeacon
  3. iBeacon introduction
  4. Lib API
Bohan Lu
  • 513
  • 2
  • 6
  • 20
  • Sorry to reply late. The problem was in that particular device model. it was detecting the the beacon alright but was returning the empty advertisement. – suvi Mar 15 '15 at 09:41