Professional Documents
Culture Documents
INTERNET OF THINGS
INTERNET OF THINGS
INTERNET OF THINGS
Learning Objectives:
The Internet in a nutshell – The layered model
The Internet is the Transport and Network layers (TCP/IP)
Media Access Control (MAC) – Data-Link and Physical Layers
The CC3100 Boosterpack for Launchpad
Application Layer Client-Server protocols – SMTP, HTTP, FTP, POP,
IMAP.
Much has been written about the Internet with the current buzz being the
so called “Internet of Things”. Let’s see how we got here.
Recall in Chapter 11, the simple notion of two LaunchPads communicating
with each other shown in Figure 16.1.
Rather than lay a separate cable for each pair, it makes sense to leverage a
single cable that each machine could tap into. The TM4C123 does have eight
UART ports, meaning we could connect nine LaunchPads together such that
there is a dedicated connection between each pair.
You can see from Figure 16.2, the complexity of the network grows on
order n2, which we label as O(n2).
Once you have multiple machines tapping into the same cable (we call this
the network) we will need the machines to adhere to a “protocol” that will
allow them to communicate with each other effectively.
One of the early implementations of this model was the IEEE 802.5 Token
Ring protocol where the cable was a loop (a ring), see Figure 16.3.
Figure 16.3 Network created by connecting to a ring. Each
node only requires one connection. In this figure node
The first issue is one of identities. For machines to learn identities of the
(possibly hundreds of) machines in other LANs , we need a naming
mechanism and accompanying discovery methods.
This naming mechanism gives each machine a “unique” identity called, its
IP (Internet Protocol) address.
A more appropriate name for this identity would be Internet address, as it
is the address by which machines connected to the interconnection of
networks are identified.
The 32-bit IP-address that is unique to each machine poses the problem of
being hard to remember, like phone numbers. A lookup service called
Domain Name Service (DNS), maps a symbolic name (like www.utexas.edu)
to its corresponding IP address.
The second issue that the Network layer addresses is routing. That is,
the movement of information (packaged in chunks called Datagrams) from
one machine to another in an optimal way.
Figure 16.6. The internet is a network of networks
Now imagine Bob lives in New York city with a unique address and Mary
lives in Austin, and the two exchange communications with each other the
old-fashioned way by writing letters.
If little Bobby in Bob’s house wants to write to Little Suzy in Mary’s house,
then Bobby would write Suzy’s name on the letter sent to Mary’s household.
This way, multiple people in Mary’s household receive letters at the same
address but the letter is addressed to them individually.
The equivalent of this in the Internet is a port. Each machine has multiple
ports at which it can send and receive messages. Furthermore, these ports
fall into two categories, TCP ports and UDP ports. TCP ports provide reliable
communication (akin to say registered post) and UDP ports provide
unreliable best-effort communication.
Not everybody fancies writing code using the socket API, so higher level
Application layer protocols, like HTTP, SMTP, FTP, have been developed
that serve a specific purposes of hyper-text transfer, mail-transfer, file-
transfer respectively.
These Application layer protocols use sockets that are TCP-based for
reliability. Multimedia applications like VoIP use UDP sockets as the goal
there is speed and not reliability. So, the layered model that the Internet uses
can be seen as having four layers:
This is popularly referred to as the TCP/IP model. The OSI model, which
the TCP/IP model is said to be compliant with, defines more layers but the
correspondence between the two can be seen in Figure 16.7.
The Transport layer tags the message with a TCP/UDP header that among
other things has the port information and checksum for integrity. This is
referred to as packet or segment.
The Network layer adds the IP address and routing information in the form
of an IP header, giving us an IP datagram.
The Data Link layer adds its own protocol specific header to form a frame.
This section will not describe how the internet works, but rather we will
discuss both the general and specific approaches for connecting embedded
systems to the internet.
For a general description of the internet of things, see Vasseur and
Dunkels, Interconnecting Smart Objects with IP. This book provides a good
overview of network technologies used for connecting devices.
Figure 16.9 illustrates the distributed approach taken with the internet of
things.
A distributed solution deploys multiple sensors and actuators connected
by the internet. Another name given for an embedded system connected to
the internet is smart object.
Smart objects include sensors to collect data, processing to detect events
and make decisions, and actuators to manipulate the local environment.
Interoperability means our device can function with a wide range of other
devices made with different technologies, sold by different vendors, and
produced by different companies.
Scalability. ARM reports over 50 million devices with an ARM core have been
shipped from 1993 to 2013, and predicts another 50 billion before the end of
this decade. In order to be effective and profitable, we need to develop
systems that can scale.
16.3. IP Addresses
IP-addresses being 32-bit numbers, we could potentially have 4 billion
addresses. With the emerging demand to connect embedded devices to the
Internet, it would seem inevitable that we run out of IP addresses.
Fortunately, the IETF envisioned this and set aside IP addresses that can be
used in private networks. These pool of private IP addresses are listed in
Table 16.2.
However, this assumes that the software support (from the OS) and the
hardware support (from physical hardware and firmware) is available on the
machine.
Figure 16.11 shows the method most systems use to create a wifi
connection. In particular there is a small amount of hardware that manages
the physical layers of the connection and the remaining layers are
implemented in software on the host.