• Non ci sono risultati.

(1)Chapter 3 ZigBee In order to permit communication between the smart devices and between the coordinator and the smart devices, a communication protocol is needed

N/A
N/A
Protected

Academic year: 2021

Condividi "(1)Chapter 3 ZigBee In order to permit communication between the smart devices and between the coordinator and the smart devices, a communication protocol is needed"

Copied!
5
0
0

Testo completo

(1)

Chapter 3

ZigBee

In order to permit communication between the smart devices and between the coordinator and the smart devices, a communication protocol is needed. The protocol must have the following properties.

1. Be standard. Not only on data-link and routing functionalities, but also on application-related functionalities. This is needed because different devices from different vendors and equipped with different applications should work together in the same network.

2. Be wireless. The cost of installing and maintaining new cable networks appears more and more unreasonable as wireless technologies are being developed. Wireless communication systems are now mandatory for new employments where high transamission rates are not a strict requirement, like for home automation.

3. Be low-battery consuming. Wireless nodes are often battery-powered, but the life-time of such batteries has to be as long as possible, in order to lower maintenance costs.

4. Be extensible. It is infeasible to provide a standard for each smart appliance that will be employed in a house, and for its behaviour. Thus, the standard must be extensible and customizable (within some constraints).

ZigBee[15], proposed by ZigBee Alliance, is a protocol that addresses these objectives. ZigBee is defined by ZigBee Alliance as a “very low-cost, very low-

13

(2)

3.2. Physical, medium access control and network layers 14

power consumption, two-way, wireless communications standard”. Its applica- tion fields are “consumer electronics, home and building automation, industrial controls, PC peripherals, medical sensor applications, toys, and games.”

3.1 ZigBee stack overview

ZigBee protocol stack is divided in four main layers.

1. Physical layer, (PHY ). Using the antennas, it solves the problem of trans- forming data bits in radio waves, transmitting and receiving them.

2. Medium access control layer, (MAC ). Basing on physical layer’s services, it offers frame-based communication between neighbour nodes. Neigbour nodes are those which are able to directly communicate with each other, without the intervention of third nodes. Since the radio frequency is a shared medium, collision issues have to be addressed.

3. Network layer, (NWK ). Basing on medium access control layer’s services, it offers frame-based communication between non-neighbour nodes.

4. Application layer, (APL). Basing on network layer’s services, it offers a large and extensible set of high-level functionalities that depend on the kind of device and the application.

Figure 3.1 shows the complete ZigBee protocol stack.

3.2 Physical, medium access control and network layers

ZigBee relies on the physical and medium access control layers provided by IEEE 802.15.4 [7] standard protocol. It is a wireless protocol focused on sim- plicity and very low battery consumption. It permits hub-and-spoke as well as mesh topologies. A 64-bit address is assigned to each communicationg node.

These addresses are globally unique and permanently stored inside the com- munication modules. An IEEE 802.15.4 network can be beacon-enabled or not- beacon-enabled, whether the communications are synchronized with a beacon tecnhique or not. The communications inside a not-beacon-enabled networks

(3)

3.2. Physical, medium access control and network layers 15

Figure 3.1: ZigBee protocol stack

follow a CSMA/CA[8] contention paradigm, similar to that used by WiFi[9].

ZigBee does not use the beacon mode of IEEE 802.15.4, as a matter of fact, ZigBee networks are always contention-based.

The network layer of ZigBee assures the connectivity between distant nodes, that may not directly communicate at physical layer. From the network layer’s point of view, nodes are cathegorized in three types.

1. Coordinator node. It is unique inside a network. It creates the ZigBee network, elects the eventual router nodes, coordinates the overall commu- nication of the network, and partecipates to routing. It must have higher computational and memory resources than the other nodes. It should be line-powered.

2. Router nodes. They partecipate to routing and coordinate the communi- cations inside their network areas. They should have higher computational and memory resources then device nodes. They should be line-powered.

3. Device nodes. They do not partecipate in routing. They can have reduced computational and memory resources. They can be battery-powered.

(4)

3.3. Applicative layer 16

The coordinator node assigns a 16-bit network address to each node. These addresses are unique within a ZigBee network. Routing procedure uses an AODV-like algorithm[11]. In this way, the routing information that a ZigBee coordinator or router has to maintain is minimized.

3.3 Applicative layer

ZigBee layer is divided in two sublayers.

• Application Support Sublayer (APS). It performs the communication mul- tiplexing to the different applications running on the same device. Each multiplex entry is identified by an 8-bit identifier called end point. Besides, this sublayer performs some security-related management operations and provides a header with standard fields that will be used by the higher sublayer. These fields include cluster ID and profile ID, discussed later.

• Application Layer properly said, sometimes called ZCL layer (from ZigBee Cluster Library[14]). It realizes the actual applicative communication.

Given the extreme heterogeneity of devices, ZigBee Alliance did not define dedicated applicative protocol for each of them. On the contrary, it defined general and reusable sets of command and attributes, called clusters, to interact with single aspects of devices. Examples of ZigBee clusters are On/off cluster to interact with devices that can be turned on or off, Thermostat cluster to interact with devices owning a thermostat, Fan control cluster to interact with devices that have a fan as a part of a heating/cooling system, etc. Each ZigBee cluster is identified by a 16-bit number called cluster identifier. The commands and the attributes of a standard cluster are defined in the ZigBee Cluster Library document[14]. Other custom clusters can be defined by manufacturers.

A device can obviously implement more than one cluster.

Profiles define which device type has to implement which cluster and how.

Examples of profiles are Home Automation profile[13] for domotic applications, or Smart Energy profile[16] for power-monitoring and billing applications. Each ZigBee profile is identified by a 16-bit number called profile identifier. Standard profiles are described in profile documents. Other custom profiles can be defined by manufacturers.

(5)

3.4. ZigBee attributes 17

3.4 ZigBee attributes

A ZigBee attribute, owned by a particular device, is defined by ZigBee Cluster Library document as “a data entity which represents a physical quantity or state”. Each attribute has a type and a value. An attrbiute owned by a devices can be written or read by the coordinator or by other devices, with specific standard commands. Periodically and/or after a significative change of its va- lue, a device can report an attribute to the coordinator (or another statically determined device), by means of an unsolicited message. This mechanism is called attribute reporting. Attribute reporting can be configured by a specific command. For example, it is possible to set the frequency of periodic reports.

Riferimenti

Documenti correlati

Following Alan Reed Libert, it is possible to classify artifi- cial and natural languages under three types, depending on the form of comparative adjectives. Artificial languages

Esercizio 1. In rettangolo la base è metà dell’altezza. Risolvi il seguente sistema di disequazioni, e scrivi la soluzione in tutti i possibili modi che conosci. a) La somma di

these arrangements we will describe the poset of all the associated building sets (ordered by inclusion) that are invariant with respect to the Weyl group action, and therefore we

The outputs of this simulation are, for each snapshot, an overload probability, that is, the probability that a given hexagon is unable to carry the requested load when the micros

Corso AP - Informatica Dal click alla nuova pagina 3

Such evidence suggested a potential role of cannabis in the pathophysiology of psychosis and other mental disorders, as later corroborated by research studies performed over the last

So, even though Rio is on the whole quite a humorous film, linguistic variation is not prioritised in the original and it is even more levelled in the dub, entrusting humour