zigbee networks

Upload: shouibm

Post on 10-Apr-2018

224 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/8/2019 ZigBee Networks

    1/51

    ABSTRACT

    Wireless connectivity ofavast number of industrial and home applications

    has modest transmission data requirements, but demands reliable and secure

    communication using simple low-cost and low-power radio systems. In the quest for high-

    bandwidth, multimedia-capable wireless networks, the need for cost and power-effective

    radio solutionsfor this vast number of fairlysimpleapplicationswas only recentlyaddressed

    bya standardized technology.

    The IEEE 802.15.4 standard and ZigBee wireless technology are designed tosatisfy the market's need for a low-cost, standard-based and flexible wireless network

    technology,which offers low powerconsumption, reliability, interoperability and security for

    controlandmonitoringapplications withlow tomoderate data rates.

    The complexity and cost of the IEEE802.15.4/Zigbee-compliant devices are

    intended to be low and scalable (application dependent) in order to enable broad

    commercial adaptation in cost-sensitive applications. In addition, the compliant system

    implementations will enable long battery life by using the power-saving featuresat the

    physical, MACandnetwork layers specified by thisstandard.

    In this respect, the implementation of the physical layer of the IEEE 802.15.4

    standard, including the RF, IF and de-modulation must be optimized to meet the

    challenginglow-cost and low-powertargets.

    Seminar Re ort 06-07 1 Zi Bee Networks

    Department of Electronics & Communication Vimal Jyothi Engineering College

  • 8/8/2019 ZigBee Networks

    2/51

    TABLE OF CONTENTS

    CHAPTER1: INTRODUCTI ON 06

    1.1 EVOLUTION OF LR-WPAN STANDARDIZATION 06

    1.2 ZigBeeAND IEEE 802.15.4 07

    1.3 WHY IS ZigBee NEEDED 08

    1.4 ZigBeeAND BLUETOOTH 09

    1.5 WIRELESSTECHNOLOGY COMPARISON CHART 10

    CHAPTER 2: ZIGBEE /IEEE 802.15. 4 WPAN 12

    2.1 COMPONENTS OFWPAN 12

    2.2 NETWORK TOPOLOGIES 12

    2.2.1 STARTOPOLOGY 12

    2.2.2 PE ER-TO-PEERTOPOLOGY 13

    2.2.3 CLUSTER-TREE TOPOLOGY 14

    2.3 ZIGBEE ARCHITECTURE 15

    CHAPTER3: IEEE 802.15. 4 PHY 17

    3.1 RECEIVER ENERGY DETECTION (ED) 19

    3.2LINK QUALITY INDICATION(LQI) 19

    3.3CLEAR CHANNEL ASSESSMENT(CCA) 20

    3.4 PPDU FORMAT 20

    CHAPTER 4: IEEE 802.15. 4MAC 22

    4.1 FRAME STRUCTURE 22

    4.2 CHANNELACCESS AND ADDRESSING 23

    4.3SUPER FRAME STRUCTURE 24

    4.4 CSMA-CA ALGORITHM 25

    4.5 DATA TRANSFERMODEL 26

    4.6 MAC LAYER SECURITY 28

    Seminar Re ort 06-07 2 Zi Bee Networks

    Department of Electronics & Communication Vimal Jyothi Engineering College

  • 8/8/2019 ZigBee Networks

    3/51

    TABLE OF CONTENTS(2)

    CHAPTER5: NERWORK LAYER 31

    5.1 ZIGBEE NETWORKNODE 32

    5.2 RESPONSIBILITIES OFTHE ZIGBEENWK LAYER 32

    5.3 NETWORK LAYER SECURITY 33

    CHAPTER6: ZIGBEEROUTING MECHANISM 35

    6.1AODV: AD HOCON DEMAND DISTANCE VECTOR 35

    6.2 CLUSTER-TREEALGORITHM 38

    6.2.1 SINGL E CLUSTER NETWORK 38

    6.2.2 MULTI-CLUSTER NETWORK 41

    CHAPTER7: APPLICATION LAYER 46

    7.1 APPLICATION SUPPORT LAYER 46

    7.2 THEGENERAL OPERATION FRAMEWORK(GOF) 46

    7.3 ZIGBEE DEVICE 47

    7.4 ZIGBEE DEVICEOBJECTS 47

    CHAPTER8:ZIGBEE - APPLICATIONS 48

    8.1 PRODUCT EXAMPLES 49

    8.2 HOME& DIAGNOSTICS EXAMPLES 49

    ZIGBEE:CONCLUSION 50

    ZIGBEE: BIBLIOGRAP HY 51

    Seminar Re ort 06-07 3 Zi Bee Networks

    Department of Electronics & Communication Vimal Jyothi Engineering College

  • 8/8/2019 ZigBee Networks

    4/51

    ZigBee

    CHAPTER 1

    INTRODUCTION

    Seminar Re ort 06-07 4 Zi Bee Networks

    Department of Electronics & Communication Vimal Jyothi Engineering College

  • 8/8/2019 ZigBee Networks

    5/51

    INTRODUCTION 1

    1.1Evolution of LR-WPAN StandardizationThe cellular network was a natural extension of the wired telephony network that

    became pervasive during the mid-20th century. As the need for mobility and the

    cost of laying new wires increased, the motivation for a personal connection

    independent of location to that network also increased. Coverage of large area is

    provided through (1-2km) cells that cooperate with their neighbors to create a

    seemingly seamless network. Examplesofstandards areGSM, IS-136, IS-95. Cellular

    standards basicallyaimedat facilitating voice communicationsthroughouta metropolitan

    area.

    During the mid-1980s, it turned out thatan even smallercoveragearea is needed for

    higher user densities and the emergent data traffic. The IEEE 802.11 working group

    for WLANsisformedto create a wireless localarea network standard.

    Whereas IEEE 802.11 was concerned with features such as Ethernet matching

    speed, long-range(100m), complexity to handle seamless roaming, message

    forwarding, and data throughput of 2-11Mbps, WPANs are focused on a space

    around a person or object that typically extends up to 10m in all directions. Thefocus of WPANs is low-cost, low power, short range and very small size. The

    IEEE802.15 working group is formed to create WPAN standard. This group has

    currently defined three classes of WPANs that are differentiated by data rate, battery

    drain and quality of service (QoS). The high data rate WPAN (IEEE 802.15.3) is

    suitable formulti-media applications that requirevery high QoS.Medium rateWPANs

    (IEEE802.15.1/Blueetooth) will handle a variety of tasks ranging from cell phones to

    PDA communications and haveQoSsuitableforvoice communications. The low rate

    WPANs (IEEE 802.15.4/LR-WPAN) is intended to serve a set of industrial,residential and medical applications with very low power consumption and cost

    requirement notconsidered by the above WPANs and with relaxed needs for data rate

    and QoS. The low data rate enables the LR-WPAN to consume very little power.

    Seminar Re ort 06-07 5 Zi Bee Networks

    Department of Electronics & Communication Vimal Jyothi Engineering College

  • 8/8/2019 ZigBee Networks

    6/51

    1.2 ZigBee and IEEE 802.15.4

    ZigBee technology is a low data rate, low power consumption, low cost; wireless

    networking protocol targeted towards automation and remote control applications.

    IEEE 802.15.4 committee started working on a low data rate standard a short while

    later. Then the ZigBee Alliance and the IEEE decided to join forces and ZigBee is the

    commercialnamefor this technology.

    ZigBee is expected toprovide lowcostand low power connectivity for equipment that

    needs battery life as long as several months to several years but does not require

    data transfer rates as high as those enabled by Bluetooth. In addition, ZigBee

    can be implemented in mesh networks larger than is possible with Bluetooth.

    ZigBee compliant 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.4GHzglobal,

    915MHz in USA OR868MHz in Europe). Thedata rate is 250kbps at2.4GHz, 40kbps

    at915MHz and 20kbps at868MHz.

    IEEE and ZigBee Alliance have been working closely to specify the entire protocol

    stack. IEEE 802.15.4 focuses on the specification of the lower two layers o f the

    protocol (physical and data link layer). On the other hand, ZigBee Alliance aims to

    provide theupper layers ofthe protocol stack(fromnetwork totheapplication layer) forinteroperable data networking, security services and a range of wireless home and

    building control solutions, provide interoperability compliance testing, marketing of the

    standard, advanced engineering for the evolution of the standard. This will assure

    consumers to buy products from different manufacturers with confidence that the

    products will work together.

    IEEE 802.15.4 is now detailing the specification of PHY and MAC by offering

    building blocks for different types of networking known as star, mesh, and cluster

    tree. Networkrouting schemesare designed to ensurepower conservation, and lowlatency through guaranteed time slots. A unique feature ofZigBee network layer iscommunication redundancy eliminating single point of failure in mesh networks.

    Key features of PHY include energy and link quality detection, clear channel

    assessmentforimproved coexistencewith other wirelessnetworks.

    Seminar Re ort 06-07 6 Zi Bee Networks

    Department of Electronics & Communication Vimal Jyothi Engineering College

  • 8/8/2019 ZigBee Networks

    7/51

    1.3 Why is ZigBee Needed?

    There are a multitude of standards like Bluetooth and WiFi that address mid to high

    data rates for voice, PC LANs, video, etc. However, up till now there hasn't been awireless network standard that meets the unique needs of sensors a n d 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 theirapplication requirements. These legacy systems

    are creating significant interoperability problems with each other and with newer

    technologies.

    ZigBeeis poisedto become the global control/sensor networkstandard. It hasbeen

    designed to provide the following features:

    Low powerconsumption, simply implemented

    Users expect batteries to last many months to years!Consider thata 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

    batteriesevery month!

    In contrast to 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

    applicationsoftware needs to focus on theapplication, not onwhich power

    mode is optimumforeachaspect of operation.

    Even mains powered equipment needs to be conscious of energy. ZigBee

    devices will be more ecological than their predecessors saving megawattsat it

    full deployment. Consider a future home that has 100 wirelesscontrol/sensor devices,

    o Case 1: 802.11 Rx power is 667 mW (always on)@ 100

    Devices/home & 50,000homes/city=3.33 megawatts

    o Case 2: 802.15.4 Rx power is 30 mW (always on)@ 100

    Devices/home & 50,000homes/city=150 kilowatts

    Seminar Re ort 06-07 7 Zi Bee Networks

    Department of Electronics & Communication Vimal Jyothi Engineering College

  • 8/8/2019 ZigBee Networks

    8/51

    o Case3: 802.15.4 powercycled at.1% (typicaldutycycle) = 150 watts

    Low cost to the users means lowdevicecost, low installationcost and low

    maintenance.

    o ZigBeedevices allow batteriesto lastup 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

    networkdevices provides lowmaintenance.

    Highdensity of nodes per network

    o 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

    o ZigBee's protocol code stack is estimated to be about 1/4th of

    Bluetooth's or 802.11's. Simplicityis essentialto 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 GHzband is nowrecognized to be a

    global bandaccepted in almost allcountries.

    1.4 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 runfor six months totwoyears onjusttwo AA

    batteries.

    The operational range of ZigBee is 10-75m compared to10m for Bluetooth

    (without a poweramplifier).

    ZigBeesits belowBluetooth in termsof data rate.

    Thedata rate ofZigBee is

    250kbpsat 2.4GHz, 40kbpsat 915MHz and 20kbpsat 868MHzwhereas that of

    Bluetoothis 1Mbps.

    ZigBee uses a basic master-slave configurationsuitedto static star networks of

    many infrequently used devices that talkvia small data packets. It allows up to

    254 nodes. Bluetooths protocol is more complex since it is geared towards

    Seminar Re ort 06-07 8 Zi Bee Networks

    Department of Electronics & Communication Vimal Jyothi Engineering College

  • 8/8/2019 ZigBee Networks

    9/51

    handling voice, images and file transfers in ad hoc networks. Bluetooth

    devices can support scatter nets of multiple smaller non-

    synchronizednetworks(piconets). Itonly allows upto 8 slave nodes in a basic

    master-slave piconetset-up.

    When ZigBee node ispowereddown, it can wake up and get a packet in

    around15msecwhereas a Bluetooth device would takearound3sec towake up

    and respond.

    ZigBee and Bluetooth are twosolutions 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.

    1.5 Wireless technology comparison chart

    Wi-Fi Bluetooth WiMAX WiMedia ZigBee

    Primary

    Use

    Laptopnetworking

    Cable replacement,cellphones

    Wireless broadbandInternet access

    Multimedia consumerelectronics

    Sensor networks,industrial control

    LAN type WLAN WPAN WMAN WPAN WPAN

    IEEE 802.11n 802.15.1 802.16 802.15.3 802.15.4

    Standards Wi-Fi Alliance Bluetooth SIG WiMAX Forum WiMedia Alliance ZigBee Alliance

    URL wi-fi.org bluetooth.org wimaxforum.org wimedia.org zigbee.org

    Range(m) 100m 10-100m 50km 4-10m 30-70m

    Bands 2.4 GHz 2.4 GHz 2.5 GHz, 3.5 GHz 3.1-10.6 GHz2.4 GHz, 866/900

    MHz

    DataSpeeds 11-54 Mbps 1 Mbps 280 Mbps 110-480 Mbps 20-250Kbps

    BOM (US$) 9 6 150 20 3

    Battery Life Hours Days N/A Days-weeks Months-years

    Seminar Re ort 06-07 9 Zi Bee Networks

    Department of Electronics & Communication Vimal Jyothi Engineering College

  • 8/8/2019 ZigBee Networks

    10/51

    ZigBee

    CHAPTER 2

    ZigBee / IEEE 802.15.4 WPLAN

    2.0 ZigBee / IEEE 802.15.4 WPAN

    Seminar Re ort 06-07 10 Zi Bee Networks

    Department of Electronics & Communication Vimal Jyothi Engineering College

  • 8/8/2019 ZigBee Networks

    11/51

    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 ofheavy protocolstacks.

    2.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, operatingas the PANcoordinator.

    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 FFDcan talk to RFDs or

    FFDs while anRFD canonlytalk to an FFD.

    2.2 Network Topologies

    ZigBee supports 3 types of topologies - star topology, peer-to-peer topology and

    cluster tree topology.

    2.2.1 Star Topology

    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 poweredwhile the deviceswill most likely be batterypowered.Applications that

    benefit from this topology include home automation, personal computer (PC)

    peripherals, toysand games.

    After an FFD is activated for the first time, it may establish its own network and

    become the PANcoordinator. Eachstart networkchooses a PAN identifier, whichis not

    currently used by any other network within the radio sphere of influence. This allows

    each star networktooperate independently.

    2.2.2 Peer-to-peer Topology

    In peer-to-peer topology, there is also one PAN coordinator. In contrast to star

    topology, anydevicecan communicate with anyother device as long as they

    are in range of one another. A peer-to-peer network can be ad hoc, self-organizing

    Seminar Re ort 06-07 11 Zi Bee Networks

    Department of Electronics & Communication Vimal Jyothi Engineering College

  • 8/8/2019 ZigBee Networks

    12/51

    and self-healing.Applications such as industrial controland 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 multi path routing.

    2.2.3 Cluster-tree Topology

    Seminar Re ort 06-07 12 Zi Bee Networks

    Department of Electronics & Communication Vimal Jyothi Engineering College

  • 8/8/2019 ZigBee Networks

    13/51

    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 thePANcoordinator.

    The PANcoordinatorformsthefirstcluster by establishing itself as theclusterhead

    (CLH) with a cluster identifier (CID) of zero, choosing an unused PAN identifier, and

    broadcasting beacon frames to neighboring devices. A candidate device receiving a

    beacon frame may request to join the network at the CLH. If the PAN coordinator

    permits thedevice to join, it will add this new deviceas a child device in its neighbor list.

    The newly joined device will add the CLH as its parent in its neighbor 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.Theadvantageof this clustered structure is the increased coverage area

    atthe cost of increasedmessage latency.

    2.3 ZigBee Architecture

    Seminar Re ort 06-07 13 Zi Bee Networks

    Department of Electronics & Communication Vimal Jyothi Engineering College

  • 8/8/2019 ZigBee Networks

    14/51

    ZigBee architecture comprises a PHY, which contains the radio frequency (RF)

    transceiver along with its low-level control mechanism, and a MAC sublayer that

    provides access to the physical channel for all types of transfer. The upper layers

    consists of a network layer, which provides network configuration, manipulation, and

    message routing, and application layer, which provides the intended function of a

    device. An IEEE 802.2 logical link control (LLC) can access the MAC sublayer

    through the service specific convergence sublayer (SSCS). Chapter 3 describes the

    physical layerofIEEE802.15.4. Chapter4explainstheMAC layerof IEEE 802.15.4.

    Chapter 6 gives the routing mechanisms that aregoingto be used in the ZigBee.

    Seminar Re ort 06-07 14 Zi Bee Networks

    Department of Electronics & Communication Vimal Jyothi Engineering College

  • 8/8/2019 ZigBee Networks

    15/51

    ZigBee

    CHAPTER 3

    PHYSICAL LAYER

    PHYSICAL LAYER 3

    Seminar Re ort 06-07 15 Zi Bee Networks

    Department of Electronics & Communication Vimal Jyothi Engineering College

  • 8/8/2019 ZigBee Networks

    16/51

    3.0 IEEE 802.15.4 PHY

    The PHY provides two services: the PHY data service and PHY management

    service interfacing to the physical layer management entity (PLME). The PHY data

    service enables the transmission and reception of PHY protocol data units (PPDU)

    across thephysicalradio channel.

    The features of the PHY are activation and deactivation of the radio transceiver,

    energy detection (ED), link quality indication (LQI), channel selection, clear channel

    assessment (CCA) and transmitting as well as receiving packets across the

    physical medium.

    The standardofferstwo PHY optionsbased onthefrequency band. Bothare based on

    direct sequence spread spectrum(DSSS). The data rate is250kbpsat 2.4GHz, 40kbps

    at 915MHz and 20kbps at 868MHz. The higher data rate at 2.4GHz is attributed to

    a higher-order modulation scheme. Lower frequencies provide longer range due to

    lower propagation losses. Low rate can be translated into better sensitivity and

    larger coverage area. Higher rate means higher throughput, lower latency or lower

    duty cycle. This informationis summarized inthe table below.

    There is asingle channel between868and868.6MHz, 10 channels between902.0

    and 928.0MHz, and 16channels between 2.4 and 2.4835GHz as shown in

    Seminar Re ort 06-07 16 Zi Bee Networks

    Department of Electronics & Communication Vimal Jyothi Engineering College

  • 8/8/2019 ZigBee Networks

    17/51

    Figure 3.2.

    Several channels in different frequency bands enables the ability to relocate within

    spectrum. The standard also allows dynamic channel selection, a scan function

    that steps through a list of supported channels in search of beacon, receiver

    energydetection, link qualityindication, channel switching.

    Receiver sensitivities are -85dBm for 2.4GHz and -92dBm for 868/915MHz. The

    advantageof 6-8dB comes from the advantageof lower rate.The achievable range isa function of receiversensitivity and transmits power.The maximum transmit power shall conform with local regulations. A compliant

    device shall have its nominal transmit power level indicated by the PHY parameter,

    phyTransmitPower.

    Figure 3.2: Operating frequency bands.

    3.1 Receiver Energy Detection (ED)

    Channels 11-26 5 MHz2.4 GHzPHY

    Seminar Re ort 06-07 17 Zi Bee Networks

    Department of Electronics & Communication Vimal Jyothi Engineering College

    868MHz / 915MHz

    PHY868.3 MHz

    Channel 0 Channels 1-10

    928 MHz902 MHz

    2 MHz

  • 8/8/2019 ZigBee Networks

    18/51

    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 thechannel. TheED 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 decibelstoED values shall be linear with an accuracyof+ - 6dB.

    3.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 maybe implemented using receiver ED, asignal-to-noise estimation ora

    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 uniformlydistributedbetweenthese two limits.

    3.3 Clear Channel Assessment (CCA)

    Seminar Re ort 06-07 18 Zi Bee Networks

    Department of Electronics & Communication Vimal Jyothi Engineering College

  • 8/8/2019 ZigBee Networks

    19/51

    The clear channelassessment (CCA) isperformed according to atleastone of the

    following three methods:

    Energy above threshold. CCA shall report a busy medium upon detecting any

    energy abovethe 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 maybe aboveor belowthe EDthreshold.

    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 withenergy abovethe ED threshold.

    3.4 PPDU Format

    The PPDUpacket structure isillustrated inFigure 3.3.Each PPDU packetconsists of

    thefollowing basiccomponents:

    SHR,which allowsa receiving device tosynchronize and lock into thebit stream

    PHR,which containsframe lengthinformation

    Avariable lengthpayload,which carries theMAC sublayerframe.

    Figure 3.3: Format of thePPDU.

    Seminar Re ort 06-07 19 Zi Bee Networks

    Department of Electronics & Communication Vimal Jyothi Engineering College

  • 8/8/2019 ZigBee Networks

    20/51

    ZigBee

    CHAPTER 4

    MEDIA ACCESS CONTROL LAYER

    Seminar Re ort 06-07 20 Zi Bee Networks

    Department of Electronics & Communication Vimal Jyothi Engineering College

  • 8/8/2019 ZigBee Networks

    21/51

    MAC LAYER 4

    4.0 IEEE 802.15.4 MAC

    The MAC (Media access control) layer 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) acrossthe PHYdata service.

    The features of MAC sub layer are beacon management, channel access, GTS

    management, frame validation, acknowledged frame delivery, association and

    disassociation.

    4.1 Frame Structure

    The frame structures have been designed to keep the complexity to a 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 IEEE802.15.4 MACdefines four frame structures A beaconframe, usedby a coordinator totransmit beacons.

    Adata frame, used for all transfersofdata. An acknowledgment frame, usedfor confirming successful frame reception.

    A MAC command frame, used for handling all MACpeer entity control

    transfers.

    Thedataframe is illustrated below:

    Seminar Re ort 06-07 21 Zi Bee Networks

    Department of Electronics & Communication Vimal Jyothi Engineering College

  • 8/8/2019 ZigBee Networks

    22/51

    ThePhysical Protocol DataUnit isthe totalinformationsentoverthe air. As shown

    in the illustrationabove the Physical layeradds thefollowing overhead:

    Preamble Sequence 4 Octets Start of Frame Delimiter 1 Octet

    Frame Length 1 Octet TheMAC addsthe following overhead:

    Frame Control 2 Octets Data Sequence Number 1 Octet

    Address Information 4 20 Octets Frame Check Sequence 2

    Octets

    In summary 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).

    Please notethatthese numbersdonot include any security overhead.

    4.2Channel access and Addressing

    Two channel-access mechanisms are implemented in 802.15.4. For a non-

    beacon network,a standard ALOHA CSMA-CA (carrier-sense medium-accesswith

    collision avoidance) communicates with positive acknowledgement for successfully

    received packets. In abeacon-enabled network, a superframe structure is used to

    control channel access. The superframe is set up by the network coordinator to

    transmit beaconsat predetermined intervals (multiples of 15.38ms, up to252s)and

    provides16 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 candedicateup to sevenguaranteed time slots perbeacon 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 isusedin mesh networks to prevent asingle point of failurewithin the network.

    4.3 Super Frame Structure

    The LR-WPAN standard allows the optional use of a superframe structure. The

    format of the superframe isdefinedby the coordinator. Thesuperframe isbounded by

    network beacons,issent by the coordinator (SeeFigure4) and is divided into16 equally

    sized slots. The beacon frame is transmitted in the first slot of each superframe.

    Seminar Re ort 06-07 22 Zi Bee Networks

    Department of Electronics & Communication Vimal Jyothi Engineering College

  • 8/8/2019 ZigBee Networks

    23/51

    If a coordinatordoesnot wish touse a superframe structureit mayturn off the beacon

    transmissions. The beacons are used to synchronize the attached devices, to identify

    the PAN, and to describe the structure of the superframes. Any device wishing to

    communicate during thecontentionaccessperiod(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.

    Figure 4.1

    For 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, as

    shown in Figure5. ThePAN coordinator mayallocateup to seven of these GTSs and

    a GTS may occupy morethan one slot period. However, a sufficient portion of the CAP

    shall remain for contention based access of other networked devices or newdevices

    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 iscompletebefore the timeof thenext GTS or the end of the CFP.

    Figure 4.2

    4.4 CSMA-CA AlgorithmIf superframe structure is used in the PAN, then slotted CSMA-CA shall be used. If

    beacons are not being used in the PANorabeacon cannotbe located in abeacon-

    enabled network, unslotted CSMA-CA algorithm is used. In both cases, the

    algorithm is implemented using units of time called backoff periods, which is equal to

    aUnitBackoffPeriodsymbols.In slotted CSMA-CA channel access mechanism, the backoff period boundaries of

    every device in the PAN are aligned with the superframe slot boundaries of the

    Seminar Re ort 06-07 23 Zi Bee Networks

    Department of Electronics & Communication Vimal Jyothi Engineering College

  • 8/8/2019 ZigBee Networks

    24/51

    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 backoff period. In

    unslotted CSMA-CA, the backoff periods of one device do not need to be

    synchronizedto thebackoff periods of another device.

    Each device has 3 variables: NB, CW and BE. NB is the number of times the

    CSMA-CA algorithm was required to backoff while attempting the current

    transmission. It is initialized to 0 before every new transmission. CW is the

    contention window length, whichdefinesthenumber ofbackoff periods thatneed to be

    clear of activity before the transmission can start. It is initialized to 2 before each

    transmission attempt and reset to 2 each time thechannel is assessed to bebusy. CW

    isonlyused forslotted CSMA-CA.BE is the backoffexponent, which is related to how

    many backoff periods a device shall wait before attempting to assess the channel.

    Although the receiver of the device is enabled during the channel assessment

    portion of this algorithm, thedevice shalldiscard any frames received during thistime.

    In slotted CSMA-CA, NB, CW and BE are initialized and the boundary of the next

    backoffperiod islocated.In unslotted CSMA-CA, NBand BE are initialized(step1). The

    MAC layershall delayfora randomnumberof completebackoff periods in the range 0

    to 2BE - 1 (step2) then request thatPHY performs a CCA (clear channel assessment)

    (step 3). The MAC sublayer shall then proceed if the remaining CSMA-CA

    algorithm steps, the frame transmission, and anyacknowledgement can be completedbefore the end of the CAP. If the MAC sublayer cannot proceed, it shall wait until

    the start of the CAP in the next

    superframe and repeat the evaluation.

    If the channel is assessed to be busy (step 4), the MAC sublayer shall increment

    both NB and BE by one, ensuring that BE shall beno more thanaMaxBE. In slotted

    CSMA-CA, CWcan also be reset to 2. If the value of NB is less than or equal to

    macMaxCSMABackoffs, the CSMA-CA shall return to step 2, else the CSMA-CA

    shall terminate with a ChannelAccess Failure status.

    If the channel is assessed to be idle (step 5), in a slotted CSMA-CA, the MAC

    sublayer shall ensure that contention window is expired before starting

    transmission. For this, the MAC sublayer first decrements CW by one. If CW is not

    equal to 0, go to step 3 else start transmission on the boundary of the next backoff

    period. In the unslotted CSMA-CA,the MAC sublayer start transmission immediately if

    the channel isassessed to beidle.

    Seminar Re ort 06-07 24 Zi Bee Networks

    Department of Electronics & Communication Vimal Jyothi Engineering College

  • 8/8/2019 ZigBee Networks

    25/51

    4.5 Data Transfer model

    Three types ofdata transfer transactionsexist: from a coordinator toa device, from a

    device to a coordinator and between two peer devices. The mechanism for each of

    these transfers depend on whether the network supports the transmission ofbeacons. When a device wishes to transfer data in a nonbeacon-enabled network, it

    simply transmitsits data frame, using the unslottedCSMA-CA,to thecoordinator. There

    isalso an optional acknowledgement at theendas shown in Figure4.3.

    Figure 4.3: Communi cation to a coordinator in abeacon-enabled network.

    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 superframe structure. At the right time, it transmits its data

    frame, using slotted CSMA-CA, to the coordinator. There is an optional

    acknowledgement at the endas shownin Figure 4.4.

    Figure 4.4: Communicat ion to a coordinator in a non beacon-enabled n etwork.

    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 deviceperiodically listens to the network beacon, and if a message ispending, transmits a MAC command requesting this data, using slotted CSMA- CA.

    Seminar Re ort 06-07 25 Zi Bee Networks

    Department of Electronics & Communication Vimal Jyothi Engineering College

  • 8/8/2019 ZigBee Networks

    26/51

    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 isremoved from thelist ofpending messages in thebeaconas shown in Figure4.5.

    Figure 4.5: Communicat ion fromacoordinator in a be acon-enabled network.

    When a coordinator wishes to transfer data to a device in a nonbeacon-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, thecoordinator transmits a data frame with a zero-length payload to indicate that no

    data were pending.The device acknowledges this packet asshown in Figure4.6.

    Figure 4.6: Communi cation from a coordinator in a non beacon-enabled network.

    In a peer-to-peer network, every device can communicate with any other device in its

    transmission radius. Thereare two optionsforthis.In thefirst case, the nodewill listen

    constantly and transmit its data using unslotted CSMA-CA. In the second case, the

    nodessynchronize witheachotherso that they can savepower

    Seminar Re ort 06-07 26 Zi Bee Networks

    Department of Electronics & Communication Vimal Jyothi Engineering College

  • 8/8/2019 ZigBee Networks

    27/51

    4.6 MAC Layer Security

    When security of MAC layer frames is desired, ZigBee uses MAC layer security tosecure MAC command, beacon, and acknowledgement frames. ZigBee may secure

    messages transmitted over a single hop using secured MAC data frames, but for

    multi-hop 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 theframe, 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. Eachkeyis 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 framepayload isalso 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

    receiptof a frame, if aMIC is present, itisverifiedand if the payload is encrypted,it is

    decrypted. Sending devices will increase the frame count with every message sentand 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.

    Encryptionat the MAC layer isdoneusing AES in Counter (CTR) mode and integrityis

    done using AES in C ipher Block Chaining (CBC- MAC) mode [16]. A combination of

    encryption and integrity isdone usingamixtureof CTR and CBC- MAC modes called

    the CCM mode.

    Seminar Re ort 06-07 27 Zi Bee Networks

    Department of Electronics & Communication Vimal Jyothi Engineering College

  • 8/8/2019 ZigBee Networks

    28/51

    ZigBee

    CHAPTER 5

    NETWORK LAYER

    Seminar Re ort 06-07 28 Zi Bee Networks

    Department of Electronics & Communication Vimal Jyothi Engineering College

  • 8/8/2019 ZigBee Networks

    29/51

    NETWORK LAYER 5

    5.0 NWK LAYER

    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 networkcoordinator is responsible for starting anewnetwork and

    assigning an address to newly associated devices.

    The NWK layer supports multiple network topologies including star, cluster tree,

    and mesh, all ofwhich are shown in Figure5.1

    Figure 5.1: Network topologies

    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.

    Inamesh topology, theZigBee 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

    ZigBee End Device (RFD or FFD)

    ZigBee Router (FFD)

    ZigBee Coordinator (FFD)

    Mesh Link

    Seminar Re ort 06-07 29 Zi Bee Networks

    Department of Electronics & Communication Vimal Jyothi Engineering College

  • 8/8/2019 ZigBee Networks

    30/51

    we'll probablyneed).Using local

    addressing,you can configure simple networks of more than 65,000 (216

    ) nodes,

    thereby reducing address overhead.

    5.1 ZigBee Network Node

    Designed for battery poweredor high energy savings

    Searches for available networks

    Transfers data from its applicationasnecessary

    Determines whether datais pending

    Requests datafromthe network coordinator Cansleep for extended periods

    5.2 Responsibilities of the ZigBee NWK layer

    Starting a network: The ability tosuccessfullyestablishanewnetwork.

    Joining and leavinganetwork: The abilityto gainmembership (join) or relinquish

    membership (leave) anetwork.

    Configuring anewdevice: The abilityto sufficiently configure the stack for

    operation asrequired.

    Addressing: Theability of a ZigBee coordinator toassign addresses to devices

    joining the network.

    Synchronizationwithin a network: Theabilityfor a deviceto achieve

    synchronizationwith another device either through tracking beacons orby

    polling.

    Security: applying security to outgoingframes and removing security to

    terminating frames

    Routing: routing frames to theirintendeddestinations.

    The network layer builds upon the IEEE 802.15.4 MACs features to allow

    extensibility of coverage. Additional clusters can be added; networks can be

    consolidated or splitup.

    Seminar Re ort 06-07 30 Zi Bee Networks

    Department of Electronics & Communication Vimal Jyothi Engineering College

  • 8/8/2019 ZigBee Networks

    31/51

    5.3 Network Layer Security

    The NWK layer also makes use of the Advanced Encryption Standard (AES).

    However,unlike the MAC layer, thesecurity suitesare allbasedon the CCM mode of

    operation.The CCM mode of operation is aminor modification oftheCCM 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

    useof CCM in all security suites allowsasinglekey tobe 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 whethersecurity is enabledor 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 theprocessing by

    setting up the keys and determining which CCMsecuritysuite to use for each frame.

    Similar to the MAC layer frame format, a frame sequence count and MIC may be

    added to secure a NWKframe.

    Seminar Re ort 06-07 31 Zi Bee Networks

    Department of Electronics & Communication Vimal Jyothi Engineering College

  • 8/8/2019 ZigBee Networks

    32/51

    ZigBee

    CHAPTER 6

    ZigBee ROUTING MECHANISMS

    Seminar Re ort 06-07 32 Zi Bee Networks

    Department of Electronics & Communication Vimal Jyothi Engineering College

  • 8/8/2019 ZigBee Networks

    33/51

    ZigBee ROUTING MECHANISMS 6

    6.0 ZigBee routing algorithm

    ZigBee routing algorithm can be thought of a hierarchical routing strategy with

    table-driven optimizationsapplied where possible. The routing layer issaid to start with

    thewell-studiedpublicdomainalgorithm Ad hoc On Demand Distance Vector (AODV)

    and Motorolas Cluster-Tree algorithm.

    6.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 need to communicate, unless the former node is

    offering services as an intermediate forwarding station to maintain connectivity

    between two othernodes.

    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 neighboring 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 nodemaintains two separate counters: sequence number and broadcast id. The sourcenode initiates path discovery by broadcasting a route request (RREQ) packet to its

    neighbors, which includes source address, source sequence number, broadcast id,destination address, destination sequence number, hop cnt. (Source sequencenumber is for maintaining freshness information about the reverse route whereas thedestination sequence numberisfor maintaining freshnessofthe routeto the destination

    before it can be accepted by thesource.)

    The pairsource address, broadcast iduniquely identifies a RREQ, wherebroadcast idis incremented whenever the source issues a new RREQ. When an intermediate

    node receivesaRREQ, if it hasalready received aRREQ with the samebroadcast id

    and source address,it drops theredundant RREQanddoesnotrebroadcast it.

    Seminar Re ort 06-07 33 Zi Bee Networks

    Department of Electronics & Communication Vimal Jyothi Engineering College

  • 8/8/2019 ZigBee Networks

    34/51

    Otherwise, it rebroadcasts it to its own neighbors 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 nodessequence 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 noderecords the address of the neighbor 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 thenetwork and producea replyto thesender.

    Figure 6.1: Reverse and forward path forma tionin AODV protocol.

    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 theRREQ. If RREQs 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 theRREQ, 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 RREQbutasmallerhopcount,it can

    Seminar Re ort 06-07 34 Zi Bee Networks

    Department of Electronics & Communication Vimal Jyothi Engineering College

  • 8/8/2019 ZigBee Networks

    35/51

    unicasts aroutereplypacket(RREP)back to its neighbor from which itreceived

    the RREQ. A RREP contains the following information: source address, dest addr,

    dest sequence number, hop cnt and lifetime. As the RREP travels back to thesource, 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

    requestexpiration timer and willdelete the reversepointers since they are noton the

    path from source to destination as shown in Figure 6.1. The value of this timeout

    time depends on the size of the ad hoc network. Also, there is the routing caching

    timeout that is associated with each routing entry to show the time after which the

    route is considered to be invalid. Each time a route entry is used to transmit data

    from a source towarda destination, the timeout for theentry isreset to thecurrenttime

    plus active-route-timeout.

    The source node can begin data transmission as soon as the first RREP is

    received, and can laterupdate its routinginformationifit learns ofa better route.

    Each routing tableentry includes the following fields: destination,nexthop, number of

    hops (metric), sequence number for the destination, active neighbors for this route,and expirationtime for theroute table entry.

    For path maintenance, each node keeps the address of active neighbors through

    which packets for the given destination are received is maintained. This neighbor is

    considered active if it originates or relays at least one packet for that destination

    within the last active-timeout period. Oncethe next hop on the path from source to the

    destination becomes unreachable (hello messages are not received for a certain

    time, hello messages also ensures that only nodes with bidirectional connectivity

    areconsidered to beneighbors, therefore each hellomessageincluded the nodes fromwhich the node has heard), the node upstream of the break propagates an

    unsolicited RREP with a fresh sequence number and hop count of 1to all active

    upstream nodes. This process continues until all active source nodes are notified.

    Upon receiving the notification of a broken link, the source nodes can restart the

    discovery process if they still require a route to the destination. If it decides that it

    would like to rebuild the route to the destination, it sends out an RREQ with a

    destination

    sequencenumber of one greater than the previously known sequence number, to

    Seminar Re ort 06-07 35 Zi Bee Networks

    Department of Electronics & Communication Vimal Jyothi Engineering College

  • 8/8/2019 ZigBee Networks

    36/51

    ensure that it builds a new, viable routeand that no nodes reply if

    they still regard thepreviousroute as valid.

    6.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 degreeof fault resistanceand 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).

    6.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 aHELLO message form

    other nodes (HELLO messages correspond to beacons in MAC layer of IEEE

    802.15.4). If it cant get any HELLO messages for a certain time, then it turns to a

    cluster head as shown in Figure 6.2 and sends out HELLO messages to its

    neighbours.The new clusterheadwait for responses from neighbours for a while. If it

    hasnt 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.

    Seminar Re ort 06-07 36 Zi Bee Networks

    Department of Electronics & Communication Vimal Jyothi Engineering College

  • 8/8/2019 ZigBee Networks

    37/51

    Figure 6.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. Thenodes that receive this message send a

    CONNECTION REQUEST message to the cluster head. When the CH receives it, it

    responds to thenodewitha CONNECTIONRESPONSE message that containsa node

    IDfor the node(nodeID corresponds tothe short address at theMAClayer). Thenode

    that is assigned a node ID replies with an ACK message to the cluster head. The

    message exchangeisshown inFigure6.3.

    Figure 6.3: Linksetup between CH andmember node.

    If all nodes are located in the range of the cluster head, the topology of connection

    becomes a starandeverymembernodes are connected to thecluster headwith one

    hop. A clustercan expand into a multi-hopstructure wheneach node supports multiple

    connections. Themessage exchange for themulti hop cluster set up procedure is

    showninFigure 6.4.

    Seminar Re ort 06-07 37 Zi Bee Networks

    Department of Electronics & Communication Vimal Jyothi Engineering College

  • 8/8/2019 ZigBee Networks

    38/51

    Figure 6.4: Mult i hop cluster setup procedure.

    If the cluster head has run outof all node IDsor the cluster has reached some other

    defined limit, it should reject connection requests from new nodes. The rejection is

    through the assignmentof aspecial 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 thecluster ID (CID)of the transmitting node in the

    neighbour list and then sends it insidea LINKSTATE REPORT to theCH so that CH

    knowswhich clusters its clusterhasintersection.

    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 childnodes and the nodesbelow it in the treeat this

    time.

    If amember node has trouble andbecomes 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

    Seminar Re ort 06-07 38 Zi Bee Networks

    Department of Electronics & Communication Vimal Jyothi Engineering College

  • 8/8/2019 ZigBee Networks

    39/51

    have lost the CH. The cluster would then be reconfigured in the same way as the

    cluster formation process.

    6.2.2 Multi-Cluster Network

    To form anetwork,aDesignated Device (DD) is needed.The DD hasresponsibility 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 DDjoins the network, it acts as the CH of cluster 0 and starts to send

    HELLOmessage to the neighborhood. IfaCH has received this message, itsends a

    CONNECTION REQUEST message and joins the cluster 0. After that, the CH

    requestsa CID to theDD. In this case, the CH is a border node that has two logical

    addresses. One is for a memberof thecluster 0and the other is for a CH. When the

    CH gets a new CID, it informs itsmember nodes bythe HELLO message.

    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 itsparent cluster and sends anetwork connection requestmessage tothe 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

    newCIDto the CH when the CH gets anewCID, itinforms toits member nodes bythe

    HELLO message.

    The clusters not bordering cluster 0 use intermediate clusters to get a CID. Again,

    either the CHbecomes theborder node to its parent cluster or the CH names a

    member node as the border to its parent cluster. These processes are shown in

    Figures 6.5,6.6,6.7,6.8.

    Seminar Re ort 06-07 39 Zi Bee Networks

    Department of Electronics & Communication Vimal Jyothi Engineering College

  • 8/8/2019 ZigBee Networks

    40/51

    Figure 6.5: CIDassignment 1

    Figure6.6: CID assignment 2.

    Figure6.7: CID assignment 3.

    Seminar Re ort 06-07 40 Zi Bee Networks

    Department of Electronics & Communication Vimal Jyothi Engineering College

  • 8/8/2019 ZigBee Networks

    41/51

    Figure6.8: CID assignment 4.

    Each member node of the cluster has to record its parent cluster, child/lower

    clusters and the border node IDsassociated with both the parent and child clusters. The

    DD should storethe wholetree structure ofthe clusters.

    Like thenodesintheclusters,the CHsreport their link state information to the DD. The

    CHperiodically sends a NETWORK LINK STATE REPORT message that contains

    its neighbor cluster CID list to the DD.Then this information can beused to calculate

    theoptimizedroute and periodicallyupdatethe topology for thenetwork redundancy.Inthe same way, theDDcan sendTOPOLOGY UPDATE message to informup-to-date

    route from the DDtothe 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 nodewithin the cluster.

    Seminar Re ort 06-07 41 Zi Bee Networks

    Department of Electronics & Communication Vimal Jyothi Engineering College

  • 8/8/2019 ZigBee Networks

    42/51

    Figure 6.9: A multi cluster network and the border nodes.

    Only the DD can send amessage toall thenodes within its network. The message is

    forwarded along the tree route of clusters. The border node should forward the

    broadcast packet from the parentcluster to the childcluster.

    ZigBee

    Seminar Re ort 06-07 42 Zi Bee Networks

    Department of Electronics & Communication Vimal Jyothi Engineering College

  • 8/8/2019 ZigBee Networks

    43/51

    CHAPTER 7

    APPLICATION LAYER

    APPLICATION LAYER 7

    7.0 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 other devices are operating in the personal

    operating spaceof a device. The responsibilities of the ZDO include defining the role

    of the device within the network (e.g., ZigBee coordinator or end device), initiating

    and/or responding to binding requestsand establishing a secure relationship

    between network devices. The manufacturer-defined application objects

    implement the actual applications according to the ZigBee-defined

    application descriptions

    7.1 Application Support Layer

    Seminar Re ort 06-07 43 Zi Bee Networks

    Department of Electronics & Communication Vimal Jyothi Engineering College

  • 8/8/2019 ZigBee Networks

    44/51

    This layerprovides the following services:

    Discovery:Theability to determine whichother devices areoperating in the

    personal operatingspace ofa device.

    Binding: The abilitytomatch two ormore devices together basedon their

    services and their needsand forwarding messagesbetweenbounddevices

    7.2 The General Operation Framework (GOF)

    TheGeneralOperation Framework (GOF) is aglue layerbetween applicationsand restof the protocol stack. The GOF currently coversvarious elements that are common

    for all devices. It includes sub addressing 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 byapplicationprofiles to construct set/get commands and their

    responses.

    Actual application profiles are defined in the individual profiles of the IEEE's working

    groups. EachZigBee device can support upto30 different profiles.

    Currently, only one profile, Commercial and Residential Lighting, is defined. It

    includes switching anddimming load controllers, corresponding remote-control

    devices, and occupancy and light sensors.

    7.3 ZigBee Device

    There aretwophysical device types forthe lowest system cost.The IEEE standard

    defines two types ofdevices:

    Fullfunction device (FFD)

    o Canfunction in any topologyo Capable of being the network coordinator

    o Capable of being a coordinator

    o Cantalk toany other device

    Reduced functiondevice (RFD)

    o Limited to star topology

    o Cannot becomea network coordinator

    o Talks only to a network coordinator

    o Very simple implementation

    Seminar Re ort 06-07 44 Zi Bee Networks

    Department of Electronics & Communication Vimal Jyothi Engineering College

  • 8/8/2019 ZigBee Networks

    45/51

    An IEEE 802.15.4/ZigBee network requires at least one full function device as a

    network coordinator, but endpoint devices may be reduced functionality devices to

    reduce system cost.

    Alldevicesmust have 64 bit IEEE addresses

    Short (16bit) addresses can beallocated to reduce packet size

    Addressing modes:

    o Network +device identifier (star)

    o Source/destination identifier (peer-peer)

    7.4 ZigBee Device Objects

    Definesthe role ofthe device within the network (e.g., ZigBee coordinator or end

    device)

    Initiates and/or responds to bindingrequests

    Establishesasecure relationship between networkdevices selecting oneof

    ZigBees security methodssuchaspublic key, symmetric key, etc.

    ZigBee

    Seminar Re ort 06-07 45 Zi Bee Networks

    Department of Electronics & Communication Vimal Jyothi Engineering College

  • 8/8/2019 ZigBee Networks

    46/51

    CHAPTER 8

    ZigBee -APPLICATIONS

    ZigBee - APPLICATIONS 8

    8.1 Product Examples

    Warehouses,Fleetmanagement, Factory, Supermarkets, Office complexes Gas/Water/Electric meter, HVAC

    Smoke, CO,H2O detector

    Refrigerationcase or appliance

    Equipment management services& PM

    Securityservices

    Lightingcontrol

    Assembly line andwork flow, Inventory

    Materialsprocessing systems(heat, gasflow, cooling, chemical)

    Energy, diagnostics,e-Business services Gateway or Field Servicelinksto sensors& equipment

    Seminar Re ort 06-07 46 Zi Bee Networks

    Department of Electronics & Communication Vimal Jyothi Engineering College

  • 8/8/2019 ZigBee Networks

    47/51

    Monitoredto suggest PM, productupdates, status changes

    Nodes link toPC for database storage

    PC Modem calls retailer, ServiceProvider, or Corpheadquarters

    Corp headquarters remotelymonitorsassets, billing, energymanagement

    8.2 Home & Diagnostics Examples

    Mobile clients link to PC for database storage

    PC links toperipherals,interactive toys

    PC Modem calls retailer, SOHO,Service Provider

    Gateway links to security system, temperaturesensor,AC system,entertainment, health.

    Gateway links to field sales/service

    ZigBee

    Seminar Re ort 06-07 47 Zi Bee Networks

    Department of Electronics & Communication Vimal Jyothi Engineering College

  • 8/8/2019 ZigBee Networks

    48/51

    ZigBee

    CONCLUSION

    CONCLUSION 9

    IEEE 802.15.4 is a new standard that still needs to pass through the circles of

    rigorous technology critics and establish its own place in the industry. Predictions for

    the future of ZigBee-enabled devices are a popular topic for numerous market-research firms.

    While I intend to stay objective, I believe, based on protocol features implemented in

    802.15.4, that ZigBee has a bright future. Backed by IEEE, ZigBee has the

    potential to unify methods of data communication for sensors, actuators,

    appliances, and asset-tracking devices. It offers a means to build a reliable but

    affordable network backbone that takes advantage of battery-operated devices with a

    low data rate and a low duty cycle. ZigBee can be used in manyapplications, from

    Seminar Re ort 06-07 48 Zi Bee Networks

    Department of Electronics & Communication Vimal Jyothi Engineering College

  • 8/8/2019 ZigBee Networks

    49/51

    industrial automation, utility metering, and building control to even toys. Home

    automation, however, is the biggest market for ZigBee-enabled devices. This

    follows from the number of remote controlled devices (or devices that may be

    connected wirelessly) in the average household. This cost-effective and easy-to-

    use home network potentially creates a whole new ecosystem of interconnected

    home appliances, light and climate control systems, and security and sensor sub

    networks.

    ZigBee

    Seminar Re ort 06-07 49 Zi Bee Networks

    Department of Electronics & Communication Vimal Jyothi Engineering College

  • 8/8/2019 ZigBee Networks

    50/51

    ZigBee

    BIBILOGRAPHY

    BIBLIOGRAPHY

    On theweb

    ZigBeeAlliance,http://www.caba.org/standard/zigbee.html.

    ZigBeeAlliance,http://www.zigbee.org

    IEEE802.15.4 web site,http://www.ieee802.org/15/pub/TG4.html

    http://wireless.weblogsinc.com/entry/1234000283039483/

    On thepress

    LAN-MANStandardsCommitteeof the IEEE ComputerSociety,Wireless Medium

    Access Control (MAC) and Physical Layer (PHY) Specifications forLow-Rate Wireless PersonalArea Networks (LR-WPANs), IEEE,2003

    Seminar Re ort 06-07 50 Zi Bee Networks

    Department of Electronics & Communication Vimal Jyothi Engineering College

  • 8/8/2019 ZigBee Networks

    51/51

    IEEEP802.15 WorkingGroup for WPANs,Cluster Tree Network

    Seminar Re ort 06-07 51 Zi Bee Networks