曹 痚臺灣大學:電機工程學研究所邱紹沅Chiu, Shao-YuanShao-YuanChiu2007-11-262018-07-062007-11-262018-07-062007http://ntur.lib.ntu.edu.tw//handle/246246/53249無線網路在近年來的發展相當的快速,目前無線個人區域網路(WPAN)出現一個新的發展方向,不同於之前以高傳輸資料量,廣泛傳輸距離為主要目標,新的網路應用瞄準在一個低功率、短傳輸距離、簡單即行的網路,大大降低裝設及使用成本,更促使電子電機工程學會(IEEE)開始推廣一項名為 IEEE 802.15.4 的規格標準,將大量應用在工廠製程,居家環境,醫療看護方面的監測或感應控制系統,此種以低速率小範圍傳輸資料的無線傳輸規格,我們又稱為低速率無線個人區域網路(Low-Rate Wireless Personal Area Networks)-簡稱LR-WPAN。 本論文將藉由 IEEE 802.15.4 的省電優勢以及 Zigbee 的網路概念,在居家環境或是辦公場所內,架構在已建好的IEEE 802.15.4 環境中,根據本論文所提出的裝置與協調器傳送機制,在適當的硬體上,使用C程式語言撰寫各函式以及中斷來實現全雙工語音的傳輸,以提供往後應用者的參考,期望在無線低功率和低成本的網路應用成為主流時,可再增加其附加性讓生活更為方便。Wireless networking has developed rapidly in recent years. Currently, Wireless Personal Area Network (WPAN)becomes a new direction of development. Different from the past, high data rate transmission, extensive transmission distance isn’t the primary purpose anymore . In order to reduce the cost of installation and usage, such wireless network needed to be more efficient, more simple, and applied to shorter transmission. It also prompted the Institute of Electrical and Electronics Engineering (IEEE)began to promote a named IEEE 802.15.4 specifications standard, large-scale application in a factory process, home environment, health care and the monitoring sensor control system, such a low rate of small-range transmission of wireless specifications, We also call it low-rate wireless personal area networks referred to the LR-WPAN. In this thesis, through IEEE 802.15.4, the advantage of saving electricity and the general idea about Zigbee, in the home environmental or working place, the structure has been built into the IEEE 802.15.4. According to the papers which presented the transmission mechanism of device and coordinator, with the appropriate hardware, using C programming language to built function and interruption. In order to achieve full-duplex voice transmission, and offer the references for the future applications, we expect that during the low-power and low-cost wireless network applications become mainstream, it can increase their additions and gives our lives more convenient.致謝--------------------------------------------------------------------------------------------------------------------------I 摘要-------------------------------------------------------------------------------------------------------------------------III Abstract--------------------------------------------------------------------------------------------------------------------V 目錄------------------------------------------------------------------------------------------------------------------------VI 圖目錄----------------------------------------------------------------------------------------------------------------------X 表目錄--------------------------------------------------------------------------------------------------------------------XV 第1章 緒論--------------------------------------------------------------------------------------------------------1 1.1 前言------------------------------------------------------------------------------------------------------------1 1.2 研究動機與目的--------------------------------------------------------------------------------------------2 1.3 論文架構------------------------------------------------------------------------------------------------------3 第2章 IEEE 802.15.4通訊協定及實體層概述-------------------------------------------------5 2.1 IEEE 802.15.4 通訊協定之特性-------------------------------------------------------------------------6 2.1.1 網路裝置與拓樸-----------------------------------------------------------------------------------6 2.1.2 資料傳送模型--------------------------------------------------------------------------------------9 2.1.3 框架結構-------------------------------------------------------------------------------------------11 2.2 通道存取----------------------------------------------------------------------------------------------------14 2.2.1 超訊框結構(Superframe)------------------------------------------------------------------14 2.2.2 載波感應多重接取碰撞避免演算法-------------------------------------------------------16 2.3 IEEE 802.15.4實體層(Physical Layer)------------------------------------------------------------17 2.3.1 調變頻帶與調變方式---------------------------------------------------------------------------17 2.3.2 IEEE 802.15.4 實體層協定資料單元(PHY protocol data unit)--------------------20 2.4 IEEE 802.15.4 實體層的服務說明--------------------------------------------------------------------20 2.4.1 實體層資料服務----------------------------------------------------------------------------------21 2.4.2 實體層管理服務----------------------------------------------------------------------------------22 第3章 IEEE 802.15.4媒體存取控制(MAC)子層介紹-------------------------------------------23 3.1 媒體存取控制框架格式---------------------------------------------------------------------------------24 3.1.1 General MAC frame format--------------------------------------------------------------------24 3.1.2 Frame Control field-------------------------------------------------------------------------------24 3.1.3 FCS(frame check sequence)----------------------------------------------------------------26 3.2 媒體存取控制子層資料服務--------------------------------------------------------------------------26 3.3 媒體存取控制子層管理服務--------------------------------------------------------------------------28 3.4 MAC command 框架------------------------------------------------------------------------------------35 3.4.1 連線請求-------------------------------------------------------------------------------------------36 3.4.2 連線回復-------------------------------------------------------------------------------------------37 3.4.3 切斷連線通知-------------------------------------------------------------------------------------37 3.4.4 資料請求-------------------------------------------------------------------------------------------38 3.4.5 個人區域網路識別衝突通知-----------------------------------------------------------------39 3.4.6 失去連線通知------------------------------------------------------------------------------------39 3.4.7 信標請求-------------------------------------------------------------------------------------------39 3.4.8 協調器重置---------------------------------------------------------------------------------------40 3.4.9 保證時槽請求-------------------------------------------------------------------------------------41 3.4.10 信標封包格式-------------------------------------------------------------------------------------41 第4章 系統開發環境與硬體架構設計---------------------------------------------------------------43 4.1 系統規格擬訂----------------------------------------------------------------------------------------------43 4.2 802.15.4 UZ2400 RF 收發機晶片---------------------------------------------------------------------44 4.2.1 收發機方塊圖-------------------------------------------------------------------------------------45 4.2.2 TX MAC----------------------------------------------------------------------------------------------46 4.2.3 CSMA-CA--------------------------------------------------------------------------------------------47 4.2.4 RX MAC----------------------------------------------------------------------------------------------50 4.2.5 SPI----------------------------------------------------------------------------------------------------50 4.3 U-NET01DK 開發模組-----------------------------------------------------------------------------------52 4.3.1 DotForce Module---------------------------------------------------------------------------------53 4.3.2 Dot-MB----------------------------------------------------------------------------------------------54 4.3.3 C8051F124 規格與功能------------------------------------------------------------------------54 4.3.4 U-NET01DK模組之下使用Seeker 軟體驗證點對點無線通訊傳輸 ------------------------------------------------------------55 4.4 系統架構設計--------------------------------------------------------------------------------------------61 第5章 系統軟體設計------------------------------------------------------------------------------------------65 5.1 PAN的初始化與建立連線------------------------------------------------------------------------------67 5.1.1 硬體初始化----------------------------------------------------------------------------------------67 5.1.2 PAN 的初始與通道掃描-----------------------------------------------------------------------68 5.1.3 SPI 介面Function的撰寫----------------------------------------------------------------------69 5.1.4 裝置與協調器的框架規劃與傳送機制----------------------------------------------------74 5.2 各中斷的使用與分配------------------------------------------------------------------------------------81 5.2.1 ADC 與DAC的中斷------------------------------------------------------------------------------81 5.2.2 RX / TX FIFO 的中斷-----------------------------------------------------------------------------82 5.3 語音壓縮----------------------------------------------------------------------------------------------------83 第6章 系統測試與分析--------------------------------------------------------------------------------------89 第7章 結論與未來展望--------------------------------------------------------------------------------------95 7.1 結論------------------------------------------------------------------------------------------------------------95 7.2 未來展望-----------------------------------------------------------------------------------------------------96 參考文獻----------------------------------------------------------------------------------------------------------------975003340 bytesapplication/pdfen-USZigbeeIEEE 802.15.4無線個人區域網路感應控制系統低功率差分脈衝碼調變Wireless Personal Area Networksensor control systemDPCMlow power架構於 IEEE 802.15.4 低速率無線個人區域網路之全雙工語音系統設計與應用Design and Application for a Full-Duplex Voice System over IEEE 802.15.4 Low-Rate Wireless Personal Area Networkthesishttp://ntur.lib.ntu.edu.tw/bitstream/246246/53249/1/ntu-96-J93921029-1.pdf