§ 瀏覽學位論文書目資料
  
系統識別號 U0002-2207201600171600
DOI 10.6846/TKU.2016.00706
論文名稱(中文) 基於USB介面建立一個物聯網閘道器
論文名稱(英文) Building a Gateway to the Internet of Things Base on USB Interface
第三語言論文名稱
校院名稱 淡江大學
系所名稱(中文) 電機工程學系碩士在職專班
系所名稱(英文) Department of Electrical and Computer Engineering
外國學位學校名稱
外國學位學院名稱
外國學位研究所名稱
學年度 104
學期 2
出版年 105
研究生(中文) 陳彥霈
研究生(英文) Yan-Pei Chen
學號 701440132
學位類別 碩士
語言別 繁體中文
第二語言別
口試日期 2016-06-28
論文頁數 56頁
口試委員 指導教授 - 江正雄
委員 - 郝敏忠
委員 - 許明華
關鍵字(中) 物聯網
乙太網路
乙太網路控制模組
乙太網路仿真模組
關鍵字(英) IoT
Ethernet
ECM
EEM
第三語言關鍵字
學科別分類
中文摘要
本文提出以一般市售智慧型電子裝置中常配置的USB傳輸埠為通訊連接基礎,而快速建立即插即用物聯網閘道器之應用。USB協會於通訊子類別當中,定義了乙太網路控制模型與乙太網路仿真模型,此方法可將USB傳輸埠虛擬成乙太網路傳輸連接埠。故不同實體裝置之間以USB乙太網傳輸通訊為基礎,快速達成實體連接與資料傳輸。對於佈線不易、需即時性、高頻寬的應用來說,這是一種簡易、快速、低成本的物聯網應用之一。
經由Transmission Control Protocol (TCP)與User Datagram Protocol (UDP)兩種常用網路通訊協定測試下,以無線網路在隔絕干擾環境的屏蔽室下之吞吐量測試結果為50M ~ 56Mbit/s傳輸速度,然而在開放環境下USB 2.0與USB 3.0之吞吐量測試結果則分別可以達到92M ~ 99Mbit/s 與 249M ~ 263Mbit/s的傳輸速度。在UDP封包遺失率測試下,無線網路之測試結果約在3.4% ~ 12.9%,而USB 2.0與USB 3.0之測試結果則分別為0.73% ~ 1.05% 與 0.69% ~ 2.2%,故不論以傳輸吞吐量或是封包遺失率來分析,以USB乙太網路為資料傳輸基礎之方式皆優於無線網路傳輸方式。
於測試數據結果當中,可以發現USB乙太網路連接傳輸方式比無線網路連接傳輸方式,可提供更穩定的傳輸速率及較少的封包遺失率。且無線網路連接傳輸方式容易被實際環境當中所存在的2.4GHz無線電波所干擾。對於物聯網閘道器以USB乙太網路連結智慧型電子裝置後直接存取網際網路資源,此種連網應用方式是目前尚未常見之網路應用方式之一。
英文摘要
This research proposes a quick establishment of plug and play gateway to the Internet of Things based on USB port, which is common in all electronic devices. USB Association has defined the Ethernet control model and Ethernet simulation model in communication subcategory. With this approach, the USB port can be simulated as an Ethernet transmission port so that fast connection and data transmission is possible based on USB Ethernet communication among different devices. This is one of the applications for the simple, quick and low-cost to the Internet of Things.
In tests with two commonly used network protocols, Transmission Control Protocol (TCP) and User Datagram Protocol (UDP), the throughput was 50M-56Mbit/s in transmission speed in a shielding chamber with all environment interference isolated. However, in an open environment, throughput of USB 2.0 and USB 3.0 were respectively 92 - 99 M bit/s and 249 - 263 M bit/s in transmission speed. In UDP packet loss rate tests, the loss rates were between approximately 3.4% - 12.9% while 0.73% - 1.05% and 0.69% - 2.2% respectively in USB 2.0 and USB 3.0 tests. Our results indicated that the USB Ethernet transmission was better than the wireless transmission in both transmission throughput and packet loss rate.
From the test results, the USB Ethernet transmission was better than the wireless transmission for more stable transmission speed and lower packet loss rate. In addition, the wireless transmission is easily disturbed by the 2.4GHz radio wave in the environment. This direct accessibility of internet information through the establishment of gateway to Internet of Things based on USB Ethernet connection to smart electronic devices is currently uncommon.
第三語言摘要
論文目次
目錄
中文摘要	I
英文摘要	III
目錄	V
圖目錄	IX
表目錄	XIII
第一章 緒論1
1.1 研究背景與動機1
1.2 論文架構2
第二章 相關的背景與系統知識4 
2.1 物連網架構簡介4
2.2 物連網裝置與使用技術5
2.2.1 RFID 6
2.2.2 Zigbee 7
2.2.3 Bluetooth 8
2.2.4物連網的感測器類型9
2.3 物連網的應用10
2.3.1 M2M10
2.3.2雲端11
2.3.2.1公有雲12
2.3.2.2私有雲12
2.3.2.3混合雲12
2.3.2.4開放雲13
2.4 USB匯流排特性與介紹14
2.4.1 USB資料傳輸率15
2.4.2  USB封包格式16
2.4.2.1 SOF封包17
2.4.2.2 IN與OUT封包17
2.4.2.3 DATA封包18
2.4.2.4 Handshake封包18
2.4.3 Ethernet Emulation Model 18
2.4.3.1 Ethernet Emulation Model封包格式19
2.4.4 Ethernet Control Model 21
2.5 TCP與UDP 21
2.5.1 TCP 建立連線的三項交握22
2.5.2 TCP的滑動視窗24
2.5.3 UDP25
2.6 Network Address Translation26
第三章 系統架構與設計28
3.1系統架構說明28
3.2硬體單元件說明29
3.3軟體設計流程說明31
3.3.1物連網閘道器軟體流程說明32
3.3.2手機端應用程式軟體流程說明33
3.3.3雲端中繼伺服器軟體流程說明34
第四章 實作結果36
4.1測試設備與環境介紹36
4.2吞吐量測試37
4.2.1 USB與WIFI於TCP協議下的吞吐量測試比較41
4.2.2 USB與WIFI於UDP協議下的吞吐量測試比較42
4.2.3 物聯網閘道器移動特性的反應時間49
4.3系統實做結果50
第五章 結論與未來展望53
參考文獻54
 
圖目錄
圖 1.1 2015智慧手機作業系統市佔率2
圖 2.1 物連網架構5
圖 2.2 RFID傳輸步驟6
圖 2.3 Zigbee通訊協定堆疊7
圖 2.4 RFID的三種拓樸結構8
圖 2.5 藍芽雙模與單模的堆疊對應8
圖 2.6 M2M系統運作架構11
圖 2.7 私有雲佈署架構圖12
圖 2.8 混合雲佈署架構圖13
圖 2.9 開放雲堆疊架構13
圖 2.10 低速裝置連接示意圖16
圖 2.11 高速與全速裝置連接示意圖16
圖 2.12 USB封包結構圖17
圖 2.13 SOF封包結構圖17
圖 2.14 DATA封包結構圖18
圖 2.15 EEM模組19
圖 2.16 EEM命令封包格式20
圖 2.17 EEM資料封包格式20
圖 2.18 ECM模型21
圖 2.19 TCP封包結構22
圖 2.20 TCP運作三階段的流程23
圖 2.21 TCP建立連線的流程23
圖 2.22 TCP滑動視窗理想狀態24
圖 2.23 TCP滑動視窗非理想狀態25
圖 2.24 UDP封包結構25
圖 2.25 NAT運作流程圖27
圖 3.1 系統架構29
圖 3.2 PC Dunio3系統方塊架構30
圖 3.3 物連網系統軟體架構32
圖 3.4 物聯網閘道器軟體流程圖33
圖 3.5 手機應用軟體流程圖34
圖 3.6 雲端中繼伺服器軟體流程圖35
圖 4.1 電波隔離室示意圖37
圖 4.2 TCP/IP架構下的WIFI測試路徑40
圖 4.3 TCP/IP架構下的USB測試路徑40
圖 4.4 確認筆記型電腦無線網路的IP位置41
圖 4.5 手機端的IP位址設定41
圖 4.6 確認主機已經透過USB介面偵測到HTC 智慧型手機43
圖 4.7 確認USB介面網路的IP為192.168.42.13 43
圖 4.8 智慧型手機端設定IP與測試秒數43
圖4.9 電腦端於UDP模式的連接埠設定44
圖4.10 手機端於UDP模式的連接埠設定44
圖4.11 USB介面與WIFI 於TCP下測試的傳輸速率48
圖4.12 USB介面與WIFI 於UDP下測試傳輸速率48
圖4.13 USB介面與WIFI於UDP下測試的封包遺失率49
圖 4.14 物聯網閘道器與伺服器連線反應時間50
圖4.15 物聯網系統完整架構51
圖 4.16 物聯網閘道器與裝置連結51
圖4.17 開啟遠端使用者的手機應用程式拍照52
圖4.18 將隨身碟放入電腦中檢查圖片是否正確上傳52

 
表目錄
表 2.1  RFID的各工作的頻率與應用範圍6
表 2.2 物連網三種無線通訊技術規格比較9
表 2.3 物連網的各式感測器9
表 2.4 常用各式USB接頭14
表 2.5 USB與WIFI傳輸速率比較表15
表 2.6 EEM的六種命令列20
表 2.7 TCP與UDP的比較表26
表3.1 PC Dunio3開發板硬體介紹31
表 4.1 測試使用的智慧型手機規格簡介36
表 4.2 一般指令可使用於伺服器端與用戶端38
表 4.3 伺服器端使用指令39
表 4.4 用戶端指令39
表 4.5 WIFI的TCP於兩種環境下的測試數據42
表 4.6 USB 2.0與USB 3.0於TCP傳輸速率比較42
表 4.7 WIFI不同環境下於UDP下傳輸速度的比較45
表 4.8 WIFI在開放環境下於UDP下封包遺失率的比較45
表 4.9 WIFI在電波隔離室下於UDP下封包遺失率的比較46
表 4.10 USB 2.0與USB 3.0於UDP傳輸速率比較46
表 4.11 USB 2.0於UDP下封包遺失率的比較47
表 4.12 USB 3.0於UDP下封包遺失率的比較47
參考文獻
參考文獻
[1]USB Association, Universal Serial Bus Communications Class Subclass Specification for Ethernet Emulation Model Devices, Revision 1.0, Feb, 2005.
[2]USB Association, Universal Serial Bus Communications Class Subclass Specification for Ethernet Control Model Devices, Revision 1.2, Feb, 2007.
[3]TCP與UDP,
http://dns2.asia.edu.tw/~wzyang/slides/info_net/info_B/CH10TCP.pdf
[4]徐崇彬:“基於智慧型手機的居家照護軟體閘道器 ”,國立高雄應用科技大學電機工程學系碩士論文,民國104年7月。
[5]林俊陞:“ Android車聯網雲端即時監控平台開發”,南臺科技大
 學電子工程學系碩士論文,民國104年6月。
[6]張志勇,翁仲銘,石貴平,廖文華 ,物聯網概論,碁峰資訊, 2013。
[7]雲端運算, http:// www.csie.nuk.edu.tw/~brchang/雲端運算.pdf
[8]楊正豪:“USB鍵盤按鍵訊號重建與編輯之設計”,國立台北科技 
大學電機工程學系碩士論文,民國104年7月。
[9]USB封包分析,
http://www.zeroplus.com.tw/software_download/USB%202.0%20Signal%20Analysis%20Skills_TW.pdf
[10]Y.-S. Kim,H.-S. Kim,C.-G. Lee,“The development of USB home control network system,” 2004 8th International Conference on Control, Automation, Robotics and Vision(ICARCV 2004), vol. 1, Kunming, China, pp. 289-293, Dec .6-9, 2004.
[11]Android Developer Tools, http://developer.android.com/sdk/eclipse-adt.html
[12]彭君豪:“物聯網之居家環境感測與控制系統實作”,明新科技大學電機工程學系碩士論文,民國104年7月。
[13]AXP 209 Datasheet, http://www.x-powers.com/
[14]All-winner A20 SOC Datasheet, http://www.allwinnertech.com/
[15]PC Duino3開發版資料, http://www.linksprite.com/linksprite-pcduino/
[16]N. Nawka, A.K. Maguliri, D. Sharma, and P. Saluja, “SESGARH: A scalable extensible smart-phone base mobile gateway and application for remote health monitoring,” Internet Multimedia Systems Architecture and Application (IMSAA), Bangalore, Karnataka , pp. 1-6 , Dec. 2011.
[17]M. Soliman, T. Abiodun, T. Hamouda, J. Zhou, C.-H. Lung, “ Smart Home: Integrating Internet of Things with Web Services and Cloud Computing,” 2013 IEEE International Conference on Cloud Computing Technology and Science, vol. 2, Bristol , pp. 317-320, Dec 2-5, 2013.
[18]T. Zachariah, N. Klugman, B. Campbell, J. Adkins, N. Jackson, and P. Dutta, “The Internet of Things Has a Gateway Problem,” Proceedings of the 16th International Workshop on Mobile Computing Systems and Applications, New Mexico, pp.27-32, Feb 12-13, 2015.
[19]PHP Manual, http://php.net/
[20]吳建達:“ 動態網頁應用程式調校-以Apache+PHP+MySQL為例”,國立清華大學資訊系統與應用研究所碩士論文,民國95年7月。
[21]PHP運作原理, https://www.cyut.edu.tw/~hcchu/course/MAN_95A/MANCh10.pdf
[22]PHP與MySQL程式與法教學,
http://aries.dyu.edu.tw/~lhuang/class/PHP/
[23]Apache,“HTTP ServerProject”[Online] Available:
http://httpd.apache.org/
[24]Apache+PHP+MySQL程式,
https://www.appservnetwork.com/en/howto-use/
[25]朱村峰:“ 在無線網路上根據封包遺失率的動態佇列調整” ,國立中山大學通訊工程研究所碩士論文,民國92年8月。
[26]J. A.R. Pacheco de Carvalho, H. Veiga, N. Marques, C. F. F. Ribeiro Pacheco and A. D. Reis, “Performance measurements of IEEE 802.11 b, g laboratory WEP and WPA point-to-point links using TCP, UDP and FTP,” in Applied Electronics (AE), 2011 International Conference on, Pilsen , pp.1-6, Sept.7-8, 2011.
[27]Iperf  Website, https://iperf.fr/iperf-doc.php
[28]RNDIS,
https://msdn.microsoft.com/en-us/library/windows/hardware/ff543835(v=vs.85).aspx
[29]K. Kim, J.k Kim and A. Deep “Throughput Improvement for Ethernet over USB,” The 18th IEEE International Symposium on Consumer Electronics (ISCE 2014), JeJu Island, pp.1-2, June 22-25, 2014.
[30]K. Mandula, R. Parupalli, CH. A. S. Murty, E. Magesh and R. Lunagariya, “ Mobile based Horne Automation using Internet of Things(IoT),” 2015 International Conference on Control,lnstrumentation, Communication and Computational Technologies (lCCICCT), Kumaracoil , pp. 340-343, Dec 18-19, 2015.
論文全文使用權限
校內
校內紙本論文立即公開
同意電子論文全文授權校園內公開
校內電子論文立即公開
校外
同意授權
校外電子論文立即公開

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