An Internet of Things Platform with Google Eddystone Beacons

Consumer adoption of Internet of Things devices is increasing rapidly. About 66% of consumers mean to buy an associated home gadget by 2019. Beacon technology helps in providing actionable insights to businesses through visual heat maps generated by the consumers and these maps are further processed by machine learning algorithms. Google’s open source Eddystone beacon format released in 2015, mitigates the problem of high cost and provides an open source alternative for developers. The aim of the proposed work is to provide a low cost, reliable, flexible, scalable and open source alternative for small and medium scale enterprises. In the proposed work, an Internet of Things platform is configured and developed. The Raspberry Pi is configured as an Eddystone beacon through a NodeJs server. An android app is developed which is the front end of the platform and web services are deployed on the cloud.


Introduction
The Internet of Things (IoT) is one where physical objects, associated with the web, can gather and trade information.It allows sensing and controlling of objects through existing infrastructure, creates direct integration between physical world and computer based systems, and improves accuracy and efficiency.It requires higher levels of scalability to handle the surge of devices [1].The IoT in retail market has helped retailers to achieve enhanced customer experiences and increased revenue.It is significantly used to oversee stock, track burglary and promote and advertise stock [2].
The product market for IoT in retail is required to enhance because of the expanding utilization of portable applications.The worldwide IoT in retail market is required to develop from USD 14,280.0 million in 2015 to USD 35,640.0 million by 2020 [3].Beacon technology is intended to drive in-store sales and client reliability.These are small Bluetooth Low Energy (BLE-v4) enabled devices that can be attached to a wall inside a retail store [4] [5].The main reasons for using beacons are to provide customer convenience, enhanced shopping experience, and affordability, compete with large retailers and customer intelligence.

Literature Survey
Several security challenges involved in IoT applications are described in the Wind River publication [6].The wireless network operator, Lace Company has conveyed Internet of Things system empowered [7] radio frequency (RF), covering more than 30 million individuals and 9000 square kilometers being the primary biggest Low Power Wireless Personal Area Network (LPWPAN) in Russia.The IDC survey from 2014 describes how recent trends in IoT deployment [8] have shifted towards the software suppliers while, in the past the lead was taken by the hardware suppliers.
There various challenges faced while adopting IoT for Retail are described in [9].Windows 10 IoT core [10] is an operating system that runs on Raspberry Pi 2, Arrow Dragon Board 410c and Minnow Board Max and is specifically designed for IoT devices.Beacons can generate product catalogs that are location sensitive and indoor maps [11].According to Wipro [12], current IT systems in retail are falling short in managing the flow of increasing amount of data.Different solutions including object storage and Big Data appliances are offered to the businesses.Retailing mammoth Walmart [13] intensely utilizes enormous information for buyer experiences and store-level promoting.
The Intel Retail Sensor Platform [14] is an end-to-end solution intended to help framework integrators and retailers rapidly make and create inventive retail solutions.Estimote alongside PayPal [15] produces a (Universal Serial Bus) USB gadget that is good with a few Point of Sale (POS) frameworks: Vend, Leaf, Erply, Leapset, ShopKeep, Micros and Revel.The Raspberry Pi [16] which is low cost, adaptable, fully customizable and programmable small PC board can be used as a wireless sensor node.Further advantages being high processing power, memory, connectivity and the ability to run Linux.Ranging of beacons [17] can be carried out either by using signal or time measurement.RSSI based ranging constitutes the least power consumption compared to the other.
Utilization of a single access point in a home environment for ranging is described in [18] interface is used for estimating the location.The final estimation of the location uses Bayesian filtering which uses the sample sets derived through Monte Carlo sampling.Indoor localization systems have more accurate and advanced options as given in [19].They are Wi-Fi network, mobile phone sensors, navigation systems and map library.The Wi-Fi network and iBeacons can work as a hybrid system providing more accurate solutions.Bluetooth low energy's feasibility for indoor positioning is discussed in [20].
Self-localization can be realized when a smart phone can detect three or more Wi-Fi hotspots' position [21].In the RSSI based localization it should made sure that a minimum value is adopted which is between Wi-Fi scan rate and gyroscope scanning rate to ensure not to collect useless data.Location estimation using RSSI measurement model and sensor node's position estimation using probabilistic model is described in [22].Accuware Indoor Navigation [23] provides mobile apps with current location information by enabling the navigation.

Methodology
Raspberry Pi 2 is chosen as the Microcontroller unit (MCU) considering the low cost, high processing power, large available memory and ability to run full Linux (Raspbian Jessie).It can be configured as an IoT Beacon and can also be used for data synchronization and data processing of peripheral devices to the network to provide intelligent decisions.Debian packages are installed using apt-get package manager.Libraries BlueZ, Blueman, libbluetooth-dev 4.99-2, Bluetooth and Node-armhf for raspberry pi are configured.Bluez is the linux Bluetooth protocol stack, blueman is Bluetooth management utility for GNOME using bluez D-bus backend.libbluetooth-dev 4.99-2 is the development file for using BlueZ.
The Bluetooth adapter used for Raspberry Pi is Cambridge Silicon Radio (CSR).The BLE adapter is configured to advertise a sample instancespaceId and namespaceId which are in accordance with the Google Eddystone frame format received from a webserver and the broadcast process is configured as a daemon.An android app is developed, which scans for Eddystone beacons using AltBeacon Library [24].The app receives the instancespace Id and namespace Id as shown in Figure 1.
The Internet of Things platform contains the backend cloud application (NodeJs server), front end user interface (in the form of an Android application) and the BLE beacon (configured on a Raspberry Pi 2 running a NodeJs server to broadcast Eddystone frames) with information interchange occurring between the front and backend processes using RESTful API's.The cloud application sends the Instancespace and Namespace Id to the beacon which are broadcasted through the CSR adapter.RESTful API's were used as the client application can enter the Representation State Transfer (REST) service with zero knowledge of the API due to the latter being less coupled to HTTP [25].

Experimental Results
Figure 2 is the console log of server running at the Pi, broadcasting Eddystone UID's.The Mac id of the Bluetooth adapter on the Pi is given as 00:1A:7D:DA:71:0C.Figure 3 shows the screenshot of the android application at the client side.The app receives the namespace id is 0x10101011010101010101and the instancespace id 0xAABBCCDDEEFF from Eddystone beacon.

Conclusion
The Internet of Things platform has been developed which uses the latest open source beacon technology from Google.The developed platform makes use of JavaScript, HTTP, HTML, JSON, NoSQL and NodeJs technologies.The platform is developed from open source libraries and is scalable, flexible, makes uses of existing BLE devices, and is compliant with Bluetooth core specification.The developed platform is economical enough to be deployed by small and medium scale stores dealing in FMCG products.The overall cost of development of the platform is less than INR 3500.The platform aims to bring aboard small and medium scale retail stores aboard the IoT bandwagon, free from the constraints of proprietary technologies, yet being easy enough to be operated by a semi-skilled labor.

Figure 1 .
Figure 1.Dataflow between the different components of the IoT platform.

Figure 2 .
Figure 2. Console log of the server running on the Pi.

Figure 3 .
Figure 3. Screenshot of the android application showing the Instancespacea and Namespace Id received from the beacon.