1 / 47

‘Under the Hood‘ of a ZigBee 2006 Network

‘Under the Hood‘ of a ZigBee 2006 Network. Ian Marsden Chairman ZigBee NWG Director, Software Engineering, Integration Associates. ZPUI. APSDE-SAP. APSDE-SAP. APSDE-SAP. APSSE-SAP. APSME-SAP. NLDE-SAP. NLSE-SAP. NLME-SAP. MCPS-SAP. MLME-SAP. Medium Access Layer (MAC) Layer. PD-SAP.

kamana
Télécharger la présentation

‘Under the Hood‘ of a ZigBee 2006 Network

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. ‘Under the Hood‘ of a ZigBee 2006 Network Ian Marsden Chairman ZigBee NWG Director, Software Engineering, Integration Associates

  2. ZPUI APSDE-SAP APSDE-SAP APSDE-SAP APSSE-SAP APSME-SAP NLDE-SAP NLSE-SAP NLME-SAP MCPS-SAP MLME-SAP Medium Access Layer (MAC) Layer PD-SAP PLME-SAP Physical (PHY) Layer ZigBee is built upon the foundations provided by the IEEE 802.15.4 standard. Application Framework ZigBee Device Object (ZDO) Application Object 240 Application Object 1 [On Endpoint 240] [On Endpoint 1] [On Endpoint 0] Application Support (APS) Layer Security Service Provider Network (NWK) Layer ZigBee Stack

  3. ZigBee Devices Type Model • Distinguishes the type of device from an end-user perspective Application Device Type e.g.Light Sensor e.g. Lighting Controller ... • Distinguishes the Logical Device Types deployed in a specific ZigBee network ZigBee LogicalDevice Type ZigBee Coordinator ZigBee Router ZigBee End Device • Distinguishes the type of ZigBee hardware platform 802.15.4Device Type FFD – Full Function Device RFD – Reduced Function Device • ZigBee products are a combination of Application, ZigBee Logical, and ZigBee Physical device types • Profiles may define specific requirements for this combination, but can also leave this up to manufacturers

  4. 802.15.4 Architecture: • Defines basic network structure • Provides methods for locating networks • Provides methods for joining / rejoining networks • Defines direct / indirect data transmission

  5. Architecture:Network Structure in 802.15.4 802.15.4 FFD 802.15.4 RFD Network Association

  6. MLME_SCAN: Locating Networks • Active Scan • Asks on the requested channels for other PANs • Returns a list of PANDescriptors

  7. MLME_START: Initiating a Network • Starts the requested PAN

  8. MLME_ASSOCIATE: Joining a Network • Associates with the requested coordinator

  9. MLME_SCAN: Rejoining a Network • Orphan Scan • Asks on the requested channels for its former parent

  10. Data Transmission: Direct • The receiving device has its receiver on (RxOnIdle) • The data packet can be set unsolicited • The MAC schedules it for immediate delivery (using CSMA-CA) In-Direct • The receiving device is asleep with its receiver off • The data packet has to be requested (Polled) • The MAC stores it for later retrieval by the RFD.

  11. Architecture: NWK layer details • ZigBee Device Types • Stack Profile, Network Rules • Network Management and Addressing • Message Routing • Route Discovery and Maintenance • Security

  12. Architecture:Network Structure in ZigBee

  13. Architecture: Stack Profile Sets the rules that the network adheres to: • nwkMaxDepth = 5 • nwkMaxChildren = 20 • nwkMaxRouters = 6 • nwkSecurityLevel = 5 (ENC-MIC-32) And many more • Minimum Table sizes (Neighbor, Routing) • Timeouts (Broadcast) • Route Cost Calculation Algorithm • Disables features (Multicast, Aggregation routing)

  14. Architecture: ZigBee Device Types ZigBee Coordinator (ZC) • One and only one required for each ZigBee network. • First one to the party • Initiates network formation. • Selects the time and place (Channel, PANId, Stack Profile) • Acts as IEEE 802.15.4 2003 PAN coordinator (FFD). • Also performs as router once network is formed. • Not necessarily a dedicated device can perform an application too.

  15. Architecture: ZigBee Device Types ZigBee Router (ZR) • Optional network component. • Discovers and associates with ZC or ZR. • Extends the network coverage • Acts as IEEE 802.15.4 2003 coordinator (FFD). • Manages local address allocation / de-allocation • Participates in multi-hop / mesh routing of messages. • Looks after its ZED’s when it comes to broadcasting and routing messages

  16. Architecture: ZigBee Device Types ZigBee End Device (ZED) • Optional network component. • Discovers and associates with ZC or ZR. • Acts as IEEE 802.15.4 2003 device (RFD). • Can be optimised for very low power operation • Relies on its parent to let it sleep • Shall not allow association. • Shall not participate in routing.

  17. General Frame Format

  18. Network Initiation: ZC • Initiates a ZigBee network • Performs an Energy Detect Scan • Performs an Active Scan • Selects the “nicest” channel • Selects an unused PANId • Starts a network

  19. Network Initiation: ZC

  20. Network Discovery: ZR & ZED • Locates ZigBee Networks • Performs an Active Scan • Selects a compatible network

  21. Network Association: ZR & ZED

  22. Network Association: ZR & ZED • Join a ZigBee Network • Selects the highest acceptable router • Associates with the chosen router • Allocated an address on the network • Inform the NHL

  23. Network Association: ZR & ZED

  24. Commencing Router Function: ZR • Commence Router Function • Once authenticated on the network • Prepares addresses for its children • Starts up the router function

  25. Addressing:Tree-structured Address Assignment • CSkip based address assignment • Address determined from tree location 0xFFFF 0x7FFF Address 0x0 Depth 0 Depth 1 nwkMaxDepth Depth 2 Depth 3 nwkMaxChildren

  26. Sending Data • Used by the NHL for sending broadcasts and unicasts • DstAddr defines the target device • Radius limits the number of hops for the message to traverse, if appropriate • DiscoverRoute can inhibit discovery

  27. Receiving Data • Created on reception of data for the local device • SrcAddr is the originator of the message

  28. Tree Routing: • The address tells you where the destination is • Simple equation gives ‘route up’ or ‘route down’ • If LocalAddr < DestAddr < LocalAddr + CSkip(d-1)Route Down • Else Route Up 0xFFFF 0x7FFF Address 0x0 Depth 0 Depth 1 Depth 2 Depth 3 Obviously not necessarily the most efficient route CSkip d= 1 CSkip d= 2

  29. Neighbour Routing: • A ZC or ZR maintains a table of devices in its neighbourhood • If the target device is physically in range it can send the message directly. 0xFFFF 0x7FFF Address 0x0 Depth 0 Depth 1 Depth 2 Depth 3 Devices Neighbourhood But what happens if the destination is not in the local neighbourhood?

  30. Mesh Routing: • ZC or ZR maintains a routing table of next hop addresses • If the target device has a routing table entry then the message can be sent using this route. 0xFFFF 0x7FFF Address 0x0 Depth 0 Depth 1 Depth 2 Depth 3 That’s great, but where do the routing table entries come from?

  31. Routing: Route Discovery • A device wishing to discover a route issues a route request command frame which is broadcast throughout the network. • When the intended destination receives the route request command frame it responds with a route reply command frame. • Potential routes are evaluated with respect to a routing cost metric. • Best route is added to the routing tables of all devices on the route

  32. Message Routing: The Basic Algorithm • See if the destination is in the Neighbour Table • Check for a Routing Table entry • Finally resort to Tree Routing NB. ZRs store messages for sleeping ZED’s

  33. Broadcast: The Basic Algorithm • Transmit broadcast message • Rebroadcast by local ZRs if it is new. • Time & radius limited. • ZRs store messages for sleeping ZED’s • ZRs issue broadcasts on behalf of sleeping ZEDs

  34. NLME-PERMIT-JOINING • Enable or Disable devices joining • Opens up a ZC or ZR for a possibly limited duration to new devices associating • Sets or clears the AssociationPermit status • PermitDuration in seconds 0 = Disable, 0xFF = Infinite

  35. Network Orphaning: ZR & ZED • Rejoin a previous Parent • Performs an 802.15.4 Orphan Scan • Previous parent will respond

  36. Network Orphaning: ZR & ZED

  37. Network Rejoining: ZR & ZED • Rejoin a network (New Parent) • Performs an Active scan to find out who is out there • Selects new parent with capacity

  38. Network Rejoining: ZR & ZED

  39. NLME-DIRECT-JOIN • Pre-join a device to a ZR or ZC • Enables the device to join later through orphaning • The CapabilityInformation is as the device would provide

  40. NLME-LEAVE • Controls the removal of devices from a network • Allows a device to leave itself (DeviceAddress = NULL) • Allows a device to request a child to leave • RemoveChildren defines if the children below the leaving device should also leave • Rejoin defines if the leave is a transient effect and the device should attempt to rejoin

  41. NLME-SYNC • Controls the receiving of data on a ZED • Requests a ZED to issue an MLME-POLL.request to its parent

  42. NLME-RESET • Returns the stack to a known state • In turn calls a MLME-RESET.request

  43. NLME-GET & NLME-SET • Requests the value of configuration parameters from within the NIB • Updates the value of configuration parameters within the NIB

  44. NLME-ROUTE-ERROR • Informs the NHL of some break down in communications • Used if Route Discovery fails • Used if Tree links break • Used if a packet cannot be delivered • Etc.

  45. Security: NWK Layer • The Stack Profile defines the security level in use. • Uses Network Key unless Link Key has been applied. • Tool box offers both authentication and encryption facilities. • Auxiliary Header and Message Integrity Code add overhead to the packet.

  46. To summarise the ZigBee network layer: • Has 3 device types; ZC, ZR and ZED. • Performs network discovery and formation • Performs address allocation • Performs message routing • Configured by the stack profile • Provides network wide security • Allows low power devices to maximize their battery life • ZigBee turns 802.15.4 into a low power multi-hop mesh network.

  47. Contact Details: Ian Marsden Integration UK Ltd Director, Software Engineering mailto:imarsden@integration.com DDI: +44 (0) 1737 227721 Cell: +44 (0) 7920 105537 Tel: +44 (0) 1737 227722 Fax: +44 (0) 1737 227744 16 - 18 West Street, Reigate, Surrey, RH2 9BS, United Kingdom http://www.integration.com

More Related