Search code examples
ibeaconsensorsaltbeaconibeacon-androidandroid-ibeacon

Read sensor values from iBeacon on Android with AltBeacon library


I have a Beacon skybeacon Forecum 201 which can advertise as iBeacon or as Eddystone (URL/UID). It has temperature and humidity sensors.

In my project I am using AltBeacon library for monitoring and ranging etc. for working with beacons. As in the examples or docs said, I can get extra data from iBeacon by using getExtraDataFields() method.

When I configure my beacon to transmit as iBeacon, the getExtraDataFields() returns 0, so no sensor values. But when I configure it to transmit as Eddystone UID with TLM than I can read that extra fields, and it returns temperature etc (I tested it with other beacon I have, MINEW E7 beacon and works same way, only as Eddyston UID / TLM sensor values are readable)

I checked even in RadiusNetwork Locate app, and it works the same way as in my app (reads sensor values only when advertise as EddyStone).

So is there any way I can read sensor values on Android with AltBeacon for iBeacon advertisement type? Or it can be only read by Eddystone UID/TLM? So what if working with iOS development and receiving iBeacons?


Solution

  • Mapping of sensors for beacon data fields is dependent on the beacon hardware manufacturer's implementation. In the case of the Forecum 201 it appears that the mapping has been done only for Eddystone-TLM. Other beacon manufacturer's like Radius networks do map beacon sensor fields to AltBeacon. AltBeacon has only a single one byte extra data field that Radius uses to expose the battery sensor. (Other manufacturer's like Kontalt.io do the same.) For iBeacon there are no extra data fields in the layout at all, so it is very unusual for sensors to be exposed by a manufacturer in the an iBeacon advertisement.

    Bottom line: you will have to use Eddystone-TLM to read the values from an advertisement with this beacon.