Självständigt arbete på grundnivå

Similar documents
1. Product Introduction FeasyBeacons are designed by Shenzhen Feasycom Technology Co., Ltd which has the typical models as below showing: Model FSC-BP

ARUBA LOCATION SERVICES

Introduction to Mobile Sensing Technology

IoT. Indoor Positioning with BLE Beacons. Author: Uday Agarwal

The definitive guide for purchasing Bluetooth Low Energy (BLE) Beacons at scale

Beacons Proximity UUID, Major, Minor, Transmission Power, and Interval values made easy

A Simple Smart Shopping Application Using Android Based Bluetooth Beacons (IoT)

CSRmesh Beacon management and Asset Tracking Muhammad Ulislam Field Applications Engineer, Staff, Qualcomm Atheros, Inc.

MOBILE COMPUTING 1/29/18. Cellular Positioning: Cell ID. Cellular Positioning - Cell ID with TA. CSE 40814/60814 Spring 2018

How to Configure ibeacons in Jamf Pro

Round shape, white case with 3M adhesive sticker, including 2pcs ER12450 battery and industrial package, special for indoor location, RoHS

WELLCORE R ibeacon Series

Comparison of RSSI-Based Indoor Localization for Smart Buildings with Internet of Things

Beacon Indoor Navigation System. Group 14 Andre Compagno, EE. Josh Facchinello, CpE. Jonathan Mejias, EE. Pedro Perez, EE.

A Bluetooth Smart Analyzer in ibeacon Networks

On Practical Selective Jamming of Bluetooth Low Energy Advertising

Real Time Indoor Tracking System using Smartphones and Wi-Fi Technology

DYNAMIC BLUETOOTH BEACONS FOR PEOPLE WITH DISABILITIES

BTLE beacon for 8262 DECT handset Engineering Rules

Hack Your Ride With Beacon Technology!

NETWORK CONNECTIVITY FOR IoT. Hari Balakrishnan. Lecture #5 6.S062 Mobile and Sensor Computing Spring 2017

ibeacon Spoofing Security and Privacy Implications of ibeacon Technology Karan Singhal

State of the Location Industry. Presented by Mappedin

Smart Beacon Management with BlueRange

Comparison ibeacon VS Smart Antenna

Performance Evaluation of Beacons for Indoor Localization in Smart Buildings

TRBOnet Mobile. User Guide. for ios. Version 1.8. Internet. US Office Neocom Software Jog Road, Suite 202 Delray Beach, FL 33446, USA

Senion IPS 101. An introduction to Indoor Positioning Systems

Hardware-free Indoor Navigation for Smartphones

User Guide. PTT Radio Application. Android. Release 8.3

Pixie Location of Things Platform Introduction

USER GUIDE CUBEACON TOOLS MOBILE ANDROID APP

Installation Manual. Ultra RF Analogue Transmitter QC0168. Manual Ref: QC0168. Version: March

Catalog

Ansible Tower Quick Setup Guide

An IoT Based Real-Time Environmental Monitoring System Using Arduino and Cloud Service

User Guide: PTT Radio Application - ios. User Guide. PTT Radio Application. ios. Release 8.3

idocent: Indoor Digital Orientation Communication and Enabling Navigational Technology

User Guide. PTT Radio Application. ios. Release 8.3

TRBOnet Enterprise/PLUS

Browser Streaming and Mobile-App Instructions for ios and Android tm

ANALYSIS OF BLUETOOTH LOW ENERGY BEACONS IN INDOOR LOCALIZATION POLICY AND APPLICATION JERRY R. GUO THESIS

How to implement proximity marketing campaigns without an app

Indoor Positioning 101 TECHNICAL)WHITEPAPER) SenionLab)AB) Teknikringen)7) 583)30)Linköping)Sweden)

Low Power Gelocation Solution. Stéphane BOUDAUD CTO Abeeway Jonathan DAVID Polytech Student

Chanalyzer 4. Chanalyzer 4 by MetaGeek USER GUIDE page 1

Ansible Tower Quick Setup Guide

Splunking ibeacon (BLE) for Profit and Pleasure

International Journal of Scientific & Engineering Research Volume 8, Issue 5, May ISSN

Indoor Navigation System with Beacons

Indoor Localization and Tracking using Wi-Fi Access Points

In-door localization and navigation for Android platform

Enhancing Bluetooth Location Services with Direction Finding

Indoor navigation with smartphones

Share My Design Space Project to Facebook or Pinterest?

User Guide: PTT Application - Android. User Guide. PTT Application. Android. Release 8.3

EOS 80D (W) Wireless Function Instruction Manual ENGLISH INSTRUCTION MANUAL

TRBOnet Guard Tour Configuration and Operation Guide

Context-Aware Planning and Verification

Indoor Positioning System using Magnetic Positioning and BLE beacons

Location Planning and Verification

Quick Start Guide. RSP-Z2 Dual Channel Analog-IP Interface

Information gathering system based on BLE communication for bus information sharing

Enhanced Push-to-Talk Application for iphone

Pervasive Systems SD & Infrastructure.unit=3 WS2008

TRBOnet Mobile. User Guide. for Android. Version 2.0. Internet. US Office Neocom Software Jog Road, Suite 202 Delray Beach, FL 33446, USA

The Deeter Group. Wireless Site Survey Tool

COLLECTING USER PERFORMANCE DATA IN A GROUP ENVIRONMENT

DESCRIPTION DOCUMENT FOR WIFI TWELVE INPUT TWELVE OUTPUT BOARD HARDWARE REVISION 0.1

TRBOnet Enterprise/PLUS

GPS Waypoint Application

Enhanced Push-to-Talk Application for iphone

Enhanced Push-to-Talk Application for Android

Instructions for using The George Institute s Data Collection App Version 1.2

Paper number ITS-EU-SP0127. Experimenting Bluetooth beacon infrastructure in urban transportation

TT-208. User s Manual. 300Mps 5.8 GHz. IP Camera Wireless Transmission Kit

IoT Wi-Fi- based Indoor Positioning System Using Smartphones

08/2017 Technical application guide EINSTONE module Light is OSRAM

IT-24 RigExpert. 2.4 GHz ISM Band Universal Tester. User s manual

Location Services with Riverbed Xirrus APPLICATION NOTE

Aruba Beacons Validated Reference Design

Pinout User Manual. Version 1.0. Zesty Systems Inc

Internet of Things and smart mobility. Dr. Martin Donoval POWERTEC ltd. Slovak University of Technology in Bratislava

Pinout User Manual. Version 1.0(Draft) Zesty Systems Inc

DragonLink Advanced Transmitter

Cellular Infrastructure and Standards while deploying an RDA

Experimental Evaluation of Precision of a Proximity-based Indoor Positioning System

B L E N e t w o r k A p p l i c a t i o n s f o r S m a r t M o b i l i t y S o l u t i o n s

Multi-sensory Tracking of Elders in Outdoor Environments on Ambient Assisted Living

2018 Student s Guide.

Specification history

USER MANUAL FIELDBEE AND RTK BEE STATION FULL VERSION. WE PROVIDE ONLINE SUPPORT: VERSION 1.0.

WEB I/O. Wireless On/Off Control USER MANUAL

SHOP&NAV: ibeacon based indoor assistance and Navigation System

ARUBA AS-100 WIRELESS SENSOR

Infoblox and Ansible Integration

Online Browser Streaming and Mobile-App Instructions

DocuSign for Sugar 7 v1.0. Overview. Quick Start Guide. Published December 5, 2013

Industrial Wireless Systems

Endurance R/C Wi-Fi Servo Controller 2 Instructions

Transcription:

Självständigt arbete på grundnivå Independent degree project - first cycle Datateknik Computer Engineering

MID SWEDEN UNIVERSITY The Department of Information Technology and Media (ITM) Examiner: Ulf Jennehag, ulf.jennehag@miun.se Supervisor: Patrik Österberg, patrik.osterberg@miun.se Author:, shma1001@student.miun.se Degree programme: Computer engineering, 180 credits Main field of study: Thesis Project DT099G Semester, year: VT, 2017, P4 ii

Abstract In our day to day activity, imagine if you go to a museum, hospital or any kind of huge building. You need to find the best way to get into a specific department. It might be difficult to find the way even if you have the map of the building in your hand. Indoor positioning systems can be used to locate people or objects inside a building, using radio waves, signals, or other sensory information collected by a smartphone or tablet. Bluetooth Low Energy (BLE) beacons broadcast signals, and bluetooth devices, such as smartphones, can then receive these signals. BLE devices can take Received Signal Strength Indication (RSSI) information together with an algorithm to calculate the location of the user. This is a useful method for indoor environments when using Global Positioning System (GPS) is not an option [1]. In this project I tried to find a better solution for localization and navigation when GPS does not work. The focus of the project is to use communication between smartphones and beacons, for guidance in inside environments, without using GPS. This thesis is about the applications I produced, which can be used for indoor localization and navigation. Using the applications, you can map any building such as university, hospital, museum, big mall etc. To map a building, you upload a map of the building and put waypoints where you placed beacons. Once mapping is done, you can log in to the web admin and put some information for each beacon. As a user, when outside a nearby mapped building, your phone can get notified (trough bluetooth), and you can download the user app, which includes the map of the building and shows your location. With the user app you can easily find your favorite places in the building and get information about place near you. Keywords:, Indoor mapping, Indoor positioning, IoT iii

Acknowledgements I would like to thank my supervisor Patrik Österberg for all his feedback and support. I have been extremely lucky to have a supervisor who cared so much about my work, and who responded to my questions and queries so prompt. I would also like to express my very profound gratitude to my parents for all their support and a very special thanks to my supportive and patient husband for all his guidance and help and continuous encouragement. Thank you! iv

Table of Contents Abstract...iii Acknowledgements...iv Terminology...vi 1 1.1 1.2 1.3 1.4 1.5 Introduction...1 Background and problem motivation...1 Overall aim...2 Scope...2 Concrete and verifiable goals...2 Outline...3 2 2.1 2.2 2.3 2.4 Theory...4 Bluetooth Low Energy (BLE)...6 Estimote ibeacons...7 Indoor mapping...8 Web admin framework...9 3 3.1 3.2 Methodology...11 Testing environment...12 Hardware...13 4 Implementation...14 4.1 Indoor mapping...14 4.2 Web admin...15 4.2.1 Log in...15 4.2.2 Dashboard...16 4.2.3 Profile update...16 4.2.4 ibeacon management...17 4.2.5 Add ibeacon...18 4.2.6 Edit ibeacon...19 4.3 Admin application...20 4.4 User application...23 4.4.1 Beacon detection...24 5 Results...26 6 6.1 6.2 6.3 Conclusions...27 Discussion...27 Ethical issues...28 Future work...29 References...30 v

Terminology Acronyms/Abbreviations Android Mobile operative system from Google AP Access Point API Application Programming Interface BLE Bluetooth Low Energy CMS Content management system dbm Decibel-milliwatt GHz Gigahertz GPS Global Positioning System GUI Graphical User Interface HTTP Hypertext Transfer Protocol IEEE Institute of Electrical and Electronics Engineers ios Operative system for Apple mobile devices IoT Internet of Things IPS Indoor Positioning System Mbi/s Mega Bits per Second MHz Megahertz MVC Model View Controller vi

mw Milliwatt PHP Scripting language for web development RF Radio Frequency RSSI Received Signal Strength Indicator SDK Software Development Kit SoC System On a Chip TxPower Transmitted Power UUID Universal Unique Identifier WiFi Wireless Local Area Network xcode Development Environment for Apple devices vii

1 Introduction We are more and more interacting with technology. In our daily activity, Global Positioning System (GPS) technology is getting used widely while the problem of localization for indoor locations still exist. In the last decade there are a lot of development in indoor navigation systems. But still there is a big demand for better indoor navigating systems. There are a lot of indoor environments where indoor map and navigation is needed, such as big malls, public transportation hubs, airports, museums, hospitals and many other places. Indoor Positioning System (IPS) has also become well known and they use sensors, magnetic fields, or other signals, sensible by mobile devices, to locate objects inside a building or specific environment [2]. The Bluetooth Low Energy (BLE) technology makes it possible to use peer to peer radio signal measurement with smartphones [3]. These kind of technologies will probably become more and more popular in the future. Any data about the environment that can be shared can help to give you a more accurate position. BLE devices known as beacons is the best choice at the moment. The usage of beacons are increasing day by day. These small devices can broadcast packets of data in short time intervals. The packets contain some information about the beacon used in distance calculation. Mobile devices or devices with bluetooth can receive BLE signals and read the data, and that is how indoor navigation applications work. 1.1 Background and problem motivation Localization refers to the problem to calculate or estimate a position within a specific map or area. Indoor localization aims to solve the problem within a specific building. GPS or other widely available signals like cellular networks are not useful in this context, because they are highly affected by obstacles. That means the reception of the signals is strongly affected in buildings. Due to that, indoor location based services needs a good accuracy in a range of a few meters. For instance in an office building, there are several rooms close to each other and maybe the accuracy of 5 meters can be enough. For that reason other technologies like Infrared, WiFi and Bluetooth are used to build an Indoor location based service [4]. 1

In simple words, the purpose of a beacon is to send out signals completely unaware of any mobile devices around it. Each beacon has a BLE transmitter. It broadcasts tiny radio signals over the air containing unique, location-specific data. Modern smartphones constantly scan for these signals. If beacons enter their range an associated app responds with the desired action. Beacons have no data stored on them, but they have a universally unique identification (UUID), a major and a minor. Any kind of device with Bluetooth capable low energy antenna can be interpreted as a beacon. 1.2 Overall aim Find a solution for localization in an inside environment where steel and concrete structure doesn't let GPS to work, is one of the things we discuss in this thesis. The goal of this project is to explore the potential use of ibeacons as an indoor positioning system in big buildings. The project is going to implement an Android application that makes the indoor positioning system, and make the phone connect to ibeacons to be able to receive information from them. 1.3 Scope The scope of this project is limited to indoor positioning and mapping, and the issues and possibilities specific to indoor navigation. Also, this project focuses on the BLE technology, and not geomagnetic technology. 1.4 Concrete and verifiable goals This project is separated to different parts, first of all there is a web admin which makes it possible for the administrator (admin) to add, delete or edit beacons and put information about each beacon. In the next step the admin should be able to map the environment and place beacons in the right place, where he/she wants to send information to users. In the last part the user will be able to see the whole map of the building or environment which is covered by beacons and see his/her accurate location in the building, and get information about different parts of the building from the beacons, by walking around the building. Map the environment by using the different technologies to achieve the most accurate map Implement a web admin application to be able to manage, add, delete or edit beacons and their information Implement a Android application to be able to detect ibeacon's information in each part of the building trough a smartphone. 2

1.5 Outline Chapter 2 describes about different kind of beacons, some small comparison between them and some small explanation about Bluetooth Low Energy (BLE). This chapter shows a bit specification about ibeacons as well. And also, a small study about different PHP frameworks to handle data from beacons in this project, will be found in this chapter. Chapter 3 describes the research and logic behind choosing the PHP framework, and also beacons that are used in the project and the Software Development Kit (SDK). Chapter 4 is about the procedure that is used in this project, how the application is implemented and how it works. Information about how the web admin is implemented and how it works, and also mapping platform in this project, will be found in this chapter. To make it clear how the application works and show the result of the project, I put some screenshots and explained how exactly the application does. 3

2 Theory There are a lot of different kinds of beacons in the market, so it s big confusion between beacons. But in general, usually they are platform free and as we said, a beacon is a physical device with an antenna and the BLE stack that can send packets. You can find several different kind of beacons in the market, for example Apple Estimote beacons or Google beacons, Eddystone, but that doesn t mean that Android devices can not see Estimote beacons. Depending on your project purpose you can choose which beacon to use, if you want them weatherproof or waterproof, long life battery or other requirements. Here is a basic comparison for popular beacons in the market; A very early manufacturer in Poland, they produce great beacons featuring WiFi, which means it s possible to update the beacons over the air [5]. Radius Networks has also good beacons with waterproof casing, and long life batteries [6]. Another kind of beacon is from Accent system, based on Texas Instruments chip, and with very long life batteries, almost two years [7]. Chinese beacons, pretty much looks like Estimote but with replaceable batteries [8]. And there is also many other manufacturers. In Table 1 you can see a summary of the performance for some of the latest and top chipsets. Table 1: Improved RF performance [9] Part Texas Instruments CC2640 TX Power Receive Sensitivity Year Released +5dBm -97dBm 2015 Nordic Semiconductor nrf52832 +4dBm -96 dbm 2015 Freescale KW40Z +5dBm -91 dbm 2015 Silicon Labs Blue Gecko +10dBm -95dBm 2015 Cypress PSoC 4 BLE +3dBm -92dBm 2014 TI CC2540/CC2541 +4dBm -89dBm/ 94 dbm 2010/2011 nrf51822 +4dBm -93dBm 2012 CSR CSR101x +7.5dBm -92.5dBm - 4

Then we have Estimote beacons, that run on Nordic Semiconductor, which is pretty much like Texas Instruments chipset. Nordic and Texas are the most common chipsets. In Table 2 below protocols supported by devices are shown: Table 2: Multi-protocol SoCs [9] Part Texas Instruments CC2650 Protocol Support BLE, Zigbee, RF4CE, 6LoWPAN Nordic Semiconductor nrf52832 BLE, ANT, 2.4GHz Proprietary, NFC Freescale KW40Z BLE, Thread Silicon Labs Blue Gecko BLE Cypress PSoC 4 BLE BLE TI CC2540/CC2541 BLE, nrf51822 BLE, ANT, 2.4GHz Proprietary CSR CSR101x BLE Indoor Positioning System (IPS) locates people or objects inside a building using radio signals, geometric fields, internal sensor data, barometric pressure, camera data or other sensory information collected by a smartphone device or tablet [10]. ibeacons It s Apple s version of Bluetooth Low Energy protocol which allows developers to create location aware apps and almost every kind of beacons supports it. That is officially supported by ios, but there are many APIs that allow Android devices to scan for ibeacons. For details on Estimote ibeacons, see chapter 2.2. Eddystone It s a Bluetooth Low Energy protocol from Google and it officially supports both ios and Android platforms, an open protocol available for everyone. 5

2.1 Bluetooth Low Energy (BLE) Bluetooth Low Energy is marketed as Bluetooth smart, which is a wireless computer network technology aimed at novel application in the healthcare, fitness, beacons, security and home entertainment industries [11]. Compared to the classic Bluetooth technology, Bluetooth Low Energy requires much lower power consumption and offers a lower cost, while maintaining the same communication range. Bluetooth Low Energy was merged into the main Bluetooth standard in 2010 when bluetooth core specification version 4.0 was adopted, that specification is called Bluetooth smart and includes classic Bluetooth protocol, Bluetooth High speed protocol, and Bluetooth Low Energy protocol. Bluetooth smart ready, indicates a dual mode device, like a laptop or smart phone, hardware is compatible with both classic and Low Energy Bluetooth peripherals. Bluetooth smart, indicates a Low Energy only device, like a battery operated sensor which requires either a smart ready or another smart device in order to function. Bluetooth Low Energy is a subset of Bluetooth version 4.0, with an entirely new protocol stack for rapid buildup of simple links. Unlike Bluetooth standard protocols, introduced in Bluetooth versions 1.0 to 3.0, it is aimed at very Low Power applications that can run off a coin cell battery for several month or even years. Chip designs allow for either single mode Bluetooth classic implementation, single mode Bluetooth Low Energy implementation or dual mode implementation where Bluetooth Low Energy functionality is integrated to an existing classic Bluetooth Controller. Bluetooth Low Energy uses the same 2.4 GHz ISM band radio frequencies as classic Bluetooth. This allows dual mode devices to share a single radio antenna, however Bluetooth Low Energy uses a modulation System that is much simpler [12], see Figure 1. Figure 1: Signal comparison of wireless systems operating in the 2.4-GHz band [12] 6

Bluetooth Low Energy technology operates in the same spectrum range as classic Bluetooth and also uses frequency hopping to counteract narrowband interference problems, however it uses a different set of channels and instead of Bluetooth classic 79, 1 MHz wide channels, Bluetooth Low Energy has 40 MHz wide channels [13]. See Figure 2. Figure 2: 40 Bluetooth Low Energy Channels [14] The bit rates is 1Mbi/s and the maximum transmit power is 10 mw. Bluetooth Low Energy Technology offers new opportunities for designers and developers of Bluetooth applications with several key advantages, including Low Power requirements, it can run for several months or years on standard coin cell batteries, small size, low cost, multi vendor interoperability, compatibility with large base of mobile phones, computers and tablets, and communication range. This advantages opens a wide range of possibilities for this technology [15]. 2.2 Estimote ibeacons ibeacons has two main interactions, monitoring and ranging. When you enter or exit a beacon s area your app will be notified about it. Monitoring works all the time in the foreground, background and even when the app is killed. But ranging works only in foreground and it provides proximity which means we can range an individual beacon. In beacon region whenever the beacon sends data, it contains its UUID (Universally Unique Identifier), major and minor. Every ibeacon ID is 20 bytes long and is divided into three sections (the values are hierarchical): UUID (16 bytes) Major number (2 bytes) Minor number (2 bytes) 7

An ibeacon which is placed in a fixed location can broadcast its presence to all bluetooth devices around it. They can be really close or as far as 70 meters away (Figure 3). The exact maximum range depends on the environment. Bluetooth is using the same type of radio waves as 2.4Ghz WiFi routers [16]. Figure 3: ibeacon range [16] Phones or smart devices can receive the Bluetooth radio signals and measure the distance to the beacon by calculating the strength of the signal. Depending on the devices, if the device sends a signal each second or 10 times per second, the accuracy will change. Estimote is using a more sophisticated formula to get more accurate and smooth data, but to make it easy and understandable, here is the formula to calculate distance between the ibeacon and the device when you don t want to use iphone for Estimote ibeacons: RSSI = -20 * logd + TxPower (d= distance) which is: d = 10 ^((TxPower - RSSI) / 20) 2.3 Indoor mapping Satellite positioning are long time ago provided and solves the problem of navigation in outdoor environments by location services in real time. But the problem is, the satellite base systems are only available when multiple satellites are on sight, and for indoor usage it is not a good solution. In this case, when you are inside and there is no GPS signal, WiFi geolocation doesn t help. We need another solution for indoor environments and inside buildings. Geomagnetic technology, which is old and based on the earths magnetic field, can help while we loose GPS connectivity. The earths magnetic field interacts with steel and concrete structure in a building. Most modern smartphones include an electronic compass chip with the purpose of magnetometer, that can be 8

used to measure the geomagnetic fields in three dimensions [17]. For this part of the project I used Indoor Atlas application which is good for mapping the location. Modern buildings all have a unique magnetic landscape produced by the natural geomagnetic fields that interact with their steel structures. By using your phone's built-in digital compass, this solution can use this magnetic landscape as a map for pinpointing locations indoors [18]. By utilizing the built-in magnetic sensor within a smartphone, we are able to detect anomalies in the Earth s magnetic field to enable a hybrid technology to accurately pinpoint and track a person s location indoors, producing blue dots on a map just like GPS. The cloud based platform is the interface for the application developers to create venues, manage data and build location based services within a mobile application that can include advertising, point of interest (search), way finding and much more [18]. 2.4 Web admin framework To create the web admin part, I am going to use the Laravel PHP framework. A brief introduction to some popular PHP frameworks are shown below. Each year there is a website carries out a survey of PHP framework popularity showing which PHP frameworks is most used, both at work and in home project. As shown in Figure 4 the most popular is Laravel [19]. Figure 4: PHP Framework popularity [19] This framework has almost every feature you could think of already included, such as database access library, its own templating engine, lots of helpers, code generators, plugins and more. It has really good documentation and many tutorials to be able to learn easily. 9

Laravel is a free PHP web framework, intended for the development of web applications following the model-view-controller (MVC) architectural pattern. Standard Laravel application structure has an application directory called app with three subdirectories: models, views, and controllers. This is a hint that Laravel follows the MVC architectural pattern, which enforces a separation between business logic from the input and presentation logic associated with a graphical user interface (GUI). In the case of Laravel web applications, the business logic typically consists of data models for things like users, blog posts, and the GUI is just a web page in a web browser. The MVC design pattern is very popular in the web development space [20]. 10

3 Methodology In this work, the goal will be to implement an application to be able to do an accurate mapping of a building or environment, and with the help of ibeacons see your location on a map, find your way in the building and get information through beacons, information that admins will be able to put through a web admin application. First of all it will be a big research to understand what kind of beacons fits this project. As I mentioned before in this report, there are several different kind in the market. In preparation, I needed to choose the best PHP framework for the web admin part. I had a small research about PHP frameworks popularity, the detailed results was interesting. The most popular framework is Laravel, because of many included features such as database access library, lots of helpers, code generators, and many others. Laravel has disadvantages also, being so full featured means it needs a powerful web server to run well. If all features is not needed, then a micro framework, like Slim, might be better, With Slim you can write applications that only do what they need to do, it provides a dispatcher and router that accepts a HTTP request and returns a response. As it s a micro framework the code base is small and doesn t need a powerful web server to run, it would run well on shared hosting [21]. If speed matters Falcon would be the right framework. It is a full stack framework that is written in C and it s installed as an extension to the web server, which means that the framework is compiled code instead of interpreted code in the case of PHP, which runs much faster. Like Laravel, it includes it s own templating language and libraries for database access. The down side of falcon is, it s complicated to install, but when its running it is easy to work with. Of course many other frameworks are also available. After all this research I chose Laravel, because of the popularity there is a lot of help and great tutorials. And since this part of the project will not be on focus, I prefer to choose an easy learning PHP framework. For beacons, I chose Estimote ibeacons to work with, so I will also use Estimote Indoor Location SDK which is a set of tools for building precise, blue dot location services indoor. For that you will need to build a configuration app and use the SDK to setup the shape and size of your space, and configure where the beacons are. There is an Android version of Estimote SDK as well, and I will use the Android version to make an app to be able to detect beacons and information about them. 11

Using Estimote SDK will have some limitations, so it will not be possible for all developers to continue develop the implemented app later in the future. Estimote is made by Apple and like many other Apple products you will get better result if you use related Apple products. For this project, to be able to get a good result with Estimote ibeacons for creating indoor location, you will need to have: 1 x iphone 4S or newer 4 or more Estimote ibeacons 1 x Mac computer with Xcode 1 x Estimote Account [22] [23] After searching I also found another solution for indoor mapping which works with any kind of beacons available in the market. Working with this platform seems so easy, easy workflow for mapping and great SDK to develop the application. It seems easy to generate an API key and use the SDK for ios and Android platform to add location based features. The API communicates with the positioning service that computes the device s location and returns it back to the mobile app as GPS coordinates [24]. 3.1 Testing environment The system will be tested inside my office place, a 700 square meter building, beacons will be separated by a distance of 5 meters from each other. Figure 5 shows the map of the building. Figure 5: Test environment map 12

3.2 Hardware The system will be tested with a Sony Xperia Z2 smartphone using Android 6.0.1. Estimote ibeacons that will be used is shown in Figure 6. Figure 6: Estimote ibeacons [25] 13

4 Implementation All requirements about this thesis for indoor navigation has been explained. In this chapter, all the information is put together, and implemented into a navigation system, with the help of a group of beacons, as an Android application. The first part presents the way to manage, update and edit beacon s information. The second part explains about ibeacons used in this project, and the last part presents the platform used for mapping. At the end, we put all parts together as a system to be able to use it for indoor mapping and indoor navigating. The system works as follow: 4.1 A few beacons are placed around the area. With the help of Atlas Indoor mapping application we upload the map of the building and put the waypoints on the map, to make it clear where beacons are placed. Then, by logging in to the web admin, we put information for each beacon. Now we can scan for beacons with the app created with Estimote SDK, to catch beacons data. The distance calculation will start at this point. After that, by running the Indoor Position Application, we can see the map of the building with waypoint, and your own location, on the map. By walking around the building and get into each beacon's range you will see a popup on your device which shows that your device detected the beacons data, by tapping on the popup you get detailed information about the beacon, and beacons range. Indoor mapping An Indoor Positioning System (Atlas Indoor) is used in this project. The map is uploaded to an online content management system (CMS), it can handle routes and multiple floors. I uploaded the map of the test environment building to the CMS, which is matched to a real world map. By walking around the building, the program can do magnetic calculation on your path. Magnetic map of the tested environment is shown in Figure 7. 14

Figure 7: Magnetic map of tested environment 4.2 Web admin 4.2.1 Log in Laravel provides built-in library called auth for user login and authentication. For login Laravel gives you a built in controller, view model, and database table named user. The auth library provides enhanced security to applications by ensuring only authorized (logged in) users can access the system. Laravel passwords is stored in encrypted form using bcrypt function. When browsing to web admin, the login page is shown (Figure 8). After entering email and password click on sign in button, you will be redirected to the dashboard page, see 4.2.2. Figure 8: Web Admin login 15

4.2.2 Dashboard When Laravel gets routing to dashboard it calls index method of Dashboards controller. Index method of the controller looks like: public function index() { $data=[]; $data['menu'] = "Dashboard"; $data['total_user'] = Ibeacon::count(); return view("dashboard",$data); } This method has code to count all records in ibeacon table, and return dashboard.blade.php page which looks like Figure 9. Figure 9: Dashboard page This is the first screen after login. In upper right corner, the admin login user name is shown. From here admin users can change their password. In left side menu there is ibeacon link, so you can redirect to ibeacons management page, see 4.2.4. In center, the count of currently active ibeacons is shown. 4.2.3 Profile update To change admin username, email and password go to profile update page, see Figure 10. When you click on profile button Laravel calls edit method of user controller, which looks like: public function edit($id) { $data['mainmenu']="user"; $data['menu']="user"; $data['article'] = User::findOrFail($id); return view('users.edit',$data); } The edit method get data of provided id form user database table, than it returns the edit.blade.php page. When you click on edit button it calls controllers update method which looks like: 16

public function update(request $request, $id) { $this->validate($request, [ 'name' => 'required', 'email' => 'required', 'password' => 'confirmed', 'status' => 'required', ]); $article = User::findOrFail($id); $input = $request->all(); $article->update($input); Session::flash('success', 'User has been Updated successfully!'); return redirect('users/'.$id.'/edit'); } This method checks validation, finds record for provided id, updates the specific record in user database table, and shows update message. Figure 10: Profile update page 4.2.4 ibeacon management When you browse to the ibeacon page (see Figure 11) Laravel finds details page from the view, and then calls the controller s index method to get data and display using details.blade.php page. Controllers index method is looks like: public function index() { $data = []; $data['menu'] = "Ibeacon"; $data['list'] = Ibeacon::all(); 17

return view("ibeacons.details", $data); } Above method fetch all data from ibeacon database table and pass all data to details.blade.php file using array variable $data. The view page details.blade.php displays each record. Figure 11: ibeacon detail page 4.2.5 Add ibeacon While you click the Add ibeacon button Laravel calls controllers create method, which looks like: public function create() { $data=[]; $data['menu']="ibeacon"; return view("ibeacons.add",$data); } This method return the page add.blade.php of the view, see Figure 12. 18

Figure 12: Add ibeacon page Then when you click Add button Laravel call store method of the controller which looks like: public function store(request $request) { $this->validate($request, [ 'uuid' => 'required', 'status'=>'required', ]); $ibeacon = new Ibeacon($request->all()); $ibeacon->save(); Session::flash('success', 'Your Ibeacon has been created successfully!'); return redirect('ibeacon'); } In the store method, we provide validation for mandatory field like status, and uuid, which means that you must enter data in these fields. These fields are required and can not be left blank. If validation is successful, then all data is stored to ibeacon database table, and a message is shown that your data is inserted and redirects you to details page. 4.2.6 Edit ibeacon When you click edit button Laravel calls edit method of controller. And it returns edit.blade.php page of the view, which looks like: public function edit($id) { $data=[]; $data['menu']="ibeacon"; $data['ibeacon'] = Ibeacon::findorFail($id); 19

return view('ibeacons.edit',$data); } This method finds all data for provided id and redirects you to edit.blade.php file of the view. Then when you click Edit button it calls controllers update method, which looks like: public function update(request $request, $id) { $this->validate($request, [ 'uuid' => 'required', 'status'=>'required', ]); $ibeacon = Ibeacon::findorFail($id); $ibeacon->update($request->all()); Session::flash('success', 'Your Ibeacon has been updated successfully!'); return redirect('ibeacon'); } The update method checks validation, update all data of provided id. Then gives an update message, finally it redirect you to detail.blade.php page. When you click close then it does nothing, but when you click delete button it calls controllers destroy method, which looks like: public function destroy(request $request,$id) { $item = Ibeacon::findOrFail($id); $item->delete(); Session::flash('danger', 'Your Ibeacon has been deleted successfully!'); return redirect('ibeacon'); } Above method finds record with provided id, then deletes the record and gives a delete message, finally it redirects you to detail.blade.php page. The deleted record is not completely deleted from database, for future log it remains in database, but it will not affect any other current records. 4.3 Admin application For this part of the project Atlas Indoor application is used, which is good for mapping the location. There is four steps of configuration in Atlas Indoor, as described below: Step 1 20

After creating an account and create the location then you upload the floor plan. Input the right address of the location. Then we add the floor plan and floor numbers. Then we upload the floor plan. For multi floor buildings you should add all floors under the same location. See Figure 13. Figure 13: Atlas Indoor location configuration The floor plan needs to be aligned in correct scale over the actual geolocation of the building, we scale and rotate the image from the corners of the floor plan to match the real life situation. See Figure 14. Figure 14: Atlas Indoor floor plan configuration Step 2 Atlas Indoor SDK will now generate some code for the admin application, shortly described as follows: 21

First of all check if the device supports BLE or not Context.getPackageManager().hasSystemFeature (PackageManager.FEATURE_BLUETOOTH_LE) To set the floor plan final IALocation location = IALocation.from(IARegion.floorPlan(floorPlanId)); Now request for location updates in onresume() method mialocationmanager.requestlocationupdates(ialocationrequest.create(), mlocationlistener); Register a region listener that will look for region changes and give callback when you enter in region for a specific floor plan mialocationmanager.registerregionlistener(mregionlistener); When entering a region, look for a floor plan and start to fetch floor final IATask<IAFloorPlan> asyncresult = mfloorplanmanager.fetchfloorplanwithid(id); Then after getting floor plan, your positioning will start and you can see your footprints as blue dots with continuous location update. Step 3 After that we map the Location; select floor plan, calibrate phone, set route and then start to walk. In this step we add waypoints, the purpose of this is to accurately pinpoint your location on the floor plan to do mapping. Waypoints should be located in places you can easily and precisely recognize in the floor plan for example close to a doorway. See Figure 15 A. Step 4 After that you start to calibrate your device, then you see the map with waypoints on it in your device. Place your device on a stable surface (on a table) for some seconds, then rotate the phone around it s axis. Then the map with waypoints on shows up. Step 5 Choose a starting waypoint on the map and place yourself on top of that. Then start to walk to the next waypoint, keep the phone horizontal and heading forward. Stop on top of the second waypoint. Make sure you are in the correct spot. Tap the waypoint that you are on top and check in with pressing the middle button. See Figure 15 B. 22

Figure 15: A. Adding waypoints 4.4 B. Waypoint calibration User application For creating the user application, Android Estimote SDK [26] is used. This SDK for Android is a library that allows interaction with Estimote ibeacons and stickers. The SDK system works on Android 4.3 or above and requires a device with Bluetooth Low Energy. It allows for: Beacon ranging (scans beacons and optionally filters them by their properties) Beacon monitoring (monitors regions for devices that have entered/exited a region) Nearables (a.k.a. Stickers), Eddystone, Estimote Telemetry, Estimote Location and Mirror discovery Easily meeting all the requirements for beacon detection (runtime permissions, acquiring all rights) Estimote beacon management - changing proximity UUID, major & minor values, broadcasting power, advertising interval and more Collecting analytic data 23

4.4.1 Beacon detection Beacon detection in Android is the method of finding the beacons in the nearby vicinity. Figure 16: Beacon detection on Android phone Considering the above screenshot of the mobile app (Figure 16), which shows the detected beacon in nearby area. To start beacon detection, the user taps the Start scan button. In code, there are four steps to setup beacon detection, as described below. Step 1 In BluetoothAdapter (Default Android class): This method is used to instantiate bluetoothmanager class, which is responsible for the Bluetooth instance which handles all the major operations to detect the Bluetooth devices. BluetoothManager manager = (BluetoothManager)context.getSystemService(Context.BLUETOOTH_SERVICE); Here manager instance is used to get the Bluetooth adapter. This adapter class is responsible for the scanning of the Bluetooth objects around. BluetoothAdapter mbtadapter = manager.getadapter(); The above method creates an adapter instance that will be used further to scan. Context.getPackageManager().hasSystemFeature(PackageManager.FEATURE_BLUETOOTH_LE); The above line will return true if the device has BLE support, otherwise it returns false. Step 2 24

mbtadapter.startlescan(this); This method starts to scan for other BLE devices and we will get callback in below method: public void onlescan(final BluetoothDevice newdeivce, final int newrssi, final byte[] newscanrecord) { // Update your Adapter from here. }); The above method is the callback once you get the device details that is detected. Here all such activities like updating the user interface, stopping loading indicator etc.. of the mobile app is done. Step 3 RSSI Parameter in method onlescan (see Step 2). This RSSI value is used to get the other details of the beacon. The data such as UUID, major, minor values all will be available and they will be shown in the adapter class. Step 4 proximity (Distance): IBeacon.getProximity (); This method returns the distance of the beacon from your device. It returns one of the following four values: PROXIMITY_IMMEDIATE = Less than half a meter away PROXIMITY_NEAR = More than half a meter to four meters away PROXIMITY_FAR = More than four meters away PROXIMITY_UNKNOWN = No distance estimate was possible 25

5 Results By running the actual user app, you will get the map of the building and your accurate location. If you start to move around and you get into range of a beacon, the you will get a popup, as you see in the screenshot, Figure 17 A. If you pull down the overlay of your phone, you will see all the beacons reached by your phone in that specific area, see Figure 17 B. By tapping on the popup (Figure 17 A), or selecting a beacon from the overlay popup (Figure 17 B), you will get the full information about that specific beacon (Figure 17 C), which can be any kind of information depending on your project. Like information about a specific area in that environment, or in a museum, information about specific art in that room, or in a store it can be an offer or information about a product or many other things. Figure 17: A. Nearby beacon B. List of beacons in range 26 C. Detailed beacon info

6 Conclusions The main purpose of this thesis (section 1.2) was to implement a system to be able to navigate indoor and taking advantage of ibeacons for any kind of commercial usage. The developed application will continue to be improved. This project has evaluated the effectiveness of BLE beacon technology for positioning. BLE has been developed to use less power so less battery for both transmitter and the receiver. The technology can be used for positioning in an accurate way, and that is beneficial in many areas. For example in shopping malls it s a great way to monitor customers, helping to understand how long do the customers spend in a special part of the mall, what are they interested in, in which age group they are, and send them offers. Many error factors make the localization process difficult, but an existing algorithm and indoor positioning application (Atlas Indoor) was used for evaluation. Atlas Indoor provides a great platform that runs a disruptive geomagnetic positioning to accurately pinpoint the location inside a building, and that is a unique system and very useful, when GPS is not working. 6.1 Discussion In this chapter I tried to summarize all the research previously discussed. Short comparison between different beacons available in the market, and a short explanation about two popular beacons (section 2). A brief explanation about Bluetooth Low Energy (BLE), and smart Bluetooth (section 2.1). Monitoring and ranging, which are two main interactions for ibeacons, and calculated RSSI for Estimote ibeacons, which are used in this project, are briefly described (section 2.2). Finding a solution for indoor mapping specially where GPS is not working (section 2.3 and 4.1). Choosing a framework to implement a web admin to be able to manage data about beacons. Laravel, which is the most popular framework, is used in this project. You can also see more information about each section and function of the web admin, how it is built, and how it works (section 2.4 and 4.2). 27

6.2 Mapping the indoor environment and how to use the indoor mapping application and the way it works. Placing beacons and calculate the distance between beacons (section 4.3). Android Estimote SDK is used to implement an application to be able to detect data from beacons (section 4.4 and 2.2). The implemented application with screenshots to show exactly how it works and tested in my working office (section 5). Ethical issues Beacons are completely unaware of devices around it, as I mentioned in chapter 1.1 the purpose of a beacon is just to send out signals and a beacons is not able to see any other device around it, that s all it can do. In this case they seem very harmless, they can not steal data from your device. But actually that s not all we do with beacons. The customer needs to download the mobile app, they need to give access to location, and by doing that you can take the ID of the beacon, which is located in customers area and ask the app and the operating system to monitor that specific beacon ID. Then the app can go to back to the server and say customer X is in beacon Y" area, and then you can take the action. [27] Many users simply agree with the terms and conditions statements and the privacy policies of the mobile applications without reading them. By doing that, they agree that we may collect location data from beacons. You agree that we may send the data from your phone to third parties who may then send you offers and monitor you. This is not illegal because the user agrees to service them. [28] Beacons can be really helpful with customer insights, helping to understand how long customers typically spend in each part of the mall, how often they go to a special product, which gender and which age range are interested in the specific product or department, and you can send them offers and take benefit on that, but that requires stealing a lot of data from them and monitor them as much as possible. 28

6.3 Future work There are a lot of possibilities to use beacons and indoor mapping. By developing the implemented applications, we will be able to use it in many different fields, and collect data. Such as: Shopping centres Guide people to a specific store in a mall, track them and find the most popular section in the store, send useful information and offers to their phones. Airports Find the direct path to the gate, check in, get flight information. Universities Offer students, employees and visitors indoor navigation. Guide them to lecture room, library, printers etc. 29

References [1] J. Lindh, Application Report: Bluetooth Low Energy Beacons, report SWRA475A, http://www.ti.com/lit/an/swra475a/swra475a.pdf January 2015, revised October 2016 [2] Wikipedia, Indoor positioning system https://en.wikipedia.org/wiki/indoor_positioning_system Retrieved 2017-08-14 [3] Y. Michalevsky, S. Nath, J. Liu, MASHaBLE: Mobile Applications of Secret Handshakes over Bluetooth LE https://www.blackhat.com/docs/asia-17/materials/asia-17-michalevskymashable-mobile-applications-of-secret-handshakes-over-bluetooth-le-wp.pdf [4] A. Zimmermann, A. Rossmann (Hrsg.), Digital Enterprise Computing 2015, Lecture Notes in Informatics (LNI), Gesellschaft für Informatik, Bonn 2015 97 https://publikationen.reutlingen-university.de/frontdoor/index/index/docid/606 [5] Wibrick, How it works http://wibrick.se/en/how-it-works/ Retrieved 2017-10-01 [6] Radius Network, RadBeacon X4 https://www.radiusnetworks.com/radbeacon/specs/x4/ Retrieved 2017-10-01 [7] Accent system, Beacons https://accent-systems.com/beacons/?gclid=cj0kcqjwpmlobrc9arisapigezdrsc21qfgo87yjnn-stq6skd8wr7319cq_hf1mmoo4xq59zv2sjjoaapmwealw_wcb Retrieved 2017-10-01 [8] Wellcore, W912 Waterproof Ibeacon product page http://www.wellcoressd.com/product/cc2541-and-nordicibeacons/w912-small-waterproof-ibeacon/#.wdfl2lghik8 Retrieved 2017-10-01 [9] Argenox, Top 5 Unmistakable Trends of BLE Chipsets, More RAM and Flash http://www.argenox.com/blog/top-5-unmistakable-trend30

s-of-ble-chipsets/ Retrieved 2017-08-14 [10] IndoorAtlas, What Are Indoor Positioning Systems (IPS) http://www.indooratlas.com/how-it-works/ Retrieved 2017-08-14 [11] Wikipedia, Bluetooth Low Energy BLE https://en.wikipedia.org/wiki/bluetooth_low_energy Retrieved 2017-08-18 [12] EETimes, Avoiding Interference in the 2.4-GHz ISM Band http://www.eetimes.com/document.asp?doc_id=1273359 Retrieved 2017-08-18 [13] M. H Vargas, using Bluetooth Low Energy (BLE) beacons, Turku University of Applied Sciences, 2016 http://theseus56-kk.lib.helsinki.fi/bitstream/handle/10024/105619/herrera%20vargas_milan.pdf?sequence=1&isallowed=y [14] National Instruments, Too Many Cooks in the 2.4 GHz Kitchen? http://www.ni.com/newsletter/51685/en/ Retrieved 2017-08-18 [15] Nordic Semiconductor, Bluetooth low energy wireless technology backgrounder https://www.nordicsemi.com/eng/news/press-center/press-backgrounders/bluetooth-low-energy-wireless-technology-backgrounder Retrieved 2017-08-18 [16] Estimote Developer Docs, Broadcasting range and proximity https://estimote.com/api/getting-started/intro-to-beacons.html Retrieved 2017-10-07 [17] Mobile Cloud Era, IndoorAtlas Geomagnetic Platform Disrupting Proximity Location Market https://mobilecloudera.com/indooratlas-geomagnetic-platform-disrupting-proximity-location-market/ Retrieved 2017-08-14 [18] IndoorAtlas http://www.indooratlas.com/ Retrieved 2017-08-14 [19] PHP, Best PHP Frameworks 2015 https://www.sitepoint.com/best-php-framework-2015-sitepoint-survey-results/ Retrieved 2017-08-16 31

[20] Laravel Home Page https://laravel.com Retrieved 2017-08-17 [21] Agriya, New Amazing Features of Slim Framework https://www.agriya.com/blog/2016/10/25/new-amazing-features-and-advantages-slim-framework/ Retrieved 2017-08-18 [22] Estimote Developer Docs, Map your location http://developer.estimote.com/indoor/map-your-location/ Retrieved 2017-08-18 [23] Estimote Developer Docs, Sign up for Estimote Account https://cloud.estimote.com/#/signup [24] Indoor Atlas, Our Platform http://www.indooratlas.com/our-platform/ Retrieved 2017-08-18 [25] Infotech Computer Center, ibeacon http://infotech.my/betong/?p=4655 Retrieved 2017-08-14 [26] GitHub, Estimote SDK for Android https://github.com/estimote/android-sdk Retrieved 2017-08-14 [27] Pulsate Academy, 10 things about bluetooth beacons you need to know http://academy.pulsatehq.com/bluetooth-beacons Retrieved 2017-10-07 [28] InfoSec Institute, Privacy Risks of Beacons http://resources.infosecinstitute.com/privacy-risks-beacons/#gref Retrieved 2017-10-07 32