Zig Bee


Published on

ZigBee in Industrial Automation

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide
  • Among these radio technologies only 802.15.4 has the low power consumption that long-lived battery powered industrial products will need. Before ZigBee, 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. Despite the increasing popularity of IEEE 802.11 wireless LAN systems (WiFi) and Bluetooth systems, wireless communication has not made significant inroads in industrial applications. And while wireless systems seem like an obvious solution for industrial applications, in reality the cure can be worse than the disease. Solutions based on these standards were not designed with the industrial environment in mind. Industrial users need a network architecture that takes the unique challenges of the industrial environment into account. WLAN , Wireless Local Area Network WLAN: IEEE 802.11: WiFi (Ethernet matching speed, long range ~100m and high data rate 2-11 Mbps) WPAN , Wireless Personal Area Network WPAN Eg: IEEE 802.15: Bluetooth, RFID, ZigBee, etc., (Low cost, low power, short range, small size) WMAN , Wireless Metropolitan Area Network WMAN IEEE 802.16: WiMAX WPAN: The IEEE 802.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 for multi-media applications that require very high QoS. Medium rate WPANs ( IEEE 802.15.1 /Blueetooth) will handle a variety of tasks ranging from cell phones to PDA communications and have QoS suitable for voice 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 with relaxed needs for data rate and QoS. This low data rate enables the LR-WPAN to consume very little power.
  • What is ZigBee ? The origin of the term ZigBee lies in the domestic honeybee, the future of whose colony is dependent upon the continuous communication of vital information between every member of the colony. The technique that honeybee uses to communicate new found food sources to other members of the colony is referred to as the ZigBee principle. Using this silent and powerful communication system, where by bee dances in zigzag pattern, she is able to share information such as location, direction of a new food source to fellow colony. The ZigBee Alliance is not pushing a technology; rather it is providing a standardized base set of solutions for sensor and control systems.
  • ZigBee’s addressing scheme is capable of supporting over 64,000 nodes per ‘network coordinator’, and multiple network coordinators can be linked together to support extremely large networks. The logical size of a ZigBee network ultimately depends on which frequency band is selected, how often each device on the network needs to communicate, how much data loss or retransmissions can be tolerated by the application. Key solution requirements for successful ZigBee deployment include ease of integration, redundancy, scalability, power efficiency .
  • Wireless networks for industrial control and sensing, must be reliable , adaptable , and scalable . Because industrial sensors send only a few of bits of data per second or minute, providing information like temperature, pressure and flow, data rates of 11 Mbps or even 54 Mbps are rarely needed. Although speed is often the focus for data networks, the primary design objectives for industrial control and sensing networks are reliability, adaptability and scalability . Three factors determine the signal reliability between a radio transmitter and receiver: Path loss RF interference Transmit power The network should adapt to the existing environment. The environment should not have to be altered to make the system "wireless ready." Any network, wired or wireless, should scale gracefully as the number of endpoints increases.
  • ? What is selectable latency in IEEE 802.15.4 or ZigBee. IEEE 802.15.4 specifies how individual packets are structured, and the interaction between two ends of a data link. IEEE 802.15.4 also specifies 27 RF channels in the three frequency bands
  • ZigBee operates at three frequency bands: 868 MHz: At this frequency single channel between 868 to 868.6 . Support in Europe and at rate of 20 Kbps . 915 MHz: At this frequency 10 channels between 902 MHz to 928 MHz . Supports in North America and Australia at rate of 40 Kpbs . 2.4GHz: Supports 16 channels between 2.4 and 2.4835 GHz . All over the world. It allows dynamic channel selection. Channel selection scan function that step through a list of supported channels in search of beacon, receiver energy detection, link quality indication, channel switching. Like Wi-Fi, Zigbee uses DSSS in the 2.4GHz band, with offset-quadrature phase-shift keying modulation . Channel width is 2MHz with 5MHz channel spacing at 2.4GHZ band. Overall 16 RF channels. The 868 and 900MHz bands also use DSSS but with binary-phase-shift keying modulation. The IEEE 802.15.4 channels do not directly coincide with Wi-Fi channels . Therefore, IEEE 802.15.4 systems can coexist with Wi-Fi systems with little physical separation.
  • FSK (Frequency Shift Keying) is a far less efficient, but simpler to implement modulation technique that is used in Bluetooth The fundamental of O-QPSK method is to sum the in-phase signals with quadrature phase signal delayed by half a cycle in order to avoid the sudden phase shift changed.
  • Typical design consist of RF IC and 8-bit microprocessor with peripherals connected to an application sensor or actuators.
  • The physical layer was designed to accommodate the need for a low cost yet allowing for high levels of integration. The use of direct sequence allows the analog circuitry to be very simple and very tolerant towards inexpensive implementations. Some of the key features of physical layer is energy and link quality detection, clear channel assessment for improved coexistence with other wireless networks. The MAC layer was designed to allow multiple topologies without complexity. The power management operation doesn’t require multiple modes of operation. The MAC allows a reduced functionality device (RFD) that needn’t have flash nor large amounts of ROM or RAM. The MAC was designed to handle large numbers of devices without requiring them to be “parked”. The network layer has been designed to allow the network to spatially grow without requiring high power transmitters. The network layer also can handle large amounts of nodes with relatively low latencies. In ZigBee network routing schemes are designed to ensure power conservation and low latency through guaranteed time slots. A unique feature of ZigBee network layer is communication redundancy eliminating single point of failure in mesh networks. Application Support 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. ZigBee Device Object 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. ZigBee applications are modeled by application objects . Application objects communicate with each other through the mapping of object attributes or sets of object attributes that are called clusters. At the highest level applications are defined by an application profile. An application profile includes a series of named services and capabilities. ZigBee also requires a set of basic device methods that every application object must implement. Each ZigBee device can support multiple applications that are identified by a numbered “endpoint” designation. There can be 240 endpoints per ZigBee device, but each endpoint can support only one profile. Application profiles are identified by a unique number that is administered by the ZigBee Alliance. Data communication between objects is implemented in compressed XML to ensure hardware independence .
  • A PAN Coordinator always have network address “ 0000 ”.
  • Devices that wish to join the network will do so by first issuing beacon requests to solicit beacons from devices that could potentially allow them to join the network. Initially, only the PAN coordinator will respond. In addition to the PAN coordinator, any device capable of allowing other devices to join the network is a ZigBee router. What ensues is a series of message exchanges that will determine whether a device may join the network. In 802.5.4, this process is called “ association ”. A key factor in such a determination is a router’s capacity to accept additional devices as its child. Where 802.15.4 differs from other wireless technologies, such as 802.11/Wi-Fi, is in permitting a hierarchy of associations , rather than a single parent-children structure. For instance, a device joining the coordinator could itself be a router (i.e., it can have childrens), and that device could permit other devices to join it. As a result, multiple levels of associations can be achieved. But in the case of Wi-Fi it not possible. d
  • Where 802.15.4 differs from other wireless technologies, such as 802.11/Wi-Fi, is in permitting a hierarchy of associations , rather than a single parent-children structure. For instance, a device joining the coordinator could itself be a router (i.e., it can have childrens), and that device could permit other devices to join it. As a result, multiple levels of associations can be achieved. But in the case of Wi-Fi it not possible. The beacons are used to synchronize the attached devices, to identify the PAN and to describe the structure of the superframe . All 802.15.4 devices have a 64-bit (long) IEEE address , which uniquely identifies the device. In order to extend battery life, shorter addresses are used to shorten the packet sizes and hence the time a device is actively communicating. ZigBee requires that all communications after joining the network be made on a 6-bit (short) network address. The 16-bit network address of a newly joining device is assigned by its parent during the association . ZigBee specifies an algorithm (often called “ Cskip ”) that provides address ranges to routers and coordinators, to be assigned to joining devices based on their location within the network hierarchy. In addition to managing network joining and address assignment, the network formation process also provides a routing algorithm called “ tree routing ”
  • A small network is shown in Figure 1. In this case, the PAN coordinator (which always has network address “0000”) has three devices associated to it, and of these, two of them (with network addresses “000” and “07e”), acting as routers , have a device associated to them. Tkey characteristics of the network are defined by the parameters. Some of the parameters are: Depth of network. Maximum number of childrens per router. Maximum of children routers per router.
  • MAC Data Service: It enables the transmission and reception of MAC Protocol Data Unit (MPDU) across the PHY data service. Wired devices can listen during their own transmissions and employ CSMA with collision detection (CSMA/CD), stations in wireless networks usually cannot listen to their own transmissions, and consequently colliding transmissions can only be detected after they have been completed. Thus wireless devices use CSMA with collision avoidance ( CSMA/CA or CSMA-CA ). The beacons are used to synchronize the attached devices, to identify the PAN, and to describe the structure of the superframes . GTS = Guaranteed Time Slot mgmt. Low latency applications may choose to the guaranteed time slot (GTS) option. GTS is a method of QoS in that it allows each device a specific duration of time each Superframe to do whatever it wishes to do without contention or latency.
  • PHY Data Service enables the transmission and reception of PHY Protocol Data Unit ( PPDU ) across physical radio channel. Energy detection report will be two byte length. 0x00 to 0xff. The minimum ED value 0 indicates that received power less then 10 dB . The range of received power spanned by the ED value shall be at least 40 dB .
  • In ZigBee network routing schemes are designed to ensure power conservation and low latency through guaranteed time slots. A unique feature of ZigBee network layer is communication redundancy eliminating single point of failure in mesh networks.
  • A FFD can talk to RFD ( Reduced Functional Device) or FFD ( Full Functional Device ) whereas RFD can talk to FFD only .
  • In ZigBee, network addresses are assigned either by a network coordinator or by a ZigBee router using a tree-structured algorithm. At the highest level the structure of a network is defined by an entity known as a "stack profile". This stack profile includes a parameter set that includes Definition of the maximum network depth.. The maximum number of child routers at any depth in the network, and the maximum number of "children" who can communicate with an individual router. These parameters broadly determine the “shape” of the resulting network tree. ZigBee end devices (ZEDs) do not participate in routing. End devices communicate with a single router, which is their parent device.
  • Most of the wireless sensor networks adopting this network only. This network has a central node (i.e., coordinator), which is linked to all other nodes in the network. All messages travel via the coordinator. To implement a star network you don’t need to use ZigBee network layer, since a star network topology is provided by the IEEE 802.15.4 layer. So if you are using IEEE 802.15.4 layer then the application program reside in the coordinator is responsible for relaying the messages. But in case of ZigBee network layer the Coordinator passes routes the messages transparent to application program. 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.
  • In sending messages from one node to another, the message must travel from the source node up the tree to the nearest common ancestor and then down the tree to the destination node. Here message propagation is handled be ZigBee stack and is transparent to the application program.
  • This Mesh network has a tree like structure in which some levels are directly linked. Messages can travel across the tree, when a suitable route is available. This Mesh topology consists of a Coordinator, and a set of Routers and End devices. Like Tree topology, in this topology also message propagation is handled by ZigBee protocol stack and it is transparent to application program.
  • Sequence number for maintain the freshness information. The source node initiates path discovery by broadcasting a route request (RREQ) packet to its neighbors, which includes source addr, source sequence number, broadcast id, dest address, dest sequence number, hop count . The pair source addr, broadcast id uniquely identifies a RREQ , where broadcast id is incremented whenever the source issues a new RREQ.
  • The pair source addr, broadcast id uniquely identifies a RREQ , Here 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 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 node’s sequence numbe r. 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. Each routing table entry includes the following fields: destination, next hop, number of hops ( metric ), sequence number for the destination , active neighbors for this route , expiration time for the route table entry.
  • DD stands for Designated Device.
  • Presently available profiles are: ■ Commercial Building Automation ■ Home Automation ■ Industrial plant monitoring. ■ Wireless sensor applications Feature standard profiles are: ■ Telecom ■ Automatic Metere Reading ■ Medical and Personal health care ■ Automotive.
  • Binding is the ability to match two devices together based on their services and their needs and forwarding messages between bound devices Discovery , is the ability to determine which other devices are operating in the personal operating space of a device.
  • A cluster is a message or a collection of similar messages.
  • The ZDO provides control and management commands. One application profile defined per end point.
  • Several limitations exist with direct binding . The device must have sufficient memory to store all this information about all its peer applications and devices. However, this might not be possible (or too expensive) for a simple device. When the device fails, the binding information stored within the device may be lost. Should its peer device be replaced or fail, updating this information in the device will be difficult.
  • Device Discovery: Commands offer the means to determine what devices are on the network, their addresses and the list of their children devices. They can also provide information about the device, including whether it is coordinator, router or end device , manufacturer or product information and even its power source and current battery level. Service Discovery: Commands, in contrast, enable the determination of services offered by devices. Using these commands, it possible to determine which endpoints are active on a device, what profiles are associated with each endpoint (i.e., the device descriptor, as mentioned earlier) and to match device descriptors between two devices. Binding Management: Commands offer the means to manage bindings between devices. Network Management: Commands provide a way to collect information and control devices for network management purposes. They provide information such as the list of ZigBee networks that a device is able to detect, the quality of the radio link with its neighbors, and the contents of its routing and binding tables. For control purposes, there are commands to instruct a device to join or leave the network.
  • 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. All devices must have 64 bit IEEE addresses Short (16 bit) addresses can be allocated to reduce packet size Addressing modes: Network + device identifier (star) Source/destination identifier (peer-peer)
  • Complete PHY Packet is called PPDU . Preamble contains 32-bits of “0” for packet detection and synchronization in the receiver. Start of Frame Delimiter ( SFD ) value is “11100101” = 0xE5.
  • There are four frame types for IEEE 802.15.4 transmissions: Data, ACK, MAC Command, Beacon. The data frame provides 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. A MAC command frame provides the mechanism for remote control and configuration of client nodes. The PHY Header is 8-bits length. Within this 8-bits, 7-bits are used to indicate PSDU ( PHY Service Data Unit ) Length and 1 bit for reserved.
  • Here FCS stands for Frame Check Sequence. Four different types of MAC frames defined. Data, ACK, Beacon and MAC Command .
  • In Ethernet ( not in IEEE 802.15.4) the preamble frame consists of a 56-bit (7-byte) pattern of alternating 1 and 0 bits , which allows devices on the network to easily detect a new incoming frame. In PHY header 0-7 bits are used for PPDU length . (so PPDU length is max of 127 bytes ) and 1 bit for reserved .
  • The beacons are used to: Synchronize the attached devices Identify the PAN coordinator Describe the structure of superframe A beacon frame used by coordinator to transmit beacons. The structure of the superframe is determined by two variables The Superframe Orde r (SO) and the Beacon Order (BO). SO determines the length of the superframe. BO determines the beacon interval. Network coordinator to transmit beacons at predetermined intervals (multiples of 15.38ms , up to 252s ) Beacon timings are different between each device.
  • Provides up to 104 byte data play load capacity. Data Sequence numbering to ensure that packets are tracked. Frame Check Sequence (FCS) validates error-free data. Each PPDU packet consists of the following basic components: SHR : It allows receiving device to synchronize and lock into the bit stream. PHR : It contains frame length information. A variable length play load (Max of 104 bytes), which carries the MAC sub layer 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: Preamble Sequence 4 Octets Start of Frame Delimiter 1 Octet Frame Length 1 Octet The MAC adds the 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 It has robust structure so improves reception in difficult condition.
  • Ack frame length is 11 bytes. It provides active feedback from receiver to sender that packet was received without error. Short packet that takes advantage of standards-specific “quiet time” immediately after data packet transmission.
  • A MAC command frame, used for handling all MAC peer entity control transfers .
  • In indirect addressing mode endpoint address fields are either included are not included. This will be done from frame control. Similarly cluster identifier or profile identifier fields are not included for command frames.
  • For transmissions of data frames in the contention access period , the slotted mode of the CSMA-CA algorithm is used Transmissions in the contention free period take place according to pre-assigned guaranteed timeslots. PANs not wishing to use Superframe structure always use unslotted CSMA-CA to access channel and are always active. 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.
  • However, a sufficient portion of the CAP (Contention Access Period) shall remain for contention based access of other networked devices or new devices wishing to join the network. All contention based 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. During the CAP, MAC is ruled by the slotted CSMA/CA mechanism .
  • The mechanism for each of these transfers depends on whether the network supports transmission of Beacon or not. For graphical representation see in next slide.
  • 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.
  • aTurnaroundTime is the time to switch from sending to receiving mode and vice versa. This value will be 12 symbol period . If the originator receives an acknowledgement from the recipient within a time of macAckWaitDuration , the data transfer has been successful. If no acknowledge is received within that time, the frame will be retransmitted up to a maximum of aMaxFrameRetries times, after which the protocol terminates and a communications failure is issued. The macAckWaitDuration 120 symbols period for channels 0 to 10 (863 or 910 MHz) or 54 symbols for channel 11 to 26 (2.4 GHz) .
  • 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. 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.
  • In integrity options 64 is the default.
  • In integrity options 64 is the default.
  • If trust centre is assigned to a dedicated device it may be possible for a portable device . Residential Mode: ► The trust center allows devices to join the network, but does not establish keys with network devices ► The trust center cannot update keys periodically because it does not maintain keys with network devices ► The memory cost in the trust center is minimal and does not scale with the size of the network Commercial Mode: ► The trust center establishes and maintains keys and freshness counters with every device in the network ► This allows centralized control and update of keys ► Cost memory in the trust center could scale with the size of the network
  • All the three keys can also be factory installed option.
  • 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 . This MIC is right appended to the MAC payload. Upon receipt of a frame, if a MIC is present, then it is verified. 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 . Unpon receipt if a play load is encrypted then 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.
  • Similar to the MAC layer frame format, a frame sequence count and MIC may be added to secure a NWK frame . 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.
  • These values are taking after adding 6 octet overhead of physical layer. 1 Symbol = 4 bits at 250 Kbps and 1 bit at other speeds.
  • 1 Unit Back Off period = 20 symbols at 250 Kbps. 1 Symbol = 4 bits = 16 Micro Second Duration. So 1 Unit Backoff Period = 16 * 20 = 320 Micro Seconds.
  • 1 symbol = 4 bits at 250 Kbps.
  • Conclusion on Power consumption: ZigBee devices can quickly attach, exchange information, detach, and then go to deep sleep to achieve a very long battery life . Bluetooth devices require about ~100X the energy for this operation. 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 other short message applications by embodying a direct sequence system with a star or peer to peer protocols. Minor changes to Bluetooth or ZigBee won’t change their inherent behavior or characteristics. The different behaviors come from architectural differences. ZigBee supports DSSS ( Direct Sequence Spread Spectrum) allows devices to sleep without the requirement for close synchronization. Whereas in Bluetooth uses FHSS ( Frequency Hopping Spread Spectrum) is extremely difficult to create extended networks without large synchronization cost.
  • If IEEE 802.11 and IEEE 802.15.4 are existed at the same network area, then IEEE 802.11 network dominates over the IEEE 802.15.4 networks and consequently the frames of IEEE 802.15.4 frames are destroyed . There clearly is a coexistence issue in the 2.4 GHz band. Especially the impact of IEEE802.11 stations with high duty cycle against IEEE802.15.4 stations may be extremely critical, if the same carrier frequencies are selected. This scenario will lead to a timeout of the physical layer.
  • Zig Bee

    1. 1. Presentation on <ul><li>ZigBee </li></ul><ul><li>Wireless Protocol </li></ul><ul><li>( Wireless Control that Simply Works ) </li></ul><ul><li>By </li></ul><ul><li>Ch.Vishwa Mohan </li></ul>
    2. 2. Agenda <ul><li>ZigBee Introduction </li></ul><ul><li>ZigBee Applications </li></ul><ul><li>ZigBee Lighting Control System Demo </li></ul><ul><li>ZigBee Features Set </li></ul><ul><li>ZigBee Protocol Stack Architecture </li></ul><ul><li>ZigBee Traffic & Frames </li></ul><ul><li>ZigBee Security </li></ul><ul><li>ZigBee Descriptors & Commands </li></ul><ul><li>CSMA/CA Algorithm </li></ul><ul><li>Comparison of ZigBee with Other Wireless Protocols </li></ul>
    3. 3. Today What Industry is Looking? <ul><li>Industry wants to move from wire to wireless networks with ubiquitous communication with focus on interoperability, plug and play, self organizing networks and low power. </li></ul><ul><li>Wireless systems for industry have mostly used cell phone-style radio links, using point-to-point or point-to-multipoint transmission. </li></ul><ul><li>In addition to the above industry also looks on: </li></ul><ul><ul><li>High Quality AV Streaming. </li></ul></ul><ul><ul><li>Bits/Hz/Watts </li></ul></ul><ul><ul><li>Mobility </li></ul></ul>
    4. 4. Parting Thought <ul><li>“Just as the personal computer was a symbol of </li></ul><ul><li>the '80s, and the symbol of the '90s is the World </li></ul><ul><li>Wide Web, the next nonlinear shift, is going to be </li></ul><ul><li>the advent of Wireless networks .” </li></ul>
    5. 5. The 802 Wireless Space
    6. 6. <ul><li>For sensor network applications key design requirement revolve around long battery life, low cost, small foot print and mesh network (to support large number of devices). </li></ul><ul><li>Large networks (large number of devices and large coverage area) that can form autonomously and that will operate very reliably for years without any operator intervention </li></ul><ul><li>Very long battery life (years off of a AA cell), very low infrastructure cost (low device & setup costs) and very low complexity and small size </li></ul><ul><li>Device data rate and QoS needs are low </li></ul><ul><li>Standardized protocols are necessary to allow multiple vendors to interoperate. </li></ul>Sensor/Control Network Requirements
    7. 7. What is ZigBee ? <ul><li>ZigBee is a robust, light weight wireless networking protocol that builds upon IEEE 802.15.4 standard. </li></ul><ul><ul><li>This IEEE 802.15.4 standard defines a short range, low-power, low data rate wireless interface specially designed for small devices that have limited power, CPU and memory resources. </li></ul></ul><ul><li>ZigBee technology is a low data rate, low power consumption, low cost, wireless networking protocol targeted towards automation, remote monitoring and control applications. </li></ul><ul><li>ZigBee stack is a more then communication protocol. </li></ul><ul><li>ZigBee = Protocol + Application Framework . </li></ul>
    8. 8. What is ZigBee ? <ul><li>ZigBee was designed for the hostile RF environment ( i.e., ISM Band 2.5 G.Hz.). Utilizing Direct Sequence Spread Spectrum with the following features: </li></ul><ul><ul><li>Collision Avoidance </li></ul></ul><ul><ul><li>Receiver Energy Detection </li></ul></ul><ul><ul><li>Link Quality Indication </li></ul></ul><ul><ul><li>Clear Channel Assessment </li></ul></ul><ul><ul><li>Acknowledgement </li></ul></ul><ul><ul><li>Security </li></ul></ul><ul><ul><li>Support for guaranteed time slots. </li></ul></ul><ul><ul><li>Packet Freshness. </li></ul></ul>
    9. 9. What is the origin of ZigBee Name <ul><li>Using communication system, whereby the bee dances in a zig-zag pattern, worker bee is able to share information such as the location, distance, and direction of a newly discovered food source to her fellow colony members. </li></ul><ul><li>Instinctively implementing the ZigBee Principle, bees around the world industriously sustain productive hives and foster future generations of colony members. </li></ul>
    10. 10. What is ZigBee Alliance? <ul><li>Needed an organization with a mission to define a complete open global standard for reliable, cost-effective, low-power, wirelessly networked products addressing monitoring and control </li></ul><ul><li>Alliance provides </li></ul><ul><ul><li>upper layer stack and application profiles </li></ul></ul><ul><ul><li>compliance and certification testing </li></ul></ul><ul><ul><li>branding </li></ul></ul><ul><li>Result is a set of recognizable, interoperable solutions </li></ul>
    11. 11. Who is supporting the ZigBee Alliance? <ul><li>Eight promoter companies </li></ul><ul><ul><li>Chipcon, Ember, Freescale, Honeywell, Mitsubishi, Motorola, Philips and Samsung </li></ul></ul><ul><li>A rapidly growing list (Now over 175) of industry leaders from 29 countries spanning 6 continents committed to providing ZigBee-compliant products and solutions </li></ul><ul><ul><li>Companies include chip suppliers, wireless IP providers, OEMs, test equip manufacturers and end users </li></ul></ul>
    12. 12. ZigBee Alliance Members:
    13. 13. IEEE 802.15.4 Basics: <ul><li>IEEE 802.15.4 defined simple data packet protocol for lightweight wireless networks. </li></ul><ul><li>IEEE 802.15.4 defines specific RF frequencies, modulation formats, data rates and coding techniques. </li></ul><ul><li>Here Primary channel access is via Carrier Sense Multiple Access with Collision Avoidance (CSMA-CA). </li></ul><ul><ul><li>This CSMA-CA reduces the probability of interfering with other users. It also supports automatic retransmission of data ensures robustness . </li></ul></ul><ul><li>Support for message acknowledgment and an optional beacon structure. </li></ul><ul><li>Multi-level security. </li></ul><ul><li>Works well for long battery life. </li></ul><ul><li>Selectable latency for controllers, sensors, remote monitoring and portable electronics. </li></ul><ul><li>Excellent performance in low SNR (Signal-to-Noise Ratio) environments. </li></ul>
    14. 14. ZigBee Operating Frequency Bands
    15. 15. ZigBee Radio Characteristics <ul><li>IEEE 802.15.4 relies upon a very robust modulation technique known as Phase-Shift Keying (PSK) , </li></ul><ul><li>The 2400 MHz band uses Offset Quadrature-PSK (O-QPSK) . </li></ul><ul><li>Lower frequency bands uses Binary PSK ( BPSK ) . </li></ul><ul><li>Both modulation modes offer extremely good low bit error rate (BER) performance at low Signal-to-Noise Ratios (SNR). </li></ul>ZigBee technology relies upon IEEE 802.15.4, which has excellent performance in low SNR environments
    16. 16. What ZigBee do? <ul><li>ZigBee does provide network-level services as TCP/IP does. </li></ul><ul><li>The impressive set of services provided by ZigBee are: </li></ul><ul><ul><li>Network formation and configuration, </li></ul></ul><ul><ul><li>Device discovery, </li></ul></ul><ul><ul><li>Service discovery, </li></ul></ul><ul><ul><li>Network address assignment, </li></ul></ul><ul><ul><li>Joining and leaving the network, </li></ul></ul><ul><ul><li>Application data binding, </li></ul></ul><ul><ul><li>Security, </li></ul></ul><ul><ul><li>Network management, </li></ul></ul><ul><ul><li>Legacy protocol encapsulation. </li></ul></ul><ul><li>What ZigBee does not provides: </li></ul><ul><ul><li>Data transport services, </li></ul></ul><ul><ul><li>Standardized application execution environment, </li></ul></ul><ul><ul><li>Standardized device configuration, </li></ul></ul><ul><ul><li>Over-the-air device download and update, </li></ul></ul><ul><ul><li>Hardware independence for application developers. </li></ul></ul>
    17. 17. The ZigBee Platform IEEE 802.15.4 Public Application Profile ZigBee Stack Certified Product Compliant Platform
    18. 18. Why ZigBee? <ul><li>Supports large number of nodes </li></ul><ul><li>Ultra low power consumption ( i.e., long battery life) </li></ul><ul><li>Secure </li></ul><ul><li>Reliable and self healing </li></ul><ul><li>Low cost </li></ul><ul><li>Easy to deploy </li></ul><ul><li>Interoperability and world wide usability. </li></ul><ul><li>Very small protocol stack. </li></ul><ul><li>Standard based wireless technology. </li></ul>
    19. 19. Advantages of ZigBee over proprietary solutions? <ul><li>Product interoperability </li></ul><ul><li>Vendor independence </li></ul><ul><li>Increased product innovation as a result of industry standardization </li></ul><ul><li>A common platform is more cost effective than creating a new proprietary solution from scratch every time </li></ul><ul><li>Companies can focus their energies on finding and serving customers </li></ul>
    20. 20. ZigBee Applications
    21. 21. 802.15.4 Application Space <ul><li>Sensors & Controls: </li></ul><ul><li>Home Automation </li></ul><ul><li>Industrial Automation </li></ul><ul><li>Remote Metering </li></ul><ul><li>Automotive Networks </li></ul><ul><li>Interactive Toys </li></ul><ul><li>Active RFID/ asset tracking </li></ul><ul><li>Medical </li></ul>
    22. 22. World is Moving Towards Wireless (Home Automation)
    23. 23. ZigBee Applications ZigBee Wireless Control that Simply Works RESIDENTIAL/ LIGHT COMMERCIAL CONTROL CONSUMER ELECTRONICS TV VCR DVD/CD remote security HVAC lighting control access control lawn & garden irrigation PC & PERIPHERALS INDUSTRIAL CONTROL asset mgt process control environmental energy mgt PERSONAL HEALTH CARE BUILDING AUTOMATION security HVAC AMR lighting control access control mouse keyboard joystick patient monitoring fitness monitoring
    24. 24. Typical ZigBee Enabled Device:
    25. 25. ZigBee Application Model <ul><li>Application Profiles are an agreement on a series of messages defining an application space (for example, “Home Automation”) </li></ul><ul><li>Endpoints are a logical extension added to a single ZigBee radio which permits support for multiple applications, addressed by the Endpoint number (1-240) </li></ul><ul><li>Key Relationships: </li></ul><ul><li>► Maximum of 240 Endpoints per ZigBee Device (0 is reserved to describe the generic device capabilities and 255 is reserved for broadcasting to all endpoints, 241-254 are reserved for future use) </li></ul><ul><li>► One Application Profile described per Endpoint. </li></ul>
    26. 26. ZigBee Lighting Control System Demo
    27. 27. ZigBee Mesh Networking
    28. 28. ZigBee Mesh Networking
    29. 29. ZigBee Mesh Networking
    30. 30. ZigBee Mesh Networking
    31. 31. ZigBee Mesh Networking
    32. 32. <ul><li>Microprocessor based devices with embedded radios </li></ul><ul><li>Lighting Ballasts become control and communication nodes </li></ul><ul><li>Utilizes an open protocol for communication – ZigBee </li></ul><ul><li>Mesh Network - Scalable, flexible up to 65,000 network nodes </li></ul><ul><li>100% digital component based network of devices with the lighting infrastructure providing the DLN backbone </li></ul><ul><li>Software and UI’s determine the user experience </li></ul><ul><li>Distributed control of lighting – From personal space to enterprise control </li></ul>Characteristics of a ZigBee Lighting Control System
    33. 33. ZigBee Features Set
    34. 34. ZigBee Features are: <ul><li>Ad-hoc and self forming networks </li></ul><ul><ul><li>Mesh, Cluster Tree and Star Topologies. </li></ul></ul><ul><ul><li>Reliable broadcast messages. </li></ul></ul><ul><ul><li>Non-guaranteed message delivery. </li></ul></ul><ul><li>Logical Device Types </li></ul><ul><ul><li>Coordinator </li></ul></ul><ul><ul><li>Router </li></ul></ul><ul><ul><li>End Devices </li></ul></ul>
    35. 35. ZigBee Features are: <ul><li>Applications </li></ul><ul><ul><li>Device and Service Discovery </li></ul></ul><ul><ul><li>Optional Acknowledgement service. </li></ul></ul><ul><ul><li>Messaging with optional response. </li></ul></ul><ul><ul><li>Mechanism to support mix of public and private profiles in the same network, all supported by standard ZigBee network and application features. </li></ul></ul><ul><li>Security </li></ul><ul><ul><li>Symmetric key with AES-128 </li></ul></ul><ul><ul><li>Authentication and Encryption at MAC, NWK, and Application levels. </li></ul></ul><ul><ul><li>Key Hierarchies: Master keys, Network keys and Link keys. </li></ul></ul>
    36. 36. ZigBee Architecture
    37. 37. ZigBee Application Layer <ul><li>ZigBee applications are modeled by “ application objects ”. </li></ul><ul><li>Application objects communicate with each other through the mapping of object attributes sets of object attributes that are called clusters . </li></ul><ul><li>At the highest-level applications are defined by an application profile . </li></ul><ul><li>Data communication between objects is implemented in compressed XML to ensure hardware independence. </li></ul><ul><li>ZigBee also requires a set of basic device methods that every application object must implement. </li></ul><ul><li>Each ZigBee device can support multiple applications that are identified by a numbered “ end point ” designation. </li></ul><ul><ul><li>There can be 240 endpoints per ZigBee device, but each end point can support only one profile. </li></ul></ul>
    38. 38. ZigBee Network Layer <ul><li>This is a critical component in the ZigBee Stack. </li></ul><ul><li>The functionality of network layer depends on its role as a Co-ordinator, Router or End Device. </li></ul><ul><li>The network layer performs device management functions for each device on the network. </li></ul><ul><li>This layer also performs route discovery and maintenance along with basic frame handling for transfer of network packets. Also supports Message Routing . </li></ul><ul><li>If a device wants to join in a network it will require a logical network address . This address is provided by a network coordinator or ZigBee router. </li></ul><ul><li>This layer also supports Security. </li></ul>
    39. 39. ZigBee Network Layer <ul><li>ZigBee End devices don’t participate routing. End devices communicate with a single router, which is their parent device. </li></ul><ul><li>When the coordinator permits new devices to join the network these devices join through a process called “ association ”. </li></ul><ul><li>Devices that lose contact with their parent device can rejoin a network through a process known as “ orphaning ”. </li></ul><ul><li>Some ZigBee network can operate with a beacon frame. This is a feature of IEEE 802.15.4 that allows a network to synchronize. </li></ul>
    40. 40. How Devices Join in Network? <ul><li>Devices that wish to join the network will do so by first issuing beacon requests to solicit beacons from devices that could potentially allow them to join the network. Initially, only the PAN coordinator will respond. In addition to the PAN coordinator, any device capable of allowing other devices to join the network is a ZigBee router. </li></ul><ul><ul><li>What ensues is a series of message exchanges that will determine whether a device may join the network. </li></ul></ul><ul><ul><li>In 802.5.4, this process is called “ association ”. At the time of association the newly joining device will get 16-bit address. </li></ul></ul><ul><ul><li>A key factor in such a determination is a router’s capacity to accept additional devices as its child. </li></ul></ul><ul><ul><li>In 802.15.4 Hierarchy of association is possible whereas in Wi-Fi it’s not possible. (Also called Multiple level of association ). </li></ul></ul><ul><ul><ul><li>In this case a device (eg: router) joining in to the network can have children's so network need to permit all the children’s to be join or reject. </li></ul></ul></ul>
    41. 41. Hierarchy of Association:
    42. 42. ZigBee MAC Layer <ul><li>This layer responsible for addressing for outgoing data. This layer also referred Data Link Layer or MAC Layer . </li></ul><ul><li>The ZigBee MAC sub layer provides two services: </li></ul><ul><ul><li>MAC Data Service </li></ul></ul><ul><ul><li>MAC Management Service </li></ul></ul><ul><li>The features of MAC Sub layer are: </li></ul><ul><ul><li>Beacon Management </li></ul></ul><ul><ul><li>CSMA-CA Channel Access </li></ul></ul><ul><ul><li>GTS Management </li></ul></ul><ul><ul><li>Frame Validation </li></ul></ul><ul><ul><li>ACK frame delivery </li></ul></ul><ul><ul><li>PAN Association and disassociation. </li></ul></ul>
    43. 43. ZigBee Physical Layer <ul><li>The ZigBee Physical layer supports two services: </li></ul><ul><ul><li>PHY Data Services: </li></ul></ul><ul><ul><li>PHY Management Entity </li></ul></ul><ul><li>The features of PHY are: </li></ul><ul><ul><li>Activation and deactivation of radio transceiver. </li></ul></ul><ul><ul><li>Energy Detection </li></ul></ul><ul><ul><li>Link Quality Indication </li></ul></ul><ul><ul><li>Channel Selection </li></ul></ul><ul><ul><li>Clear Channel Assessment </li></ul></ul><ul><ul><li>Transmitting and receiving packets across physical medium. </li></ul></ul>
    44. 44. ZigBee Network Topologies PAN coordinator Full Function Device Reduced Function Device Star Mesh Cluster Tree
    45. 45. <ul><li>65,536 network (client) nodes </li></ul><ul><li>Optimized for timing-critical applications and power management </li></ul><ul><ul><li>Time to Join Network: <30ms </li></ul></ul><ul><ul><li>Sleeping to active: <15ms </li></ul></ul><ul><ul><li>Channel access time: <15ms </li></ul></ul><ul><li>Full Mesh Networking Support </li></ul>Basic Network Characteristics Network coordinator Full Function node Reduced Function node Communications flow Virtual links
    46. 46. ZigBee Device Types <ul><li>ZigBee Coordinator (ZC) </li></ul><ul><ul><li>One and only one required for each ZB network. </li></ul></ul><ul><ul><li>Initiates network formation. </li></ul></ul><ul><ul><li>Acts as 802.15.4 2003 PAN coordinator (FFD). </li></ul></ul><ul><ul><li>May act as router once network is formed. </li></ul></ul><ul><li>ZigBee Router (ZR or FFD) </li></ul><ul><ul><li>Optional network component. </li></ul></ul><ul><ul><li>May associate with ZC or with previously associated ZR. </li></ul></ul><ul><ul><li>Acts as 802.15.4 2003 coordinator (FFD). </li></ul></ul><ul><ul><li>Participates in multihop routing of messages. </li></ul></ul><ul><li>ZigBee End Device (ZED or RFD) </li></ul><ul><ul><li>Optional network component. </li></ul></ul><ul><ul><li>Shall not allow association. </li></ul></ul><ul><ul><li>Shall not participate in routing. </li></ul></ul>
    47. 47. ZigBee Device Types
    48. 48. ZigBee Device Functionalities <ul><li>Designed for battery powered or high energy savings </li></ul><ul><li>Searches for available networks </li></ul><ul><li>Transfers data from its application as necessary </li></ul><ul><li>Determines whether data is pending </li></ul><ul><li>Requests data from the network coordinator </li></ul><ul><li>Can sleep for extended periods </li></ul><ul><li>Sets up a network </li></ul><ul><li>Transmits network beacons </li></ul><ul><li>Manages network nodes </li></ul><ul><li>Stores network node information </li></ul><ul><li>Routes messages between paired nodes </li></ul><ul><li>Typically operates in the receive state </li></ul>The ZigBee Network Node The ZigBee Network Coordinator
    49. 49. ZigBee Network Topologies <ul><li>Star networks support a single ZigBee coordinator with one or more </li></ul><ul><li>ZigBee End Devices (up to 65,536 in theory) </li></ul><ul><li>Cluster tree networks provide for a beaconing multi-hop network </li></ul><ul><li>► Permits battery management of coordinator and routers </li></ul><ul><li>► Must tolerate high latency due to beacon collision avoidance </li></ul><ul><li>► Must use “netmask” type tree routing </li></ul><ul><li>Mesh network routing permits path formation from any source device to any destination device </li></ul><ul><li>► Radio Receivers on coordinator and routers must be on at all times </li></ul><ul><li>► Employs ZigBee joint routing solution including tree and table driven routing </li></ul><ul><li>► Table routing employs a simplified version of Ad Hoc On Demand Distance Vector Routing (AODV). This is an Internet Engineering Task Force (IETF) Mobile Ad Hoc Networking (MANET) submission. </li></ul>
    50. 50. Star Network: <ul><li>Simplest type of network. Consists only coordinator and end devices. </li></ul><ul><li>The disadvantage of this network is the network can extend to only two hops (end device, coordinator, end device). </li></ul><ul><ul><li>This limits the coverage of a single network. </li></ul></ul><ul><li>It also requires a reliable link between all end devices and the ZigBee coordinator. </li></ul><ul><li>Here all the messages traveled via coordinator. </li></ul><ul><li>No alternate route if the link between target devices and coordinator broken. </li></ul><ul><li>Also coordinator have bottleneck and causes congestion. </li></ul>
    51. 51. Tree Network: <ul><li>Unlike star network it can allow multi-hop communication and thus can extended the network coverage. </li></ul><ul><li>The Coordinator and Routers can have children, and End devices can’t have children. </li></ul><ul><li>Nodes with the same parent are called siblings. Similarly nodes with the same grandparent are called cousins. </li></ul><ul><li>Some of the communication rules: </li></ul><ul><ul><li>A child can only direct communicate with its parent (and with no other node). A parent can only direct communicate with its children and with its own parent. </li></ul></ul><ul><ul><li>The disadvantage of this topology is that there is no alternate route if a necessary link fails. </li></ul></ul>
    52. 52. ZigBee Tree Network Example:
    53. 53. Mesh Network: <ul><li>This network allows multi-hop communication and also support multiple paths between network nodes for increased reliability. </li></ul><ul><li>Routers on mesh networks are able to discover and characterize the alternative routes available to them and choose the best path. </li></ul><ul><li>Mesh networks can extend widely. </li></ul><ul><li>The drawback of this networks are that the router nodes must be powered on at all times and also router nodes must also be capable of storing route information and discovering routes. </li></ul><ul><li>Latencies of mesh networks are difficult to estimate. </li></ul><ul><li>The network structure is same as tree topology. However the communication rules are more flexible as described below: </li></ul><ul><ul><li>Router nodes within range of each other can communicate directly. </li></ul></ul><ul><ul><li>Route discovery feature is provided. </li></ul></ul>
    54. 54. Mesh Network: <ul><li>Mesh Network overcomes barriers in wireless networks (i.e., Overcomes line of sight fear): </li></ul><ul><ul><li>Barrier 1: Reliability </li></ul></ul><ul><ul><ul><li>Peoples can move when wireless reception is poor, machines typically can’t. </li></ul></ul></ul><ul><ul><li>Barrier 2: Wireless Expertise </li></ul></ul><ul><ul><ul><li>Customers and some installers don’t want to be wireless experts. </li></ul></ul></ul><ul><ul><ul><li>Wants “wireless control that simply works”. </li></ul></ul></ul>
    55. 55. ZigBee Mesh Network Example:
    56. 56. ZigBee – Highly Reliable <ul><li>Mesh and tree networking protocol provides redundant paths </li></ul><ul><li>Automatic retries and acknowledgements </li></ul><ul><li>Broadcast delivery scheme ensures reliable broadcasts across the network </li></ul><ul><li>Parents keep track of messages for sleeping children </li></ul><ul><li>High intrinsic interference tolerance </li></ul><ul><ul><li>Multiple channels </li></ul></ul><ul><ul><li>Frequency agility </li></ul></ul><ul><ul><li>Robust modulation </li></ul></ul>
    57. 57. ZigBee Routing: <ul><li>ZigBee routing algorithm is Ad hoc On Demand Distance Vector (AODV) and Cluster Tree algorithm . </li></ul><ul><li>Ad hoc On Demand Distance Vector: </li></ul><ul><ul><li>This is a pure on-demand route acquisition algorithm: nodes that don’t lie in active path neither maintaining any routing information nor participate any periodic routing table exchange. </li></ul></ul><ul><ul><li>Also a node doesn’t have to discover another node until the two needs to communicate, unless further node is offering a services as an intermediate forwarding station to maintain connectivity between two other nodes. </li></ul></ul><ul><li>Whenever a source needs to communicate with another node for which no routing information in its table, then the Path Discovery process is initiated. </li></ul><ul><li>Every node maintains two separate counters: Sequence number and Broadcast id. </li></ul>
    58. 58. AODV Routing:
    59. 59. Cluster Tree Algorithm: <ul><li>Protocol of logical link and network layers </li></ul><ul><li>Forms single/multi cluster tree networks </li></ul><ul><li>Forms self-organizing network with redundancy and self-repair capabilities </li></ul><ul><li>Nodes select cluster heads and form clusters in a self-organized manner. </li></ul><ul><li>Self-developed clusters then connect to each other through a designated Device (DD) </li></ul>
    60. 60. Cluster Tree Algorithm: Multi cluster network with DD border nodes
    61. 61. ZigBee Profiles <ul><li>What is a Profile ? </li></ul><ul><ul><li>An agreement of series of messages defined in application space. </li></ul></ul><ul><li>Why we need profile? </li></ul><ul><ul><li>Need a command language for exchanging data. </li></ul></ul><ul><ul><li>Need a well defined set of processing actions </li></ul></ul><ul><ul><li>Device interoperability across different manufacturers </li></ul></ul><ul><ul><li>Allows solid conformance test programmes to be created </li></ul></ul><ul><ul><li>Simplicity and reliability for the end users </li></ul></ul><ul><ul><li>Realistic application specifications developed through OEM experience </li></ul></ul><ul><li>Different types of profiles? </li></ul><ul><ul><li>Standard ( Defined by ZigBee alliance ) </li></ul></ul><ul><ul><li>Private profile ( Vendor defined ) . </li></ul></ul>
    62. 62. ZigBee Protocol Stack
    63. 63. ZigBee Stack Architecture
    64. 64. ZigBee Stack Architecture <ul><li>Using layered communication architecture, ZigBee makes use of IEEE 802.15.4 MAC and Physical layers and ZigBee itself defines Network along with application layers and security components. </li></ul><ul><ul><li>The PHY, MAC and NWK layers are used to create and maintain the communication network interconnecting between individual ZigBee devices. </li></ul></ul><ul><ul><li>The Application support (APS) sub layer is used to communicate application layer information between devices. </li></ul></ul><ul><li>ZigBee Stack System Requirements: </li></ul><ul><ul><li>8-bit Micro controller (Eg: 80 C51). </li></ul></ul><ul><ul><li>Full protocol stack < 32K </li></ul></ul><ul><ul><li>Simple node only stack ~ 6K. </li></ul></ul><ul><ul><li>Coordinator requires extra RAM for Node device database, Transaction table and Pairing table. </li></ul></ul>
    65. 65. Responsibilities of ZigBee Network Layer: <ul><li>Starting a network: Ability to successfully establish a new network. </li></ul><ul><li>Joining and leaving a network : The ability to gain membership (join) or relinquish membership (leave) a network. </li></ul><ul><li>Configuring a new device: The ability to sufficiently configure the stack for operation as required. </li></ul><ul><li>Addressing: The ability of a ZigBee coordinator to assign addresses to devices joining the network. </li></ul><ul><li>Synchronization within a network: The ability for a device to achieve synchronization with another device either through tracking beacons or by polling. </li></ul><ul><li>Security: applying security to outgoing frames and removing security to terminating frames </li></ul><ul><li>Routing: routing frames to their intended destinations. </li></ul>
    66. 66. Responsibilities of ZigBee Application Layer: <ul><li>The ZigBee application layer consists of </li></ul><ul><ul><li>APS Sub Layer </li></ul></ul><ul><ul><li>ZDO </li></ul></ul><ul><ul><li>Manufacture defined application objects. </li></ul></ul><ul><li>Responsibilities of APS sub layer: </li></ul><ul><ul><li>Maintaining tables for binding. </li></ul></ul><ul><ul><li>Forwarding messages between bound devices. </li></ul></ul><ul><ul><li>Discovery. </li></ul></ul><ul><li>Responsibilities of the ZDO include: </li></ul><ul><ul><li>Defining the role of the device within the network (e.g., ZigBee coordinator, router or end device), </li></ul></ul><ul><ul><li>Initiating and/or responding to binding requests. </li></ul></ul><ul><ul><li>Establishing a secure relationship between network devices by selecting one of the security method by selecting public key or symmetric key. </li></ul></ul><ul><li>The manufacturer-defined application objects implement the actual applications. </li></ul>
    67. 67. ZigBee Stack Architecture <ul><li>An application profile describes the collection of devices employed for a specific application and implicitly the messaging scheme between the devices. </li></ul><ul><ul><li>Eg: Home Automation application profile, Industrial Automation application profile, etc.,. </li></ul></ul><ul><ul><li>A profile ID is allocated for each application to uniquely identify that application. </li></ul></ul><ul><li>Devices within a application profile communicate with each other by means of clusters , which may be input to or output from the device. </li></ul><ul><ul><li>Eg: In home automation system there is a cluster (group of predefined functions) dedicated to the control of lighting subsystem. </li></ul></ul><ul><ul><li>A cluster ID uniquely identify the clusters within the scope of a particular profile. </li></ul></ul>
    68. 68. ZigBee Stack Architecture <ul><li>An end point defines a communication entry within a device through which a specific application is carried. </li></ul><ul><ul><li>In a device you can use maximum of 240 endpoints. </li></ul></ul><ul><ul><li>End point 0 dedicated to ZigBee Device Object (ZDO). </li></ul></ul><ul><ul><li>Eg: End point 5 for control of light in bed room, endpoint 8 to manage the heating and air conditioning system and 12 for controlling security system etc., </li></ul></ul><ul><li>It is also possible to define the private application profiles also and implicitly need to define device and cluster definitions. </li></ul>
    69. 69. ZigBee Device Binding <ul><li>Bindings are connections between two end points, with each binding supporting a specific application profile , and each message type is represented by a cluster (within that profile). </li></ul><ul><li>When combined with the network source and destination address (which identifies a particular radio), an APS frame containing the source and/or the destination endpoint, cluster ID and profile ID uniquely identifies a specific message type within a specific profile between two application endpoints associated with two specific devices. </li></ul><ul><li>The above binding information will be stored within the source device. This type of binding is called as direct binding or source binding . </li></ul>
    70. 70. ZigBee Device Binding
    71. 71. Direct & Indirect Binding <ul><li>The above left fig shows direct binding . Here source contain all the necessary information to construct a packet and send it to peer device. </li></ul><ul><li>The other type of binding is called indirect binding . In this type of binding all the binding information will be stored in a intermediate device that provides a lookup table mapping the source endpoint and address to the corresponding destination endpoint and address. </li></ul>
    72. 72. ZigBee Lighting Applications Addressing & Binding Example:
    73. 73. ZigBee Device Binding <ul><li>Bindings establishes the relationship between the nodes of a ZigBee network. </li></ul><ul><ul><li>Eg: Which switch controls which light, etc., </li></ul></ul><ul><li>Types of bindings that can be achieved are: </li></ul><ul><ul><li>one-to-one, </li></ul></ul><ul><ul><li>one-to-many </li></ul></ul><ul><ul><li>many-to-one. </li></ul></ul><ul><li>Some of the characteristics of bindings are: </li></ul><ul><ul><li>Binding is independent of network topology. </li></ul></ul><ul><ul><li>Some times Bindings are factory configured and stored in application image. </li></ul></ul><ul><ul><li>Some times Bindings are automatically created during network installation. </li></ul></ul><ul><ul><li>In some cases bindings are created manually by the system integrator or installation technician. </li></ul></ul>
    74. 74. ZigBee Device Object (ZDO) <ul><li>The ZigBee Device Object (ZDO) is a special application common to all ZigBee devices. This application (ZDO) resides in the application layer of node at endpoint 0 . </li></ul><ul><li>ZDO has the following Roles: </li></ul><ul><ul><li>Defines the type of networked device (Coordinator, router or end device). Also Initialize the nodes to allow application to run. </li></ul></ul><ul><ul><li>Performs Device and Service Discovery process. </li></ul></ul><ul><ul><li>Implements the processes needed to allow a Coordinator to create a network, and Routers and End devices to join and leave a network. </li></ul></ul><ul><ul><li>Initiate and respond to binding requests. </li></ul></ul><ul><ul><li>Provides security services which allow security relationships to be established between applications. </li></ul></ul><ul><ul><li>Allow remote nodes to retrieve information from the node, such as routing and binding tables, etc.,, </li></ul></ul>
    75. 75. ZigBee Device Object (ZDO) <ul><li>The ZDO provides management commands common to all ZigBee applications and devices and it is implemented on end point 0 of each device. </li></ul><ul><li>The definitions of clusters used by ZDO are described by the ZigBee Device Profile (ZDP) . At present the following functions are supported by this profile. </li></ul><ul><ul><li>Device and Service Discovery </li></ul></ul><ul><ul><li>Binding Management. </li></ul></ul><ul><ul><li>Network Management. </li></ul></ul><ul><li>In short ZDO is resides in the application layer and responsible for defining the role of the device within the network (e.g., Coordinator or End device), initiating and/or responding to binding and discovery requests and establishing a secure relationship between network devices. </li></ul>
    76. 76. ZigBee Traffic & Frames
    77. 77. ZigBee/IEEE802.15.4 - Typical Traffic Types Addressed <ul><li>ZigBee/IEEE 802.15.4 addresses three typical traffic types. IEEE 802.15.4 MAC can accommodate all types. </li></ul><ul><ul><li>Periodic data : The application dictates the rate, and the sensor activates, checks for data and deactivates. </li></ul></ul><ul><ul><li>Intermittent data : Application/external stimulus defined rate (e.g., light switch). The device needs to connect to the network only when communication is necessitated. This type enables optimum saving on energy. </li></ul></ul><ul><ul><li>Repetitive low latency data: Here the rate is fixed a priori. Depending on allotted time slots, called GTS devices operate for fixed durations. </li></ul></ul><ul><ul><ul><li>Time slot allocated for a device Eg: mouse. </li></ul></ul></ul>
    78. 78. PHY Packet Overview: <ul><li>PHY Packet Field: </li></ul><ul><ul><li>Preamble (32 bits) – synchronization 4-bit Symbols. </li></ul></ul><ul><ul><li>Start of Frame Delimiter (8 bit) – Sync Byte. Used to indicate starting point of packet. </li></ul></ul><ul><ul><li>PHY Header (8 bits) – PSDU length. Max of 127 bytes. </li></ul></ul><ul><ul><li>PSDU (0 to 1016 bits) – Data field (Max of 127 bytes PSDU). </li></ul></ul><ul><li>PHY Responsible for: </li></ul><ul><ul><li>Activation and deactivation of the radio transceiver </li></ul></ul><ul><ul><li>ED within the current channel </li></ul></ul><ul><ul><li>LQ Indication for received packets </li></ul></ul><ul><ul><li>CCA for CSMA-CA </li></ul></ul><ul><ul><li>Channel frequency selection </li></ul></ul><ul><ul><li>Data transmission and reception </li></ul></ul>
    79. 79. Different Frames in IEEE 802.15.4 <ul><li>The IEEE 802.15.4 MAC defines four frame structures: </li></ul><ul><ul><li>Beacon Frame: Used by a coordinator to transmit beacons. </li></ul></ul><ul><ul><li>Data frame: Used for all transfers of data. </li></ul></ul><ul><ul><li>Acknowledgment Frame: Used for confirming successful frame reception. </li></ul></ul><ul><ul><li>MAC Command Frame: Used for handling all MAC peer entity control transfers. </li></ul></ul>
    80. 80. ZigBee all Four Frame Formats:
    81. 81. MAC Frame: <ul><li>Each MAC frame consists following components: </li></ul><ul><ul><li>MHR : Consists Frame control, Sequence number and address. </li></ul></ul><ul><ul><li>MAC Play Load: It is variable length contains information specific to frame type. Acknowledgement frames doesn’t contain this play load. </li></ul></ul><ul><ul><li>MFR: Which contains FCS. </li></ul></ul>
    82. 82. Frame Commonality: <ul><li>All the frames have the following common components: </li></ul><ul><ul><li>Preamble Sequence: All of the frames begin with a 32-bit preamble that helps the receiving station to pick the transmission out of noisy environments. </li></ul></ul><ul><ul><li>Start Frame Delimiter : It consists a 8-bit. </li></ul></ul><ul><ul><li>Frame Length Field: Tells the receiving station exactly how long the frame is. 8-bit length. (i.e., PHY Header ) </li></ul></ul><ul><ul><li>Sequence Number : An 8-bit value that is incremented each time a device transmits a new, unique frame. </li></ul></ul><ul><ul><li>Frame Check Sequence (FCS) : Each frame ends with a 16-bit mathematical sequence that allows the receiving station to validate that the packet was received without error. </li></ul></ul>
    83. 83. Beacon Frame:
    84. 84. Data Frame:
    85. 85. Acknowledgement Frame:
    86. 86. MAC Command Frame:
    87. 87. IEEE 802.15.4 & ZigBee Frame Formats
    88. 88. General APDU Frame Format:
    89. 89. Super Frame: <ul><li>The superframe is bounded by network beacons is sent by the coordinator and is divided into 16 equally sized slots. </li></ul><ul><ul><li>The format of the superframe is defined by the coordinator. </li></ul></ul><ul><ul><li>The beacon frame is transmitted in the first slot of each superframe. </li></ul></ul><ul><ul><li>If a coordinator does not wish to use a superframe structure it may turn off the beacon transmissions. </li></ul></ul><ul><li>The beacons are used to synchronize the attached devices, to identify the PAN, and to describe the structure of superframes . </li></ul>Super Frame without GTS
    90. 90. Super Frame: <ul><li>For a low latency applications or applications requires specific data band width, the PAN coordinator may dedicate portions of the active superframe to that application. These portions are called Guaranteed Time Slots (GTS’s) . </li></ul><ul><ul><li>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, </li></ul></ul><ul><ul><li>The PAN coordinator may allocate up to seven of these GTSs and a GTS may occupy more than one slot period. </li></ul></ul>Super Frame with GTS
    91. 91. Super Frame & Beacon <ul><li>A Zigbee router can announce a beacon to start a superframe </li></ul><ul><li>Each superframe consists of an active portion followed by an inactive portion . </li></ul><ul><li>Each active portion consists of 16 equal-length slots and can further partitioned into a Contention Access Period (CAP) and a Contention Free Period (CFP). </li></ul><ul><ul><li>CAP : Slotted CSMA/CA is used in CAP </li></ul></ul><ul><ul><li>CFP : FFDs which require fixed transmission rates can ask for guarantee time slots (GTSs). ( As many as 7 slots for GTS transmission ). </li></ul></ul><ul><li>On receiving parent router’s beacon, and end device has to wake up for an active portion to sense the environment and communication with its coordinator. </li></ul><ul><li>To avoid collision with its neighbor, a router should shift its active portion by a certain amount. </li></ul>
    92. 92. Data Transfer Modes in ZigBee <ul><li>ZigBee employs either of two modes to enable the to-and-fro data traffic. </li></ul><ul><ul><li>Beacon Mode : Max Power saving. When coordinator runs on batteries this mode is used. </li></ul></ul><ul><ul><li>Non-beacon Mode : Here coordinator is main powered. </li></ul></ul><ul><li>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'; </li></ul><ul><ul><li>In fact, the coordinator itself switches to sleep mode. </li></ul></ul><ul><li>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. </li></ul>
    93. 93. Data Transfer Modes in ZigBee <ul><li>The non-beacon mode will be included in a system where devices are ‘asleep' nearly always. </li></ul><ul><ul><li>Eg: In smoke detectors and burglar alarms. </li></ul></ul><ul><ul><li>The devices wake up and confirm their continued presence in the network at random intervals. </li></ul></ul><ul><ul><li>On detection of activity, the sensors ‘jumps to attention', as it were, and transmit to the ever-waiting coordinator's receiver (since it is mains-powered). </li></ul></ul><ul><li>In tree networks coordinator and router can announce beacons. However in mesh networks regular beacons are not allowed. </li></ul><ul><li>Beacons are important mechanism to support power management. </li></ul><ul><li>So Tree topology is preferred for energy saving is a desirable feature. </li></ul>
    94. 94. Data Transfer Types in ZigBee <ul><li>Three types of data transfer transactions exists: </li></ul><ul><ul><li>Coordinator to Device </li></ul></ul><ul><ul><li>Device to Coordinator </li></ul></ul><ul><ul><li>Between two peer devices </li></ul></ul><ul><li>In non-beacon enabled network when device wants to transfer a data it simply transmits its data frame using the un-slotted CSMA-CA, to the coordinator. </li></ul><ul><ul><li>Optionally acknowledgement at the end. </li></ul></ul><ul><li>In a peer-to-peer network, every device can communicate with any other device in its transmission radius. There are two options: </li></ul><ul><ul><li>In the first case, the node will listen constantly and transmit its data using un slotted CSMA-CA. </li></ul></ul><ul><ul><li>In the second case, the nodes synchronize with each other so that they can save power. </li></ul></ul>
    95. 95. MAC Data Service Diagrams Non-Beacon Network Communication Beacon Network Communication:
    96. 96. Data Transfer Coordinator to Device (NonBeacon-Enabled) <ul><li>Coordinator stores pending data and waits for request </li></ul><ul><li>Device requests data using unslotted CSMA-CA at application-defined rate </li></ul><ul><li>Coordinator acknowledges request </li></ul><ul><li>Data sent from coordinator to device </li></ul><ul><li>Finally Device acknowledges. </li></ul>
    97. 97. Data Exchange Scenario in Non-Beacon Enabled Networks: <ul><li>Steps to exchange data with ACK between stations A and B : </li></ul><ul><ul><li>Station A checks the RF channel to ensure that another station is not transmitting. </li></ul></ul><ul><ul><li>Station A transmits a data frame addressed to Station B. </li></ul></ul><ul><ul><li>Station B receives the frame, and uses the FCS to make sure that the packet was received without error. </li></ul></ul><ul><ul><li>After the aTurnaroundTime end of A’s transmission, B responds with the Acknowledgement packet which is addressed to A, and contains the Frame Number specified in A’s original frame. </li></ul></ul><ul><ul><ul><li>It allows A to know that B received the data without error. </li></ul></ul></ul><ul><ul><li>If this ACK is not received within “ macAckWaitDuration” , then the process begins a new with A transmitting the Data Frame. </li></ul></ul><ul><li>Ev en with multiple retransmissions, the entire process takes well under 10 m.sec , (So R obust, Timely, Efficient data exchange). </li></ul>
    98. 98. Beacon communication from coordinator to device: <ul><li>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, device transmits a MAC command requesting this data, using slotted CSMA-CA. The pending data frame is then sent using slotted CSMA-CA by coordinator. </li></ul>Here Both the ACK’s are optional.
    99. 99. Steps required for transmitting data from Coordinator to Device (Beacon enabled) network <ul><li>The coordinator has data and it need to be transmitted to the device. </li></ul><ul><li>The Coordinator indicates in beacon message that data is pending. </li></ul><ul><li>Devices tracking the beacons, decode the pending address fields. </li></ul><ul><li>If a device finds its address listed among the pending address fields, it realizes it has data to be received from the coordinator </li></ul><ul><li>Device issues a Data-Request Command to the coordinator using slotted CSMA-CA. </li></ul><ul><li>The coordinator replies with an acknowledgement. </li></ul><ul><li>If there is data to be sent to the device, Coordinator will transmits the data. </li></ul><ul><li>If acknowledgements are not optional, the device would respond with an acknowledgement. </li></ul>
    100. 100. Data Transmission from a device to a Coordinator in Beacon enabled network <ul><li>The device first listens to the beacon. </li></ul><ul><li>On finding the beacon, it synchronizes first to the superframe structure. This process lets it know the start and end time of the Contention access period. </li></ul><ul><li>The device will now compete with its peers for a share of the channel. </li></ul><ul><li>On its turn, it will transmit the data to the coordinator. </li></ul><ul><li>The coordinator may reply back with an acknowledgement, if it is not optional. </li></ul>
    101. 101. ZigBee Security
    102. 102. ZigBee – Highly Secure <ul><li>Utilizes AES 128-bit encryption </li></ul><ul><li>Concept of a “trust center” </li></ul><ul><li>Link and network keys </li></ul><ul><li>Authentication and encryption </li></ul><ul><li>Security can be customized for the application </li></ul><ul><li>Keys can be “hard-wired” into application </li></ul><ul><li>Security defined at MAC, NWK and APS layers. </li></ul>
    103. 103. ZigBee Security Architecture
    104. 104. ZigBee Security <ul><li>ZigBee networks are highly secure. The security toolbox offering into the ZigBee network are: </li></ul><ul><ul><li>Access Control Lists: Only free defined friendly nodes can join in the network. </li></ul></ul><ul><ul><li>128-bit AES-based encryption: A very high-security key-based encryption system preventing external agents from interpreting the ZigBee network data . </li></ul></ul><ul><ul><li>Message Freshness Timers: Timed-out messages are rejected, and Freshness check prevents the message replay attacks on the network. </li></ul></ul>
    105. 105. ZigBee Security <ul><li>ZigBee Security specifications are built upon capabilities of the IEEE 802.15.4 specification. </li></ul><ul><li>ZigBee provides 4 fundamental security mechanisms: freshness, message integrity, authentication, and encryption . </li></ul><ul><li>Freshness: ZigBee devices maintained freshness counters for incoming and outgoing messages. These counters are designed to prevent “replay attacks”, where an attacker replays messages it recorded previously. </li></ul><ul><ul><li>Counter is reset when new key is created. </li></ul></ul><ul><ul><li>Devices that communicate once per second will not overflow their freshness counters for 136 years. </li></ul></ul>
    106. 106. ZigBee Security <ul><li>Message Integrity: It ensures that the message has not been modified during transit. </li></ul><ul><ul><li>Integrity options of 0, 32, 64 and 128 bit integrity. 64 is default. </li></ul></ul><ul><ul><li>Integrity options allows tradeoff between message protection and communication overhead required to support the protection. </li></ul></ul><ul><li>Authentication: It provides the assurance as to the identify of the originator of any message. In ZigBee authentication can be performed at the network level or the device level . </li></ul><ul><ul><li>Network authentication is performed using a common network key . This prevents outsider attacks while adding very little memory cost. </li></ul></ul><ul><ul><li>Device authentication uses unique link keys between pairs of devices. This prevents inside and outsider attacks but has higher memory cost. </li></ul></ul>
    107. 107. ZigBee Security <ul><li>Encryption: It prevents eavesdroppers from being able to understand the contents of messages. </li></ul><ul><ul><li>ZigBee uses 128-bit AES encryption. </li></ul></ul><ul><li>Similar to authentication ZigBee encryption is implemented at either network level or the device level using variable key lengths. </li></ul><ul><ul><li>Network level encryption is achieved by using a common network key. This prevents outsider attacks while adding very little memory cost. </li></ul></ul><ul><ul><li>Device level encryption is achieved by using unique key links between pairs of devices. This prevents inside and outsider attacks but has higher memory cost. </li></ul></ul><ul><li>Encryption can be turned off without impacting Freshness , Integrity or Authentication . </li></ul>
    108. 108. Trust Centre concept in ZigBee <ul><li>Trust centre allows the devices into the network and distributes keys. </li></ul><ul><ul><li>ZigBee Coordinator assumed to be the trust centre. </li></ul></ul><ul><ul><li>It is possible for the trust centre to be a dedicated device. </li></ul></ul><ul><li>Trust centre has the following roles: </li></ul><ul><ul><li>Trust Manager: It authenticate the device that join to the network. </li></ul></ul><ul><ul><li>Network Manager: Maintains and distributes network keys. </li></ul></ul><ul><ul><li>Configuration Manager: Enables end-to-end security between devices. </li></ul></ul><ul><li>Trust centre has the following modes: </li></ul><ul><ul><li>Residential Mode: Doesn’t establish keys with network devices. </li></ul></ul><ul><ul><li>Commercial Mode: Establishes and maintains keys with every device in the network. </li></ul></ul>
    109. 109. Fundamental Key types in ZigBee <ul><li>Master Key : Basis for long-term security between two devices. Eavesdropping should be prevented when this is setup. </li></ul><ul><ul><li>This key can be setup over the air or using the out-of-band mechanisms. ( Also have factory installed option ). </li></ul></ul><ul><ul><li>Master keys are installed first. These are sent from Trust center. </li></ul></ul><ul><li>Link Key: Basis of security between two devices. </li></ul><ul><li>Network Key: Basis of security across the network ( i.e., protects against outsiders ). </li></ul><ul><li>Link and Network keys can be updated periodically. </li></ul><ul><ul><li>These keys either can be installed in factory or out-of band. </li></ul></ul><ul><ul><li>These keys are transport from trust center. </li></ul></ul><ul><li>If two devices have a link key it is always used instead of network key . </li></ul><ul><li>Storage cast can be reduced by using network keys . However this reduces the security since the network key is used in many devices and can’t be prevented insider attacks. </li></ul>
    110. 110. Example: New device joining into the network: <ul><li>Keys need to be setup with and between new devices that join the network. </li></ul>
    111. 111. Example: New device joining into the network: <ul><li>If keys are setup over the air only the last link is vulnerable to a one time eavesdropper attack. </li></ul>
    112. 112. Example: New device joining into the network: <ul><li>After device joins into the network it needs to store multiple keys. </li></ul>
    113. 113. Example: Key distribution in ZigBee networks: <ul><li>In below key distribution keys with trust center allows periodic update of network keys. </li></ul>
    114. 114. ZigBee Frame with Security <ul><li>ZigBee security could add headers to the data frames at the MAC, NWK, and APS Layers. </li></ul>
    115. 115. Security at MAC Layer <ul><li>When security of MAC layer frames is desired, ZigBee uses MAC layer security to secure MAC command, beacon, and ACK frames. </li></ul><ul><ul><li>The MAC Layers uses AES as its core cryptographic algorithm and describes variety of security suites that use the AES. </li></ul></ul><ul><ul><li>The MAC layer does the security processing, but the upper layers, set up the keys and determine the security levels to use, control this processing. </li></ul></ul><ul><li>ZigBee may secure messages transmitted over a single hop using secured MAC data frames, but for multi-hop messaging ZigBee relies upon upper layers (Eg: NWK layer) for security. </li></ul><ul><li>When the MAC layer transmits (receives) a frame with security enabled, it retrieves the key associated with that destination (source), and then uses this key to process the frame. </li></ul><ul><ul><li>Specify security enabled or disable, MAC frame header has a bit. </li></ul></ul>
    116. 116. Security at MAC Layer <ul><li>The MAC layer security suites are based on three modes of operation. </li></ul><ul><ul><li>Encryption at the MAC layer is done using AES in Counter ( CTR ) mode. </li></ul></ul><ul><ul><li>Integrity is done using AES in Cipher Block Chaining ( CBC- MAC ) mode. </li></ul></ul><ul><ul><li>A combination of encryption and integrity is done using a mixture of CTR and CBC- MAC modes called the CCM mode. </li></ul></ul>
    117. 117. Security at NWK Layer <ul><li>The NWK layer also makes use of the AES. Unlike the MAC layer, the security suites are all based on the CCM* mode of operation. </li></ul><ul><ul><li>The CCM* mode of operation is a minor modification of the CCM used by the MAC layer. </li></ul></ul><ul><ul><li>It includes all of the capabilities of CCM and additionally offers encryption-only and integrity-only capabilities so simplifies NWK security, by eliminating the need for CTR and CBC-MAC modes. </li></ul></ul>
    118. 118. Security policies are not defined in ZigBee <ul><li>Out of band methods for key setup. </li></ul><ul><li>Cost/security tradeoff for number of link keys needed. </li></ul><ul><li>Handling security error conditions. </li></ul><ul><li>Handling loss of counter synchronization. </li></ul><ul><li>Handling loss of key synchronization. </li></ul><ul><li>Policy of expiration and update of keys. </li></ul><ul><li>Policy for accepting new devices. </li></ul>
    119. 119. ZigBee Descriptors & Commands
    120. 120. Descriptors used in ZigBee User-definable information O User Further information about the device descriptions (one per active endpoint) O Complex Device descriptions contained in the node (one per active endpoint) M Simple Node power characteristics M Node power Type and capabilities of the node (one per device) M Node Description Mandatory/ Optional Name
    121. 121. ZigBee Node Descriptor Allocated by the ZigBee Alliance 16 Manufacturer code Alternative PAN coordinator, MAC logical device type, power source, receiver on when idle, security capability 8 MAC capability flags 868MHz, 915MHz, 2.4GHz 5 Frequency band ZigBee coordinator, router, end-device 3 Logical type Description Length (bits) Field name
    122. 122. ZigBee Simple Descriptor Number of output clusters 8 Application output cluster count List of supported output clusters 8*o Application output cluster list Description Length (bits) Field name The endpoint to which this descriptor refers 8 Endpoint The profile implemented on this endpoint 16 Application profile ID The device description implemented on this endpoint 16 Application device ID Version 1.0 4 Application device version Complex, user descriptor available 4 Application flags List of supported input clusters 8* i Application input cluster list Number of input clusters 8 Application input cluster count
    123. 123. Device & Service Discovery Commands
    124. 124. Binding Commands
    125. 125. Network Mgmt Commands
    126. 126. CSMA/CA Algorithm
    127. 127. Some of Important Parameters: 12 symbol periods aMinSIFSPeriod 40 symbol periods aMinLIFSPeriod 440 symbol periods aMinCAPLength 18 octets aMaxSIFSFrameSize 3 aMaxFrameRetries 5 aMaxBE 60 symbol periods aBaseSlotDuration 15--133 octets PHY data frame length 23--100 octets PHY beacon frame length 11 octets PHY acknowledgement frame length 8 symbol periods CCA duration Value Attribute
    128. 128. Some of Important Parameters: 0-15 (default 15) macSuperframeOrder 0-3 (default 3) macMinBE 0-5 (default 4) macMaxCSMABackoffs 0-15 (default 15) macBeaconOrder 120 or 54 symbol periods (channels 0 to 10 and 11 to 26, respectively) macAckWaitDuration 20 symbol periods aUnitBackoffPeriod 12 symbol periods aTurnaroundTime
    129. 129. Super Frame :
    130. 130. Terminology: <ul><li>Beacon Interval (BI): Time duration between two successive beacons. </li></ul><ul><li>Super Frame Duration (SD): Active period between two beacons. </li></ul><ul><li>BI and SD values are determined by two parameters namely Beacon Order (BO) and Super Frame Order (SO) . </li></ul><ul><li>BI = aBaseSuperFrameDuration * 2 BO for 0 ≤ BO ≤ 14 </li></ul><ul><li>SD = aBaseSuperFrameDuration * 2 SO for 0 ≤SO ≤ BO ≤ 14 </li></ul><ul><li>aBaseSuperFrameDuration denotes the minimum duration of the super frame corresponding SO = O. </li></ul><ul><ul><li>This duration is fixed to 960 symbols. </li></ul></ul><ul><li>Slotted CSMA/CA algorithm is based on a basic time unit called Backoff Period (BP), also called as aUnitBackoffPeriod. </li></ul><ul><li> aUnitBackoffPeriod = 20 Symbols. </li></ul>
    131. 131. Slotted CSMA/CA Algorithm:
    132. 132. Slotted CSMA/CA Algorithm: <ul><li>First, the number of backoffs (NB) and the contention window (CW) are initialized ( NB = 0 and CW = 2). </li></ul><ul><li>The backoff exponent is also initialized to BE = 2 or BE = min(2, macMinBE ) depending on the value of the Battery Life Extension MAC attribute. </li></ul><ul><li>Then, the algorithm starts counting down a random number of BPs uniformly generated within [0, 2 BE -1 ] . </li></ul><ul><ul><li>The count down must start at the boundary of a BP. </li></ul></ul><ul><li>When the timer expires, the algorithm then performs one CCA operation at the BP boundary to assess channel activity. </li></ul><ul><li>If the channel is busy , CW is re-initialized to 2, NB and BE are incremented. </li></ul><ul><ul><li>BE must not exceed aMaxBE . Which has default value of 5. </li></ul></ul><ul><ul><li>Incrementing BE increases the probability for having greater backoff delays. </li></ul></ul>
    133. 133. Slotted CSMA/CA Algorithm: <ul><li>If the NB reached the value macMaxCSMABackoffs ( default value = 5) is reached, the algorithm reports a failure to the higher layer, otherwise, it goes back to (Step 2) and the backoff operation is restarted. </li></ul><ul><li>If the channel is sensed as idle , CW is decremented. The CCA is repeated if CW ≠ 0 . </li></ul><ul><ul><li>This ensures performing two CCA operations to prevent potential collisions of acknowledgement frames. </li></ul></ul><ul><li>If the channel is again sensed as idle, the node attempts to transmit, provided that the remaining BPs in the current CAP are sufficient to transmit the frame and the subsequent acknowledgement. </li></ul><ul><li>If not, the CCAs and the frame transmission are both deferred to the next superframe. This is referred to as CCA deference . </li></ul>
    134. 134. Unslotted CSMA/CA Algorithm:
    135. 135. ZigBee vs Other Wireless Protocols
    136. 136. ZigBee vs Bluetooth <ul><li>New slave enumeration: ~ 30ms </li></ul><ul><li>Sleeping slave changing to active: ~ 15ms </li></ul><ul><li>Active slave channel access time: ~ 15ms </li></ul><ul><li>New slave enumeration = >3s to typically 20s </li></ul><ul><li>Sleeping slave changing to active ~ 3s </li></ul><ul><li>Active slave channel access time ~ 2ms typically </li></ul><ul><li>20 - 250 KBPS </li></ul><ul><li>10-100 meters </li></ul><ul><li>~1000-3000 KBPS </li></ul><ul><li>10 meters </li></ul><ul><li>DSSS </li></ul><ul><li>FHSS </li></ul><ul><li>Controls & Sensors </li></ul><ul><li>Lots of devices </li></ul><ul><li>Low duty cycle </li></ul><ul><li>Small data packets </li></ul><ul><li>Long battery life is critical </li></ul><ul><li>Synchronization of cell phone to PDA </li></ul><ul><li>Hands-free audio </li></ul><ul><li>PDA to printer </li></ul>ZigBee Bluetooth
    137. 137. Major Wireless Standards using ISM Band:
    138. 138. ZigBee and Other Wireless Standards:
    139. 139. More Information <ul><li>ZigBee Alliance Web Site </li></ul><ul><li>http:// www.ZigBee.org </li></ul><ul><li>IEEE 802.15 Web Site </li></ul><ul><li>http://www.ieee802.org/15 </li></ul><ul><li>Freescale Web Site </li></ul><ul><li>http://www.freescale.com/zigbee </li></ul>
    140. 140. More Information: <ul><li>IEEE 2003 version of 802.15.4 MAC & Phy standard </li></ul><ul><ul><li>http://standards.ieee.org/getieee802/download/802.15.4-2003.pdf </li></ul></ul><ul><li>ZigBee Specification </li></ul><ul><ul><li>http:// www.zigbee.org/en/spec_download/download_request.asp </li></ul></ul><ul><li>ZigBee Technology: Wireless Control that Simply Works </li></ul><ul><ul><li>http://www.hometoys.com/htinews/oct03/articles/kinney/zigbee.htm </li></ul></ul><ul><li>Home networking with Zigbee </li></ul><ul><ul><li>http:// www.embedded.com//showArticle.jhtml?articleID =18902431 </li></ul></ul><ul><li>Can the competition lock ZigBee out of the home? </li></ul><ul><ul><li>http:// www.techworld.com/mobility/features/index.cfm?FeatureID =1809 </li></ul></ul>
    141. 141. Questions: ?
    142. 142. Thank You ! <ul><li>ZigBee </li></ul><ul><li>Wireless Control that simply works ! </li></ul>