Received 2 April 2016; accepted 14 June 2016; published 17 June 2016
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  . 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  .
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  . 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   . The main reasons for using beacons are to provide customer convenience, enhanced shopping experience, and affordability, compete with large retailers and customer intelligence.
2. Literature Survey
Several security challenges involved in IoT applications are described in the Wind River publication  . The wireless network operator, Lace Company has conveyed Internet of Things system empowered  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  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  . Windows 10 IoT core  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  . According to Wipro  , 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  intensely utilizes enormous information for buyer experiences and store-level promoting.
The Intel Retail Sensor Platform  is an end-to-end solution intended to help framework integrators and retailers rapidly make and create inventive retail solutions. Estimote alongside PayPal  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  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  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  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  . 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  .
Self-localization can be realized when a smart phone can detect three or more Wi-Fi hotspots’ position  . 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  . Accuware Indoor Navigation  provides mobile apps with current location information by enabling the navigation.
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  . 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  .
4. 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.
Figure 1. Dataflow between the different components of the IoT platform.
Figure 2. Console log of the server running on the Pi.
Figure 3. Screenshot of the android application showing the Instancespacea and Namespace Id received from the beacon.
 Markets and Markets (2015) Internet of Things (IoT) in Retail Market by Component (Hardware and Software), Hardware (Gateways, RFID, Sensors), Service (Remote device management, Managed service, and Professional service), Technology, Region—Global Forecast to 2020 [Whitepaper]. Research and Markets Press, New York.
 Sénéclauze, G., Purswani, P., Karekar, S. and Becker, A. (2012) Internet of Things and Its Associated Technologies— Wireless, Miniaturization, Batteries, Networking [Whitepaper]. Atos SE Publishing, Bezons.
 Smith, C. (2015) Beacons Are Moving out of the Pilot Phase and Helping Retailers and Marketers Revolutionize In-Store Shopping. 8 March.
 Vujovi?, V. and Maksimovi?, M. (2014) Raspberry Pi as a Wireless Sensor Node: Performances and Constraints. in 37th International Convention on Information and Communication Technology, Electronics and Microelectronics (MIPRO), Opatija, 26-30 May 2014, 1013-1018.
 Dong, Q. and Dargie, W. (2012) Evaluation of the Reliability of RSSI for Indoor Localization. International Conference on Wireless Communications in Unusual and Confined Areas (ICWCUCA), Clermont Ferrand, 28-30 August 2012, 1-6.
 Martin, P., Ho, B.-J., Grupen, N., Mu?oz, S. and Srivastava, M. (2014) An iBeacon Primer for Indoor Localization. 1st ACM Conference on Embedded Systems for Energy-Efficient Buildings, Memphis, TN, November 2014, 190-191.