.. _Wireless:

.. raw:: html

   <script>ODSA.SETTINGS.DISP_MOD_COMP = true;ODSA.SETTINGS.MODULE_NAME = "Wireless";ODSA.SETTINGS.MODULE_LONG_NAME = "Wireless Connectivity: Wi-Fi, Bluetooth, and Zigbee";ODSA.SETTINGS.MODULE_CHAPTER = "The Internet and Connectivity"; ODSA.SETTINGS.BUILD_DATE = "2021-06-01 12:51:47"; ODSA.SETTINGS.BUILD_CMAP = false;JSAV_OPTIONS['lang']='en';JSAV_EXERCISE_OPTIONS['code']='java';</script>


.. |--| unicode:: U+2013   .. en dash
.. |---| unicode:: U+2014  .. em dash, trimming surrounding whitespace
   :trim:


.. This file is part of the OpenCSF eTextbook project. It was
.. auto-generated by scripts from the OpenDSA eTextbook project.
.. See https://OpenCSF.org for more details. OpenCSF is distributed
.. under a Creative Commons Attribution-NonCommercial 4.0 International
.. License (see http://creativecommons.org/licenses/by-nc/4.0/),
.. Copyright (c) 2019-2021 by Michael S. Kirkpatrick. OpenDSA is
.. distributed under an MIT open source license, Copyright (c) 2012-2021
.. by the OpenDSA Project Contributors.

.. avmetadata::
   :author: Michael S. Kirkpatrick
   :requires:
   :satisfies: 
   :topic: 

Wireless Connectivity: Wi-Fi, Bluetooth, and Zigbee
===================================================

We close our survey of network technologies with a brief overview of three forms of wireless
connectivity that facilitate three very different capabilities. :term:`Wi-Fi` is the common name for
the set of wireless technologies defined by the :term:`IEEE 802.11` working groups and supported by
the :term:`Wi-Fi Alliance`. *Bluetooth* is a set of standards defined by the :term:`Bluetooth SIG
<Bluetooth Special Interest Group>`. :term:`Zigbee` is a suite of protocols maintained by the
:term:`Zigbee Alliance`, intended to create short-range networks using radio communication defined
by the :term:`IEEE 802.15.4` working group.

Wireless Protocol Stacks and Uses
---------------------------------

Wi-Fi is designed to act as a substitute for the wired connections that make up the traditional link
and physical layers. That is, Wi-Fi assumes that the goal is to use a wireless connection to
facilitate Internet access for a mobile device. As such, devices like laptops and tablets use the
802.11 technology standards to communicate with an :term:`access point` that is connected to an ISP.
Readers may be familiar with the different standards, such as 802.11a, 802.11g, and 802.11n. These
standards offer different levels of performance by specifying different features of the radio that
is used. For instance, 802.11n wireless routers can have more than one antenna to support
:term:`multiple input and multiple output` (MIMO) access; with MIMO, the router can be sending and
receiving communications with several devices all at one, increasing the efficiency of the overall
system. Early standards did not assume MIMO-compatible radios, so the maximum speed and throughput
were significantly lower.

In contrast, Bluetooth was not designed to connect a device to the Internet. Instead, Bluetooth
devices focus on short-range :term:`mobile ad hoc networks (MANETs) <mobile ad hoc network>`. In a MANET, unknown devices
establish connections with efficient, minimal overhead and configuration; the goal is to allow a new
device to join the network rapidly, exchange some data, then disconnect. In the simplest case,
Bluetooth speakers or headphones may be used to play the sound that would otherwise be produced by a
computer's speakers; similarly, a Bluetooth keyboard or mouse reduce the number of cables that must
physically connect a computer and its peripheral devices. Bluetooth devices are generally assumed to
have low-power requirements, so the range of the connection can be as short as 1 to 10 meters.

.. _WirelessBluetooth:

.. figure:: Images/CSF-Images.5.13.png
   :align: right
   :width: 95%
   :figwidth: 35%
   :alt: The Bluetooth protocol stack does not assume Internet access

   The Bluetooth protocol stack does not assume Internet access

Since Bluetooth is not intended to provide Internet access, its protocol stack is very different
than the 5-layer model we have examined previously. :num:`Figure <Figure #WirelessBluetooth>` shows
the main structure of the Bluetooth protocol stack. At the lowest layer, the baseband and
the link manager/link controller (LM/LC) layers provide the basic point-to-point modulation
of the radio signal. The logical link control and adaptation protocol (L2CAP) acts in a
manner similar to the traditional link layer by multiplexing access to the radio for higher-layer
protocols. Given Bluetooth's usage model is for point-to-point communication, its protocol stack
does not offer an equivalent of the Internet layer.

Bluetooth defines a number of protocols that are analogous to a transport layer. The RFCOMM
protocol provides a generic serial port interface, similar to a TCP stream socket.
Multichannel adaptation protocol (MCAP) defines a common transport layer for medical
devices. Lastly, the generic access profile (GAP) creates an extendible interface that can
be used for future applications that are not defined in the specification.

:term:`Bluetooth profiles <Bluetooth profile>` serve as the equivalent of the application layer. The
hands-free protocol (HFP) defines the interface for connecting a cell-phone to a wireless
peripheral, such as a headset or an automobile. HFP and object exchange (OBEX)—a generic profile for
exchanging binary data—run on top of the RFCOMM protocol. The health device protocol (HDP) provides
a common interface for healthcare devices, such as thermometers or heart meters, running on the MCAP
protocol. Some profiles, such as human interface device (HID) and audio/video distribution transport
protocol (AVDTP), run directly on top of L2CAP to minimize their latency to support real-time human
interactions. HID is used for wireless devices such as a mouse and keyboard, whereas AVDTP is used
for devices like headphones. More recently, the advanced audio distribution profile (A2DP) has been
added on top of AVDTP to provide improved service for audio-visual devices.

The Bluetooth SIG was established with a core set of applications in mind. The designers also had a
stated design goal to use existing radios, rather than designing new technology from scratch. These
design goals allowed the Bluetooth SIG to get devices on the market for consumer use very rapidly.
By working within the constraints of the top and bottom layers (the applications and the existing
radios), the designers were able to construct a working protocol stack in a short period of time.

The Zigbee wireless standard lies somewhere in between the goals of Wi-Fi and Bluetooth. Like
Bluetooth, Zigbee is used for MANETs, but on a larger and more complex scale. To be specific,
Bluetooth is generally based on a :term:`star topology`, with multiple peripherals (keyboard, mouse,
speakers) connecting to a central device (laptop); no one expects their keyboard and mouse to be
exchanging data packets. In contrast, Zigbee provides support for :term:`wireless mesh networks <wireless mesh network>`, in
which devices provide support for routing packets if two hosts are too far apart to communicate
directly. Note that the Internet backbone can be described as a wired mesh network, allowing
multiple routing paths; Zigbee takes this idea and replaces the wired connections with wireless
ones. Zigbee uses this structure to support applications like low-powered sensor networks. Zigbee is
one of the protocols used to support the :term:`Internet of Things` (IoT). IoT is the general
concept of connecting non-traditional computing devices, such as home appliances, thermostats, or
entertainment devices, to each other and to the Internet as a whole.

.. _WirelessZigbee:

.. figure:: Images/CSF-Images.5.14.png
   :align: right
   :width: 95%
   :figwidth: 40%
   :alt: The Zigbee protocol stack supports custom short-range networks

   The Zigbee protocol stack supports custom short-range networks

:num:`Figure <Figure #WirelessZigbee>` shows the structure of the Zigbee protocol stack. The lowest
layers, MAC and PHY, are defined by the 802.15.4 working group, independent of Zigbee itself. These
layers define a generic point-to-point communication that can be used with low-power radios. Zigbee
refers specifically to the layers built on top of this this foundation. The NWK layer coordinates
the mesh routing that builds the network. The APS and Zigbee Device Object (ZDO) Management provide
common services that applications can use, such as cryptographic key management and information
about devices on the network. Applications can access ZDOs through an interface at the application
layer, or they can request services through application end points.

These three protocol stacks serve illustrate how wireless connectivity can be used to provide very
different services. Wi-Fi is designed to extend the traditional Internet model to mobile devices,
replacing the last link of the network with a wireless access point. Bluetooth defines a local
point-to-point mechanism that allows computer peripherals to communicate without a cable physically
connecting the devices. Zigbee creates a wireless mesh network that can be used to route data, such
as sensor readings, between low-powered devices. Zigbee devices can also have additional components
added that allow them to link to an Internet access point, connecting the sensor network and the
Internet. These separate infrastructures provide support for application designers to build services
that can communicate without physical connections.
   
.. avembed:: Exercises/Internet/InterWirelessSumm.html ka
   :module: Wireless
   :long_name: Wireless connectivity questions
   :threshold: 3

