Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Maximum number of ZigBee devices

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?^^

like image 733
user1228633 Avatar asked Nov 24 '13 14:11

user1228633


3 Answers

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.

like image 158
kyork Avatar answered Nov 06 '22 18:11

kyork


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.

like image 40
Vibhor Avatar answered Nov 06 '22 18:11

Vibhor


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.
like image 5
Vikram Singh Avatar answered Nov 06 '22 18:11

Vikram Singh