The Chinese University of Hong Kong
Total Page:16
File Type:pdf, Size:1020Kb
1 The Chinese University of Hong Kong Department of Computer Science and Engineering LYU1403 Exhibition Navigation with iBeacon Supervised by Professor Michael LYU NG Ping Him 1155029312 YEUNG Tak Wing 1155009050 2 Table of Contents Introduction ................................................................................................................................ 1 Background ............................................................................................................................ 1 Introduction to Bluetooth ......................................................................................................... 2 What is indoor exhibition and navigation system? .................................................................. 3 Why Bluetooth Low Energy (BLE)? ........................................................................................ 4 Customized marketing ............................................................................................................ 5 Objective ................................................................................................................................ 6 Requirement Analysis ................................................................................................................ 7 Services ................................................................................................................................. 8 Kontakt.io ............................................................................................................................ 8 IndoorAtlas .......................................................................................................................... 8 Proximity Kit by Radius Networks ....................................................................................... 9 Case studies..........................................................................................................................10 City Gallery ........................................................................................................................10 Macy’s ...............................................................................................................................14 LINE Maps for Indoor .........................................................................................................14 Project Scope and Stepwise Refinement ...............................................................................27 Technology ...............................................................................................................................29 Bluetooth Low Energy ...........................................................................................................30 Generic Attribute Profile .....................................................................................................30 Speed ................................................................................................................................31 Frequency Band.................................................................................................................31 Setup .................................................................................................................................31 Range ................................................................................................................................31 Security ..............................................................................................................................31 Topology ............................................................................................................................32 Power consumption ...........................................................................................................32 Bluetooth stack ..................................................................................................................32 Services and Characteristics ..............................................................................................32 Descriptors .........................................................................................................................33 Central and Peripheral Profiles ..........................................................................................33 i GATT servers and clients ...................................................................................................33 Cost ...................................................................................................................................34 iBeacon .................................................................................................................................36 Modes ................................................................................................................................36 Editing an iBeacon .............................................................................................................36 Advertising packet ..............................................................................................................36 TxPower, RSSI ..................................................................................................................38 Working mechanism ..........................................................................................................39 Android ..................................................................................................................................40 Permissions .......................................................................................................................40 Setup .................................................................................................................................41 BluetoothAdapter ...............................................................................................................41 Start Bluetooth ...................................................................................................................41 Connect to a BLE device ....................................................................................................43 Read BLE device ...............................................................................................................44 Notifications .......................................................................................................................44 Close connection ...............................................................................................................44 Third Party Library .............................................................................................................45 Indoor Positioning .....................................................................................................................47 Overview ...............................................................................................................................47 Deployment and Calibration ..................................................................................................48 Trilateration ...........................................................................................................................49 Quality of Measured RSSI .....................................................................................................51 Cell-based Region Detection .................................................................................................56 Design ......................................................................................................................................60 Android ..................................................................................................................................61 Interface to be shown to visitors .........................................................................................61 Interface to be shown for internal testing ............................................................................65 Web .......................................................................................................................................67 Database ...........................................................................................................................67 CMS ...................................................................................................................................68 REST API ..........................................................................................................................78 JSON .................................................................................................................................80 ii Documentation ...................................................................................................................82 Implementation .........................................................................................................................84 Android ..................................................................................................................................84 Web ..................................................................................................................................... 115 Limitations ............................................................................................................................... 154 No background scans .........................................................................................................