A Seminar Report ON







This is to certify that the seminar entitled ZigBee Technology submitted by Archana Kumari is a record of presentation in the departm ent and it may be submitted to Stani Memorial College of Engineering and T echnology, Jaipur (Rajasthan), in fulfillment of the requirement of the B .tech degree in Electronics & Communication Engineering.



ZigB is an open technology developed by the ZigBee Alliance to overcome the and Wi i. ZigBee is an IEEE 802. 5.4 standard for data limitations of B communications with business and consumer devices. It is designed around low-power consumption allowing batteries to essentially last forever. B ETOOTH as we know was developed to replace wires and Wi-Fi to achieve higher data transfer rate, as such till now nothing has been developed for sensor networking and control machines which require longer battery life and continuous working without human intervention. ZigBee devices allow batteries to last up to years using primary cells (low cost without any chargers (low cost and easy installation). The ZigBee standard provides network, security, and application support services operating on top of the IEEE 802. 5.4 Medium Access Control (MAC) and Physical Layer (PHY) wireless standard. It employs a suite of technologies to enable scalable, selforganizing, self-healing networks that can manage various data traffic patterns. The network layer supports various topologies such star, clustered tree topology and self healing mesh topology which is essential in Smartdust Apart from easy installation and easy implementation. ZigBee has a wide application area such as home networking, industrial networking, Smartdust, many more, having different profiles specified for each field. The upcoming of ZigBee will revolutionize the home networking and rest of the wireless world.

I sincerely thank head of department MR ABHISHEK SHARMA sir , for their friendly advice and full support in the successful completion of this topic. Words are inadequate to express my sincere gratitude to the respective professors for devoting enough time to me so that this topic could be successfully completed. I am highly indebted to my family members and my dear friends for their inspiration. It is my pleasure to say thank you for all of your support.

1. Introduction 2. Existing Standards 2.1. Wi-Fi (IEEE standard 802.11) 2.1.1. Standards 2.1.2. etwork Types 2.2. Bluetooth (IEEE standard 802.15.1) 2.3. ZigBee (IEEE standard 802.15.4) 2.4. IEEE 802.15.4 2.5. Components of IEEE 802.15.4 2.6. Relation between IEEE 802.15.4 & ZigBee 2.7. ZigBee vs. Bluetooth 2.8. Technology Comparison 3. Introduction to ZigBee 3.1. History 3.2. The ZigBee Alliance 3.3. ZigBee Basics 3.4. The Name ZigBee 3.5. What is ZigBee? 3.6. Why ZigBee? 3.7. Protocol 3.8. OSI overview 3. . Software and Hardware 3.10. What ZigBee¶s ³Low Power Consumption´ Means 3.11. ZigBee Benefits 4. ZigBee/IEEE 802.15.4 ± General Characteristics 4.1. ZigBee/IEEE 802.15.4 ± Typical Traffic Types Addressed 4.2. Transmission Range 4.3. ata Rate 4.4. ata Latency 4.5. Size 4.6. ata security

5. ZigBee/IEEE 802.15.4 WPAN 12 5.1. Components of WPAN 5.2. Network Topology

6. IEEE 802.15.4 6.1. Received Energy Detection 6.2. Centre Quality Indication 6.3. Clear Channel Assessment 6.4. PPDU Format 7. IEEE 802.15.4 MAC22 7.1. Frame Structure 7.2. Channel Access & Addressing 7.3. Super Frame Structure 7.4. CSMA-CA Algorithm 7.5. Data Transfer Model 7.6. Traffic Type 7.7. MAC Layer Security 8. ZigBee Network Model 9. ZigBee Protocol Stack 9.1. The Physical Layer (PHY) 9.2. Media Access Layer (MAC) 9.2.1. Frame Structure 9.2.2. Super Frame Structure 9.3. Network and Security Layer 9.4. Application Layer 9.4.1. ZigBee Device Object 9.4.2. Application Support Layer

10. ZigBee Routing Mechanism 11. How ZigBee works? 12. ZigBee Security. 13. Licensing 14. ZigBee Applications. 15. ZigBee¶s Future 16. Conclusion 17. Bibliography

1. Introduction

It was in 1896 that Guglielmo Marconi invented the first wireless telegraph. In 1901 he sent telegraphic signals across the Atlantic ocean from Cornwall to St. John¶s Newfoundland; a distance of 1800 miles. Over the last century, advances in wireless technologies have led to the radio, the television, the mobile telephone, and communication satellites. All type of information can now be send to any corner of the world. A wireless network is a flexible data communication system, which uses wireless media such as radio frequency technology to transmit and receive data over the air, minimizing the need for wired connections. Wireless networks are used to augment rather than replace wired networks and are most commonly used to provide last few stages of connectivity between a mobile user and a wired network. Wireless networks use electromagnetic waves to communicate information from one point to another without relying on any physical connection. Radio waves are often referred to as radio carriers because they simply perform the function of delivering energy to a remote receiver. The data being transmitted is superimposed on the radio carrier so that it can be accurately extracted at the receiving end. Once data is superimposed (modulated) onto the radio carrier, the radio signal occupies more than a single frequency, since the frequency or bit rate of the modulating information adds to the carrier. Multiple radio carriers can exist in the same space at the same time without interfering with each other if the radio waves are transmitted on different radio frequencies. To extract data, a radio receiver tunes in one radio frequency while rejecting all other frequencies. The modulated signal thus received is then demodulated and the data is extracted from the signal. Wireless networks offer the following productivity, convenience, and cost advantages over traditional wired networks: Mobility: provide mobile users with access to real-time information so that they can roam around in the network without getting disconnected from the network. This mobility supports productivity and service opportunities not possible with wired networks. Installation speed and simplicity: installing a wireless system can be fast and easy and can eliminate the need to pull cable through walls and ceilings. Reach of network: the network can be extended to places which cannot be wired. More Flexibility: wireless networks offer more flexibility and adapt easily to changes in the configuration of the network. Reduced cost of ownership: while the initial investment required for wireless network hardware can be higher than the cost of wired network hardware, overall

installation expenses and life-cycle costs can be significantly lower in dynamic environments. Scalability: wireless systems can be configured in a variety of topologies to meet the needs of specific applications and installations. Configurations can be easily changed and range from peer-to-peer networks suitable for a small number of users to large infrastructure networks that enable roaming over a broad area.


In the world of wireless communication there are many standards existing today, each with a specific application field and characteristics which best suites the need. However among so many standard we will only discuss about Wi-Fi, Bluetooth and ZigBee as they are the most complementary standards among all. 2.1. Wi-Fi (IEEE standard 802.11) Wi-Fi is the wireless way to handle networking. It is also known as 802.11 networking and wireless networking. The big advantage of Wi-Fi is its simplicity. Mobile connectivity for computers is a rapidly growing requirement. Of the schemes that are available the IEEE 802.11 standard, often termed Wi-Fi has become the de-facto standard. With peak operating speeds of around 54 Mbps it is able to compete with many wired systems. As a result of the flexibility and performance of the system, many Wi-Fi ³hotpots´ have been set up and more are following. These enable people to use their laptop computers as they wait in hotels, airport lounges, cafes, and many other places using a wireless link rather that needing to use a cable.

There is a plethora of standards under the IEEE 802 LMSC (LAN / MAN Standard Committee). Of these even 802.11 has variety of standards, each with a letter suffix. These cover everything from the wireless standards themselves, to standards for security aspects, quality of service and the like: 802.11a ± Wireless network bearer operating in the 5 GHz. ISM band with data rate up to 54 Mbps. 802.11b ± Wireless network bearer operating in the 2.4 GHz ISM band with data rates up to 11 Mbps 802.11e ± Quality of service and prioritization 802.11f ± Handover 802.11g ± Wireless network bearer operating in 24.GHz ISM band with data rates up to 54 Mbps 802.11h ± Power control 802.11i ± Authentication and encryption 802.11j ± Internetworking 802.11k ± Measurement reporting 802.11n ± stream multiplexing 802.11s ± Mesh networking Of these the standards that are most widely known are the network bearer standards, 802.11a, 802.11b, 802.11g.

2.1.2.Network types

There are two types of network that can be formed: infrastructure networks; and ad-hoc networks. The infrastructure application is aimed at office areas or to provide a ³hotspot´. It can be installed instead of a wired system, and can provide considerable cost savings, especially when used in established offices. A backbone wired network is still required and is connected to a server. Wireless network is then split up into a number of cells, each serviced by a base station or Access Point (AP) which acts as a controller for the cell. Each Access Point may have a range of between 30 and 300 metres dependent upon the environment and the location of the Access Point. The other type of network that may be used is termed as Ad-Hoc network. These are formed when a number of computers and peripherals are brought together. They may be needed when several people come together and need to share data or if they need to access a printer without the need for having to use wire connections. In this situation the user4s may only communicate with each other and not a larger wired network. As a result there is no Access Point and special algorithms within the protocols are used to enable one of the peripherals to take over the role of master to control the network with the others acting as slaves. 2.2. luetooth Bluetooth is based on IEEE standards 802.15.1. Bluetooth has now established itself in the market place enabling a variety of devices to be connected together using wireless technology. Bluetooth technology has come into its own connecting remote headsets to mobile phones, but it is also used in a huge number of other applications as well. Bluetooth technology originated in 1994 when Erricsson came up with a concept to use a wireless connection to connect items such as an earphone and a cordless headset and the mobile phone. The name of the Bluetooth standard originates from the Danish king Harald Blatand who was king of Denmark between 940 and 981 AD. His name translates as ³Bluetooth´ and this was used as his nickname. A brave warrior, his main achievement was that of uniting Denmark under the banner of Christianity, and then uniting it with Norway that he had conquered. The Bluetooth standard was named after him because Bluetooth endeavors to unite personal computing and telecommunications devices. Bluetooth is a wireless data system and can carry data at speeds up to 721 Kbps in its basic form and in addition to this it offers up to three voice channels. Bluetooth technology enables a user to replace cables between devices such as printers, fax machines, desktop computers and peripherals, and a host of other digital devices. Furthermore, it can provide a connection between an ad-hoc wireless network and existing wired data networks. The technology is intended to be placed in a low cost module that can be easily incorporated into electronics devices of all sorts. Bluetooth uses the license free Industrial, Scientific and Medical(ISM) frequency band for its radio signals and enables communications to be established between devices up to

a maximum distance of 100 metres. Running in the 2.4 GHz ISM band, Bluetooth employs frequency hopping techniques with the carrier modulated using Gaussian Frequency Shift Keying (GFSK). After a network connection is established between two devices they change their frequency 1600 times per second thus leaving no time for interference, and if by chance there is interference it will be for few microseconds. No other sub network will be working at the frequency at which other sub networks work, thus eliminating interference. 2.3. IEEE 802.15.4 IEEE 802.15 is the working group 15 of the IEEE 802 which specializes in Wireless PAN standards. It includes four task groups (numbered from 1 to 4): Task group 1 (WPAM/Bluetooth) deals with Bluetooth, having produced the 802.15.1 standard, published on June 14, 2002. It includes a medium access control and physical layer specification adapted from Bluetooth 1.1. Task group 2 (coexistence) deals with coexistence of Wireless LAN (802.11) and Wireless PAN. Task group 3 is in fact two groups: 3 (WPAN High Rate) and 3a (WPAN Alternate Higher Rate), both dealing with high-rate WPAN standards (20 Mbit/s or higher). Task group 4 (WPAN Low Rate) deals with low rate but very long battery life (months or even years). The first edition of the 802.15.4 standard was released in May 2003. In March 2004, after forming Task Group 4b, task group 4 put itself in hibernation. The new Task Group 4b aims at clarifying and enhancing specific parts of the Task Group 4 standard. 2.4. Components of IEEE 802.15.4 IEEE 902.15.4 networks use three types of devices. The network coordinator maintains the overall network knowledge. It is the most sophisticated one of the three types and required the most memory and computing power. The Full Function Device (FFD) supports all IEEE 802.15.4 functions and features specified by the standard. It can function as a network coordinator. Additional memory and computing power make it ideal for network router functions or it could be used in network-edge devices (where the network touches the real world).

The Reduced Function Device (RFD) carries limited (as specified by the standard) functionality to lower cost and complexity. It us generally found in network-edge devices. 2.5. ZigBee` ZigBee is a wireless networking standard that is aimed at remote control and sensor applications which is suitable for operation in harsh radio environments and in isolated locations, It builds on IEEE standard 802.15.4 which defines the physical and MAC layers. Above this ZigBee defines the application and security layer specifications enabling interoperability between products from different manufacturers. In this way ZigBee is a superset of the 802.15.4 specification. With the applications for remote wireless sensing and control growing rapidly it is estimated that the market size could reach hundreds of millions of dollars as early as 2007. This makes ZigBee a very attractive proposition, and one, which warrants the introduction of a focused standard 2.6. Relation between IEEE 802.15.4 & ZigBee The relationship between IEEE 802.15.4 and ZigBee is similar to that between IEEE 802.11 and the Wi-Fi Alliance. The ZigBee 1.0 specification was ratified on 14 December 2004 and is available to members of the ZigBee Alliance. Most recently, the ZigBee 2007 specification was posted on 30 October 2007. The first ZigBee Application Profile, Home Automation, was announced 2 November 2007. ZigBee operates in the industrial, scientific and medical (ISM) radio bands; 868 MHz in Europe, 915 MHz in the USA and Australia, and 2.4 GHz in most jurisdictions worldwide. The technology is intended to be simpler and less expensive than other WPANs such as Bluetooth. ZigBee chip vendors typically sell integrated radios and microcontrollers with between 60K and 128K flash memory, such as the Jennic JN5148, the Free scale MC13213, the Ember EM250, the Texas Instruments CC2430, the Samsung Electro-Mechanics ZBS240 and the AtmelATmega128RFA1. Radios are also available stand-alone to be used with any processor or microcontroller. Generally, the chip vendors also offer the ZigBee software stack, although independent ones are also available. Because ZigBee can activate (go from sleep to active mode) in 15 msec or less, the latency can be very low and devices can be very responsive ² particularly compared to Bluetooth wake-up delays, which are typically around three seconds. Because ZigBees can sleep most of the time, average power consumption can be very low, resulting in long battery life. The first stack release is now called ZigBee 2004. The second stack release is called ZigBee 2006, and mainly replaces the MSG/KVPstructure used in 2004 with a "cluster library". The 2004 stack is now more or less obsolete.

ZigBee 2007, now the current stack release, contains two stack profiles, stack profile 1 (simply called ZigBee), for home and light commercial use, and stack profile 2 (called ZigBee Pro). ZigBee Pro offers more features, such as multi-casting, many-to-one routing and high security with Symmetric-Key Key Exchange (SKKE), while ZigBee (stack profile 1) offers a smaller footprint in RAM and flash. Both offer full mesh networking and work with all ZigBee application profiles. ZigBee 2007 is fully backward compatible with ZigBee 2006 devices: A ZigBee 2007 device may join and operate on a ZigBee 2006 network and vice versa. Due to differences in routing options, ZigBee Pro devices must become non-routing ZigBee End-Devices (ZEDs) on a ZigBee 2006 or ZigBee 2007 network, the same as ZigBee 2006 or ZigBee 2007 devices must become ZEDs on a ZigBee Pro network. The applications running on those devices work the same, regardless of the stack profile beneath them. 2.7. ZigBee vs. Bluetooth ZigBee looks rather like Bluetooth but is simpler, has a lower data rate and spends most of its time snoozing. This characteristic means that a node on a ZigBee network should be able to run for six months to two years on just two AA batteries. The operational range of ZigBee is 10-75m compared to 10m for Bluetooth (without a power amplifier). ZigBee sits below Bluetooth in terms of data rate. The data rate of ZigBee is 250kbps at 2.4GHz, 40kbps at 915MHz and 20kbps at 868MHz whereas that of Bluetooth is 1Mbps. ZigBee uses a basic master-slave configuration suited to static star networks of many infrequently used devices that talk via small data packets. It allows up to 254 nodes. Bluetooth¶s protocol is more complex since it is geared towards handling voice, images and file transfers in ad hoc networks. Bluetooth devices can support scatter nets of multiple smaller non-synchronized networks (piconets). It only allows up to 8 slave nodes in a basic master-slave piconet set-up. When ZigBee node is powered down, it can wake up and get a packet in around 15msec whereas a Bluetooth device would take around 3sec to wake up and respond. ZigBee and Bluetooth are two solutions for two different application areas. Bluetooth has addressed a voice application by embodying a fast frequency hopping system with a master slave protocol. ZigBee has addressed sensors, controls, and other short message applications by embodying a direct sequence system with a star or peer to peer protocols.

2.8. Technology Comparisons

3. ZigBee

The past few years have witnessed a rapid growth of wireless networking. However, up to now wireless networking has been mainly focused on high ± speed communications, and relatively long range applications such as IEEE 802.11 wireless local area network standards. The first well known standard focusing on low rate wireless personal area networks was BLUETOOTH. However it has limited capacity for networking of many nodes. There are many wireless monitoring and control applications in industrial and home environments which require longer battery life, lower data rates and less complexity than those from existing standards. For such wireless applications, a new standard called IEEE 802.15.4 has been developed by IEEE. The new standard is also called ZigBee. 3.1. History 

ZigBee-style networks began to be conceived about 1998, when many installers realized that both WiFi and Bluetooth were going to be unsuitable for many applications. In particular, many engineers saw a need for self-organizing ad-hoc digital radio networks. The IEEE 802.15.4 standard was completed in May 2003. In the summer of 2003, Philips Semiconductors, a major mesh network supporter, ceased the investment. Philips Lighting has, however, continued Philips' participation, and Philips remains a promoter member on the ZigBee Alliance Board of Directors. The ZigBee Alliance announced in October 2004 that the membership had more than doubled in the preceding year and had grown to more than 100 member companies, in 22 countries. By April 2005 membership had grown to more than 150 companies, and by December 2005 membership had passed 200 companies. The ZigBee specifications were ratified on 14 December 2004. The ZigBee Alliance announces public availability of Specification 1.0 on 13 June 2005, known as ZigBee 2004 Specification. The ZigBee Alliance announces the completion and immediate member availability of the enhanced version of the ZigBee Standard in September 2006, known as ZigBee 2006 Specification. During the last quarter of 2007, ZigBee PRO, the enhanced ZigBee specification was finalized.   


3.2. The ZigBee Alliance The ZigBee standard is organized under the auspices of the ZigBee Alliance. The ZigBee alliance is an organization of companies working together to define an open global standard for making low power wireless networks. The intended outcome of ZigBee alliance is to create a specification defining how to build different network topologies with data security features and interoperable application profiles. This organization has over 150 members, of which seven have taken on the status of what they term ³promoter.´ These seven companies are Ember, Honeywell, Invensys, Mitsubishi, Motorola, Philips and Samsung. A big challenge for the alliance is to make the interoperability to work among different products. To solve this problem, the ZigBee Alliance has defines profiles, depending on what type of category the product belongs to. For example there is a profile called home lightning that exactly defines how different brands of home lightning-products should communicate with each other. Under the umbrella of the ZigBee Alliance, the new standard will be pushed forward, taking on board the requirements of the users, manufacturers and the system developers. The Alliance has specified three profiles: Private Profile: In this profile interoperability is not at all important. However producers cannot use the official ZigBee stamp, but can claim that µbased on ZigBee platform¶. Published Profile: A private profile is shared among other users. Still one cannot use official ZigBee stamp, but can claim µbased on ZigBee platform¶. Public profile: It is the official ZigBee profile. 3.3. The ZigBee Basics ZigBee is the product of the ZigBee Alliance, an organization of manufacturers dedicated to developing a new networking technology for small, ISM-band radios that could welcome even the simplest industrial and home end devices into wireless connectivity. The ZigBee specification was finalized in December, 2004, and products supporting the ZigBee standard are just now beginning to enter the market. ZigBee is designed as a lowcost, low-power, low-data rate wireless mesh technology. The ZigBee specification identifies three kinds of devices that incorporate ZigBee radios, with all three found in a typical ZigBee network (Figure 1): ‡ a coordinator, which organizes the network and maintains routing tables ‡ routers, which can talk to the coordinator, to other routers, and to reduced function end devices ‡ reduced function end devices, which can talk to routers and the coordinator, but not to each other

Figure 1: ZigBee networks incorporate coordinators, routers, and reduced function end devices in a variety of topologies (mesh topology shown) To minimize power consumption and promote long battery life in battery-powered devices, end devices can spend most of their time asleep, waking up only when they need to communicate and then going immediately back to sleep. ZigBee envisions that routers and the coordinator will be mains powered and will not go to sleep. To illustrate how these components interrelate, consider ZigBee networking in office lighting. Several manufacturers are currently developing inexpensive sensors for fluorescent tubes that let lights be turned on and off by battery-powered wall switches, with no wires between switch and fixture. The light switch is the end device, powered by a button cell battery that will last for years; the switch wakes up and uses battery power only when flipped on or off to transmit the new state to the fluorescent tubes¶ routers which, as they are already connected to the mains, are not concerned with battery conservation. Any one of the fluorescent tubes can contain the coordinator. The implications are enormous for new office construction ± no more electrical runs for lighting, and the ability to reconfigure lighting controls at almost zero cost. ZigBee extends similar benefits to a wide range of industrial automation and control applications. 3.4. The Name ZigBee The name ZigBee is said to come from the domestic honeybee which uses a zig-zag type of dance to communicate important information to other hive members. This communication dance (³The ZigBee Principle´) is what engineers are trying to emulate with this protocol ± a bunch of separate and simple organisms that join together to tackle complex tasks.

3.5. What is ZigBee? ZigBee is a home-area network designed specifically to replace the proliferation of individual remote controls. ZigBee was created to satisfy the market's need for a costeffective, standards-based wireless network that supports low data rates, low power consumption, security, and reliability The alliance is working closely with the IEEE to ensure an integrated, complete, and interoperable network for the market. The ZigBee Alliance will also serve as the official test and certification group for ZigBee devices. ZigBee is the only standards based technology that addresses the needs of most remote monitoring and control and sensory network applications. The 802.15.4 specification only covers the lower networking layers (MAC and PHY). To achieve inter-operability over a wide range of applications such as Home, Industrial or Building Automation, the higher layers must be standardized as well. The ZigBee Alliance has produced such a standard, using 802.15.4 wireless (generally in the 2.4 GHz band) as the low-level transport. Through the use of 'profiles', the specification may customised to suit various application areas. ZigBee Home Automation Example

It may be helpful to think of IEEE 802.15.4 as the physical radio and ZigBee as the logical network and application software. Following the standard Open Systems Interconnection (OSI) reference model, ZigBee's protocol stack is structured in layers. The first two layers, physical (PHY) and media access (MAC), are defined by the IEEE 802.15.4 standard. The layers above them are defined by the ZigBee Alliance.

3.6. Why ZigBee? There are a multitude of standards like Bluetooth and Wi-Fi that address mid to heigh data rates for voice, PC LANs, video etc. However, up till now there hasn¶t been a wireless network standard that meets the unique needs of sensors and control devices. Sensors and controls don¶t need high bandwidth but they do need low latency and very low energy consumption for long battery lives and for large device arrays. There are a multitude of proprietary wireless systems manufactured today to solve a multitude of problems that don¶t require high data rates but do require low cost and very low current drain. These proprietary systems were designed because there were no standards that met their application requirements. These legacy systems are creating significant interoperability problems with each other and with newer technologies. The ZigBee Alliance is not pushing a technology; rather it is providing a standardized base set of solutions for sensor and control systems. Here are the following points that justify the use of ZigBee over the existing standards. Low power consumption, simply implemented: Users expect batteries to last many months to years! Consider that a typical single-family house has about 6 smoke/CO detectors. If the batteries for each one only lasted six months, the home owner would be replacing batteries every month! In contrast Bluetooth, which has many different modes and states depending upon your latency and power requirements, ZigBee/IEEE 802.15.4 has two major states: active(transmit/receive) or sleep. The application software needs to focus on the application, not on which power mode is optimum for each aspect of operation. Even mains powered equipment needs to be conscious of energy. ZigBee devices will be more ecological than their predecessors saving megawatts at it full deployment. Consider a future home that has 100 wireless control/sensor devices, Case 1: 802.11 Rx power is 667 mW (always on) @ 100 devices/home & 50,000 homes/city = 150 3.33 megawatts. Case 2: 802.15.4 Rx power is 30 mW (always on) @ 100 devices/home & 50,000 homes/city = 150 kilowatts. Case 3: 802.15.4 power cycled at .1% (typical duty cycle) = 150 watts Low cost to the users means low device cost, low installation cost and low maintenance. ZigBee devices allow batteries to last up to years using primary cells (low cost) without any chargers (low cost and easy installation). ZigBee¶s simplicity allows for inherent configuration and redundancy of network devices provides low maintenance.

High density of nodes per network: ZigBee¶s use of the IEEE 802.15.4 PHY and MAC allows networks to handle any number of devices. This attribute is critical for massive sensor arrays and control networks. Simple protocol, global implementation: ZigBee¶s protocol code stack is estimated to be about 1/4th of Bluetooth¶s or 802.11¶s. Simplicity is essential to cost, interoperability, and maintenance. The IEEE 802.15.4 PHY adopted by ZigBee has been designed for the 868 MHz band in Europe, the 915 MHz band in N America, Australia, etc; and the 2.4 GHz band is now recognized to be a global band accepted in almost all countries. 3.7. Protocol The protocols build on recent algorithmic research (Ad-hoc On-demand Distance Vector, neuRFon) to automatically construct a low-speed ad-hoc network of nodes. In most large network instances, the network will be a cluster of clusters. It can also form a mesh or a single cluster. The current profiles derived from the ZigBee protocols support beacon and non-beacon enabled networks. In non-beacon-enabled networks (those whose beacon order is 15), an unslotted CSMA/CA channel access mechanism is used. In this type of network, ZigBee Routers typically have their receivers continuously active, requiring a more robust power supply. However, this allows for heterogeneous networks in which some devices receive continuously, while others only transmit when an external stimulus is detected. The typical example of a heterogeneous network is a wireless light switch: The ZigBee node at the lamp may receive constantly, since it is connected to the mains supply, while a battery-powered light switch would remain asleep until the switch is thrown. The switch then wakes up, sends a command to the lamp, receives an acknowledgment, and returns to sleep. In such a network the lamp node will be at least a ZigBee Router, if not the ZigBee Coordinator; the switch node is typically a ZigBee End Device. In beacon-enabled networks, the special network nodes called ZigBee Routers transmit periodic beacons to confirm their presence to other network nodes. Nodes may sleep between beacons, thus lowering their duty cycle and extending their battery life. Beacon intervals may range from 15.36 milliseconds to 15.36 ms * 214 = 251.65824 seconds at 250 kbit/s, from 24 milliseconds to 24 ms * 214 = 393.216 seconds at 40 kbit/s and from 48 milliseconds to 48 ms * 214 = 786.432 seconds at 20 kbit/s. However, low duty cycle operation with long beacon intervals requires precise timing, which can conflict with the need for low product cost. In general, the ZigBee protocols minimize the time the radio is on so as to reduce power use. In beaconing networks, nodes only need to be active while a beacon is being transmitted.

In non-beacon-enabled networks, power consumption is decidedly asymmetrical: some devices are always active, while others spend most of their time sleeping. ZigBee devices are required to conform to the IEEE 802.15.4-2003 Low-Rate Wireless Personal Area Network (WPAN) standard. The standard specifies the lower protocol layers²the physical layer (PHY), and the media access control (MAC) portion of the data link layer (DLL). This standard specifies operation in the unlicensed 2.4 GHz (worldwide), 915 MHz (Americas) and 868 MHz (Europe) ISM bands. In the 2.4 GHzband there are 16 ZigBee channels, with each channel requiring 5 MHz of bandwidth. The center frequency for each channel can be calculated as, FC = (2405 + 5 * (ch - 11)) MHz, where ch = 11, 12, ..., 26. The radios use direct-sequence spread spectrum coding, which is managed by the digital stream into the modulator. BPSK is used in the 868 and 915 MHz bands, and OQPSK that transmits two bits per symbol is used in the 2.4 GHz band. The raw, over-the-air data rate is 250 kbit/sper channel in the 2.4 GHz band, 40 kbit/s per channel in the 915 MHz band, and 20 kbit/s in the 868 MHz band. Transmission range is between 10 and 75 meters (33 and 246 feet) and up to 1500 meters for zigbee pro, although it is heavily dependent on the particular environment. The maximum output power of the radios is generally 0 dBm (1 mW). The basic channel access mode is "carrier sense, multiple access/collision avoidance" (CSMA/CA). That is, the nodes talk in the same way that people converse; they briefly check to see that no one is talking before they start. There are three notable exceptions to the use of CSMA. Beacons are sent on a fixed timing schedule, and do not use CSMA. Message acknowledgments also do not use CSMA. Finally, devices in Beacon Oriented networks that have low latency real-time requirements may also use Guaranteed Time Slots (GTS), which by definition do not use CSMA. ZigBee RF4CE On March 3, 2009 the RF4CE (Radio Frequency for Consumer Electronics) Consortium agreed to work with the ZigBee Alliance to jointly deliver a standardized specification for radio frequency-based remote controls. ZigBee RF4CE is designed to be deployed in a wide range of remotely-controlled audio/visual consumer electronics products, such as TVs and set-top boxes. It promises many advantages over existing remote control solutions, including richer communication and increased reliability, enhanced features and flexibility, interoperability, and no line-of-sight barrier.

3.8. OSI Overview The Open System Interconnection (OSI) reference model, was developed by the International Organization for Standardization (ISO) as a model for the computer protocol architecture, and as a framework for developing protocol standards. The entire point of the model is to separate networking into several distinct functions that operate at di_erent levels. Each layer is responsible for performing a speci_c task or set of tasks, and dealing with the layers above and below it. An illustration of the general OSI -model and where ZigBee is de_ned in the model can be seen in Figure 2.2.

Figure 2.2: OSI model

3.9. Software and hardware The software is designed to be easy to develop on small, inexpensive microprocessors. The radio design used by ZigBee has been carefully optimized for low cost in large scale production. It has few analog stages and uses digital circuits wherever possible. Even though the radios themselves are inexpensive, the ZigBee Qualification Process involves a full validation of the requirements of the physical layer. This amount of

concern about the Physical Layer has multiple benefits, since all radios derived from that semiconductor mask set would enjoy the same RF characteristics. On the other hand, an uncertified physical layer that malfunctions could cripple the battery lifespan of other devices on a ZigBee network. Where other protocols can mask poor sensitivity or other esoteric problems in a fade compensation response, ZigBee radios have very tight engineering constraints: they are both power and bandwidth constrained. Thus, radios are tested to the ISO 17025 standard with guidance given by Clause 6 of the 802.15.4-2006 Standard. Most vendors plan to integrate the radio and microcontroller onto a single chip. 3.10. What ZigBee¶s ³Low Power Consumption´ Means

ZigBee¶s low power consumption is rooted not in RF power, but in a sleep modespecifically designed to accommodate battery powered devices. Any ZigBeecompliant radio can switch automatically to sleep mode when it¶s not transmitting, and remain asleep until it needs to communicate again. For radios connected to batterypowered devices, this results in extremely low duty cycles and very low average power consumption. When a radio is in sleep mode, its RF power rating is irrelevant; it¶s only when transmitting that its RF power affects power consumption. In the case of Cirronet¶s ZigBee solutions, a radio with 100 mW RF power will typically consume 150 mA at 3.3V when transmitting, compared to 75 mA at 3.3 V for a radio with 1 mW RF power. The 100 mW radio consumes twice as much power ± but only when actively transmitting. As long as the high power radio¶s low noise amplifier is turned off, power consumption while sleeping is roughly equivalent to that of a low power radio. If the high RF power radio is awake and transmitting 5% of the time, which would be a very active radio, the extra average power consumption is roughly 5%. This additional power consumption means that a battery that would last for five years with a 1 mW radio would last four years and nine months with a 100 mW radio. As this illustrates, ZigBee radios with higher RF output ratings are still excellent candidates for use with battery powered devices. It¶s important to note that the ZigBee Alliance doesn¶t itself specify anything for RF power. ZigBee¶s RF power specification comes from IEEE 802.15.4, which specifies a minimum power output rating of 1 mW, with no specified maximum. The de facto 100 mW ³high power´ level relates to the European limit of 100 mW EIRP, including antenna gain. 3.11. ZigBee Benefits

In all of its uses, ZigBee offers four inherent characteristics that are highly beneficial: ‡ Low cost The typical ZigBee radio is extremely cost-effective. Chipset prices can be as low as $12 each in quantities as few as 100 pieces (while the 802.15.4 and ZigBee stacks are typically included in this cost, crystals and other discrete components are not). Design-in modules fall in the neighbourhood of $25 in similar quantities. This pricing provides an economic justification for extending wireless networking to even the simplest of devices.

‡ Range and obstruction issues avoidance ZigBee routers double as input devices and repeaters to create a form of mesh network. If two network points are unable to communicate as intended, transmission is dynamically routed from the blocked node to a router with a clear path to the data¶s destination. This happens automatically, so that communications continue even when a link fails unexpectedly. The use of low-cost routers can also extend the network¶s effective reach; when the distance between the base station and a remote node exceeds the devices¶ range, an intermediate node or nodes can relay transmission, eliminating the need for separate repeaters (Figure 2).

Figure 2: Heavy lines show a signal from a reduced function end device passing through multiple routers to reach a gateway functioning as a coordinator; lighter lines show possible alternative signal paths ‡ Multi-source products As an open standard, ZigBee provides customers with the ability to choose among vendors. ZigBee Alliance working groups define interoperability profiles to which ZigBee-certified devices must adhere, and certified radio will interoperate with any other ZigBee-certified radio adhering to the same profile, promoting compatibility and the associated competition that allows the end users to choose the best device for each particular network node, regardless of manufacturer. ‡ Low power consumption Basic ZigBee radios operate at 1 mW RF power, and can sleep when not involved in transmission (higher RF power ZigBee radios for applications needing greater range also provide the sleep function). As this makes battery-powered radios more practical than ever, wireless devices are free to be placed without power cable runs in addition to eliminating data cable runs.

4. ZigBee/IEEE 802.15.4 ± General Characteristics
y y y y y y y y y

Data rates of 250 kbps (@2.4 GHz), 40 Kbps (@ 915 MHz) and 20 kbps (@868 MHz) Optimized for low duty-cycle applications (<0.1%). Low power (battery life multi-month to years). Multiple topologies: star, peer-to-peer, mesh. CSMA-CA channel access yields high throughput and low latency for low duty cycle devices like sensors and controls. Addressing space of 64 bits ± 18,450,000,000,000,000,000 devices (64 bit IEEE address) ± 65,535 networks. Optional guaranteed time slot for applications requiring low latency. Fully hand-shaked protocol for transfer reliability. Range: 50m typical (5-500m based on environment).

4.1. ZigBee/IEEE 802.15.4 ± Typical Traffic types Addressed Following are typical traffic types specified: i. Periodic data ii. Application defined rate (e.g. sensors) iii. Intermittent data iv. Application/external stimulus defined rate (e.g. light switch) v. Repetitive low latency data vi. Allocation of time slots(e.g. mouse) Each of these traffic types mandates different attributes from the MAC. The IEEE 802.15.4 MAC is flexible enough to handle each of these types. Periodic data can be handled using the beaconing system whereby the sensor will wake up for the beacon, check for any messages and then go back to sleep. Intermittent data can be handled either in a beaconless system or in a disconnected fashion. In a disconnected operation the device will only attach to the network when it needs to communicate saving significant energy. Low latency applications may choose to the guaranteed time slot (GTS) option. GTS is a method of QoS (Quality of Service) in that it allows each device a specific duration of time each Super frame to do whatever it wishes to do without contention or latency.

5. ZigBee/IEEE 802.15.4 WPAN 12
Wireless personal area networks (WPANs) are used to convey information over relatively short distances. The main features of this standard are network flexibility, low cost, very low power consumption, and low data rate in an adhoc self-organizing network among inexpensive fixed, portable and moving devices. The main features of this standard are network flexibility, low cost, very low power consumption, and low data rate in an adhoc self-organizing network among inexpensive fixed, portable and moving devices. It is developed for applications with relaxed throughput requirements which cannot handle the power consumption of heavy protocol stacks. 3.1 Components of WPAN A ZigBee system consists of several components. The most basic is the device. A device can be a full-function device (FFD) or reduced-function device (RFD). A network shall include at least one FFD, operating as the PAN coordinator. The FFD can operate in three modes: a personal area network (PAN) coordinator, a coordinator or a device. An RFD is intended for applications that are extremely simple and do not need to send large amounts of data. An FFD can talk to RFDs or FFDs while an RFD can only talk to an FFD. 3.2 Network Topologies 3 types of topologies that ZigBee supports: star topology, peer-to-peer topology and cluster tree. Peer to Peer (Ad-hoc) ZigBee nodes connect directly to each other for peer to peer communication. In peer-topeer topology, there is also one PAN coordinator. In contrast to star topology, any device can communicate with any other device as long as they are in range of one another. A peer-to-peer network can be ad hoc, self-organizing and self-healing. Applications such as industrial control and monitoring, wireless sensor networks, asset and inventory tracking would benefit from such a topology. It also allows multiple hops to route messages from any device to any other device in the network. It can provide reliability by multipath routing.

Cluster Tree

A cluster tree network consists of a number of star networks connected whose central nodes are also in direct communications with the single PAN Coordinator. Using a set of routers and a single PAN coordinator, the network is formed into an interconnected mesh of routers and end nodes which pass information from node to node using the most cost effective path. Should any individual router become inaccessible, alternate routes can be discovered and used providing a robust and reliable network topography. Cluster-tree network is a special case of a peer-to-peer network in which most devices are FFDs and an RFD may connect to a cluster-tree network as a leave node at the end of a branch. Any of the FFD can act as a coordinator and provide synchronization services to other devices and coordinators. Only one of these coordinators however is the PAN coordinator. The PAN coordinator forms the first cluster by establishing itself as the cluster head (CLH) with a cluster identifier (CID) of zero, choosing an unused PAN identifier, and broadcasting beacon frames to neighbouring devices. A candidate device receiving a beacon frame may request to join the network at the CLH. If the PAN coordinator permits the device to join, it will add this new device as a child device in its neighbour list. The newly joined device will add the CLH as its parent in its neighbour list and begin transmitting periodic beacons such that other candidate devices may then join the network at that device. Once application or network requirements are met, the PAN coordinator may instruct a device to become the CLH of a new cluster adjacent to the first one. The advantage of this clustered structure is the increased coverage area at the cost of increased message latency.

Fig 5.7 Cluster tree topology

In a mesh topology, the ZigBee coordinator is responsible for starting the network and for choosing key network parameters, but the network may be extended through the use of ZigBee routers.

The routing algorithm uses a request-response protocol to eliminate sub-optimal routing. Ultimate network size can reach 264 nodes (more than we¶ll probably need). Using local addressing, you can configure simple networks of more than 65,000 (216) nodes, thereby reducing address overhead.
Star Configuration

In a star topology, one of the FFD-type devices assumes the role of network coordinator and is responsible for initiating and maintaining the devices on the network. All other devices, known as end devices, directly communicate with the coordinator. In the star topology, the communication is established between devices and a single central controller, called the PAN coordinator. The PAN coordinator may be mains powered while the devices will most likely be battery powered. Applications that benefit from this topology include home automation, personal computer (PC) peripherals, toys and games. After an FFD is activated for the first time, it may establish its own network and become the PAN coordinator. Each start network chooses a PAN identifier, which is not currently used by any other network within the radio sphere of influence. This allows each star network to operate independently.

Fig. 5.6 Star network topology

3.3 Zi B

Archi cture

Zi Bee architecture compri e a PHY, which contain the radio frequenc (RF) tran ceiver alon with it low-level control mechani m, and a MAC ubla er that provide acce to the ph ical channel for all t pe of tran fer The upper la er con i t of a network la er, which provide network confi uration, manipulation, and me a e routin , and application la er, which provide the intended function of a device An IEEE 802 2 lo ical link control (LLC) can acce the MAC ubla er throu h the ervice pecific conver ence ubla er (SSCS)

Zi Bee Alli ce

6. IEEE 802.15.4
4.1 Receiver Energy Detection (ED) The receiver energy detection (ED) measurement is intended for use by a network layer as part of channel selection algorithm. It is an estimate of the received signal power within the bandwidth of an IEEE 802.15.4 channel. No attempt is made to identify or decode signals on the channel. The ED time should be equal to 8 symbol periods. The ED result shall be reported as an 8-bit integer ranging from 0x00 to 0xff. The minimum ED value (0) shall indicate received power less than 10dB above the specified receiver sensitivity. The range of received power spanned by the ED values shall be at least 40dB. Within this range, the mapping from the received power in decibels to ED values shall be linear with an accuracy of + or í 6dB. 4.2 Link Quality Indication (LQI) Upon reception of a packet, the PHY sends the PSDU length, PSDU itself and link quality (LQ) in the PD-DATA. Indication primitive. The LQI measurement is a characterization of the strength and/or quality of a received packet. The measurement may be implemented using receiver ED, a signal-to-noise estimation or a combination of these methods. The use of LQI result is up to the network or application layers. The LQI result should be reported as an integer ranging from 0x00 to 0xff. The minimum and maximum LQI values should be associated with the lowest and highest quality IEEE 802.15.4 signals detectable by the receiver and LQ values should be uniformly distributed between these two limits. 4.3 Clear Channel Assessment (CCA) The clear channel assessment (CCA) is performed according to at least one of the following three methods: y Energy above threshold. CCA shall report a busy medium upondetecting any energy above the ED threshold.

Carrier sense only. CCA shall report a busy medium only upon the detection of a signal with the modulation and spreading characteristics of IEEE 802.15.4. This signal may be above or below the ED threshold. Carrier sense with energy above threshold. CCA shall report a busy medium only upon the detection of a signal with the modulation and spreading characteristics of IEEE 802.15.4 with energy above the ED threshold.


4.4 PPD


The PPDU packet structure is illustrated in Figure 3.4. Each PPDU packet consists of the following basic components: y SHR, which allows a receiving device to synchronize and lock into the bit stream
y y

PHR, which contains frame length information A variable length payload, which carries the MAC sub layer frame.

Figure 3.4 Format of the PPDU

7. IEEE 802.15.4 MAC22
The MAC sub layer provides an interface between the SSCS and the PHY. The MAC sub layer conceptually includes a management entity called the MLME. This entity provides the service interfaces through which layer management functions may be invoked. The MLME is also responsible for maintaining a database of managed objects pertaining to the MAC sub layer. This database is referred to as the MAC sub layer PIB. The MAC sub layer provides two services: The MAC data service and The MAC management service interfacing to the MAC sub layer management entity (MLME) service access point (SAP) (MLMESAP). The MAC data service enables the transmission and reception of MAC protocol data units (MPDU) across the PHY data service. The features of MAC sub layer are beacon management, channel access, GTS management, frame validation, acknowledged frame delivery, association and disassociation. 7.1 Frame Structure The frame structures have been designed to keep the complexity to minimum while at the same time making them sufficiently robust for transmission on a noisy channel. Each successive protocol layer adds to the structure with layer-specific headers and footers. The IEEE 802.15.4 MAC defines four frame structures: A beacon frame, used by a coordinator to transmit beacons. The beacon frame wakes up client devices, which listen for their address and go back to sleep if they don¶t receive it. Beacons are important for mesh and cluster-tree networks to keep all the nodes synchronized without requiring those nodes to consume precious battery energy by listening for long periods of time. A data frame, used for all transfers of data. The data frame p rovides a payload of up to 104 bytes. The frame is numbered to ensure that all packets are tracked. A frame-check sequence ensures that packets are received without error. This frame structure improves reliability in difficult conditions. This frame is shown in fig. 5.3. An acknowledgment frame, used for confirming successful frame reception It provides feedback from the receiver to the sender confirming that the packet was received without error. The device takes advantage of specified ³quiet time´ between frames to send a short packet immediately after the data-packet transmission. A MAC command frame is used for handling all MAC peer entity control transfers. A Mac command frame provides the mechanism for remote control and configuration of client nodes. A centralized network manager uses MAC to configure individual clients¶ command frames no matter how large the network

The data frame is illustrated below in fig 5.3:

Fig 5.3 ZigBee¶s Data Frame The Physical Protocol Data Unit is the total information sent over the air. As shown in the illustration above the Physical layer adds the following overhead:

The total overhead for a single packet is therefore 15 ± 31 octets (120 bits); depending upon the addressing scheme used (short or 64 bit addresses). These numbers do not include any security overhead. 7.2 Channel access, addressing Two channel-access mechanisms are implemented in 802.15.4. For a non"beacon network, a standard ALOHA CSMA-CA (carrier-sense medium-access with collision avoidance) communicates with positive acknowledgement for successfully received packets. In a beacon-enabled network, a superframe structure is used to control channel access. The superframe is set up by the network coordinator to transmit beacons at predetermined intervals (multiples of 15.38ms, up to 252s) and provides 16 equal-width time slots between beacons for contention-free channel access in each time slot. The structure guarantees dedicated bandwidth and low latency. Channel access in each time slot is contention-based. However, the network coordinator can dedicate up to seven guaranteed time slots per beacon interval for quality of service.

Device addresses employ 64-bit IEEE and optional 16-bit short addressing. The address field within the MAC can contain both source and destination address information (needed for peer-to-peer operation). This dual address information is used in mesh networks to prevent a single point of failure within the network. 7.3 Super Frame Structure The LR-WPAN standard allows the optional use of a superframe structure. The format of the super frame is defined by the coordinator. The superframe is bounded by network beacons, is sent by the coordinator and is divided into 16 equally sized slots. The beacons are used to synchronize the attached devices, to identify the PAN and to describe the structure of the super frames. Any device wishing to communicate during the contention access period (CAP) between two beacons shall compete with other devices using a slotted CSMA-CA mechanism. All transactions shall be completed by the time of the next network beacon.

Fig. 7.4: ZigBee¶s super frame structure bounded by two beacons For the low latency applications or applications requiring specific data bandwidth, the PAN coordinator may dedicate portions of the active superframe to that application. These portions are called guaranteed time slots (GTSs). The guaranteed time slots comprise the contention free period (CFP), which always appears at the end of the active superframe starting at a slot boundary immediately following the CAP. The PAN coordinator may allocate up to seven of these GTSs and a GTS may occupy more than one slot period. However, a sufficient portion of the CAO shall remain for contention-based access of other networked devices or new devices wishing to join the network. All contentionbased transactions shall be complete before the CFP begins.

Also each device transmitting in a GTS shall ensure that its transaction is complete before the time of the next GTS or the end of the CFP.

Fig. 5.5 ZigBee¶s superframe structure with contention access and free period

7.4 CSMA-CA Algorithm If super frame structure is used in the PAN, then slotted CSMA-CA shall be used. If beacons are not being used in the PAN or a beacon cannot be located in a beacon-enabled network, unslotted CSMA-CA algorithm is used. In both cases, the algorithm is implemented using units of time called Back off periods, which is equal to a Unit Back off Period symbols.

In slotted CSMA-CA channel access mechanism, the back off period boundaries of every device in the PAN are aligned with the super frame slot boundaries of the PAN coordinator. In slotted CSMA-CA, each time a device wishes to transmit data frames during the CAP, it shall locate the Boundary of the next back off period. In unslotted CSMA-CA, the back off periods of one device do not need to be synchronized to the back off periods of another device.


7.5 Data Transfer model Three types of data transfer transactions exist: y from a coordinator to adevice, y from a device to a coordinator and y between two peer devices.

The mechanism for each of these transfers depends on whether the network supports the transmission of beacons. The non-beacon mode will be included in a system where devices are µasleep' nearly always, as in smoke detectors and burglar alarms. The devices wake up and confirm their continued presence in the network at random intervals. When a device wishes to transfer data in a non beacon-enabled network, it simply transmits its data frame, using the unslotted CSMA-CA, to the coordinator. On detection of activity, the sensors µspring to attention', as it were, and transmit to the ever-waiting coordinator's receiver (since it is mains-powered). There is also an optional acknowledgement at the end as shown in Figure 4.3.

In the beacon mode, a device watches out for the coordinator's beacon that gets transmitted at periodically, locks on and looks for messages addressed to it. If message transmission is complete, the coordinator dictates a schedule for the next beacon so that the device µgoes to sleep'; in fact, the coordinator itself switches to sleep mode. While using the beacon mode, all the devices in a mesh network know when to communicate with each other. In this mode, necessarily, the timing circuits have to be quite accurate, or wake up sooner to be sure not to miss the beacon. This in turn means an increase in power consumption by the coordinator's receiver, entailing an optimal increase in costs. When a device wishes to transfer data to a coordinator in a beacon-enabled network, it first listens for the network beacon. When the beacon is found, it synchronizes to the super frame structure. At the right time, it transmits its data frame, using slotted CSMACA, to the coordinator.

There is an optional acknowledgement at the end as shown in Figure 4.4.

The applications transfers are completely controlled by the devices on a PAN rather than by the coordinator. This provides the energy-conservation feature of the ZigBee network. When a coordinator wishes to transfer data to a device in a beacon-enabled network, it indicates in the network beacon that the data message is pending. The device periodically listens to the network beacon, and if a message is pending, transmits a MAC command requesting this data, using slotted CSMA-CA. The coordinator optionally acknowledges the successful transmission of this packet. The pending data frame is then sent using slotted CSMA-CA. The device acknowledged the successful reception of the data by transmitting an acknowledgement frame. Upon receiving the acknowledgement, the message is removed from the list of pending messages in the beacon as shown in Figure 4.5.

When a coordinator wishes to transfer data to a device in a non-beacon enabled network, it stores the data for the appropriate device to make contact and request data. A device may make contact by transmitting a MAC command requesting the data, using unslotted CSMA-CA, to its coordinator at an application-defined rate. The coordinator acknowledges this packet. If data are pending, the coordinator transmits the data frame

using unslotted CSMA-CA. If data are not pending, the coordinator transmits a data frame with a zero-length payload to indicate that no data were pending. The device acknowledges this packet as shown in Figure 4.6.

In a peer-to-peer network, every device can communicate with any other device in its transmission radius. There are two options for this. In the first case, the node will listen constantly and transmit its data using unslotted CSMA-CA. In the second case, the nodes synchronize with each Other so that they can save power. 7.6 Traffic Types ZigBee/IEEE 802.15.4 addresses three typical traffic types. IEEE 802.15.4 MAC can accommodate all the types. y Data is periodic. The application dictates the rate, and the sensor activates checks for data and deactivates. y Data is intermittent. The application, or other stimulus, determines the rate, as in the case of say smoke detectors. The device needs to connect to the network only when communication is necessitated. This type enables optimum saving on energy. y Data is repetitive, and the rate is fixed a priori. Depending on allotted time slots, called GTS (guaranteed time slot), devices operate for fixed durations. ZigBee employs either of two modes, beacon or non-beacon to enable the to-and-fro data traffic. Beacon mode is used when the coordinator runs on batteries and thus offers maximum power savings, whereas the non-beacon mode finds favour when the coordinator is mains-powered.

7.7 MAC Layer Security When security of MAC layer frames is desired, ZigBee uses MAC layer security to secure MAC command, beacon, and acknowledgement frames. ZigBee may secure messages transmitted over a single hop using secured MAC data frames, but for multihop messaging ZigBee relies upon upper layers (such as the NWK layer) for security. The MAC layer uses the Advanced Encryption Standard (AES) as its core cryptographic algorithm and describes a variety of security suites that use the AES algorithm. These suites can protect the confidentiality, integrity, and authenticity of MAC frames. The MAC layer does the security processing, but the upper layers, which set up the keys and determine the security levels to use, control this processing. When the MAC layer transmits (receives) a frame with security enabled, it looks at the destination (source) of the frame, retrieves the key associated with that destination (source), and then uses this key to process the frame according to the security suite designated for the key being used. Each key is associated with a single security suite and the MAC frame header has a bit that specifies whether security for a frame is enabled or disabled. When transmitting a frame, if integrity is required, the MAC header and payload data are used in calculations to create a Message Integrity Code (MIC) consisting of 4, 8, or 16 octets. The MIC is right appended to the MAC payload. If confidentiality is required, the MAC frame payload is also left appended with frame and sequence counts (data used to form a nonce). The nonce is used when encrypting the payload and also ensures freshness to prevent replay attacks. Upon receipt of a frame, if a MIC is present, it is verified and if the payload is encrypted, it is decrypted. Sending devices will increase the frame count with every message sent and receiving devices will keep track of the last received count from each sending device. If a message with an old count is detected, it is flagged with a security error. The MAC layer security suites are based on three modes of operation. Encryption at the MAC layer is done using AES in Counter (CTR) mode and integrity is done using AES in Cipher Block Chaining (CBC- MAC) mode [16]. A combination of encryption and integrity is done using a mixture of CTR and CBC- MAC modes called the CCM mode.

8. ZigBee Network Model

The functions of the Coordinator, which usually remains in the receptive mode, encompass network set-up, beacon transmission, node management, storage of node information and message routing between nodes. The network node, however, is meant to save energy (and so µsleeps' for long periods) and its functions include searching for network availability, data transfer, checks for pending data and queries for data from the coordinator.

Figure 1: ZigBee Network Model For the sake of simplicity without jeopardising robustness, this particular IEEE standard defines a quartet frame structure and a super-frame structure used optionally only by the coordinator. The four frame structures are
y y y y

Beacon frame for transmission of beacons Data frame for all data transfers Acknowledgement frame for successful frame receipt confirmations MAC command frame

These frame structures and the coordinator's super-frame structure play critical roles in security of data and integrity in transmission. All protocol layers contribute headers and footers to the frame structure, such that the total overheads for each data packet range are from 15 octets (for short addresses) to 31 octets (for 64-bit addresses). The coordinator lays down the format for the super-frame for sending beacons after every 15.38 ms or/and multiples thereof, up to 252s. This interval is determined a priori and the coordinator thus enables sixteen time slots of identical width between beacons so that channel access is contention-less. Within each time slot, access is contention-based. Nonetheless, the coordinator provides as many as seven GTS (guaranteed time slots) for every beacon interval to ensure better quality.

9. ZigBee Protocol Stack

The ZigBee protocol stack is 1/4th of that of Wi-Fi and Bluetooth. It may be helpful to think of IEEE 802.15.4 as the physical radio and ZigBee as the logical network and application software. Following the standard Open Systems Interconnection (OSI) reference model, ZigBee¶s protocol stack is structured in layers. The first two layers, physical (PHY) and media access (MAC) are defined by the IEEE 802.15.4 standard as shown in the figure µfig 5.1¶. The layers above them are defined by the ZigBee Alliance. The IEEE working group passed the first draft of PHY and MAC in 2003.

Fig 5.1 ZigBee¶s Protocol Stack

9.1. The Physical Layer (PHY) ZigBee-compliant products operate in unlicensed bands worldwide, including 2.4 GHz (global), 902 to 928 MHz. (America) and 868 MHz (Europe). Raw data throughput rates of 250Kbps can be achieved at 2.4 GHz (16 channels), 40 Kbps at 915 MHz (10 channels), and 20 Kbps at 868 MHz (1 channel). The transmission distance is expected to range from 10 to 75m, depending on power output and environmental characteristics. Like Wi-Fi, ZigBee uses direct-sequence spread spectrum in the 2.4 GHz band, with offset-quadrature phase shift keying modulation. Channel width is 2 MHz with 5 MHz channel spacing. The 868 and 900 MHz bands also use direct-sequence spread spectrum but with binary-phases shift keying modulation. 868/915 MHz Band Modulation The transmitter must be capable of transmitting atleast ±3dbm although this should be reduced when possible to reduce interference to other users. The maximum allowable power will depend on local regulatory bodies. The receiver must have a packet error rate of <1% for input signals at the antenna connector of >-92dBm. 2450 MHz Band Modulation The transmitter must be capable of transmitting at least ±3dBm although this should be reduced when possible to reduce interference to other users. The maximum allowable power will depend on local regulations. What is Direct Sequence Spread Spectrum (DSSS)? In direct Sequence Spread Spectrum a bit is assigned a particular code spectrum that is transmitted and on the destination node that code is replaced by that specific bit, this way assigning the code spectrum utilizes bandwidth efficiently. PHY (MHz ) Frequency Band(MHz) Spreading Parameters Chiprate (kchip/s) Modulation Data Parameters Bit rate (kb/s) Symbol Symbols rate (ksymbol/s ) 20 Binary 40 62.5 Binary

868/9 15 2450

868-868.6 902-928 24002483.5

300 600 2000


20 40 250

16-ary Orthogonal Fig 5.2. shows the operating frequencies offered by the physical layer of ZigBee protocol.

Two types of devices are defined: Full Function Device (FFD) and Reduced Function Device (RFD). An FFD can serve as a coordinator or a regular device.

Fig 5.3: OPERATING FREQUENCY BAND It can communicate with any other devices within its transmission range. An RFD is a simple device that associates and communicates only with an FFD, The IEEE 802.15.4 PHY layer provides a parameter, Link Quality Indivation (LQI), to characterize the quality of received signal. It can be the received power, the estimated signal-to-noiseration (SNR), or a combination of both. LQI is passed to MAC layer and finally available to the network and upper layers. Other futures of PHY layer include the activation and deactivation of the radio transceiver, channel selection, clear channel assessment, and transmitting/receiving packets across physical medium. 9.2. Media Access Layer (MAC) There are two channel access mechanisms used by MAC Layer:
y y

Non-Beacon mode Beacon mode

ZigBee networks can use beacon or non-beacon environments. Beacons are used to synchronize the network devices, identify the PAN and describe the structure of the superframe. The beacon intervals are set by the network coordinator and vary from 15ms to over 4 minutes. Sixteen equal time slots are allocated between beacons are message delivery. The channel access in each time slot is contention-based. However, the network coordinator can dedicate up to seven guaranteed time slots for non contention based or low-latency delivery.

The non-beacon mode is a simple, traditional multiple-access system used in simple peer and near-pear networks. It operates like a two-way radio network, where each client is autonomous and can initiate a conversation at will, but could interfere with others unintentionally. The recipient may not here the call or the channel might already be in use Beacon Mode is a mechanism for controlling power consumption in extended networks such as cluster tree or mesh. It enables all the clients to know when to communicate with each other. Here, the two-way radio network has a central dispatcher that manages the channel and arranges the calls. The primary value of beacon mode is that it reduces the system¶s power consumption Non-beacon mode is typically used for security systems where client units, such as intrusion sensors, motion detectors, and glass-break detectors, sleep 99.999% of the time. Remote units wake up on a regular, yet random, basis to announce their continued presence in the network. When an event occurs, the sensor wakes up instantly and transmits the alert (³Somebody is on the front porch´). The network coordinator, powered from the main source, has its receiver on all the time and can therefore wait to hear from each of these stations. Since the network coordinator has an ³infinite´ source of power it can allow clients to sleep for unlimited periods of time, enabling them to save power. Beacon mode is more suitable when the network coordinator is battery-operated. Client units listen for the network coordinator¶s beacon (broadcast at intervals between 0.015 and 252 s). A client registers with the coordinator and looks for any messages directed to it. If no messages are pending, the client returns to sleep, awaking on a schedule specified by the coordinator. Once the client communications are completed, the coordinator itself returns to sleep. This timing requirement may have an impact on the cost of the timing circuit in each end device. Longer intervals of sleep mean that the timer must be more accurate or turn on earlier to make sure that the beacon is heard, both of which will increase receiver power consumption. Longer sleep intervals also mean the timer must improve the quality of the timing oscillator circuit (which increases cost) or control the maximum period of time between because to not exceed 252s, keeping oscillator circuit costs low. 7.3 Network and Security Layer (NWK) The NWK layer associates or dissociates devices using the network coordinator implements security, and routes frames to their intended destination. In addition, the NWK layer of the network coordinator is responsible for starting a new network and assigning an address to newly associated devices. The NWK layer associates or dissociates devices using the network coordinator, implements security, and routes frames to their intended destination. In addition, the NWK layer of the network coordinator is responsible for starting a new network and assigning an address to newly associated devices.

The NWK layer supports multiple network topologies including star, cluster tree, and mesh. In a star topology, one of the FFD-type devices assumes the role of network coordinator and is responsible for initiating and maintaining the devices on the network. All other devices, known as end devices, directly communicate with the coordinator. In a mesh topology, the ZigBee coordinator is responsible for starting the network and for choosing key network parameters, but the network may be extended through the use of ZigBee routers. The routing algorithm uses a request-response protocol to eliminate suboptimal routing. Ultimate network size can reach 264 nodes (more than we'll probably need). Using local addressing, you can configure simple networks of more than 65,000 (216) nodes, thereby reducing address overhead.
7.3.1 ZigBee Network Node

‡ Designed for battery powered or high energy savings ‡ Searches for available networks ‡ Transfers data from its application as necessary ‡ Determines whether data is pending ‡ Requests data from the network coordinator ‡ Can sleep for extended periods
7.3.2 Responsibilities of the ZigBee NWK layer

‡ Starting a network : The ability to successfully establish a new network. ‡ Joining and leaving a network: The ability to gain membership (join) or relinquish membership (leave) a network. ‡ Configuring a new device: The ability to sufficiently configure the stack for operation as required. ‡ Addressing: The ability of a ZigBee coordinator to assign addresses to devices joining the network. ‡ Synchronization within a network: The ability for a device to achieve synchronization with another device either through tracking beacons or by polling. ‡ Security: applying security to outgoing frames and removing security to terminating frames ‡ Routing: routing frames to their intended destinations. The network layer builds upon the IEEE 802.15.4 MAC¶s features to allow extensibility of coverage. Additional clusters can be added; networks can be consolidated or split up.

7.3.3 Network Layer Security

The NWK layer also makes use of the Advanced Encryption Standard (AES). However, unlike the MAC layer, the security suites are all based on the CCM mode of operation. The CCM mode of operation is a minor modification of the CCM mode used by the MAC layer. It includes all of the capabilities of CCM and additionally offers encryption-only and integrity-only capabilities. These extra capabilities simplify the NWK layer security by eliminating the need for CTR and CBC-MAC modes. Also, the use of CCM in all security suites allows a single key to be used for different suites. Since a key is not strictly bound to a single security suite, an application has the flexibility to specify the actual security suite to apply to each NWK frame, not just whether security is enabled or disabled When the NWK layer transmits (receives) a frame using a particular security suite it uses the Security Services Provider (SSP) to process the frame. The SSP looks at the destination (source) of the frame, retrieves the key associated with that destination (source), and then applies the security suite to the frame. The SSP provides the NWK layer with a primitive to apply security to outgoing frames and a primitive to verify and remove security from incoming frames. The NWK layer is responsible for the security processing, but the upper layers control the processing by setting up the keys and determining which CCM security suite to use for each frame. Similar to the MAC layer frame format, a frame sequence count and MIC may be added to secure a NWK frame.

7.4 Application Layer. The ZigBee application layer consists of the APS sub-layer, the ZDO and the manufacturer-defined application objects. The responsibilities of the APS sub-layer include maintaining tables for binding, which is the ability to match two devices together based on their services and their needs, and forwarding messages between bound devices. Another responsibility of the APS sub-layer is discovery, which is the ability to determine which responsibilities of the ZDO include defining the role of the device within the network (e.g. ZigBee coordinator or end device), y initiating and/or responding to binding requests and y establishing a secure relationship between network devices. The manufacturer-defined application objects implement the actual applications according to the ZigBee- defined application descriptions.

7.4.1 Application Support Layer This layer provides the following services: Discovery: The ability to determine which other devices are operating in the personal operating space of a device. Binding: The ability to match two or more devices together based on their services and their needs and forwarding messages between bound devices. 7.4.2 General Operation Framework : The General Operation Framework (GOF) is a glue layer between applications and rest of the protocol stack. The GOF currently covers various elements that are common for all devices. It includes subaddressing and addressing modes and device descriptions, such as type of device, power source, sleep modes, and coordinators. Using an object model, the GOF specifies methods, events, and data formats that are used by application profiles to construct set/get commands and their responses. Actual application profiles are defined in the individual profiles of the IEEE's working groups. Each ZigBee device can support up to 30 different profiles. Currently, only one profile, Commercial and Residential Lighting, is defined. It includes switching and dimming load controllers, corresponding remote-control devices, and occupancy and light sensors. The ZigBee stack is small in comparison to other wireless standards. For network-edge devices with limited capabilities, the stack requires about 4Kb of the memory. Full implementation of the protocol stack takes less than 32Kb of memory. The network coordinator may require extra RAM for a node devices database and for transaction and pairing tables. The 802.15.4 standard defines 26 primitives for the PHY and MAC layers; probably another dozen will be added after finalizing the NWK layer specification. Those numbers are still modest compared to 131 primitives defined for Bluetooth. Such a compact footprint enables you to run Zigbee on a simple 8-bit microcontroller such as an HC08- or 8051-based processor core.

Figure 4: A typical ZigBee-enabled device will consist of RF IC and 8-bit microprocessor with peripherals connected to an application sensor or actuators A typical ZigBee-enabled device includes a radio frequency integrated circuit (RF IC) with a partially implemented PHY layer connected to a low-power, low-voltage 8-bit microcontroller with peripherals, connected to an application sensor or actuators. The protocol stack and application firmware reside in on-chip flash memory. The entire ZigBee device can be compact and cost efficient. The focus of network applications under the ZigBee standard include the features of low power consumption, needed for only two major modes (Tx/Rx or Sleep), high density of nodes per network, low costs and simple implementation. 7.4.3 ZigBee Device Types ZigBee devices are required to conform to the IEEE 802.15.4-2003 Low- Rate Wireless Personal Area Network (WPAN) standard. ZigBee wireless devices are expected to transmit 10-75 meters, depending on the RF environment and the power output consumption required for a given application, and will operate in the unlicensed RF worldwide (2.4GHz global, 915MHz Americas or 868 MHz Europe). The data rate is 250 kbps at 2.4 GHz, 40 kbps at 915 MHz and 20 kbps at 868 MHz. There are three different ZigBee device types that operate on these layers in any self-organizing application network. These devices have 64-bit IEEE addresses, with option to enable shorter addresses to reduce packet size, and work in either of two addressing modes ± star and peer-to-peer.

ZigBee (PAN) Coordinator (ZC) node

The most capable device, the coordinator forms the root of the network tree and might bridge to other networks. It is able to store information about the network. There is one, and only one, ZigBee coordinator in each network to act as the router to other network. It also acts as the repository for security keys.

Features ±One and only one required for each ZB network. ±Initiates network formation. ±Acts as 802.15.4 2003 PAN coordinator (FFD). ±May act as router once network is formed. ±Not necessarily dedicated device, can perform applications.

ZigBee Router (ZR)

±Optional network component. ±May associate with ZC or with previously associated ZR.±Acts as 802.15.4 2003 coordinator (FFD).  The FFD is an intermediary router transmitting data from other devices. It needs lesser memory than the ZigBee coordinator node, and entails lesser manufacturing costs. It can operate in all topologies and can act as a coordinator ±Local address (destination) allocation/de-allocation. ±Participates in multi hop routing of messages. ±Looks after its own ZigBee End Device (ZEDs) (broadcasting/routing).  Optional network component.  Shall not allow association.  Shall not participate in routing.  Low power operation; put to sleep by parent.

The Reduced Function Device (RFD) :

This device is just capable of talking in the network; it cannot relay data from other devices. Requiring even less memory, (no flash, very little ROM and RAM), an RFD will thus be cheaper than an FFD. This device talks only to a network coordinator and can be implemented very simply in star topology. 7.4.4 ZigBee Device Object
y y y

Defines the role of the device within the network (e.g. ZigBee coordinator or end device) Initiates and/or responds to binding requests Establishes a secure relationship between network devices selecting one of ZigBee¶s security methods such as public key, symmetric key etc.

10. ZigBee Routing Mechanism
ZigBee routing algorithm ZigBee routing algorithm can be thought of a hierarchical routing strategy with tabledriven optimizations applied where possible. The routing layer is said to start with the well-studied public domain algorithm Ad hoc On Demand Distance Vector (AODV) and Motorola¶s Cluster-Tree algorithm. 10.1 AODV : Ad hoc On Demand Distance Vector AODV is a pure on-demand route acquisition algorithm: nodes that do not lie on active paths neither maintain any routing information nor participate in any periodic routing table exchanges. Further, a node does not have to discover and maintain a route to another node until the two needs to communicate, unless the former node is offering services as an intermediate forwarding station to maintain connectivity between two other nodes. The primary objectives of the algorithm are to broadcast discovery packets only when necessary, to distinguish between local connectivity management and general topology maintenance and to disseminate information about changes in local connectivity to those neighbouring mobile nodes that are likely to need the information. When a source node needs to communicate with another node for which it has no routing information in its table, the Path Discovery process is initiated. Every node maintains two separate counters: sequence number and broadcast id. The source node initiates path discovery by broadcasting a route request (RREQ) packet to its neighbours, which includes source addr, source sequence number, broadcast id, dest addr, dest sequence number, hop cnt. (Source sequence number is for maintaining freshness information about the reverse route whereas the destination sequence number is for maintaining freshness of the route to the destination before it can be accepted by the source.) The pair source addr, broadcast id uniquely identifies a RREQ, where broadcast id is incremented whenever the source issues a new RREQ. When an intermediate node receives a RREQ, if it has already received a RREQ with the same broadcast id and source address, it drops the redundant RREQ and does not rebroadcast it. Otherwise, it rebroadcasts it to its own neighbours after increasing hop cnt. Each node keeps the following information: destination IP address, source IP address, broadcast id, expiration time for reverse path route entry and source node¶s sequence number. As the RREQ travels from a source to destinations, it automatically sets up the reverse path from all nodes back to the source. To set up a reverse path, a node records the address of the neighbour from which it received the first copy of RREQ. These reverse path route entries are maintained for at least enough time for the RREQ to traverse the network and produce a reply to the sender. When the RREQ arrives at a node, possibly the destination itself that possesses a current route to the destination, the receiving node first checks that the RREQ was received over a bi-directional link. If this node is not destination but has route to the destination, it determines whether the route is current by comparing the destination sequence number in its own route entry to the destination sequence number in the RREQ. If RREQ¶s sequence number for the destination is greater than that recorded by the intermediate node, the

intermediate node must not use this route to respond to the RREQ, instead rebroadcasts the RREQ. If the route has a destination sequence number that is greater than that contained in the RREQ or equal to that contained in the RREQ but a smaller hop count, it can unicasts a route reply packet (RREP) back to its neighbour from which it received the RREQ. A RREP contains the following information: source addr, dest addr, dest sequence number, hopcnt and lifetime. As the RREP travels back to the source, each node along the path sets up a forward pointer to the node from which the RREP came, updates its timeout information for route entries to the source and destination, and records the latest destination sequence number for the requested destination. Nodes that are along the path determined by the RREP will timeout after route request expiration timer and will delete the reverse pointers since they are not on the path from source to destination as shown in Figure 5.1. The value of this timeout time depends on the size of the ad hoc network.

10.2 Cluster-Tree Algorithm The cluster-tree protocol is a protocol of the logical link and network layers that uses link-state packets to form either a single cluster network or a potentially larger cluster tree network. The network is basically self-organized and supports network redundancy to attain a degree of fault resistance and self-repair. Nodes select a cluster head and form a cluster according to the self-organized manner. Then self-developed clusters connect to each other using the Designated Device (DD).
10.2.1 Single Cluster Network

The cluster formation process begins with cluster head selection. After a cluster head is selected, the cluster head expands links with other member nodes to form a cluster. After a node turns on, it scans the channels to search for a HELLO message form other

nodes (HELLO messages correspond to beacons in MAC layer of IEEE 802.15.4). If it can¶t get any HELLO messages for a certain time, then it turns to a cluster head as shown in Figure 10.2 and sends out HELLO messages to its neighbours. The new cluster head wait for responses from neighbours for a while. If it hasn¶t received any connection requests, it turns back to a regular node and listens again. The cluster head can also be selected based on stored parameters of each node, like transmission range, power capacity, computing ability or location information.

Figure 10.2: Cluster head selection process. After becoming the cluster head (CH), the node broadcasts a periodic HELLO message that contains a part of the cluster head MAC address and node ID 0 that indicates the cluster head. The nodes that receive this message send a CONNECTION REQUEST message to the cluster head. When the CH receives it, it responds to the node with a CONNECTION RESPONSE message that contains a node ID for the node (node ID corresponds to the short address at the MAC layer). The node that is assigned a node ID replies with an ACK message to the cluster head. The message exchange is shown in

Figure 10.3.

Figure 10.3: Link setup between CH and member node. If all nodes are located in the range of the cluster head, the topology of connection becomes a star and every member nodes are connected to the cluster head with one hop. A cluster can expand into a multi-hop structure when each node supports multiple connections. The message exchange for the multi hop cluster set up procedure is shown in Figure 10.4.

Figure 10.4: Multi hop cluster setup procedure. If the cluster head has run out of all node IDs or the cluster has reached some other defined limit, it should reject connection requests from new nodes. The rejection is through the assignment of a special ID to the node. The entry of the neighbour list and the routes is updated by the periodic HELLO message. If a node entry does not update until a certain timeout limit, it should be eliminated. A node may receive a HELLO message from a node that belongs to different cluster. In that case, the node adds the cluster ID (CID) of the transmitting node in the neighbour list and then sends it inside a LINK STATE REPORT to the CH so that CH knows which clusters its cluster has intersection.

The LINK STATE REPORT message also contain the neighbors node ID list of the node so that the CH knows the complete topology to make topology optimizations. If the topology change is required, then the CH sends a TOPOLOGY UPDATE message. If a member receives a TOPOLOGY UPDATE message that the different parent node is linked to the node, it changes the parent node as indicated in the message. And it also records its child nodes and the nodes below it in the tree at this time. If a member node has trouble and becomes unable to communicate, the tree route of the cluster would be reconfigured. The CH knows the presence of a trouble by the periodic LINK STATE REPORT. When the cluster head has trouble, the distribution of HELLO message is stopped and all member nodes know that they have lost the CH. The cluster would then be reconfigured in the same way as the cluster formation process.
10.2.2 Multi-Cluster Network

To form a network, a Designated Device (DD) is needed. The DD has responsibility to assign a unique cluster ID to each cluster head. This cluster ID combined with the node ID that the CH assigns to each node within a cluster forms a logical address and is used to route packets. Another role of the DD is to calculate the shortest route from the cluster to the DD and inform it to all nodes within the network. When the DD joins the network, it acts as the CH of cluster 0 and starts to send HELLO message to the neighborhood. If a CH has received this message, it sends a CONNECTION REQUEST message and joins the cluster 0. After that, the CH requests a CID to the DD. In this case, the CH is a border node that has two logical addresses. One is for a member of the cluster 0 and the other is for a CH. When the CH gets a new CID, it informs its member nodes by the HELLO message.

fig : CH as a border node

If a member has received the HELLO message from the DD, it adds CID 0 in its neighbor list and reports to its CH. The reported CH selects the member node as a border node to its parent cluster and sends a network connection request message to the member node to set up a connection with the DD. The border node requests a connection and joins the cluster 0 as its member node. Then it sends a CID REQUEST message to the DD. After the CID RESPONSE message arrival, the border node sends NETWORK CONNECTION RESPONSE message that contains a new CID to the CH when the CH gets a new CID, it informs to its member nodes by the HELLO message. The clusters not bordering cluster 0 use intermediate clusters to get a CID. Again, either the CH becomes the border node to its parent cluster or the CH names a member node as the border to its parent cluster. Each member node of the cluster has to record its parent cluster, child/lower clusters and the border node IDs associated with both the parent and child clusters. The DD should store the whole tree structure of the clusters. Like the nodes in the clusters, the CHs report their link state information to the DD. The CH periodically sends a NETWORK LINK STATE REPORT message that contains its neighbor cluster CID list to the DD. Then this information can be used to calculate the optimized route and periodically update the topology for the network redundancy. In the same way, the DD can send TOPOLOGY UPDATE message to inform up-to-date route from the DD to the clusters. A backup DD (BDD) can be prepared to prevent network down time due to the DD trouble. Inter-cluster communication, which is shown in Figure 6.9, is realized by routing. The border nodes act as routers that connect clusters and relay packets between the clusters. When a border node receives a packet, it examines the destination address, then forwards to the next border node in the adjacent cluster or to the destination node within the cluster. Only the DD can send a message to all the nodes within its network. The message is forwarded along the tree route of clusters. The border node should forward the broadcast packet from the parent cluster to the child cluster.

11. How ZigBee Works?

ZigBee basically uses digital radios to allow devices to communicate with one another. A typical ZigBee network consists of several types of devices. A network coordinator is a device that sets up the network, is aware of all the nodes within its network, and manages both the information about each node as well as the information that is being transmitted/received within the network. Every ZigBee network must contain a network coordinator. Other Full Function Devices (FFD's) may be found in the network, and these devices support all of the 802.15.4 functions. They can serve as network coordinators, network routers, or as devices that interact with the physical world. The final device found in these networks is the Reduced Function Device (RFD), which usually only serve as devices that interact with the physical world. An example of a ZigBee network is shown below in Figure 1.

Figure 1. ZigBee Network [11]. The figure above introduces the concept of the ZigBee network topology. Several topologies are supported by ZigBee, including star, mesh, and cluster tree. Star and mesh networking are both shown in the figure above. As can be seen, star topology is most useful when several end devices are located close together so that they can communicate with a single router node.

That node can then be a part of a lar er me h network that ultimately communicate with the network coordinator Me h networkin allow for redundancy in node link , o that if one node oe down, device can find an alternative path to communicate with one another Fi ure below provide an example of how me h networkin allow for multiple path between device


Fi ure . Mesh Networki

Path 2 [7].


Fi ure . Mesh Networki

Path 2 [7].

Fi ure . Mesh Networki

Path 1 [7].


Fi ure . Mesh Networki .

Path 2 [7].

Fi ure . Mesh Networki

Path 2 [7].

ZigBee operates in two main modes: y non-beacon mode and y beacon mode. Beacon mode is a fully coordinated mode in which all the devices know when to coordinate with one another. In this mode, the network coordinator will periodically "wake-up" and send out a beacon to the devices within its network. This beacon subsequently wakes up each device, who must determine if it has any message to receive. If not, the device returns to sleep, as will the network coordinator, once its job is complete. Non-beacon mode, on the other hand, is less coordinated, as any device can communicate with the coordinator at will. However, this operation can cause different devices within the network to interfere with one another, and the coordinator must always be awake to listen for signals, thus requiring more power. In any case, ZigBee obtains its overall low power consumption because the majority of network devices are able to remain inactive over long periods of time.

12. ZigBee Security
When security of MAC layer frames is desired, ZigBee uses MAC layer security to secure MAC command, beacon, and acknowledgment frame. ZigBee may secure messages transmitted overPage single hop using secured MAC data frames, but for multihop messaging ZigBee relies upon upper layers (such as the NWK layer) for security. The MAC layer uses the Advanced Encryption Standard (AES) as its core cryptographic algorithm and describes a variety of security suites that use the AES algorithm. These suites can protect the confidentiality, integrity, and authenticity of MAC frames. The MAC layer does the security processing, but the upper layers, which set up the keys and determine the security levels to use, control this processing. When the MAC layer transmits (receives) a frame with security enabled, it looks at the destination (source) of the frame, retrieves the key associated with that destination (source), and then uses this key to process the frame according to the security suite designated for the key being used. Each key is associated with a single security suite and the MAC frame header has a bit that specifies whether security for a frame is enabled or disabled.

13. Licensing

For non-commercial purposes, the ZigBee specification is available free to the general public. An entry level membership in the ZigBee Alliance, called Adopter, provides access to the as-yet unpublished specifications and permission to create products for market using the specifications. The click through license on the ZigBee specification requires a commercial developer to join the ZigBee Alliance. "No part of this specification may be used in development of a product for sale without becoming a member of ZigBee Alliance." The annual fee conflicts with the GNU General Public License. From the GPL v2, "b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License." Since the GPL makes no distinction between commercial and non-commercial use it is impossible to implement a GPL licensed ZigBee stack or combine a ZigBee implementation with GPL licensed code. The requirement for the developer to join the ZigBee Alliance similarly conflicts with most other Free software licenses.

14. ZigBee Applications

The ZigBee Alliance targets applications ³Across consumer, commercial, industrial and government markets worldwide´. Unwired applications are highly sought after in many networks that are characterized by numerous nodes consuming minimum power and enjoying long battery lives. ZigBee technology is designed to best suit these applications, for the reason that it enables reduced costs of development, very fast market adoption and rapid ROI.. For the last few years, we have witnessed a great expansion of remote control devices in our day-to-day life. Five years ago, infrared (IR) remotes for the television were the only such devices in our homes. Now the number of devices is uncountable. This number will only increase as more devices are controlled or monitored from a distance. To interact with all these remotely controlled devices, we will need to put them under a single standardized control interface that can interconnect into anetwork, specifically a HAN or home-area network. ZigBee applications can be divided into the following groups. y Home networking y Industrial control and management y Human and computer interface y Smart dust y Intrusion sensors, motion detectors and glass break detectors.

15. ZigBee Future

16. Conclusion
Bluetooth has already matured and graduated to version 1.2 after its initial hype. Lots of products compliant to Bluetooth version 1.1 are available on the market. Will ZigBee be able to compete with Bluetooth in the market? And if yes, will it replace Bluetooth? This question is asked by the people where since ZigBee came to the market. We have already seen all the aspects of both ZigBee and Bluetooth. And hence can be concluded that ZigBee and Bluetooth are two solutions for two different application areas. The differences are from their approach to their desired application. Bluetooth has addressed a voice application by embodying a fast frequency hopping system with a master slave protocol. ZigBee has addressed sensors, controls, and o ther short message applications by embodying a direct sequence system with a star or peer-topeer protocols. Minor changes to Bluetooth or ZigBee won¶t change their inherent behaviour or characteristics. The different behaviours come from architectural differences.

17. Bibliography
[1] http://www.standards.ieee.org [2] http://www.sigbee.org/en/about/initial_m...p_home.asp [3] http://www.zigbee.org/en/documents/zigbeeoverview4.pdf [4] http://www.palowireless.com/zigbee/tutorials.asp [5] http://www.zigbee.org/en/resources/03141...nology.doc [6] http://en.wikipedia.org/wiki/Zigbee [7] Behrouz A. Frouzan, ³Data Communication´, Third Edition, Tata McGraw-Hill Publishing company Limitted, 2004 [8]Andrew S. Tenenbaum, ³Computer Networks´, Fourth Edition Pearson Publication Limited, 2003 [9] William Stalling, ³Wireless Communication and Networks´, Fourth Edition, Pearson Publication Limited, 2004 [10]James Kurose & Keith W. Ross, ³Computer Networks´, Fourth Edition, Pearson Publication Limited, 2

Sign up to vote on this title
UsefulNot useful