【正文】
orks,Vol 11, No. 2, ,.[4]Texas Instrument. CC2530 [5]Xin Li,” Design of ZigBee Network Node Based on CC2530”, PLCamp。FA, , .[6]Bingwu Ning,” Research and implementation of ZigBee network Networking”, Master’s Thesis, Dalian University of Technology,.原文THE RESEARCH AND DESIGN OF ZIGBEE WIRELESS NETWORKINGBASED ON CC2530JIANMING LIAO1, XUEQIN HE1, GUOMING LU1, SIYU ZHAN11School of Computer Science and Engineering, UESTC, ChinaEMAIL: hexq127@, liaojm@, lugm@, zhansy@Abstract:ZigBee is widely used in many fields for its low cost, low power. This paper discussed the network topology, device type and protocol architecture about ZigBee protocol and introduced CC2530 chip. Then we used ZStack protocol stack for networking and did some tests based on the previous content, such as the network munication distance and packet loss rate test. Test results show, ZigBee networking using CC2530 has longer munication distance and better munication quality.Keyword:ZigBee。 CC2530。 Wireless networking Test1 IntroductionWith the rapid development of wireless munication technology, the power, reliability and flexibility on munication technology have bee increasingly aware by the industry and researcher munity. Characterized by lowpower, lowcost, reliable data transmission and flexible networking, ZigBee has been the most promising technique and widely used in many ’s new CC2530 is a true systemon –chip solution tailored for IEEE , ZigBee,RF4CE and Smart Energy , design and implement large scale ZigBee network based on CC2530 is of great importance.2 ZigBee wireless munication technologyZigBee wireless munication technology is a technology that is based on standard. And its good interference performance can help it coexist reliably with WiFi, Bluetooth, WirelessUSB, home cordless phones and microwave ovens in band. ZigBee network topology and device typeThere are three typical topology that ZigBee network support: star, tree and mesh[1]. We can choose the type according to project requirements.And there are three device types in ZigBee network:Coordinator, Router and End Device[2]. Coordinator is the center of the entire network, responsible for network establishment, management and maintenance. It also can control the monitoring area. Router is responsible for allowing other devices to join the network, multihop routing, packet forwarding. End device can join and leave the network, send and receive data, it can choose to sleep. Architecture of ZigBee protocolZigBee protocol stack consists of four layers[3], the structure is depicted in Figure 1. The physical layer and media access control layer are defined by ,network layer and application layer by ZigBee Alliance. The structure of ZigBee protocol stackAs shown in Figure 1, the physical layer is responsible for physical channel data transmission and management.The main functions included in MAC layer are as follows: generating and sending web beacons for coordinator, providing reliable munication links between the MAC entity, maintaining equipment safety and so on.The network layer is responsible for establishment of topology and maintenance of network connections, as well as route discovery and route forwarding for equipment.Application layer is posed by the application support sublayer(APS), ZigBee device configuration and user application layer. APS mainly provides ZigBee endpoint interface.ZigBee device configuration layer provides standard ZigBee configuration services. The user application is developed based on user’s needs.3 CC2530 systemonchipCC2530 which is launched by TI is a second generation support IEEE , industrystandard enhanced 8051 MCU core, 256KB Flash ROM and 8KB RAM[4].The main characteristics are as follows: a two USART,8bit and 16bit timers, watchdog timer, 8 inputs configurable 12bit ADC, 21 GPIO, AES128 coprocessor,hardware support CSMA / CA, digitized received signal strength indicator, link quality indication and powerful DMA function, battery monitoring and temperature supports five operating modes, can better meet the needs of lowpower systems. The current consumption is 24mA and 29mA in receive and transmit modes. Because of its hardware design is relatively simple, small package, low power, it has been widely used in wireless sensor networks [4] [5].CC2530 can be used as ZigBee coordinator, router and end device. After bination with the TI/Chipcon39。s ZigBee protocol stack, CC2530 is considered to be the most petitive ZigBee solution in the market. This paper studies on the ZigBee network is using TI39。s ZStack protocol stack.4 ZigBee network formation ZStack protocol stack analysisZStack is a ZigBee protocol stack supported by TI. It begins execution from main function. The main function implements the system initialization, then begin running rotating query operating system OSAL.OSAL defines two key array, *tasksEvents and *tasksArr. The former stores the values that numbered from 0 to taskCnt,which is as a present of tasks need to be allowed in this cycle. The value of the task required to run is nonzero,and 0 otherwise. The task number is smaller , it’s priority is higher. TasksArr stores entry address of each task corresponds. Only recorded in tasksEvents, the task can be called to in this cycle. OSAL works under the way that querys and runs tasks constantly. ZigBee networking processZigBee network is established by the coordinator initially, other nodes join the network by applying, and the networking process shown in Figure 2 [6]. When the first FFD device is activated, it first scans energy of valid default channel in physical layer in order to detect possible interference and sequences the channel by the channel energy value. Then it performs active scanning process to select an optimal channel as the current channel. The first successful networking node is the coordinator. Flow chart of ZigBee networkingAfter establishment of the network, all other nodes are tre