系統識別號 | U0002-1707201717162300 |
---|---|
DOI | 10.6846/TKU.2017.00584 |
論文名稱(中文) | MQTT與MQTT-SN物聯網應用實作於IPv6藍牙低功耗環境 |
論文名稱(英文) | Implementation of IoT applications based on MQTT and MQTT-SN in IPv6 over Bluetooth Low Energy |
第三語言論文名稱 | |
校院名稱 | 淡江大學 |
系所名稱(中文) | 資訊工程學系資訊網路與多媒體碩士班 |
系所名稱(英文) | Master's Program in Networking and Multimedia, Department of Computer Science and Information Engine |
外國學位學校名稱 | |
外國學位學院名稱 | |
外國學位研究所名稱 | |
學年度 | 105 |
學期 | 2 |
出版年 | 106 |
研究生(中文) | 廖開弘 |
研究生(英文) | Kai-Hung Liao |
學號 | 605420156 |
學位類別 | 碩士 |
語言別 | 繁體中文 |
第二語言別 | |
口試日期 | 2017-06-20 |
論文頁數 | 66頁 |
口試委員 |
指導教授
-
林其誼(chiyilin@mail.tku.edu.tw)
委員 - 蔡智強(jichiangt@nchu.edu.tw) 委員 - 林振緯(jwlin@csie.fju.edu.tw) |
關鍵字(中) |
物聯網 低功耗藍牙 6LoWPAN MQTT-SN IPv6 |
關鍵字(英) |
Internet of things Bluetooth Low Energy MQTT MQTT-SN IPv6 6LoWPAN |
第三語言關鍵字 | |
學科別分類 | |
中文摘要 |
人們想提高生活品質的想法造就了物聯網時代的來臨,如何更容易地取得想要的感測資料,以及更有效率地管理設備也成為物聯網實作的重要主題。為了管理裝置,傳統網路環境我們會對所有裝置配置名為IP的數字標籤,而鑒於IPv4數量逐漸枯竭,IPv6技術將取代之成為網路上用於識別個體的新依據。再者,物聯網設備還有另一項不可忽視的問題 - 電池耗能。環境感測器每次在充完電或更換電池之後必須工作很長一段時間,若期間能源耗盡感測服務即失去功用。在本篇論文中,我們使用了IPv6結合藍牙低功耗(Bluetooth Low Energy,縮寫為BLE)技術,讓感測器網路內設備可以相互溝通且達到低耗能的效果。同時實做出異質網路閘道器,以達成與網際網路結合的目標。並且在IPv6基礎上使用MQTT與MQTT-SN應用層協議向用戶提供推播、訂閱服務,以期達到感測器設備主動向客戶提供訂閱訊息的效果。整合以上各項技術,我們預期做出一個以IPv6作為設備辨別依據,以求管理智慧化的藍牙低功耗環境資訊蒐集系統 |
英文摘要 |
Due to the desire of improvement on quality of life, people are expecting to enter the new era of Internet of Things (IoT). How to obtain data from a great number of sensors and manage them effectively have become one of the important challenges we need to conquer. Because of the exhaustion of IPv4 addresses, IPv6 is designed to replace IPv4 as the new identity of devices connected to the Internet. There is another challenge for IoT – power consumption. If a battery-operated IoT device runs out of power, it will stop working. In this thesis, we combine IPv6 with Bluetooth Low Energy (BLE) to build a low-power wireless local area network. We also develop a heterogeneous gateway, which can integrate BLE device with other smart objects over either wired or wireless communications. By using Raspberry Pi 3 development boards as the BLE nodes and the gateway, on top of them we have deployed Message Queuing Telemetry Transport (MQTT) and MQTT-Sensor Network (MQTT-SN) application protocols to transport sensor data using the publish/subscribe model. We expect that many intelligent IoT applications can be built over our prototype system based on IPv6/BLE |
第三語言摘要 | |
論文目次 |
目錄 第 1 章 緒論 1 1.1 研究背景與動機 1 1.2 研究目的 2 第 2 章 技術背景與相關研究 5 2.1 低功耗藍牙( Bluetooth Low Energy ) 5 2.2 IPv6 7 2.3 6LoWPAN 10 2.4 MQTT 與 MQTT-SN 13 第 3 章 實驗架構 17 3.1 實驗說明 17 3.2 實驗架構圖 18 3.3 網路架構圖 19 3.4 系統作業流程 20 第 4 章 系統實作與功能展示 23 4.1 使用情境 23 4.2 節點需求 23 4.3 建立IPv6 over BLE連線 25 4.4 MQTT服務 34 4.4.1 Mosquitto 34 4.4.2 mqtt-sn-tools 36 4.4.3 RSMB - Really Small Message Broker 37 4.4.4 Quality of Service (QoS) 40 4.4.5 Broker設定檔 43 4.5 感測節點設計 45 4.6 Web server設計 46 4.7 網路資料庫 50 4.8 封包分析 51 第 5 章 結論與未來展望 56 5.1 結論 56 5.2 未來展望 57 參考文獻 58 附錄 – 英文論文 61 圖目錄 圖 2 1藍牙4.0 堆疊 6 圖 2 2 IPv6 over BLE 堆疊 7 圖 2 3 6LoWPAN 表頭架構 11 圖 2 4 6LoWPAN 來源端位址表示法示意圖 12 圖 2 5 6LoWPAN 目的端位址表示法示意圖 13 圖 2 6 MQTT協議運作圖 14 圖 3 1實驗架構圖 18 圖 3 2網路架構圖 19 圖 3 3 BLE連線建立流程圖 21 圖 3 4 IPv6鄰居探索協議流程圖 22 圖 4 1 BLE從設備發送廣播封包等待連線 26 圖 4 2建立一般BLE連線以及此時的網路介面 27 圖 4 3掛載bluetooth_6LoWPAN並開啟功能(Linux kernel 4.1以後版本) 29 圖 4 4掛載bluetooth_6LoWPAN並開啟功能 (Linux kernel 4.0以前版本) 29 圖 4 5設置radvd路由規則 30 圖 4 6 6LBR搜尋到6LN的廣播 31 圖 4 7 6LBR與6LN產生bt0網路介面 32 圖 4 8 6LBR與6LN設定Global位址 33 圖 4 9 6LN對Google DNS server發出Ping封包 34 圖 4 10 Mosquitto 推播指令使用方法與可設定參數 35 圖 4 11 Mosquitto 訂閱指令使用方法與可設定參數 36 圖 4 12 RSMB 執行畫面 37 圖 4 13 Mosquitto推播訊息至RSMB 38 圖 4 14 Mosquitto從RSMB訂閱訊息 39 圖 4 15 MQTT QoS 0 流程圖 40 圖 4 16 MQTT QoS 1 執行順序與流程圖 41 圖 4 17 MQTT QoS 2 執行順序與流程圖 42 圖 4 18 RSMB 設定檔 44 圖 4 19實際設備圖 45 圖 4 20 Raspberry Pi與感測器連接 45 圖 4 21 Express.js 架構圖 47 圖 4 22網頁即時資料圖 48 圖 4 23網頁歷史資料圖 49 圖 4 24 Firebase資料庫畫面 51 圖 4 25封包架構圖 52 圖 4 26 tcpdump指令與參數 53 圖 4 27 Tcpdump封包截取 - IPv6表頭 53 圖 4 28 Tcpdump封包截取 - UDP表頭 54 圖 4 29 Tcpdump封包截取 - MQTT-SN封包 54 圖 4 30 MQTT-SN - PUBLISH封包結構 55 圖 4 31 Wireshark擷取L2CAP封包 55 表目錄 表 2 1 MQTT與MQTT-SN比較圖 15 表 4 1 Raspberry Pi 3 24 表 4 2 Broker可設定參數表 43 |
參考文獻 |
[1] Gartner Announcements http://www.gartner.com/newsroom/id/3165317 , last accessed Jun. 11, 2017. [2] Internet of Things http://www.itu.int/en/ITU-T/techwatch/Pages/internetofthings.aspx , last accessed Jun. 11, 2017. [3] IBM - Why Facebook is using MQTT on mobile https://www.ibm.com/developerworks/community/blogs/mobileblog/entry/why_facebook_is_using_mqtt_on_mobile?lang=en, last accessed July 17,2017. [4] Robin Heydon. “Bluetooth low energy : the developer's handbook”. Upper Saddle River, NJ : Prentice-Hall. 2012 [5] RFC 7668 : IPv6 over BLUETOOTH(R) Low Energy https://tools.ietf.org/html/rfc7668 [6] Zach Shelby, Carsten Bormann. “6LoWPAN: The Wireless Embedded Internet”. Chichester, U.K. : Wiley. 2009. [7] MQTT For Sensor Networks (MQTT-SN) Protocol Specification http://mqtt.org/new/wp-content/uploads/2009/06/MQTT-SN_spec_v1.2.pdf , last accessed Jun. 11, 2017. [8] MQTT V3.1 Protocol Specification https://public.dhe.ibm.com/software/dw/webservices/ws-mqtt/mqtt-v3r1.html , last accessed Jun. 11, 2017. [9] M. Siekkinen, M. Hiienkari, J. K. Nurminen and J. Nieminen, "How low energy is bluetooth low energy? Comparative measurements with ZigBee/802.15.4," 2012 IEEE Wireless Communications and Networking Conference Workshops (WCNCW), Paris, 2012, pp. 232-237. [10] IPv6 Stateless Address Autoconfiguration, https://tools.ietf.org/search/rfc4862, last accessed July 17, 2017 [11] RFC 4861 : Neighbor Discovery for IP version 6 (IPv6) https://tools.ietf.org/html/rfc4861 , last accessed Jun. 11, 2017. [12] Compression Format for IPv6 Datagrams in 6LoWPAN Networks, https://www.ietf.org/proceedings/74/slides/6lowpan-2.pdf, last accessed July 17,2017. [13] RFC 6282 : Compression Format for IPv6 Datagrams over IEEE 802.15.4-Based Networks https://tools.ietf.org/html/rfc6282 , last accessed Jun. 11, 2017. [14] Internet Protocol Support Profile https://www.bluetooth.org/docman/handlers/downloaddoc.ashx?doc_id=296307 , last accessed Jun. 11, 2017. [15] Haolin Wang, Minjun Xi, Jia Liu and Canfeng Chen, "Transmitting IPv6 packets over Bluetooth low energy based on BlueZ," 2013 15th International Conference on Advanced Communications Technology (ICACT), PyeongChang, 2013, pp. 72-77. [16] Radvd, https://linux.die.net/man/5/radvd.conf, last accessed Apr 10, 2017. [17] Mosquitto, https://mosquitto.org, last accessed July 17, 2017. [18] mqtt-sn-tools, https://github.com/njh/mqtt-sn-tools, last accessed July 17, 2017 [19] Getting started with the Really Small Message Broker, https://rawgit.com/MichalFoksa/rsmb/master/rsmb/doc/gettingstarted.htm, last accessed July 17, 2017. [20] Node.js https://nodejs.org, last accessed July 17, 2017 [21] Firebase , https://firebase.google.com, last accessed July 17, 2017 [22] Express.js, http://expressjs.com, last accessed July 17, 2017 [23] Tcpdump, http://www.tcpdump.org/tcpdump_man.html, last accessed July 17, 2017 [24] Wireshark, http://www.tcpdump.org/tcpdump_man.html, last access July 17, 2017 [25] W. Yoon, K. Kwon, M. Ha and D. Kim, "Transfer IPv6 packets over Bluetooth Low Energy with ensuring emergency data transmission," 2016 IEEE Sixth International Conference on Communications and Electronics (ICCE), Ha Long, 2016, pp. 136-141. [26] J. Yim, S. Kim, N. K. Kim and Y. B. Ko, "IPv6 based real-time acoustic data streaming service over Bluetooth Low Energy," 2015 IEEE Pacific Rim Conference on Communications, Computers and Signal Processing (PACRIM), Victoria, BC, 2015, pp. 269-273. [27] H. W. Kang, C. M. Kim and S. J. Koh, "ISO/IEEE 11073-Based Healthcare Services over IoT Platform Using 6LoWPAN and BLE: Architecture and Experimentation," 2016 International Conference on Networking and Network Applications (NaNA), Hakodate, 2016, pp. 313-318. , 2016 |
論文全文使用權限 |
如有問題,歡迎洽詢!
圖書館數位資訊組 (02)2621-5656 轉 2487 或 來信