EIOT Unit-4
EIOT Unit-4
4.3 ZIGBEE
4. Explain in detail about ZIGBEE Architecture with neat diagram.
ZigBee is built on top of the IEEE 802.15.4 standard. ZigBee provides routing and multi-hop
functions to the packet-based radio protocol. ZigBee is a registered trademark of the ZigBee.
Alliance.
802.15.4M is a trademark of the Institute of Electrical and Electronics Engineers (IEEE).
802.15.4 defines the physical and MAC layers, and ZigBee defines the network and application
layers.
ZigBee is the primary protocol which builds on the 802.15.4 standard, adding a network layer
capable of peer-to-peer multi-hop mesh networking, a security layer capable of handling
complex security situations, and an application layer for interoperable application profiles.
The 802.15.4 specification was created and is maintained by IEEE. This specification defines
the physical (PHY) and Media Access Control (MAC) layers of a personal area, low-power,
wireless network.
ZigBee is a wireless standard for home and commercial use developed by the ZigBee Alliance,
established in 2002. It is based on an IEEE 802.15.4 standard. The latest version of the standard
is known as ZigBee Pro and was published in 2007.
A major feature of the ZigBee protocol is its mesh network topology that is self-healing and
auto-routing. Mesh networks do not depend on any single connection; if one link is broken,
devices search through the mesh to find another available route. This capability makes a
ZigBee-based network very reliable and flexible.
The protocol is administered by the ZigBee Alliance, an open, non-profit association of
approximately 400 members.
The Alliance certifies products and promotes worldwide adoption of ZigBee as the wirelessly
networked standard for sensing and control in consumer, commercial and industrial areas.
The ZigBee specifications enhance the IEEE 802.15.4 standard by adding network and security
layers and an application framework. ZigBee is an open, global, packet-based protocol
The channel from the base station to the mobile unit is known as the downlink or forward
channel. The channel from the mobile unit to the base station is known as the uplink or reverse
channel.
Physical channel: Each timeslot on a carrier is referred to as a physical channel.
Logical channel: Variety of information is transmitted between the MS and BTS. GSM logical
channels consists of two types Control Channels and Traffic Channels.
Control channels Control Channels is subdivided into three types: Broadcast Control channel,
Common Control Channel and Dedicated Control Channel.
Channels used for communication between the MS and BSS when a call is in progress.
Control channels used by idle mode mobiles to exchange signaling information, required
changing to dedicated mode.
• Mobiles in dedicated mode monitor the surrounding base stations for handover and other
information. Control channels include:
1. Broadcast Control Channel (BCCH) serves for BS identification, broadcasts and frequency
allocations.
2. Frequency Correction Channel (FCCH) and Synchronization Channel (SCH) used for
synchronization and physical layer definition (time slots, burst time...)
3. Random Access Channel (RACH) used by mobile to request access to the network
4. Paging Channel (PCH) used for locating the mobile user
/SS: This pin is used to output the select signal from the SPI module to another peripheral with which a
data transfer is to take place when its configured as a Master and its used as an input to receive the
slave select signal when the SPI is configured as Slave.
SCLK: This pin is used to output the clock with respect to which the SPI transfers data or receive
clock in case of Slave.
SPI data transmit and data receive register are the main elements of the SPI. When the
communication takes place the data on the transmit register are transferred into the shift register.
The shift register in the master of width (8,16,32) and the shift register in the slave are linked by
MOSI and MISO pins to form a distributed 16,32,64 bit register respectively.
When the data transfer operation needs to be performed these 16,32,64- registers are serially
shifted eight, sixteen, thirty-two bit positions by the serial clock generated by the master so that the
data can be exchanged between the master and the selected slave.
Data on the master SPI data transmit register becomes the input data for the slave read from the
MOSI and the data read from the master SPI data receive register was the data send from the slave
from MISO.
Data on the shift registers are transferred into data receive register when the transfer completes and
this data may be read from the data receive register any time before next transfer has completed.
3. I2C
I2C is a communication protocol that the Raspberry I'I can use to speak to other embedded devices
(temperature sensors, displays, accelerometers, etc).
Fig. 4.8.2
Current flows from the anode (+) to cathode (-). Anode is longer pin and cathode is shorter pin.
Open up IDLE, the Python programming software and create a New file. Save it as led.py and
input the code from the code listing. What the code does is first tell Python to use the GPIO
module so we can connect to the GPIO pins, by importing the module.
We then import the time module so we can create a delay between commands. We then tell the
code to treat the GPIO pins as the number they are on the board and to turn the seventh pin into an
output.
We alternate between True and False so that it turns the pin on and off. Once it's cycled a few
times, it will print the message Done' into IDLE and finally turn off the GPIO pins.
Fig. 4.8.3
#Hold down the button, run the command again. The output should be "true".
GPIO.input(17)
Application code runs on client machine. Fig. 4.9.2 shows WAMP session between client and
router.
Dealer
caller callee
A WAMP Session connects two Peers, a Client and a Router. Each WAMP Peer MUST implement
one role and MAY implement more roles. A Client MAY implement any combination of the
Roles: Callee, Caller, Publisher and Subscriber.
Router MAY Implement either or both of the Roles: Dealer and Broker.
WAMP implementations may choose to tie the lifetime of the underlying transport connection for a
WAMP connection to that of a WAMP session, Le establish a new transport-layer connection as
part of each new session establishment. They may equally choose to allow re-use of a transport
connection, allowing subsequent WAMP sessions to be established using the same transport
connection.
Fig. 4.9.4 shows the full transport connection and session lifecycle for an implementation which
uses WebSocket over TCP as the transport and allows the re-use of a transport connection.
Xively is available for many platforms since libraries for Arduino, Android, ARM embeded, C.
Electric Imp, Java, JavaScript, Objeccve-C, PHP, Python and Ruby are available.
Xively provides message bus for real time message management and routing, data services for time
archiving, directory services that provides a searchable directory of objects and business services for
device provisioning and management.
Xively device support one or more channels. Each channel enables bi-directional communication
between the loT devices and Xively cloud.