11

I am currently digging into ZigBee and the following question came to me:

Each ZigBee device has a 16 Bit short address, which means I can connect up to 2^16=65536 different devices (minus a few reserved addresses of course). Now each devices can bind up to 2^8 = 256 different services (since a few "ports" are also reserved, the maximum is actually 240 here). I was wondering, if these 8 bits are added to the 16 Bit short address, which means the actual address has 24 Bits or if these 8 bits are taken from the short address, which means, that the short address would effectively only have 8 Bits, which again would mean I could "only" connect 256 devices?

I am a little bit confused now, especially since most paper/articles about ZigBee use the term "node", which I assume means something like service, but not necessarily a new (different) device.

Any clarification?^^

3 Answers 3

10

In Zigbee the "node address" is the physical device (the radio). Each physical device can contain up to 240 "logical" devices (endpoints). Endpoints consist of clusters, which provide device behavior. When you create a bindings, you are tell one "logical" device how to communicate with another "logical" device.

So technically you can have roughly 15 million (2^16 * 240) "logical" devices on a network. In practice, Zigbee networks that reach the 1000s of node ranges tend to hit technical limitations, but this comes down to the placements of the physical devices relative to each other.

TL;DR - Think of the Node address as the IP address, and the Endpoint as the Port value. You can have multiple "applications" running at a single physical address on different ports.

5

In Zigbee each device has a 8 byte MAC address. This is called EUI64 format and is unique for each interface. Iti s just like the MAC address in ethernet but whereas in ethernet it is 6 bytes, in zigbee it is 8 bytes. When a device joins a network, it sends a association request to coordinator. In zigbee, the coordinator has a predefined node id [0000]. The node id is also called the short address. A short address can be used as a device identifier in the MAC header in place of 8 byte MAC address.The association request MAC header contains the source MAC address and the destination short address [0000]. The coordinator replies back with a association response. The MAC header of association response contains source as coordinator's MAC and Dest as device's MAC. The MAC payload of the association response contains a short address, which coordinator has chosen for the device. This short address is the device Node Id. Its a 16 bit number and can change every time the device actively joins a network. When used in the network layer it is called the node Id. When used in MAC layer it is called the short address. Node Id serves the same purpose as an IP address. It identifies the the device amongst multiple devices in the network. But in order to support multiple application, we would also need some kind of application identifier. This purpose is served by Endpoints. You can visualize Endpoints as TCP/UDP ports. Endpoints can serve any of the 3 purposes

  • It can be used to identify different application on a device
  • It may allow separate control points to exist in a single device. Each endpoint can be BINDED to another remote endpoint. So if a single device wants to talk to two devices, it can have 2 endpoints and the remote devices can have one endpoint each.
  • Now each physical device can contain multiple embedded basic logical devices. For example a device can contain both temperature sensor and on-off switch. Each of this logical device is generally an endpoint.

But in any of the above cases, each endpoint consists of multiple clusters, which defines the behavior of the logical device.

Here is the breakdown of the identifiers at various levels

  • MAC - 8 bytes EUI64 address. This can be replaced by a 2 byte short address to reduce the number of bytes being sent over the air since each bytes sent uses power and zigbee is all about conserving power.
  • NWK - 2 bytes node id. This can also be used as 2 bytes short address in MAC. This is independent of endpoint.
  • APL - 1 bytes Endpoint. To identify the application object. This is independent of Node Id.
3
  • Thanks for this Long explanation. I am playing around with some xbee Modulen anrduino and experienced a Stränge behaviour. The Short mac address changes from Time to Time, especially when The Nodes have been unplugged from power and re-connected again. Shouldn't the coordinator keep the short addresses as long as I have not disassociated the device from the network?
    – solick
    Jun 23, 2014 at 19:05
  • yes, the short address should remain the same. A lot of Zigbee devices are battery powered and lot of them sleep for a long time. Once in a while they would wake up and send some message. So there is no way for the coordinator to know whether the device is sleeping or powered down. Thas why the node Id should remain same across reboots Jun 24, 2014 at 20:22
  • Thanks. So this means the changes in my network seems to be some missconfiguration?
    – solick
    Jun 25, 2014 at 10:12
2

ZigBee’s addressing scheme is capable of supporting more than 64,000 nodes per network 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, and how much data loss or retransmissions can be tolerated by the application.

Your Answer

Reminder: Answers generated by Artificial Intelligence tools are not allowed on Stack Overflow. Learn more

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.