§ 瀏覽學位論文書目資料
  
系統識別號 U0002-0607201715105800
DOI 10.6846/TKU.2017.00207
論文名稱(中文) 以CoAP/IPv6/BLE協議堆疊為基礎的物聯網應用實作
論文名稱(英文) Implementation of IoT Applications based on CoAP/IPv6/BLE Protocol Stack
第三語言論文名稱
校院名稱 淡江大學
系所名稱(中文) 資訊工程學系碩士班
系所名稱(英文) Department of Computer Science and Information Engineering
外國學位學校名稱
外國學位學院名稱
外國學位研究所名稱
學年度 105
學期 2
出版年 106
研究生(中文) 章家軒
研究生(英文) Chia-Hsuan Chang
學號 604410059
學位類別 碩士
語言別 繁體中文
第二語言別
口試日期 2017-06-20
論文頁數 59頁
口試委員 指導教授 - 林其誼
委員 - 許輝煌
委員 - 林昌鴻
關鍵字(中) 物聯網
IPv6
BLE
6LoWPAN
CoAP
關鍵字(英) Internet of Things
IPv6
BLE
6LoWPAN
CoAP
第三語言關鍵字
學科別分類
中文摘要
隨著物聯網(IoT)的快速發展,萬物連網已成為必然趨勢並衍生出如工業4.0、智慧家居、智慧醫療等各種智慧化服務。為了使這些智慧IoT服務確實可行,最重要的一點是能有一個可以與各種上層網路協議相容的低功耗鏈結層技術。當今已有許多流行的低功耗無線傳輸技術像是ZigBee和藍牙低功耗(Bluetooth Low Energy)應用在物聯網中。為了在ZigBee上運行IPv6,在2007年,IETF RFC 4944已經提出了藉由IEEE 802.15.4網路傳輸IPv6封包。相較之下,直到2010年 BLE才被作為藍牙4.0規範當中的一部分。由於現在 BLE 智慧型手機無所不在,BLE 近期在物聯網中得到了極大的關注。在2015年年底,IETF 也提出了一個RFC 7668標準來運行IPv6 over BLE。
在本研究中,我們的目標是使用Raspberry Pi 3和nRF51-DK開發板來實現IPv6 over BLE 的環境,並在IPv6/BLE 協議堆疊的基礎上運行 CoAP (Constrained Application Protocol)應用協議。更具體來說,在我們的實驗環境中,每個BLE節點都支援IPv6位址並且可以在網路上的任何地方透過CoAP通訊協議進行數據交換。此外,為了簡化一般網頁瀏覽器的訪問,我們還實現了一個接受HTTP請求並將其轉換為CoAP請求的BLE 閘道器設備。此閘道器設備還被設計為定期請求傳感器數據,然後將數據轉發到IoT雲平台。實驗結果顯示我們的系統可以運行並且易於使用。在未來,我們希望能構建一個由BLE和ZigBee設備組成的IoT系統,並分別測試其在網路層和應用層之間的互通性。
英文摘要
With the rapid development of Internet of Things (IoT), it is an inevitable trend that all things will get connected to the Internet to form various intelligent services such as Industry 4.0, smart home, smart medical care, etc. To make such intelligent IoT services practicable, it is vital to have a low-power link-layer technology that can accommodate a variety of upper-layer networking protocols. Currently, there are many popular low-power wireless technologies for IoT such as ZigBee and Bluetooth Low Energy (BLE). To run IPv6 over ZigBee, in 2007 IETF RFC 4944 Transmission of IPv6 Packets over IEEE 802.15.4 Networks has already been proposed. By contrast, BLE was introduced until 2010 as part of Bluetooth 4.0 specification. Because of the ubiquity of BLE-enabled smartphones nowadays, BLE has gained much attention in the IoT industry recently. In late 2015, IETF also proposed a standard RFC 7668 to run IPv6 over BLE.
In this research, we aim at implementing IPv6 over BLE using Raspberry Pi 3 and nRF51-DK development boards, and then run the Constrained Application Protocol (CoAP) over the stack of IPv6/BLE. Specifically, in our experimental system every BLE node is IPv6-addressable and accessible through the CoAP protocol from anywhere over the Internet. Moreover, to ease the accesses from ordinary web browsers, we also implemented a BLE gateway device that accepts HTTP requests and translates them into CoAP requests. The gateway device is also designed to routinely request sensor data and then forward the data to an IoT cloud platform. Experimental results showed that our system is workable and easy to use. In the future, we would like to build an IoT system consisting of both BLE and ZigBee devices, and test their interoperability at the network layer and the application layer, respectively.
第三語言摘要
論文目次
目錄
 第一章  緒論	1
1.1	研究背景與動機	1
1.2	研究目的與重要性	2
1.3	論文架構	4
 第二章  相關研究	5
2.1	Bluetooth Low Energy	5
2.2	IPv6 over BLE 架構	5
2.3	6LoWPAN封包壓縮、切割與重組	11
2.3.1	6LoWPAN封包切割方法	11
2.3.2	IPv6表頭壓縮	12
2.4	受限應用協定	13
2.5	相關研究	16
 第三章  系統架構與實作	19
3.1	實驗環境架構介紹	19
3.2	IPv6 over BLE實驗環境建置	23
3.3	CoAP over 6LoWPAN 實作	32
3.4	Web系統實作	36
 第四章  系統功能展示與驗證	39
4.1	感測節點實作	39
4.2	Web系統操作介面	40
4.3	Xively雲端平台	44
4.4	實作成果分析	46
 第五章  結論與未來展望	49
5.1	結論	49
5.2	未來展望	49
 參考文獻	51
 附錄 – 英文論文	53
圖目錄
圖 2 1:IPv6 over BLE 架構圖	7
圖 2 2:BLE 6LoWPAN 協定堆疊	8
圖 2 3:BLE MAC Address轉為Interface ID流程	10
圖 2 4:IPv6 StateLess Address Auto-configuration示意圖	10
圖 2 5:6LoWPAN封包切割示意圖	12
圖 2 6:CoAP 封包結構	15
圖 2 7:CoAP request/response 示意圖	15
圖 2 8:CoAP Observe 示意圖	16
圖 3 1:實驗環境架構圖	19
圖 3 2:IPv6 配置示意圖	20
圖 3 3:IPv6 位址配發示意圖	21
圖 3 4:外部網路節點與感測網路節點間的CoAP通訊	22
圖 3 5:實驗環境節點角色示意圖	23
圖 3 6:節點間建立6LoWPAN 連線與IPv6 無狀態自動配置流程圖	26
圖 3 7:Radvd 設定檔	28
圖 3 8:為6LN節點欲與6LBR建立6LoWPAN連線指令	28
圖 3 9:6LBR欲建置6LoWPAN連線和IPv6 自動組態指令	29
圖 3 10:透過Hcitool掃描附近BLE廣播裝置	30
圖 3 11:6LBR已經連結到的3個6LN 裝置	30
圖 3 12:6LBR的網路介面組態	31
圖 3 13:6LN的網路介面組態	31
圖 3 14:外部網路Ping BLE感測節點IPv6位址	32
圖 3 15:CoAP request/response 取得感測資訊	33
圖 3 16:Observing CoAP 回傳感測資訊	34
圖 3 17:6LN節點執行CoAP Observing中,封包內的詳細內容	34
圖 3 18:外部網路節點透過Firefox Copper附加元件做為CoAP Client	35
圖 3 19:CoAP Server回傳的感測資訊透過WebSocket技術送往網頁前端	38
圖 4 1:實際環境建置圖	40
圖 4 2:結合CoAP & HTTP 通訊協定網頁介面	41
圖 4 3:Observing CoAP 網頁介面	42
圖 4 4:顯示與6LBR裝置連線的所有6LN 網頁介面	43
圖 4 5:藉由MongoDB 取得歷史感測資訊的網頁介面	44
圖 4 6:Xively IoT雲端平台介面	45
圖 4 7:對Xively IoT雲端平台上傳資料的Request Log	46
圖 4 8:透過6LoWPAN轉換後完整封包格式示意圖	48
圖 4 9:在6LBR節點上對bt0介面監聽CoAP 封包資訊	48
表目錄
表 3 1:Raspberry Pi3 規格	24
表 3 2:nRF51-DK 規格	25
參考文獻
參考文獻
[1] 	 市調機構IDC預測,  http://www.digitimes.com.tw/iot/article.asp?cat=130&id=0000496883_io57txre9zty8d284supe, last accessed Apr.10, 2017.
[2] 	Bluetooth Low Energy, https://www.bluetooth.com/what-is-bluetooth-technology/how-it-works/low-energy, last accessed Apr.10, 2017.
[3] 	RFC7668, IPv6 over BLUETOOTH Low Energy, https://tools.ietf.org/html/rfc7668, last accessed Apr.10, 2017.
[4] 	RFC4919, 6LoWPAN, https://tools.ietf.org/html/rfc4919#page-4, last accessed Apr.10, 2017.
[5] 	RFC6550, IPv6 Routing Protocol for Low-Power and Lossy networks, https://tools.ietf.org/html/rfc6550, last accessed Apr.10, 2017.
[6] 	RFC 7252, Constrained Application Protocol, https://tools.ietf.org/html/rfc7252, last accessed Apr.10, 2017.
[7] 	IPSP, https://www.bluetooth.org/docman/handlers/downloaddoc.ashx?doc_id=296307, last accessed Apr.10, 2017.
[8] 	RFC3633, DHCPv6, https://tools.ietf.org/html/rfc3633, last accessed Apr.10, 2017.
[9] 	RFC4862, SLAAC, https://tools.ietf.org/search/rfc4862, last accessed Apr.10, 2017.
[10] 	RFC 4861, Neighbor Discovery for IP version 6, https://tools.ietf.org/html/rfc4861, last accessed Apr.10, 2017.
[11] 	REST架構, https://ihower.tw/blog/archives/1542, last accessed Apr.10, 2017.
[12] 	RFC 7641, Observing Resources in the Constrained Application Protocol https://tools.ietf.org/html/rfc7641, last accessed Apr.10, 2017.
[13] 	Haolin Wang, Minjun Xi, Jia Liu, “Transmitting IPv6 packets over Bluetooth low energy based on BlueZ” 2013 15th International Conference on Advanced Communications Technology (ICACT), pp.72-77, 2013.
[14] 	Praveen Kumar Kamma, Cheenakeshava Reddy Palla, Usha Rani Nelakuditi, ”Design and implementation of 6LoWPAN border router”   2016  13th
International Conference on Wireless and Optional Communications Networks (WOCN) pp.1-5, 2016.
[15] 	Wondeuk Yoon, Kiwoong Kwon, Minkeun Ha, Daeyoung Kim, “Transfer IPv6 packets over Bluetooth Low Energy with ensuring emergency data transmission” 2016 IEEE Sixth International Conference on Communications and Electronics (ICCE), PP136-141, 2016.
[16] 	侯善尹, CoAP為基礎運用於異質物聯網環境中的自動服務整合與遞送機制, 國立臺中教育大學資訊工程學系碩士論文, 民國一零三年七月.
[17] 	Raspberry Pi, https://www.raspberrypi.org/, last accessed Apr.10, 2017.
[18] 	nRF51-DK, https://www.nordicsemi.com/eng/Products/nRF51-DK, last accessed Apr.10, 2017.
[19] 	Segger Jlink, https://www.segger.com/jlink-debug-probes.html, last accessed Apr.10, 2017.
[20] 	Nordic nRFgo Studio, https://www.nordicsemi.com/chi/node_176/2.4GHz-RF/nRFgo-Studio, last accessed Apr.10, 2017.
[21] 	Radvd, https://linux.die.net/man/5/radvd.conf, last accessed Apr.10, 2017.
[22] 	BlueZ, https://www.bluez.org/, last accessed Apr.10, 2017.
[23] 	Node-coap library, https://github.com/mcollina/node-coap, last accessed Apr.10, 2017.
[24] 	Aiocoap library, https://github.com/chrysn/aiocoap, last accessed Apr.10, 2017.
[25] 	Firefox Copper, https://addons.mozilla.org/zh-tw/firefox/addon/copper-270430/, last accessed Apr.10, 2017.
[26] 	Node.js, https://nodejs.org/, last accessed Apr.10, 2017.
[27] 	Express, http://expressjs.com/zh-tw/, last accessed Apr.10, 2017.
[28] 	WebSocket, https://tools.ietf.org/html/rfc6455, last accessed Apr.10, 2017.
[29] 	Xively, https://www.xively.com/, last accessed Apr.10, 2017.
[30] 	Wireshark, https://www.wireshark.org/, last accessed Apr.10, 2017. 
[31] 	Tcpdump, https://www.wireshark.org/docs/wsug_html_chunked/AppToolstcpdump.html, last accessed Apr.10, 2017.
論文全文使用權限
校內
校內紙本論文立即公開
同意電子論文全文授權校園內公開
校內電子論文於授權書繳交後2年公開
校外
同意授權
校外電子論文於授權書繳交後2年公開

如有問題,歡迎洽詢!
圖書館數位資訊組 (02)2621-5656 轉 2487 或 來信