Project

General

Profile

Zigbee Protocol

  • Work in progress to document the Zigbee Protocol from different internet sources.

History

  • Build for low-power, low-cost, reliable

Standards

  • Based of 802.15.4 which implements PHY and MAC layers
    • Radio frequencies, encoding, frames, timeslots, etc.
    • 2.4GHz or 915MHz in US (unlicensed frequencies)
  • Zigbee Specificaiton handles the layers above this

Device Types

  • Full Function Device (FFD)
    • Coordinator
      • Repository for security keys
      • Stores network information
      • All networks must have at least one coordinator, but can have more than one
      • Can talk to anyone
    • Router
      • Routes packets to any other device
      • Can talk to anyone
  • Reduced Function Device (RFD)
    • Can only talk to FFDs, never to another RFD
    • Can't route packets

Addressing

  • 64bit or 16bit addresses

Frames

  • Fundamental unit of data transfer
  • Idea of a supergrame also exists
    • 16 time slots
      • Active and inactive sections for each slot
    • Guarantees bandwidth
    • Used for low-latency applications
  • CSMA/CA (Carrier Sense Multiple Access with Collision Avoidance) used for collisions
    • Will listen first to make sure no one is transmitting before transmitting
    • Exponential backoff for collisions

ZigBee Protocol

  • Network Layer
    • Take MAC layer and provides interface to application laye
    • Data Entity provides routing capabilities
    • Layer Control handles new device configuration and network establishment. Allows for discover of new nodes.
    • AODV routing (x x Distance Vector)
      • Broadcasts a send request to all neighbors who keep doing the same
      • Once path is found send reply through lowest cost path (usually the one that gets to the destination first)
      • Once reply reaches source, update routing table and then send packet to the first node on path to route
  • Application Layer
    • ZigBee Device Objects (ZDO)
      • Role assignment
        • A coordinator, router, or end device
      • Managing join requests
      • Device discovery
        • If address known -> Unicast to device
        • If address unknown -> broadcast with addresses returned by the device who responds to the broadcast message
        • Can learn information about what these nods can do this way
      • Security
        • 128bit keys
          • Associated with a network or link
        • Two types of keys
          • Master keys - controls the link key, must be preshared
          • Link key
        • Can send other nodes the keys as well
    • Application Support Sublayer (APS)
      • Bridges network and application layers
      • Can contain upto 240 "objects"
    • Manufacturer Defined Application Objects

Joining Networks

  • MAC Association
    • Supported by every Zigbee device
    • Steps
      • Coordinator tells others to join network by sending "NLIME-PERMIT-JOINING.request"
      • Router who wants to join (after receiving this message) sends "NLIME-JOIN.request" with rejoin=FALSE
    • Unsecure, all packets sent in the clear
  • Network Rejoin
    • Can be used to join for the first time too
    • Does not require the coordinator to send "NLIME-PERMIT-JOINING.request"
    • If key is shared beforehand or through another medium we can secure joining as well

Routing

  • Distance Vector used
  • Routing table keeps the cost and next node to get to a particular node *

Mesh Networks

  • Each peer usually connected to 2 or more peers
  • Relay messages from one peer to another

References