Beacons truly are revolutionary pieces of technology. This small piece of hardware is used to transmit messages using Bluetooth technology. The connection is utilizes low energy. They can also prompt directly to a smartphone or a tablet. Cell signals are often blocked indoors and beacons are a solution to this problem.
This DIY focuses on tracking the beacon itself! It is basically a beacon scanner which uses Raspberry Pi and Node.js. The hardware required includes the Raspberry Pi B+ as the base hardware as it makes the Node.js setup easy. The author has used Nordic semiconductor nRF beacons and Estimotes. The Estimotes are iBeacon certified. These were detected by almost all Bluetooth LE utilities possessed by the authors. If you sign up for a Qualcomm developer account, you get three free Gimbal beacons. The devices’ firmware is easier to update thanks to the web configuration tool and the iOS app.
The beacons that do not broadcast an iBeacon configuration seem difficult to work with. Also, the Gimbal beacons come with a security feature that changes the MAC address each time an advertisement is emitted. The authors have used multiple soft wares for this DIY.
Bluez is required for the Pi to start scanning for Bluetooth devices and is the core Bluetooth stack for Linux. It takes about 90 minutes to install on the Pi. Hcitool and gattool are the two utilities which can be used for scanning and connecting to Bluetooth and smart devices,once you have installed Bluez. With a single command (hcitool) , you can get the addresses of nearby hardware. Gattool is used for obtaining further information regarding the hardware you have connected to.
Getting the node to run on the Pi has been made easier with the ARM-version of node. After the node has been installed, use Noble to scan for Bluetooth devices and access their metadata like the hardware address, rssi, local name, etc. Data can be passed to another node for analysis using Socket.io. Responsibility of capturing the data sent from the Pi is undertaken by the server app.
The main hurdles that needed to be overcome while doing the proximity tracking were the distance from rssi. Another issue was figuring out how to smoothen the noisy data coming from the sensor. The first problem was resolved by using an algorithm which calculates the distance between rssi signal and measured power. It also adds some decay for signal fall off. The second problem was solved using the Kalman filter algorithm. It estimates the optimum output value when a series of noisy measurements is provided as input.
There you have it; your very own beacon scanner using Raspberry Pi as hardware and Node.js as software.
Filed Under: Reviews