4.6 Bluetooth
In 1994, the L. M. Ericsson company became interested in connecting
its mobile phones to other devices (e.g., PDAs) without cables. Together with
four other companies (IBM, Intel, Nokia, and Toshiba), it formed a SIG (Special
Interest Group, i.e., consortium) to develop a wireless standard for
interconnecting computing and communication devices and accessories using
short-range, low-power, inexpensive wireless radios. The project was named Bluetooth, after Harald Blaatand (Bluetooth) II
(940-981), a Viking king who unified (i.e., conquered) Denmark and Norway, also
without cables.
Although the original idea was just to get rid of the cables
between devices, it soon began to expand in scope and encroach on the area of
wireless LANs. While this move makes the standard more useful, it also creates
some competition for mindshare with 802.11. To make matters worse, the two
systems also interfere with each other electrically. It is also worth noting
that Hewlett-Packard introduced an infrared network for connecting computer
peripherals without wires some years ago, but it never really caught on in a
big way.
Undaunted by all this, in July 1999 the Bluetooth SIG issued a
1500-page specification of V1.0. Shortly thereafter, the IEEE standards group
looking at wireless personal area networks, 802.15, adopted the Bluetooth document
as a basis and began hacking on it. While it might seem strange to standardize
something that already had a very detailed specification and no incompatible
implementations that needed to be harmonized, history shows that having an open
standard managed by a neutral body such as the IEEE often promotes the use of a
technology. To be a bit more precise, it should be noted that the Bluetooth
specification is for a complete system, from the physical layer to the
application layer. The IEEE 802.15 committee is standardizing only the physical
and data link layers; the rest of the protocol stack falls outside its charter.
Even though IEEE approved the first PAN standard, 802.15.1, in
2002, the Bluetooth SIG is still active busy with improvements. Although the
Bluetooth SIG and IEEE versions are not identical, it is hoped that they will
soon converge to a single standard.
4.6.1 Bluetooth Architecture
Let us start our study of the Bluetooth system with a quick
overview of what it contains and what it is intended to do. The basic unit of a
Bluetooth system is a piconet, which consists
of a master node and up to seven active slave nodes within a distance of 10
meters. Multiple piconets can exist in the same (large) room and can even be
connected via a bridge node, as shown in Fig.
4-35. An interconnected collection of piconets is called a scatternet.
Figure 4-35. Two piconets can be connected to form a scatternet.
In addition to the seven active slave nodes in a piconet,
there can be up to 255 parked nodes in the net. These are devices that the
master has switched to a low-power state to reduce the drain on their
batteries. In parked state, a device cannot do anything except respond to an
activation or beacon signal from the master. There are also two intermediate
power states, hold and sniff, but these will not concern us here.
The reason for the master/slave design is that the designers
intended to facilitate the implementation of complete Bluetooth chips for under
$5. The consequence of this decision is that the slaves are fairly dumb,
basically just doing whatever the master tells them to do. At its heart, a
piconet is a centralized TDM system, with the master controlling the clock and
determining which device gets to communicate in which time slot. All
communication is between the master and a slave; direct slave-slave
communication is not possible.
4.6.2 Bluetooth Applications
Most network protocols just provide channels between
communicating entities and let applications designers figure out what they want
to use them for. For example, 802.11 does not specify whether users should use
their notebook computers for reading e-mail, surfing the Web, or something
else. In contrast, the Bluetooth V1.1 specification names 13 specific
applications to be supported and provides different protocol stacks for each
one. Unfortunately, this approach leads to a very large amount of complexity,
which we will omit here. The 13 applications, which are called profiles, are listed in Fig.
4-36. By looking at them briefly now, we may see more clearly what the
Bluetooth SIG is trying to accomplish.
Figure 4-36. The Bluetooth profiles.
The generic access profile is not really an application, but
rather the basis upon which the real applications are built. Its main job is to
provide a way to establish and maintain secure links (channels) between the
master and the slaves. Also relatively generic is the service discovery
profile, which is used by devices to discover what services other devices have
to offer. All Bluetooth devices are expected to implement these two profiles.
The remaining ones are optional.
The serial port profile is a transport protocol that most of
the remaining profiles use. It emulates a serial line and is especially useful
for legacy applications that expect a serial line.
The generic object exchange profile defines a client-server
relationship for moving data around. Clients initiate operations, but a slave
can be either a client or a server. Like the serial port profile, it is a
building block for other profiles.
The next group of three profiles is for networking. The LAN
access profile allows a Bluetooth device to connect to a fixed network. This
profile is a direct competitor to 802.11. The dial-up networking profile was
the original motivation for the whole project. It allows a notebook computer to
connect to a mobile phone containing a built-in modem without wires. The fax
profile is similar to dial-up networking, except that it allows wireless fax
machines to send and receive faxes using mobile phones without a wire between
the two.
The next three profiles are for telephony. The cordless
telephony profile provides a way to connect the handset of a cordless telephone
to the base station. Currently, most cordless telephones cannot also be used as
mobile phones, but in the future, cordless and mobile phones may merge. The
intercom profile allows two telephones to connect as walkie-talkies. Finally,
the headset profile provides hands-free voice communication between the headset
and its base station, for example, for hands-free telephony while driving a
car.
The remaining three profiles are for actually exchanging
objects between two wireless devices. These could be business cards, pictures,
or data files. The synchronization profile, in particular, is intended for
loading data into a PDA or notebook computer when it leaves home and collecting
data from it when it returns.
Was it really necessary to spell out all these applications in
detail and provide different protocol stacks for each one? Probably not, but
there were a number of different working groups that devised different parts of
the standard, and each one just focused on its specific problem and generated
its own profile. Think of this as Conway's law in action. (In the April 1968
issue of Datamation magazine, Melvin Conway
observed that if you assign n people to write a
compiler, you will get an n-pass compiler, or
more generally, the software structure mirrors the structure of the group that
produced it.) It would probably have been possible to get away with two
protocol stacks instead of 13, one for file transfer and one for streaming
real-time communication.
4.6.3 The Bluetooth Protocol Stack
The Bluetooth standard has many protocols grouped loosely into
layers. The layer structure does not follow the OSI model, the TCP/IP model,
the 802 model, or any other known model. However, IEEE is working on modifying
Bluetooth to shoehorn it into the 802 model better. The basic Bluetooth
protocol architecture as modified by the 802 committee is shown in Fig.
4-37.
Figure 4-37. The 802.15 version of the Bluetooth protocol architecture.
The bottom layer is the physical radio layer, which
corresponds fairly well to the physical layer in the OSI and 802 models. It
deals with radio transmission and modulation. Many of the concerns here have to
do with the goal of making the system inexpensive so that it can become a mass
market item.
The baseband layer is somewhat analogous to the MAC sublayer
but also includes elements of the physical layer. It deals with how the master
controls time slots and how these slots are grouped into frames.
Next comes a layer with a group of somewhat related protocols.
The link manager handles the establishment of logical channels between devices,
including power management, authentication, and quality of service. The logical
link control adaptation protocol (often called L2CAP) shields the upper layers
from the details of transmission. It is analogous to the standard 802 LLC
sublayer, but technically different from it. As the names suggest, the audio
and control protocols deal with audio and control, respectively. The
applications can get at them directly, without having to go through the L2CAP
protocol.
The next layer up is the middleware layer, which contains a
mix of different protocols. The 802 LLC was inserted here by IEEE for
compatibility with its other 802 networks. The RFcomm, telephony, and service
discovery protocols are native. RFcomm (Radio Frequency communication) is the
protocol that emulates the standard serial port found on PCs for connecting the
keyboard, mouse, and modem, among other devices. It has been designed to allow
legacy devices to use it easily. The telephony protocol is a real-time protocol
used for the three speech-oriented profiles. It also manages call setup and
termination. Finally, the service discovery protocol is used to locate services
within the network.
The top layer is where the applications and profiles are
located. They make use of the protocols in lower layers to get their work done.
Each application has its own dedicated subset of the protocols. Specific
devices, such as a headset, usually contain only those protocols needed by that
application and no others.
In the following sections we will examine the three lowest
layers of the Bluetooth protocol stack since these roughly correspond to the
physical and MAC sublayers.
4.6.4 The Bluetooth Radio Layer
The radio layer moves the bits from master to slave, or vice
versa. It is a low-power system with a range of 10 meters operating in the
2.4-GHz ISM band. The band is divided into 79 channels of 1 MHz each.
Modulation is frequency shift keying, with 1 bit per Hz giving a gross data
rate of 1 Mbps, but much of this spectrum is consumed by overhead. To allocate
the channels fairly, frequency hopping spread spectrum is used with 1600
hops/sec and a dwell time of 625 µsec. All the nodes in a piconet hop
simultaneously, with the master dictating the hop sequence.
Because both 802.11 and Bluetooth operate in the 2.4-GHz ISM
band on the same 79 channels, they interfere with each other. Since Bluetooth
hops far faster than 802.11, it is far more likely that a Bluetooth device will
ruin 802.11 transmissions than the other way around. Since 802.11 and 802.15
are both IEEE standards, IEEE is looking for a solution to this problem, but it
is not so easy to find since both systems use the ISM band for the same reason:
no license is required there. The 802.11a standard uses the other (5 GHz) ISM
band, but it has a much shorter range than 802.11b (due to the physics of radio
waves), so using 802.11a is not a perfect solution for all cases. Some
companies have solved the problem by banning Bluetooth altogether. A
market-based solution is for the network with more power (politically and
economically, not electrically) to demand that the weaker party modify its
standard to stop interfering with it. Some thoughts on this matter are given in
(Lansford et al., 2001).
4.6.5 The Bluetooth Baseband Layer
The baseband layer is the closest thing Bluetooth has to a MAC
sublayer. It turns the raw bit stream into frames and defines some key formats.
In the simplest form, the master in each piconet defines a series of 625 µsec
time slots, with the master's transmissions starting in the even slots and the
slaves' transmissions starting in the odd ones. This is traditional time
division multiplexing, with the master getting half the slots and the slaves
sharing the other half. Frames can be 1, 3, or 5 slots long.
The frequency hopping timing allows a settling time of 250–260
µsec per hop to allow the radio circuits to become stable. Faster settling is
possible, but only at higher cost. For a single-slot frame, after settling, 366
of the 625 bits are left over. Of these, 126 are for an access code and the
header, leaving 240 bits for data. When five slots are strung together, only
one settling period is needed and a slightly shorter settling period is used,
so of the 5 x 625 = 3125 bits in five time slots, 2781 are available to the
baseband layer. Thus, longer frames are much more efficient than single-slot
frames.
Each frame is transmitted over a logical channel, called a link, between the master and a slave. Two kinds of
links exist. The first is the ACL (Asynchronous Connection-Less) link, which is used
for packet-switched data available at irregular intervals. These data come from
the L2CAP layer on the sending side and are delivered to the L2CAP layer on the
receiving side. ACL traffic is delivered on a best-efforts basis. No guarantees
are given. Frames can be lost and may have to be retransmitted. A slave may
have only one ACL link to its master.
The other is the SCO (Synchronous Connection Oriented) link, for real-time
data, such as telephone connections. This type of channel is allocated a fixed
slot in each direction. Due to the time-critical nature of SCO links, frames
sent over them are never retransmitted. Instead, forward error correction can
be used to provide high reliability. A slave may have up to three SCO links
with its master. Each SCO link can transmit one 64,000 bps PCM audio channel.
4.6.6 The Bluetooth L2CAP Layer
The L2CAP layer has three major functions. First, it accepts
packets of up to 64 KB from the upper layers and breaks them into frames for
transmission. At the far end, the frames are reassembled into packets again.
Second, it handles the multiplexing and demultiplexing of
multiple packet sources. When a packet has been reassembled, the L2CAP layer
determines which upper-layer protocol to hand it to, for example, RFcomm or
telephony.
Third, L2CAP handles the quality of service requirements, both
when links are established and during normal operation. Also negotiated at
setup time is the maximum payload size allowed, to prevent a large-packet
device from drowning a small-packet device. This feature is needed because not
all devices can handle the 64-KB maximum packet.
4.6.7 The Bluetooth Frame Structure
There are several frame formats, the most important of which
is shown in Fig.
4-38. It begins with an access code that usually identifies the master so
that slaves within radio range of two masters can tell which traffic is for
them. Next comes a 54-bit header containing typical MAC sublayer fields. Then
comes the data field, of up to 2744 bits (for a five-slot transmission). For a
single time slot, the format is the same except that the data field is 240
bits.
Figure 4-38. A typical Bluetooth data frame.
Let us take a quick look at the header. The Address field identifies which of the eight active devices
the frame is intended for. The Type field
identifies the frame type (ACL, SCO, poll, or null), the type of error
correction used in the data field, and how many slots long the frame is. The Flow bit is asserted by a slave when its buffer is
full and cannot receive any more data. This is a primitive form of flow
control. The Acknowledgement bit is used to
piggyback an ACK onto a frame. The Sequence bit
is used to number the frames to detect retransmissions. The protocol is
stop-and-wait, so 1 bit is enough. Then comes the 8-bit header Checksum. The entire 18-bit header is repeated three
times to form the 54-bit header shown in Fig.
4-38. On the receiving side, a simple circuit examines all three copies of
each bit. If all three are the same, the bit is accepted. If not, the majority
opinion wins. Thus, 54 bits of transmission capacity are used to send 10 bits
of header. The reason is that to reliably send data in a noisy environment
using cheap, low-powered (2.5 mW) devices with little computing capacity, a
great deal of redundancy is needed.
Various formats are used for the data field for ACL frames.
The SCO frames are simpler though: the data field is always 240 bits. Three
variants are defined, permitting 80, 160, or 240 bits of actual payload, with
the rest being used for error correction. In the most reliable version (80-bit
payload), the contents are just repeated three times, the same as the header.
Since the slave may use only the odd slots, it gets 800
slots/sec, just as the master does. With an 80-bit payload, the channel
capacity from the slave is 64,000 bps and the channel capacity from the master
is also 64,000 bps, exactly enough for a single full-duplex PCM voice channel
(which is why a hop rate of 1600 hops/sec was chosen). These numbers mean that
a full-duplex voice channel with 64,000 bps in each direction using the most
reliable format completely saturates the piconet despite a raw bandwidth of 1
Mbps. For the least reliable variant (240 bits/slot with no redundancy at this
level), three full-duplex voice channels can be supported at once, which is why
a maximum of three SCO links is permitted per slave.
There is much more to be said about Bluetooth, but no more
space to say it here. For more information, see (Bhagwat, 2001; Bisdikian,
2001; Bray and Sturman, 2002; Haartsen, 2000; Johansson et al., 2001; Miller
and Bisdikian, 2001; and Sairam et al., 2002).
No comments:
Post a Comment
silahkan membaca dan berkomentar