Iot Unit-3
Iot Unit-3
Syllabus: IoT Data Link Layer: PHY/MAC Layer (3GPP MTC, IEEE 802.11, IEEE
802.15), Wireless HART, ZWave, Bluetooth Low Energy, Zigbee Smart Energy,
DASH7
PHY/MAC Layer:
In IoT (Internet of Things) architecture, the PHY (Physical) and MAC (Media
Access Control) layers refer to the lower layers of the communication stack
responsible for establishing and managing the physical connectivity and data
transmission between IoT devices.
PHY Layer: The PHY layer is the lowest layer in the IoT communication stack
and deals with the physical transmission of data over the communication
medium. It defines the hardware and electrical specifications required for
transmitting and receiving signals. The PHY layer is responsible for aspects
such as modulation, coding, frequency bands, transmission power, and signal
propagation. It ensures reliable and efficient transmission of data between IoT
devices.
MAC Layer: The MAC layer resides above the PHY layer and is responsible for
managing access to the shared communication medium and handling data
packet transmission between IoT devices. It defines protocols and rules for
devices to access the medium, avoiding collisions and ensuring fair and
efficient utilization of the available bandwidth.
The MAC layer controls the timing, synchronization, and channel access
methods for IoT devices. It can use various techniques such as contention-
based access (e.g., CSMA/CA - Carrier Sense Multiple Access with Collision
Avoidance), time-based access (e.g., TDMA - Time Division Multiple Access), or
scheduled access (e.g., FDMA - Frequency Division Multiple Access) depending
on the specific technology being used.
Additionally, the MAC layer may handle functions such as packet
fragmentation, error detection, acknowledgments, and retransmissions to
ensure reliable data transmission in the presence of interference or other
communication challenges.
Both the PHY and MAC layers play a crucial role in establishing robust and
efficient communication between IoT devices. They define the physical and
access control mechanisms necessary for transmitting data over various
wireless technologies, ensuring reliable and optimized connectivity in IoT
deployments.
3GPP MTC:
Quality of Service (QoS): 3GPP MTC supports differentiated QoS for different
types of IoT applications. It provides mechanisms to prioritize critical data
traffic and ensure reliable transmission for mission-critical applications. QoS
parameters can be adjusted to meet the specific requirements of diverse IoT
use cases.
By leveraging 3GPP MTC, IoT applications can benefit from the wide coverage,
reliable connectivity, power efficiency, and security features offered by cellular
networks. These technologies enable cellular communication for a wide range
of IoT devices and applications, facilitating the scalability and interoperability
of IoT deployments.
MTC Feature: MTC Features are network functions to optimise the network
for use by M2M applications.
MTC Group: A MTC Group is a group of MTC Devices that share one or
more MTC Features and that belong to the same MTC Subscriber.
Provides services for applications and can host the application (e.g. The
MTC Server is an Application Server).
MTC User: A MTC User uses the service provided by the MTC Server.
IEEE 802.11 standard, popularly known as WiFi, lays down the architecture
and specifications of wireless LANs (WLANs). WiFi or WLAN uses high
frequency radio waves for connecting the nodes.
There are several standards of IEEE 802.11 WLANs. The prominent among
them are 802.11, 802.11a, 802.11b, 802.11g, 802.11n and 802.11p. All the
standards use carrier-sense multiple access with collision avoidance
(CSMA/CA). Also, they have support for both centralized base station based
as well as ad hoc networks.
IEEE 802.11
IEEE 802.11 was the original version released in 1997. It provided 1 Mbps
or 2 Mbps data rate in the 2.4 GHz band and used either frequency-hopping
spread spectrum (FHSS) or direct-sequence spread spectrum (DSSS). It is
obsolete now.
IEEE 802.11a
IEEE 802.11b
IEEE 802.11g
802.11g was indorsed in 2003. It operates in the 2.4 GHz band (as in
802.11b) and provides a average throughput of 22 Mbps. It uses OFDM
technique (as in 802.11a). It is fully backward compatible with 802.11b.
802.11g devices also faces interference from other devices operating in 2.4
GHz band.
IEEE 802.11n
802.11n was approved and published in 2009 that operates on both the 2.4
GHz and the 5 GHz bands. It has variable data rate ranging from 54 Mbps
to 600 Mbps. It provides a marked improvement over previous standards
802.11 by incorporating multiple-input multiple-output antennas (MIMO
antennas).
IEEE 802.11p
Wireless LANs are those Local Area Networks that use high frequency radio
waves instead of cables for connecting the devices in LAN. Users connected
by WLANs can move around within the area of network coverage. Most
WLANs are based upon the standard IEEE 802.11 or WiFi.
1) Stations (STA) − Stations comprise all devices and equipments that are
connected to the wireless LAN. A station can be of two types:
Wireless Access Pointz (WAP) − WAPs or simply access points (AP) are
generally wireless routers that form the base stations or access.
• The station selects one of the access points, and sends the AP an
Association Request frame.
Most wired LANs products use Carrier Sense Multiple Access with Collision
Detection (CSMA/CD) as the MAC protocol. Carrier Sense means that the
station will listen before it transmits. If there is already someone transmitting,
then the station waits and tries again later. If no one is transmitting then the
station goes ahead and sends what it has. But when more than one station
tries to transmit, the transmissions will collide and the information will be lost.
This is where Collision Detection comes into play. The station will listen to
ensure that its transmission made it to the destination without collisions. If a
collision occurred then the stations wait and try again later. The time the
station waits is determined by the back off algorithm. This technique works
great for wired LANs but wireless topologies can create a problem for
CSMA/CD. However, the wireless medium presents some unique challenges
not present in wired LANs that must be dealt with by the MAC used for IEEE
802.11. Some of the challenges are:
In the discussion of both the problem, we shall assume that all radio
transmitters have fixed range. When the receiver is in the range of two active
transmitters then the signal will be garbled. It is important to note that not all
stations are in range of two transmitters.
The problem of a station not been able to detect a potential competitor for the
medium because the competitor is too far away is referred as Hidden Station
Problem. As in the described scenario C act as a hidden station to A, this is
also competing for the medium.
The main fields of a frame of wireless LANs as laid down by IEEE 802.11 are −
Duration − It is a 2-byte field that specifies the time period for which the frame
and its acknowledgment occupy the channel.
Address fields − There are three 6-byte address fields containing addresses of
source, immediate destination, and final endpoint respectively.
Data − This is a variable-sized field that carries the data from the upper layers.
The maximum size of the data field is 2312 bytes.
Check Sequence − It is a 4-byte field containing error detection information.
Frame Control(FC) –
It is 2 bytes long field which defines type of frame and some control
information. Various fields presentin FC are:
1. Version:
It is a 2 bit long field which indicates the current protocol version which is fixed to
be 0 for now.
2. Type:
It is a 2 bit long field which determines the function of frame i.e
management (00), control (01) ordata (10). The value 11 is reserved.
3. Subtype:
It is a 4 bit long field which indicates sub-type of the frame like 0000 for
association request, 1000 forbeacon.
4. To DS:
It is a 1 bit long field which when set indicates that destination frame is for
DS(distribution system).
5. From DS:
It is a 1 bit long field which when set indicates frame coming from DS.
6. More frag (More fragments):
It is 1 bit long field which when set to 1 means frame is followed by other fragments.
7. Retry:
It is 1-bit long field, if the current frame is a retransmission of an earlier frame, this
bit is set to 1.
8. Power Mgmt (Power management):
It is 1-bit long field that indicates the mode of a station after successful
transmission of a frame. Set to 1 the field indicates that the station goes into
power-save mode. If the field is set to 0, the station stays active.
9. More data:
It is 1-bit long field that is used to indicate receiver that a sender has more data
to send than the current frame. This can be used by an access point to indicate
to a station in power-save mode that more packets are buffered or it can be used
by a station to indicate to an access point after being polled that more polling is
necessary as the station has more data ready to transmit.
10. WEP:
It is 1 bit long field which indicates that the standard security mechanism of 802.11 is
applied.
11. Order:
It is 1 bit long field, if this bit is set to 1 the received frames must be processed in
strict order.
The IEEE 802.15 architecture consists of multiple task groups, each focusing
on specific applications and requirements. Here are some key task groups
within the IEEE 802.15 standard:
IEEE 802.15.1 (Bluetooth): This task group defines the specifications for
Bluetooth wireless technology, which enables short-range communication
between devices such as mobile phones, laptops, and peripherals.
IEEE 802.15.4: This task group specifies the PHY and MAC layers for low-rate
wireless personal area networks (LR-WPANs). It is commonly used in
applications like home automation, industrial control, and wireless sensor
networks. The most well-known standard built on IEEE 802.15.4 is Zigbee.
IEEE 802.15.3: This task group focuses on high-rate wireless personal area
networks (HR-WPANs). It defines the PHY and MAC layers for applications that
require higher data rates, such as streaming multimedia.
IEEE 802.15.6: This task group concentrates on wireless body area networks
(WBANs). It addresses the specific requirements of medical, healthcare, and
fitness applications by defining the PHY and MAC layers suitable for wearable
and implantable devices.
IEEE 802.15.7: This task group defines the PHY and MAC layers for visible
light communication (VLC). It enables communication using light-emitting
diodes (LEDs) and is often used for indoor positioning, smart lighting, and
other applications.
IEEE 802.15.4
Physical Layer
2.4 GHz to sub-GHz frequencies in ISM bands. (ISM bands are discussed
earlier in this chapter.) The original IEEE 802.15.4-2003 standard specified
only three PHY options based on direct sequence spread spectrum (DSSS)
modulation. DSSS is a modulation technique in which a signal is intentionally
spread in the frequency domain, resulting in greater bandwidth. The original
physical layer transmission options were as follows:
You should note that only the 2.4 GHz band operates worldwide. The 915 MHz
band operates mainly in North and South America, and the 868 MHz
frequencies are used in Europe, the Middle East, and Africa. IEEE 802.15.4-
2006, 802.15.4-2011, and
These improvements increase the maximum data rate for both 868 MHz and
915 MHz to 100 kbps and 250 kbps, respectively. The 868 MHz support was
enhanced to 3 channels, while other IEEE 802.15.4 study groups produced
addendums for new frequency bands. For example, the IEEE 802.15.4c study
group created the bands 314–316 MHz, 430–434 MHz, and 779–787 MHz for
use in China.
Figure shows the frame for the 802.15.4 physical layer. The synchronization
header for this frame is composed of the Preamble and the Start of Frame
Delimiter fields. The Preamble field is a 32-bit 4-byte (for parallel construction)
pattern that identifies the start of the frame and is used to synchronize the
data transmission. The Start of Frame Delimiter field informs the receiver that
frame contents start immediately after this byte.
MAC Layer
The IEEE 802.15.4 MAC layer manages access to the PHY channel by defining
how devices in the same area will share the frequencies allocated. At this layer,
the scheduling and routing of data frames are also coordinated. The 802.15.4
MAC layer performs the following tasks:
■ Device security
The MAC layer achieves these tasks by using various predefined frame types.
In fact, four types of MAC frames are specified in 802.15.4:
Each of these four 802.15.4 MAC frame types follows the frame format shown
in Figure . In Figure, notice that the MAC frame is carried as the PHY payload.
The 802.15.4 MAC frame can be broken down into the MAC Header, MAC
Payload, and MAC Footer fields.
The MAC Header field is composed of the Frame Control, Sequence Number
and the Addressing fields. The Frame Control field defines attributes such as
frame type, address- ing modes, and other control flags. The Sequence Number
field indicates the sequence identifier for the frame. The Addressing field
specifies the Source and Destination PAN Identifier fields as well as the Source
and Destination Address fields.
The MAC Payload field varies by individual frame type. For example, beacon
frames have specific fields and payloads related to beacons, while MAC
command frames have different fields present. The MAC Footer field is nothing
more than a frame check sequence (FCS). An FCS is a calculation based on the
data in the frame that is used by the receiving side to confirm the integrity of
the data in the frame. IEEE 802.15.4 requires all devices to support a unique
64-bit extended MAC address, based on EUI-64. However, because the
maximum payload is 127 bytes, 802.15.4 also defines how a 16-bit “short
address” is assigned to devices. This short address is local to the PAN and
substantially reduces the frame overhead compared to a 64-bit extended MAC
address. However, you should be aware that the use of this short address
might be limited to specific upper-layer protocol stacks.
The IEEE 802.15.4 BE and NBE operational modes have being strongly
investigated over recent years. Thus, some limitations have been addressed
and the most important ones are the unbounded delay, low communication
efficiency, low interference robustness, and/or fading and main powered relay
nodes Figure compares IEEE 802.15.4 stack with the OSI reference model.
Fig: IEEE 802.15.4 compared with OSI reference model.
-cheap cost
-unbounded latency
-interference susceptibility
-Automotive networks
Wireless HART:
Wireless HART is a datalink protocol that operates on the top of IEEE 802.15.4
PHY and adopts Time Division Multiple Access (TDMA) in its MAC. It is a
secure and reliable MAC protocol that uses advanced encryption to encrypt the
messages and calculate the integrity in order to offer reliability. The
architecture, as shown in fig consists of a network manager, a security
manager, a gateway to connect the wireless network to the wired networks,
wireless devices as field devices, access points, routers and adapters. The
standard offers end-to-end, per-hop or peer-to- peer security mechanisms. End
to end security mechanisms enforce security from sources to destinations while
per-hop mechanisms secure it to next hop only.
Using the IEEE 802.15.4 PHY layer, Wireless-HART operates in the license-free
ISM of 2.4–2.4835 GHz with 2 MHz bandwidth of each one of the 16 channels.
The channels are numbered from 11 to 26 with a gap of 5 MHz between IEEE
802.11b/g adjacent channels, delivering up to 250 Kbps. Wireless-HART uses
its own Time Division Multiple Access (TDMA) on the MAC layer including the
10 ms synchronized time slot features. These characteristics allow the
messages routing through a network topology obstacle and interference. This is
possible due to the use of self-organizing and self-healing mesh networking
techniques supported by the network layer. Even being essentially a centralized
wireless network, Wireless-HART uses a network manager in its stack in order
to provide routing and communication schedules. This can guarantee network
performance and satisfy the wireless industrial applications. The focus of
Wireless-HART is communication on a one-hop level and the network layer has
its responsibility to the network devices vicinity allocation.
Wireless HART technology allows users to access the vast amount of unused
information stranded in these installed HART smart devices—85% of the
installed HART devices. It also provides a simple, reliable and secure way to
deploy new points of measurement and control without the wiring costs.
1. Simple:
-Always-on security
2. Reliable:
• Self-Healing Network
-Channel hopping
Z-Wave:
Z-Wave is a low-power MAC protocol designed for home automation and has
been used for IoT communication, especially for smart home and small
commercial domains. It covers about 30-meter point- to-point communication
and is suitable for small messages in IoT applications, like light control, energy
control, wearable healthcare control and others. It uses CSMA/CA for collision
detection and ACK messages for reliable transmission. It follows a master/slave
architecture in which the master control the slaves, send them commands, and
handling scheduling of the whole network. Z-Wave was developed and is
overseen by the company Zensys to provide wireless communication between
devices with a focus on residential automation. Monitoring and controlling of
lighting, ambient temperature and security through sensors and actuators by
tablets, smartphones or computers are some applications in its portfolio. Z-
Wave devices are arranged in mesh networktopology. They can send and
receive messages from any device that is connected to the network.
The Z-Wave basic device classes are the following: Portable Controller, Static
Controller, Slave, and Slave with Routing Capabilities. Different classes provide
the device with a certain role in the Z- Wave network. Inside a Basic Class,
Generic and Specific device classes are used to achieve the wanted
functionality in the control network. In the Z-Wave protocol, the unique
identification of the devices is used through a 32-bit ID. This ID value cannot
be changed as it is written in the device chipset by the device manufacturer. A
Z-Wave network has only one primary controller device at a time.
Each of the 232 nodes of this network can also be a repeater for forwarding
data to its neighbors, mediating a connection. Battery-powered nodes do not
enjoy this facility. In an environment with a certain level of device drift or even
when a device is removed from the network for some reason, the network
topology may change. Changing network topology can lead to problems in
packet forwarding and packet routing in the network. To minimize this effect,
routing tables should be kept up-to-date, optimized and any new topology
detected; Z-Wave supports the discovery and suitability of the new network
topology.
Fig: Z-Wave protocol stack.
This is possible by keeping the routing table up-to-date on each device and
showing all neighboring devices. When a node changes its position or is
removed from the network, a topology failure can start an automatic topology
and healing procedure to detect the new topology and define the best routes to
update the routing tables. This mechanism is subjected to unauthorized
modification of routing table attacks by rouge nodes.
Addressing: DASH7 uses two types of addresses: the unique identifier which is
the EUI-64 ID and dynamic network identifier which is 16-bit address specified
by the network administrator.
Frame format: The MAC frame has a variable length of maximum 255 bytes
including addressing, subnets, estimated power of the transmission and some
other optional fields.
The RFID technologies such as NFC and Dash7 are widely used in WSN
(wireless sensor networking). Most of the Smartphone will have these
technologies integrated to provide many facilities to the users. These include
building access, mobile payments, advanced location services, home
automation, ticketing and more. This means that Dash7 will be part of
IoT(Internet of Things) which acquires sensors data and use that to manage
social network applications.
There are four different device classes defined in D7A (Dash7 Alliance Protocol).
Endpoint: It can transmit and receive the data. It also supports wake-up
events.
Sub controller: It is full featured device. It is not always active. It uses wake on
scan cycles similar to end points.
Gateway: It connects D7A network with the other network. It will always be
online. It always listens unless it is transmitting.
D7A describes full functional RFID tag. All the devices in Dash7 network
support one or more of the above-mentioned device classes.
The dialogs between tags and interrogators are query response based (referred
as pull model). This request response mechanism is described by the D7A
Query Protocol Data transfer initiated from the tags to the gateway on the other
hand is based on the push model. Both of these models are depicted in the
figure. This approach for instance is implemented as an automated message or
beacon which is sent on specific time intervals. This system is called Beacon
Transmit Series.
DASH7 defines two types of frames viz. a foreground frame and a background
frame. The foreground frames are regular messages which contain data or data
requests. Background frames on the other hand are very short broadcast
messages. Background frames are used by the D7A Advertising Protocol for
rapid ad-hoc group synchronization.
A coordinator controls the network and is the central node in a star topology,
the root in a tree or cluster topology and may be located anywhere in peer-to-
peer. ZigBee standard defines two stack profiles: ZigBee and ZigBee Pro. These
stack profiles support full mesh networking and work with different
applications allowing implementations with low memory and processing power.
ZigBee Pro offers more features including security using symmetric-key
exchange, scalability using stochastic address assignment, and better
performance using efficient many-to-one routing mechanisms.
Wireless protocol for device monitoring and control: Zigbee Smart Energy
(Zigbee SE) is a protocol designed for monitoring and actively managing energy
consumption at the end-user level. For both utilities and consumers, Zigbee SE
can help reduce waste, energy consumption and enables utilities to monitor
and manage customers’ energy use. Furthermore, the end-user can monitor
their energy consumption.
With Zigbee SE it easier to monitor energy consumption and lower the energy
costs – for both utilities and the end-user. Zigbee SE is easy to use because it
is interoperable with other Zigbee protocols and works across manufacturers.
The standardized protocol provides fast access to new markets for solution
providers, and it reduces research costs
Reducing energy consumption
ZigBee networks support star and mesh topologies. Three types of devices are
defined:
1) Coordinator: this is the device that coordinates and forms the network,
which means that every network must always have one. Once this device
creates the network, other devices (Routers or End devices) can join. It is
responsible for selecting the frequency channels and assigning network
identifiers (PAN ID) to devices. The PAN ID is used to communicate
between network devices. The coordinator can help to route data over
mesh networks. It requires a permanent power supply, must always be
active and be able to support child devices.
2) Router: First, it must join the network, after which it can allow other
Routers and End devices to join. It requires a permanent power supply,
must always be active and be able to support child devices.
3) End Devices: These do not connect to other network devices. They are
usually battery-powered devices and can go into “sleep” mode to save
energy.
A number of standards use ZigBee as a base. The most common of these are:
The two main roles of BLE are: controller and host. BLE differs from the
classical Bluetooth in the controller stack that defines the association methods
of the devices. A slave can belong to only one pico-net during an association
lifetime, and is synchronized with only one master element.
In the classic Bluetooth basic protocol, this layer a stop-and-wait flow control
mechanism is used to provide error recovery capabilities. At BLE, the L2CAP is
an adaption of the classic Bluetooth basic protocol stack but optimized and
simplified to receive the application layers designed for low energy platforms.
Data exchange between the application layer and link layer are also done by
L2CAP using no retransmission techniques or flow control mechanisms as
used on the classic Bluetooth. Not using retransmission or flow control
mechanisms (present in the classic Bluetooth) and segmentation and
reassembly capabilities, the Packet Data Units (PDU) (limited to 23 bytes in
BLE) received by the application layer is delivered ready to fit the maximum
size of the L2CAP payload.
Fig: Bluetooth low energy protocol stack.
When two devices are connected under a server and client association
architecture, the server needs to maintain a set of attributes. The Attribute
Protocol (ATT) handles the attributes of this connection like the definition of
data structure used to store the information managed by the Generic Attribute
Profile (GATT) that works on top of the ATT. GATT defines the client or server
functionalities of a connection and this association is independent of the
master or slave roles. The attributes of the server need to be accessed by the
client through the requests sent, which trigger the response messages of the
server. It is also possible for a server to send to a client, unsolicited messages
like notifications that do not need any confirmation message to be sent by the
client. A server is also required to send indication messages, which need
confirmation messages to be sent by the client. The slave sends requests for
responses and indications prior to transactions confirmation following a stop-
and-waitscheme. Slaves can either write attributes values at the master.
A framework defined by GATT performs the role of discovery services using the
ATT attributes, and allows exchange of characteristics between devices
interconnected. An attribute carries a set of characteristics that includes a
value and properties of the parameter monitored by the device. For example, a
humidity sensor needs humidity characteristics and attributes to describe this
sensor, and to store its measurements. Thus, this sensor needs a further
attribute to specify the measurement units. Creating specific profiles with the
Low Energy Bluetooth standard takes place in the Generic Attribute
Profile (GATT). GATT uses the Attribute Protocol (ATT) protocol in addition to
the lower stack protocols, in order to introduce the subdivision of retained
server attributes into services and features. Services can contain a set of
features, which can include a single value (accessible from the client) and other
numerical data that describe such features. Among the assignments of GAP
profile specifications are: device role rights, discovery devices and services, as
well as establishing connections and security. A new profile based on the
existing profile requirements can be created following a profile hierarchy. The
interoperability of different devices can be handled through application
profiles.Bluetooth is designed to offer a low-cost alternative to Wi-Fi at the
expense of the transmission range. Its transmission range is considerably
shorter (up to 100 m LOS) and data rate does not exceed 721.2 Kbps in the
classic Bluetooth Basic Rate version and can reach 3 Mbps with the Enhanced
DataRate feature. BLE operates at 1Mbps rate on its physical layer, while its
application layer can handleonly 236.7 Kbps.
In Bluetooth Low Energy, there are no subdivisions in power classes but only
the maximum and minimum output power values of the transmitter are
provided. Only an approximate value of the maximum reachable distance can
be predicted. The low power required for transmission is the main feature of
the Bluetooth Low Energy standard and this result is due to enhancements
made on the classic version. These enhancements include reduced frequency
band and shorter PDU packets. An energy evaluation is offered at using
CC2640 radio chipset consumption reference measurements. The comparison
is made when operating on 0 dBm transmission power by gathering the main
characteristics of Bluetooth and BLE.
Bluetooth v5.0 has no functional block included in its first and second layers
when compared to versions v4.0, v4.1, and v4.2. A representation of the inter-
layer communication structure and the relationship with Bluetooth layers of
different Bluetooth versions can be seen in Figure 8. Device-to- device file
transfers, wireless speakers, wireless headsets, and Body Sensor Networks are
often enabled with Bluetooth versions.