datasheets.com EBN.com EDN.com EETimes.com Embedded.com PlanetAnalog.com TechOnline.com  
Events
UBM Tech
UBM Tech

Design Article

ZigBee applications - Part 5: Addressing within the node

Drew Gislason

8/2/2010 9:37 PM EDT

[Part 1 reviews ZigBee data transmission along with an example that demonstrates how to initiate various data request mechanisms. Part 2 discusses ZigBee's lack of a standard C API and looks at an API sampling from the four "Golden Unit" ZigBee vendors. Part 3 describes PAN IDs, extended PAN IDs, and channels, as well as application examples. Part 4 examines ZigBee node types, the network address, MAC addresses, groups and broadcasts.]

4.5 Addressing Within the Node
The ZigBee addressing discussed so far, PAN IDs, unicasts, groupcasts, and broadcasts, are all about getting data to a node. But ZigBee goes beyond a networking protocol. ZigBee also offers application-level compatibility. To achieve this, ZigBee contains a variety of concepts I'll explain in detail here: endpoints, clusters, command, attributes, and profiles.

Addressing within ZigBee includes all of the following components:

  • PAN ID (MAC)
  • NwkAddr (NWK)
  • Endpoint (APS)
  • Profile ID (APS)
  • Cluster (APS)
  • Command and/or attribute (ZCL)

Take a look at this packet decode for the toggle command. All of the above components are included. The PAN ID is found in the IEEE 802.15.4 (MAC) portion of the frame, the source, and destination NwkAddr are found in the NWK frame, the source and destination endpoint, profile ID, and cluster ID are found in the APS frame. The command is found in the ZCL frame:

Frame 38 (Length = 30 bytes)
IEEE 802.15.4
        Frame Control: 0x8861
        Sequence Number: 67
        Destination PAN Identifier: 0x0f00
        Destination Address: 0x0000
        Source Address: 0x796f
ZigBee NWK
        Frame Control: 0x0048
        Destination Address: 0x0000
        Source Address: 0x796f
        Radius = 10
        Sequence Number = 19
ZigBee APS
        Frame Control: 0x40
        Destination Endpoint: 0x08
        Cluster Identifier: On/off (0x0006)
        Profile Identifier: HA (0x0104)
        Source Endpoint: 0x08
        Counter: 0x45
ZigBee ZCL
        Frame Control: 0x01
        Transaction Sequence Number: 0x48
        Command Identifier: Off (0x00)

4.5.1 Endpoints
Within each node are endpoints. Endpoints, identified by a number between 1 and 240, define each application running in a ZigBee node (yes, a single ZigBee node can run multiple applications).

Imagine a virtual wire connecting an endpoint on one node to an endpoint on another node, from endpoint 1 on node A to endpoint 99 on node B (see Figure 4.20).

Figure 4.20: Endpoints Are Virtual Wires Between Applications

A node may contain any number of endpoints (up to 240), with any set of endpoint identifiers. For example, a single node might contain just one endpoint, numbered 55. Or a node might contain 20 endpoints, numbered 1 through 10 and 201 through 210.

Endpoints serve three purposes in ZigBee:

  • Endpoints allow for different application profiles to exist within each node
  • Endpoints allow for separate control points to exist within each node
  • Endpoints allow for separate devices to exist within each node

Perhaps a switch may be sold in both commercial and home (or light commercial) markets. This switch, then, might support two Application Profiles: Home Automation and Commercial Building Automation. If so, it would contain two endpoints, one for each profile.

Perhaps a bank of three switches, as depicted in Figure 4.20, contains a single radio. Each of the switches would reside on a separate endpoint within that node, so that the switches operate independently of each other.

Perhaps a single widget contains three separate devices from a ZigBee standpoint. A common example of this is a thermostat.

ZigBee defines at least three separate devices to heat or cool a home or office, each of which may be controlled or monitored independently: a thermostat, which includes a human interface, a temperature sensor which informs the thermostat how warm it is, and a heating/cooling unit which physically controls the heater or air-conditioner unit. All three of these devices might be separated, spread out across the office, or they might be together in one widget as is common in homes. In the latter case, each of these devices would reside on a separate endpoint, within a single ZigBee node.

There is a special endpoint called a broadcast endpoint (0xff). Sending a data request to the broadcast endpoint will reach all endpoints within the node that matches the profile ID. The broadcast endpoint is implied when groupcasting (sending a data request with address mode gZbAddrModeGroup_c).





t.alex

8/13/2010 8:25 PM EDT

Gislason, The article is pretty informative. I would like to clarify further the use of endpoints here. It seems we can choose to use any endpoint we want ? Or we should follow some standard defining which endpoint for which purpose?

Sign in to Reply



Tim.Gillman

8/30/2010 1:38 AM EDT

To find out more about ZigBee and Wireless Sensor Networking, go to Drew's website: www.sanjuansw.com

Sign in to Reply



Please sign in to post comment

Navigate to related information

Datasheets.com Parts Search

185 million searchable parts
(please enter a part number or hit search to begin)