淡江大學覺生紀念圖書館 (TKU Library)
進階搜尋


下載電子全文限經由淡江IP使用) 
系統識別號 U0002-1008202014283000
中文論文名稱 以藍牙信標做為非接觸式電子票證之應用研究
英文論文名稱 Applied Research on Contactless e-Tickets using Bluetooth Beacon Technology
校院名稱 淡江大學
系所名稱(中) 資訊工程學系碩士班
系所名稱(英) Department of Computer Science and Information Engineering
學年度 108
學期 2
出版年 109
研究生中文姓名 林冠宏
研究生英文姓名 Kuan-Hung Lin
學號 604410265
學位類別 碩士
語文別 中文
第二語文別 英文
口試日期 2019-07-14
論文頁數 55頁
口試委員 指導教授-林其誼
委員-蔡智強
委員-林振緯
中文關鍵字 物聯網  低功耗藍牙  藍牙信標  OpenCV 
英文關鍵字 Internet of Things  Bluetooth Low Energy  Bluetooth Beacon  OpenCV 
學科別分類 學科別應用科學資訊工程
中文摘要 隨著科技化的發展,物聯網應用已成為近年來蓬勃發展的項目之一,使得現今許多設備皆主打著可連接網路,並且透過智慧型手機安裝相對應的應用程式(APP)即可控制設備、管理機器與收集資訊。若此時結合大數據之應用,將訊息加以分析與學習使用習慣,以各種形式反饋於使用者,讓現今的生活更加便利外,也增加許多提示,給使用者更注意生活。
由於全球衛星定位系統(GPS)於室內定位時常產生極大的誤差,而且無法由GPS計算出使用者位於的樓層,因此基於Wi-Fi及藍牙(Bluetooth)等無線訊號之室內定位應用的技術不斷衍生而出。其中,低耗電與低建置成本的低功耗藍牙(Bluetooth Low Energy, BLE)。而基於BLE技術所制訂的藍牙信標(Beacon),也因此具有低耗電的優點,使Beacon應用不斷延伸發展。
本論文將以Beacon的室內定位概念為基礎,同時利用Beacon作為使用者的電子票證。這有別於固定Beacon這種常見的配置方式,而是由使用者攜帶Beacon裝置,再由固定位置的兩台Raspberry Pi 4設置為接收器,藉由比較兩台接收器所感測到的接收信號強度指標(Received Signal Strength Indication, RSSI)可計算出使用者移動的方向,同時結合OpenCV之影像辨識,來達到使用非接觸式電子票證之應用。本研究可運用於電影院或遊樂場等應用場景,達成減少工作人力的配置,也能在疫情流行時期,減少人與人的接觸。
英文摘要 With the development of technology, the Internet of Things application has become one of the booming projects in recent years, so that many devices today are mainly connected to the Internet, and can be controlled by installing the corresponding application (APP) through the smartphone. Equipment, management machines and information collection. If you combine the application of big data at this time, analyze the information and learn the habit of use, and feedback it to the user in various forms, so that today's life is more convenient, and many tips are added to give the user more attention to life.

Since the global positioning system (GPS) often generates great errors in indoor positioning, and the floor where the user is located cannot be calculated by GPS, the technology of indoor positioning applications based on wireless signals such as Wi-Fi and Bluetooth (Bluetooth) is continuously derived Out. Among them, Bluetooth Low Energy (BLE) with low power consumption and low installation cost. The Bluetooth beacon (Beacon) developed based on BLE technology also has the advantage of low power consumption, making Beacon applications continue to develop.


This thesis will be based on Beacon's indoor positioning concept, while using Beacon as the user's electronic ticket. This is different from the common configuration method of fixed Beacon, but the user carries the Beacon device, and then two fixed Raspberry Pi 4 set up as receivers by comparing the received signals sensed by the two receivers Received Signal Strength Indication (RSSI) can calculate the direction of user movement, and combined with OpenCV's image recognition to achieve the application of contactless electronic tickets. This research can be applied to movie theaters or playgrounds and other application scenarios to achieve a configuration that reduces work manpower and can also reduce human-to-human contact during epidemic outbreaks.
論文目次 目錄
第一章 緒論 1
1.1 研究背景與動機 1
1.2 研究目的 2
1.3 論文架構 3
第二章 技術背景與相關研究 5
2.1 低功耗藍牙 (Bluetooth Low Energy, BLE) 5
2.1.1 藍牙5.1 6
2.2 iBeacon藍牙信標 7
2.2.1 iBeacon運作 8
2.2.2 iBeacon封包格式 8
2.2.3 iBeacon距離計算 10
2.3 OpenCV 12
2.4 相關研究 12
第三章 系統架構與實作 14
3.1 實驗系統架構 14
3.2 系統運作原理 15
第四章 系統實作與功能展示 18
4.1 iBeacon設備選擇 19
4.1.1 iOS無法提取藍牙MAC位址 20
4.1.2 行動裝置非固定的藍牙mac address 20
4.1.3 Estimote裝置使用 21
4.2 Reader 設備選擇 23
4.2.1 BlueZ 、PyBluZ與BluePy套件選擇 23
4.2.2 設備替換 25
4.2.3 資料庫連線 25
4.3 Edge Server設備選擇與實作 26
4.3.1 MariaDB架設 26
4.3.2 iBeacon設備移動方向判斷 27
4.3.3 OpenCV人數計算 31
4.4 實驗測試 32
4.4.1 iBeacon註冊 32
4.4.2 Reader廣播接收與傳送 33
4.4.3 Edge Server方向辨識 34
4.4.4 OpenCV 人數計算與確認 37
4.4.5 顯示進出畫面位置 40
4.4.6 準確率測試 40
第五章 結論與未來展望 44
5.1 結論 44
5.2 未來展望 44
參考文獻 46
附錄–英文論文 50


圖目錄
圖 2.1 1 AoA 與AoD有向角測量示意圖 [7] 7
圖 2.2 1 藍牙封包PDU內容格式介紹 9
圖 2.2 2 iBeacon 封包AD內容格式介紹 10
圖 3.1 1架構圖 15
圖 3.2 1RSSI值變化與區域判斷對照圖 17
圖 4 1環境場景俯瞰示意圖 18
圖 4 2原始架構圖 19
圖 4.1 1 iOS首次執行我們開發的iBeacon app 19
圖 4.1 2 尚未開啟iBeacon畫面 20
圖 4.1 3執行iBeacon畫面 20
圖 4.1 4 Estimote iBeacon設定 23
圖 4.2 1 Bluepy 藍牙掃描頻率調整程式碼 24
圖 4.2 2 藍牙封包預處裡程式碼 24
圖 4.3 1 1m時RSSI值變化 28
圖 4.3 2 1m時RSSI值與距離估算值(N值設為2) 28
圖 4.3 3 1m時RSSI值與距離估算值(N值設為1) 29
圖 4.3 4 iBeacon移動時RSSI變化圖 30
圖 4.3 5區域判斷程式碼 31
圖 4.4 1裝置綁定畫面 33
圖 4.4 2 裝置綁定結果對照圖 33
圖 4.4 3 每秒RSSI值取最大與平均對照圖 34
圖 4.4 4區域判斷成果資料表 36
圖 4.4 5方向判斷成果 37
圖 4.4 6使用者通過 OpenCV畫面 38
圖 4.4 7允許通過畫面 39
圖 4.4 8 不允許通過畫面 40

表目錄
表 2.1 1傳統藍牙與BLE規格比較表 [6] 6
表 2.2 1 iOS距離狀態回應說明表 [8] 11
表 4.1 1 Estimote iBeacon規格表 [16] 22
表 4.2 1 Raspberry Pi 3 與Raspberry Pi 4規格比較表 25
表 4.3 1使用者裝置認這資料表結構 26
表 4.3 2 iBeacon訊號接收資料表結構 26
表 4.3 3區域判斷資料表 27
表 4.3 4使用者移動方向紀錄表 27
表4.4 1僅藉由 iBeacon判斷移動方向的準確率 41
表4.4 2 僅藉由OpenCV判斷移動方向及人數之準確率 42
表4.4 3整體系統判斷準確率 42

參考文獻 [1] iBT數位建築雜誌, “一探究竟Sigfox、LoRa、NB-IoT-物聯網世代的無線傳輸技術,” [線上]. Available: http://www.ibtmag.com.tw/new_article.asp?ar_id=25557. [存取日期: 07 2020].
[2] Apple, “iBeacon,” [線上]. Available: https://developer.apple.com/ibeacon/. [存取日期: 07 2020].
[3] Google, “Mark up the world using beacons,” [線上]. Available: https://developers.google.com/beacons. [存取日期: 07 2020].
[4] R. Networks, “AltBeacon,” [線上]. Available: https://altbeacon.org/. [存取日期: 07 2020].
[5] BluetoothSIG, “Get Your Beac On Part 1,” [線上]. Available: https://www.bluetooth.com/blog/get-your-beac-on-part-1/. [存取日期: 07 2020].
[6] BluetoothSIG, “Radio Versions,” [線上]. Available: https://www.bluetooth.com/learn-about-bluetooth/bluetooth-technology/radio-versions/. [存取日期: 07 2020].
[7] BluetoothSIG, “Bluetooth Core Specification Version 5.1 Feature Overview,” [線上]. Available: https://www.bluetooth.com/wp-content/uploads/2019/03/1901_Feature_Overview_Brief_FINAL.pdf. [存取日期: 07 2020].
[8] Apple, “Getting Started with iBeacon,” [線上]. Available: https://developer.apple.com/ibeacon/Getting-Started-with-iBeacon.pdf. [存取日期: 07 2020].
[9] BluetoothSIG, “Intro to Bluetooth Beacons,” [線上]. Available: https://www.bluetooth.com/bluetooth-resources/intro-to-bluetooth-beacons/. [存取日期: 07 2020].
[10] BluetoothSIG, “TIONS,” [線上]. Available: https://www.bluetooth.com/specifications/assigned-numbers/company-identifiers/. [存取日期: 07 2020].
[11] Apple, “Proximity Beacon Specification R1,” Apple, 2015.
[12] M. Ivanić and I. Mezei, “Distance Estimation Based on RSSI Improvements of Orientation Aware Nodes,” 於 2018 Zooming Innovation in Consumer Technologies Conference (ZINC), Novi Sad, Serbia, 2018.
[13] Y. Oikawa, “Tag movement direction estimation methods in an RFID gate system,” 於 2009 6th International Symposium on Wireless Communication Systems, Tuscany, Italy, 2009.
[14] H. Kong and B. Yu, “Method for Movement Direction Judgment of Secret Carriers Based on Multi-frequency RFID,” 於 2018 IEEE 3rd Advanced Information Technology, Electronic and Automation Control Conference (IAEAC), Chongqing, China, 2018.
[15] G. Kalantar, A. Mohammadi and S. N. Sadrieh, “Analyzing the Effect of Bluetooth Low Energy (BLE) with Randomized MAC Addresses in IoT Applications,” 於 2018 IEEE International Conference on Internet of Things (iThings) and IEEE Green Computing and Communications (GreenCom) and IEEE Cyber, Physical and Social Computing (CPSCom) and IEEE Smart Data (SmartData), Halifax, NS, Canada, Canada, 2018.
[16] Estimote, “Compare beacons,” Estimote, [線上]. Available: https://estimote.com/products/. [存取日期: 07 2020].
[17] P. Seymer, D. Wijesekera and C.-D. Kan, “Secure Outdoor Smart Parking Using Dual Mode Bluetooth Mesh Networks,” 於 2019 IEEE 89th Vehicular Technology Conference (VTC2019-Spring), Kuala Lumpur, Malaysia, Malaysia, 2019.
[18] Argenox, “USING BLE DEVICES WITH A RASPBERRY PI,” Argenox, [線上]. Available: https://www.argenox.com/library/bluetooth-low-energy/using-raspberry-pi-ble/. [存取日期: 07 2020].
[19] elinux, “RPi USB Webcams,” elinux, [線上]. Available: https://elinux.org/RPi_USB_Webcams. [存取日期: 07 2020].
[20] A. Rosebrock, “OpenCV People Counter,” 12 8 2018. [線上]. Available: https://www.pyimagesearch.com/2018/08/13/opencv-people-counter/. [存取日期: 07 2020].
[21] “步行,” wikipedia, [線上]. Available: https://zh.wikipedia.org/wiki/%E6%AD%A5%E8%A1%8C#cite_note-12. [存取日期: 07 2020].
論文使用權限
  • 同意紙本無償授權給館內讀者為學術之目的重製使用,於2020-08-12公開。
  • 同意授權瀏覽/列印電子全文服務,於2020-08-12起公開。


  • 若您有任何疑問,請與我們聯絡!
    圖書館: 請來電 (02)2621-5656 轉 2487 或 來信