# ZigBee

## Combined topologies

### Mesh Topologies

<figure><img src="https://2294401029-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1IGi5yHjBBVlQOff5FyI%2Fuploads%2F936ofUvMFRpXvx5kxNhv%2Fa.png?alt=media&#x26;token=c4085353-cdf0-4e69-8e7a-8727a2c84ba4" alt=""><figcaption></figcaption></figure>

In a mesh network, **regular beacons are not allowed**.

* Devices in a mesh network can only communicate with each other by peer-to- peer transmissions.

<figure><img src="https://2294401029-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1IGi5yHjBBVlQOff5FyI%2Fuploads%2FgO2uVaJg62lYvFcyLptH%2Fa.png?alt=media&#x26;token=17b7a316-7e3f-4b32-a45d-cc5dc1cade83" alt=""><figcaption></figcaption></figure>

In a tree network, the coordinator and routers can announce beacons.

## Device addressing

Two or more devices communicating on the same physical channel constitute a WPAN which includes **at least one FFD (PAN coordinator)**.

Each independent PAN will select a unique PAN identifier.

All devices operating on a network shall have a unique 64-bit extended address (IEEE 802.15.4). This address can be used for direct communication in the PAN.

The network address can use a 16-bit short address, which is allocated to the child routers by the PAN coordinator when the device associates.

256 sub-addresses may be allocated for subunits.

### Address assignment in a ZigBee network

In ZigBee, network addresses are assigned to devices by a **distributed address assignment scheme**.

The ZigBee coordinator determines three network parameters to set the allocations.

* the maximum number of children (_Cm_) of a ZigBee router.
* the maximum number of child routers (_Rm_) of a parent node.
* the depth of the network (_Lm_).

A parent device utilizes _Cm_ , _Rm_ , and _Lm_ to compute a parameter called _Cskip_.

* which is used to compute the size of its children’s address pools.

<figure><img src="https://2294401029-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1IGi5yHjBBVlQOff5FyI%2Fuploads%2Fgrimi3V8CF6za1zuZuBy%2Fa.png?alt=media&#x26;token=7bbf353b-8263-4558-8cc7-35a3ad5a992c" alt=""><figcaption></figcaption></figure>

If a parent node at depth _d_ has an address _Aparent_,

* the _&#x6E;_&#x74;h child router is assigned to address ![](https://2294401029-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1IGi5yHjBBVlQOff5FyI%2Fuploads%2Fh9vlsKmXJli6MtBfxVK2%2Fa.png?alt=media\&token=a1ad47f3-e4df-430a-bd9a-3303d06eebaf)
* _the nth-child_ end device is assigned to address ![](https://2294401029-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1IGi5yHjBBVlQOff5FyI%2Fuploads%2F94CGsIaLl6DQyoXniSxP%2Fa.png?alt=media\&token=0f728338-e707-4ca0-b4ca-55643134a282)

<figure><img src="https://2294401029-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1IGi5yHjBBVlQOff5FyI%2Fuploads%2F0dkm8GVTDNu8dhidxZG9%2Fa.png?alt=media&#x26;token=5aad14be-2659-43b1-8ba6-0bf95640ffa7" alt=""><figcaption></figcaption></figure>

## Routing protocols

In a tree network.

* Utilize the address assignment to obtain the routing paths.

In a mesh network.

* Two options.
  * Reactive routing: if having routing capacity.
  * Use tree routing: if do not have routing capacity.

Note:

* ZigBee coordinators and routers are said to have _**routing capacity**_ if they have **routing table capacities** and **route discovery table capacities**.

## Summary of ZigBee network layer

Pros and cons of different kinds of ZigBee network topologies.

<figure><img src="https://2294401029-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1IGi5yHjBBVlQOff5FyI%2Fuploads%2F6TWx0UpOrMOlBzv96dRu%2Fa.png?alt=media&#x26;token=17bafa39-3ec3-4454-890e-7f0c3625fa3f" alt=""><figcaption></figcaption></figure>

## Application Level

<figure><img src="https://2294401029-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1IGi5yHjBBVlQOff5FyI%2Fuploads%2FVz7wkmdsgfG0STGVQchC%2Fa.png?alt=media&#x26;token=e071f2b8-1665-414a-aa99-0192e1e16f51" alt=""><figcaption></figcaption></figure>

### ZigBee defined Objects (ZDO):

* provides common function for applications.
* initializes APS, NWK-Layer and Security Service Specification.
* offers services like device-/service-descovery, binding and security management.
* assembles information about the network.
* for ZBC/ZBR -> e.g. binding table.

<figure><img src="https://2294401029-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1IGi5yHjBBVlQOff5FyI%2Fuploads%2FZ7rpEuJxhwlRAxrqaq9X%2Fa.png?alt=media&#x26;token=1892a5ab-5c77-444a-a569-23d20eff9737" alt=""><figcaption></figcaption></figure>

## Profiles

Definition of ZigBee-Profiles:

* describes a common language for exchanging data.
* defines the offered services.
* device interoperability across different manufacturers.
* standard profiles available from the ZigBee Alliance.
* profiles contain device descriptions.
* unique identifier (licensed by the ZigBee Alliance).
