U4 Flashcards
The core idea behind IoT technology is to ?
connect physical devices to the Internet and enable communication between users and their devices.
By connecting a huge number of devices to the Internet, one often has to deal with?
so-called constrained devices which have physical limitations in the allocated energy, size, and memory footprint.
To provide these constrained devices with connectivity, IoT developers have to ?
implement a communication protocol stack.
The figure below demonstrates the widely adopted networking protocols within IoT and where they fit within the TCP/IP layers.
Many emerging networking technologies, offered by different vendors, are being adopted within the ———————–. These competing technologies mostly provide alternative implementations of the same————————.
IoT space
standard protocols
For example,
IEEE 802.15.4 describes the operation of low-rate wireless personal area networks (LR-WPANs) and is implemented by several competing technologies including ZigBee, Z-Wave, SNAP, and 6LoWPAN.
It is worth mentioning that some Internet protocols, e.g., Ethernet and Wi-Fi, can be?
applied in the IoT framework.
Nevertheless, new technologies are being developed specifically to?
meet the IoT challenges.
Nevertheless, new technologies are being developed specifically to?
meet the IoT challenges.
Nevertheless, new technologies are being developed specifically to?
meet the IoT challenges.
Nevertheless, new technologies are being developed specifically to?
meet the IoT challenges.
Nevertheless, new technologies are being developed specifically to?
meet the IoT challenges.
Nevertheless, new technologies are being developed specifically to?
meet the IoT challenges.
The structure of a network is known as ?
its topology.
The most common network topologies that are adopted within IoT are?
star and mesh topologies.
In mesh topologies, IoT devices connect to ?
other devices within range.
The nodes within a network can act as ?
simple sensor nodes which route traffic.
Mesh networks are more complex than networks with star topologies but?
have the advantage of being more resilient to failure because they do not depend on a single central gateway.
Now, we discuss two communication patterns that are commonly used in the IoT applications.
Publish/Subscribe Pattern
Representational State Transfer Pattern
The publish/subscribe pattern concentrates on ?
the non-direct exchange of messages between a sender and a receiver.
As delineated below, the sender, referred to as the publisher, sends the message not directly to the receiver, but publishes it to a message-oriented middleware.
This middleware is called ?
a broker and manages the distribution of messages.
A sender publishes?
a message to the broker.
A receiver, referred to as?
the subscriber, can subscribe to the content/topics of interest and then will receive all messages that are relevant.
The broker must handle all incoming messages and distribute them correctly to?
all subscribed receivers.
Using this pattern enables ?
a loose coupling between senders and receivers.
In this context, loose coupling means that?
they do not depend on each other regarding time, space, and synchronization.
Senders and receivers do not need to?
know where the other end-device is located (e.g., IP address).
They also do not need to run at the same time to receive/send————————. For synchronization, they do not need to ——————–local operations to send or receive messages.
a message
interrupt
Publish/subscribe provides three different types of message filtering:
.
The first filter approach is a “subject-based filtering” performed with topics hosted on the broker.
Each message published to the broker has a specific topic and each subscription of a client is related to a specific topic.
The broker distributes messages tagged with different topics. The topics are in general string with a hierarchical structure which enables limited filtering
In general, a huge benefit of the publish/subscribe pattern is:
the fact that it is loosely coupled, and thus is extremely scalable and flexible.
The only task done by the IoT devices is ?
generating the content—every other step is done through a separated message broker.
the content can easily be scaled and modulated to the architecture and design of the solution.
The only task done by the IoT devices is generating the content—every other step is done through a separated message broker.
Furthermore, the publish/subscribe pattern lends itself very well to?
testing.
A subscriber is?
narrowly limited to a set of events that they have requested under a certain topic.
If a failure occurs, this natural segmentation informs the provider as ?
to where the fault is, and which class of users is experiencing the fault.
Unfortunately, decoupling is seen as a ?
huge disadvantage for this pattern.
Brokers in the publish/subscribe pattern cannot effectively notify the publishers that?
a certain message has been sent.
The subscribers are entirely separated from the event and thus?
may not know if a message was not erroneously sent.
While the system is extensible and flexible, network instability may occur with ?
an increase in traffic load.
Such a high load will lead to ? its own difficulties when these relationships need to be modulated.
the aforementioned instability together with increased complexity.
Although the relationship between the publisher and subscriber in this model may be beneficial, it also comes with?
Although the relationship between the publisher and subscriber in this model may be beneficial, it also comes with?
its own difficulties when these relationships need to be modulated.
The Representational State Transfer (REST) pattern enables IoT applications to?
represent objects as resources with universal resource identifier (URI).
REST is based on the client/server architecture which relies on?
the HTTP protocol.
In this context, a resource is ?
a source of specific information, i.e., sensor readings, identified with an URI identifier.
Such resources can be?
readily manipulated by using the HTTPmethods, i.e., GET, PUT, POST, and DELETE.
Using the REST architectural style allows?
an independent implementation of clients and servers.
Such an independency leads to a stateless system, where neither the server nor the client needs to?
know anything about the current state of the other end-device.
Standard HTTP methods are used?
To get the content of some object or to modify it.
Standard HTTP methods are used?
To get the content of some object or to modify it.
Standard HTTP methods are used?
To get the content of some object or to modify it.
Standard HTTP methods are used?
To get the content of some object or to modify it.
Standard HTTP methods are used?
To get the content of some object or to modify it.
A request consists of ?
an HTTP method identifier,
a message header,
a path to a resource,
and an optional message body with data in case of a PUT or POST request.
In the request example above, a GET request is sent to a server with the specified path of the resource. In the header, the accepted content-type is defined as JSON. On the server side, a JSON file is located at the specified path. After the server gets the request, the response looks like the following:
Code
GET http://example.com/temperature/sensor1
Accept: application/json
The status codes are inherited from?
HTTP semantics.
The content behind the URI can be very different, e.g.,?
XML, JSON, images, or PDF files.
In general, REST is popular thanks to its simplicity where it builds upon existing systems and features of the Internet’s HTTP to achieve?
its objectives, in lieu of creating new standards, frameworks, and technologies.
REST-based applications can be written using?
any language, e.g., Java, Kotlin,.
Another advantage of REST is being a?
language-agnostic architectural style.
NET, AngularJS, or JavaScript, as long as the programming language can make web-based requests using ?
HTTP
Accordingly, IoT developers have the freedom to select the?
technologies that are well suited for their situation.
We classify these technologies into :
IP-based protocols
and non-IP-based technologies.
The non-IP communication systems are?
optimized for cost and energy usage, whereas IP-based solutions usually have fewer constraints.
Furthermore, we divide the non-IP-based communication systems into?
short-range and long-range communication systems.
In general, IP represents the standard form of?
global communication for several reasons.
For instance,
IP stacks are provided by nearly every operating system and every medium. IP communication protocols can run on various WPAN systems, e.g., cellular, copper wire, fiber-optic, PCI Express, and satellite systems.
IP stacks are provided by ?
nearly every operating system and every medium.
IP communication protocols can run on various WPAN systems, e.g., ?
cellular, copper wire, fiber-optic, PCI Express, and satellite systems.
Furthermore, —————has withstood the test of time by users for —— years. Longevity is paramount for many industrial and field ————————— that must support devices and systems for decades.
TCP
40
IoT solutions
Aside from longevity, TCP/IP is governed by?
the Internet Engineering Task Force (IETF) which IETF maintains a set of open standards focused on the Internet protocol.
System designers can trust IP for their application?
the Internet Engineering Task Force (IETF) which IETF maintains a set of open standards focused on the Internet protocol.
Additionally, IP-based networks have mostly demonstrated massive scaling to billions of users and many more devices To further enhance the scalability, IPv6 has been designed to provide?
a unique IP address to a virtually unlimited number of devices.
Finally, there exist various tools to manage IP networks and devices on an IP network:
Modeling tools,
network sniffers,
diagnostic tools,
and various appliances exist to assist in building,
scaling,
and maintaining networks.
IP addresses require a well-supported and robust transport layer, e.g., ?
TCP and user datagram protocol (UDP), for end-to-end communication.
TCP is used for connection-oriented transmissions, whereas UDP is used for?
connectionless transmissions.
UDP is naturally much simpler to implement than TCP, but ?
not as resilient.
Both services provide segment reordering as packets are?
not guaranteed to be delivered in order using an IP protocol.
TCP also provides the layer of reliability to an unreliable IP network layer using?
acknowledgment messages and retransmissions of lost messages.
Additionally, TCP provides flow control using ? a lightweight, high-speed facility for broadcasting data to various devices that may or may not be present.
sliding windows and congestion avoidance algorithms.
Alternatively, UDP provides?
a lightweight,
high-speed facility for broadcasting data to various devices that may or may not be present.
In fact, 6LoWPAN is the result of several efforts to bring IP addressability to?
the resource-constrained devices which do not need high bandwidth networking services.
6LoWPAN is an acronym that stands for ?
IPV6 over low-power WPANs.
The protocol can be used with?
other WPAN communications such as 802.15.4 as well as Bluetooth, and sub-1 GHz RF protocols.
The main advantage of 6LoWPAN is?
-the simplicity of implementing sensors which have IP addressability and act as a network citizen over 3G/4G/LTE/Wi-Fi/Ethernet routers.
- Moreover, IPV6 provides significant theoretical addressability of billions of unique addresses, thus more IoT devices can be easily connected.
6LoWPAN networks are typically?
mesh networks residing on the periphery of larger networks.
These topologies are naturally flexible, thus?
allowing for disjointed networks without any binding to the Internet or other systems.
Additionally, ad-hoc networks can form without ?
requiring an Internet connectivity of an edge router (Olsson, 2014).
The figure below depicts an example of an IPv6 network, including a 6LoWPAN mesh network.
The 6LoWPAN networks operates on the edge and is connected to the IPv6 network using?
an edge router.
As can be seen below, three different types of nodes exist within the 6LoWPAN mesh network:
router nodes,
host nodes
and edge routers.
The router nodes forward data from?
one 6LoWPAN mesh node to another.
The host nodes in the mesh network cannot?
-route data in the mesh
-and are simply endpoints consuming or producing data.
Hosts are allowed to be?
in sleep states, occasionally waking to produce data or receive data cached by their parent routers.
The edge router handles three actions:
(1) the data exchange between 6LoWPAN devices and the Internet;
(2) the local data exchange between devices inside the 6LoWPAN;
and (3) the generation and maintenance of the radio subnet (the 6LoWPAN network).
OSI model
This is a conceptual framework that describes functions of the networking and divides data communication into seven abstraction layers.
6LoWPAN significantly changes?
the IoT landscape.
Without 6LoWPAN, a complex application layer gateway is required to?
make devices such as ZigBee and Bluetooth connect to the Internet.
6LoWPAN solves this problem through introducing?
an adaptation layer between the IP stack’s link and network layers to enable transmission of IPv6 datagrams over IEEE 802.15.4 radio links.
As depicted in the following figure, the stack of 6LoWPAN comprises several layers, analog to the OSI model.
At the outset, the physical layer converts data bits into————————- and received over the air. Afterward, the data link layer provides a ——————— between two directly connected ————.
signals transmitted
reliable link
nodes
Such reliability is achieved by?
-detecting and correcting errors that may occur in the physical layer during transmission and receiving.
-Specifically, the data link layer includes the media access layer (MAC) which provides access to the media, using protocols such as the carrier sense multiple access–collision avoidance (CSMA-CA) where the radio listens that no other IoT device is transmitting before actually sending data over the network.
The data link layer also includes the 6LoWPAN adaptation layer which provide?
adaptation from IPv6 to IEEE 802.15.4.
The network layer addresses and routes data through?
the network over several hops.
The transport layer, e.g., TCP/IP, generates communication sessions among different applications running on?
end devices.
Additionally, it allows multiple applications, on each end device, to ?
have their own communications channel.
Bluetooth is ?
one of the most adopted wireless technologies that is designed for short-range communication.
Many of our everyday devices implement the Bluetooth feature such as mobile phones, smart watches, sensors, and more.
Furthermore, Bluetooth Low Energy (BLE), otherwise known as ——————————— is also a wireless communication technology that was first introduced as ——————————— in 2006. After that, the ———————————— (SIG) adopted the technology and kept developing it as ————– was introduced in the ——————————————————— version 4.0 in 2010.
Bluetooth Smart,
Wibree by Nokia
Bluetooth Special Interest Group
BLE
Bluetooth Core Specification
Although there are many wireless technologies that have been emerging in the market such as Zigbee and 6LoWPAN, BLE has?
drastically improved and grown exponentially more than those other technologies
due to its low power consumption
and also its prior support on many devices and smartphones.
BLE was first supported on the Android platform in?
API 18 (Android Jelly Bean version 4.3).
Android smartphones could interact with BLE devices which allowed them to ?
fetch services and even read or write data to these BLE smart devices. the expansion of BLE-integrated low-power devices such as heart rate monitors, proximity sensors, and fitness trackers.
This feature had a great influence on the Android community as it helped in ?
the expansion of BLE-integrated low-power devices such as heart rate monitors, proximity sensors, and fitness trackers.
Additionally, BLE has many great features as it is?
extremely power efficient and has an enhanced short communication range.
The ability of BLE devices to consume low energy and to operate on coin-cell batteries for months, or sometimes years, made it a very reliable technology to be used in many IoT applications.
Technically speaking, BLE has two implementation modes:
-single mode.
Devices that concentrate on low power consumption and low cost, such as smart watches and heart rate sensors.
-dual mode.
Devices that can operate on both Bluetooth Classic and BLE. For example, smartphones need Classic Bluetooth to connect to a Bluetooth headset. However, BLE is also required to connect to a smart fitness tracker.
The BLE Protocol Stack consists of two main parts:
the controller
and the host.
The controller part has two layers:
(1) the link layer which is responsible for providing medium access, error control, flow control, and connection establishment; and
(2) the physical layer which makes sure the transmission and reception of data bits are working properly.
Meanwhile, the host part has three main components:
-the control
and adaptation protocol (L2CAP),
Generic Attribute Profile (GATT), and Generic Access Profile (GAP).
-The Generic Access Profile (GAP) provides a framework which describes the procedures and modes for data broadcasting, device discovery, and establishing connections.
GAP specifies four possible roles for the BLE device to adopt:
Broadcaster,
Observer,
Central,
and Peripheral.
Each one of these roles will be?
further discussed in detail throughout this section.
Any IoT device with integrated BLE has the ability to use two communication mechanisms which are:
“connection” and “broadcast.”
First, the connection mechanism is ?
used for the establishment of a bi-directional communication to exchange data between two devices.
Two types of devices are present in this type of communication:
central device
and peripheral device.
Basically, the main role of the central device is to? sending advertisements and responding to connection requests, if received.
regularly scan for advertising packets that it can connect to,
and if found, it sends a connection request to the advertising devices to begin data transmission.
On the other hand, the peripheral device is responsible for ?
sending advertisements and responding to connection requests, if received.
The following figure illustrates the connection topology between the central and peripheral roles in BLE connection scenario.
the difference between central devices and peripheral devices?
Accordingly, the central devices have the privilege of connecting to more than one peripheral device at the same time, while the peripheral cannot connect to several central devices.
When the two devices establish a connection, the peripheral device stops?
advertising more packets and begins data exchange only between these two devices.
After establishing the connection, the central device deals with?
the timing intervals
and the exchange of data procedure.
After establishing the connection, the central device deals with?
the timing intervals
and the exchange of data procedure.
After establishing the connection, the central device deals with?
the timing intervals
and the exchange of data procedure.
After establishing the connection, the central device deals with?
the timing intervals
and the exchange of data procedure.
The other communication mechanism is ————————. Broadcasting is a simple way to establish ———————–connection for the ————–devices to send data to central devices, if they are within the ———————.
broadcast
one-way
peripheral
range
In addition, this mechanism has two discrete roles:
(1) broadcaster and
(2) observer.
The broadcaster role is to send advertising packets periodically to nearby listening devices while the observer can receive and collect these advertising packets sent by the broadcaster.
Moreover, an advertising packet is mainly composed of?
a 31-byte payload.
An advertising packet is mainly composed of a 31-byte payload. These bytes include:
device descriptive data
and other information that can be transmitted to an observer during the connection period.
Additionally, this payload can be extended with an optional second packet of 31 bytes which means that ?
the advertising packet’s size can be up to 62 bytes.
The figure below demonstrates the advertising process between a broadcaster (i.e., peripheral device) and an observer (i.e., central device).
A peripheral specifies a certain ————interval. As each interval passes, it ——————its advertising ———-. Setting long intervals reduces the energy consumption but a device only advertising itself once every ——————— is considered less responsive compared to when advertising itself every————————.
advertising
re-transmits
packet
circa 2 seconds
20 milliseconds