為了設計與發展無線感測器網路(wireless sensor network, WSN)的通訊協定及其應用,監控並評量WSN的運作情形是必要的工作。然而實際WSN的部署、維護以及收集資料是勞力密集、容易發生錯誤且高成本的工作。受限於實際執行的困難以及成本考量等條件下,採用模擬的方式進行WSN的評估是一個有效且可行的解決方案。 IEEE 802.15.4是一個對應低速率無線個人區域網路(low-rate wireless personal area networks, LR-WPANs)所發展的國際標準,其定義了網路協定堆中的實體(physical, PHY)層及媒體存取控制(medium access control, MAC)層,為ZigBee規範之底層基礎,並普遍使用在各種WSN平台中。 J-Sim是一個使用Java開發的網路模擬架構,具有高度泛用性、延展性以及擴充性並支援WSN模擬架構,但缺乏WSN協定模組來提高模擬結果可靠度。因此本研究在J-Sim中研製一個IEEE 802.15.4協定模組。該模組完成信標模式(beacon mode,採用slotted CSMA-CA)與非信標模式(nonbeacon mode,採用unslotted CSMA-CA)傳輸以及個人區域網路(personal area network)管理功能。最後,以該模組為基礎在J-Sim上建立一個大規模感測器網路情境,驗證模擬大量節點的延展能力。
In order to enable the design and development of new wireless sensor network (WSN) protocols and applications, it is necessary to monitor and evaluate the operation of WSN. However, nodes deployment, system maintenance, and data collection tasks of real WSNs are labor-intensive, error-prone and cost-inefficient. Evaluating WSN in simulation is an effective and feasible solution under constrains of hard to actually implement and cost consideration. IEEE 802.15.4 is an international standard which specifies the physical (PHY) and medium access control (MAC) layer for low-rate wireless personal area networks (LR-WPANs) which focuses on short-range, low-data-rate and low-power. It is the basis for the ZigBee specification and generally used in various WSN platforms. J-Sim is a Java-developed network simulation framework with high generality, scalability and extensibility. Additionally, J-Sim supports WSN framework, but lacks the WSN protocol module to improve the reliability of simulation results. In this thesis, an IEEE 802.15.4 protocol module in J-Sim is designed, developed and implemented. This module has completed the functions of beacon mode and nonbeacon mode transmissions, and personal area network management. Finally, a large scale WSN scenario based on the proposed module is built on J-Sim to verify the scalability of simulating a large numer of nodes.