Community Articles

Find and share helpful community-sourced technical articles.
Labels (1)
Super Guru

People were asking me when you could throw some more acronyms into an article. So I did that.

iBeacons are tiny devices that are broadcasting over Bluetooth Low Energy (BLE) that are very good for advertising and for broadcasting proximity. I have been thinking of the retail space so I purchased a beacon, got a beacon simulator on my phone and found a really cool gateway device. It reads the BLE transmissions from these devices, packages them as JSON MQTT messages and sends them over WIFI to a MQTT Broker of your choice. I am using a cloud hosted MQTT broker to hold these and then Apache NiFi subscribes to these messages. This can happen amazingly fast as MQTT is very light weight, NIFI is fast and BLE is fast. These tiny messages are constantly advertising their identity and other information. With multiple beacons in a building, store, room, facility; you can see who is close to where.

As you might expect there's multiple standards for this, iBeacon is Apple's and Google Eddystone. Fortunately this gateway works with both and so can you. Walk into the Physical Web.

Use Cases

Happy Bubbles Technology




In Apache NiFi, it doesn't matter the data or location, it's easy as pie to ingest Beacon data via MQTT and store it in ORC files for Hive table queries.


Easy to visualize and analyze the data in Apache Zeppelin against these Hive tables.

What I like about this gateway from Happy Bubble technology besides the awesome Hippo logo is that this gateway is dead simple to setup. Plug it in, wait a bit, connect to it's WIFI, set WIFI and MQTT settings. Then you are running! They also provide an open source server you can use to see the data. If BLE messages are ibeacon format, they will get one JSON format. If they are Google Eddystone format it's a second one. And if it's something else, it will get a generic format. I have three listeners in NiFi to grab them all.




Example Messages

{"rssi":-63, "heap_free":27912}

{"hostname": "happy-bubbles-ble",
 "mac": "fa909c522836",
 "rssi": -51,
 "is_scan_response": "1",
 "type": "0",
 "data": "020a000816f0ff640000000011094d696e69426561636f6e5f3331303033"}

{"hostname": "happy-bubbles-ble",
 "beacon_type": "ibeacon",
 "mac": "fa909c522836",
 "rssi": -51,
 "uuid": "e2c56db5dffb48d2b060d0f5a71096e0",
 "major": "0000",
 "minor": "0000",
 "tx_power": "c5"}


There's a great free application for IPhone called Locate Beacon that let's you simulate beacons. This is great for testing.

For the inexpensive beacon from Happy Bubbles I bought it is a minew MS49_nrf51822 and there's an app for that called BeaconSET. This will let you set properties and see it over your phone's BlueTooth.


CREATE EXTERNAL TABLE IF NOT EXISTS beaconstatus (rssi INT, heap_free INT) 

CREATE EXTERNAL TABLE IF NOT EXISTS ibeacon (hostname STRING, beacon_type STRING, mac STRING, rssi INT, uuid STRING, major STRING, minor STRING, tx_power STRING) 
STORED AS ORC  LOCATION '/beacons/ibeacon';

CREATE EXTERNAL TABLE IF NOT EXISTS beacongateway (hostname STRING, mac STRING, rssi INT, is_scan_response STRING, type STRING, data STRING) 
STORED AS ORC  LOCATION '/beacons/gateway';


Take a Tour of the Community
Don't have an account?
Your experience may be limited. Sign in to explore more.
Version history
Last update:
‎08-17-2019 01:10 PM
Updated by:
Top Kudoed Authors