Fundamentals of Mobile Computing
Fundamentals of Mobile Computing
Mobile
Computing
Operation Subsystem
(OSS)
RAJIB MALL
Professor
Department of Computer Science and Engineering
Indian Institute of Technology Kharagpur
New Delhi-110001
2012
FUNDAMENTALS OF MOBILE COMPUTING
Prasant Kumar Pattnaik and Rajib Mall
© 2012 by PHI Learning Private Limited, New Delhi. All rights reserved. No part of this
book may be reproduced in any form, by mimeograph or any other means, without
permission in writing from the publisher.
ISBN-978-81-203-4632-1
The export rights of this book are vested solely with the publisher.
Published by Asoke K. Ghosh, PHI Learning Private Limited, M-97, Connaught Circus,
New Delhi-110001 and Printed by Raj Press, New Delhi-110012.
Contents
Preface........................................................................................................................ix
iii
iv Contents
Glossary........................................................................................................211–234
Index...............................................................................................................235–238
Preface
Rajib Mall
[email protected]
Basics of Communication Technologies
1
I n this chapter, we review a few basic concepts related to telecommunica-
tions and computer communications that form the essential infrastructure
required for building knowledge in the area of mobile computing. In par-
ticular, we focus here on the basics of wireless technologies and computer
communications. These concepts form the prerequisites that we implicitly
assume in the treatment of this text.
Mobile computing refers to the computational tasks performed by
mobile users using their handsets. Since the handsets have very limited
processing power and memory, these devices by themselves do not have
the capability to carry out any significant and meaningful computations and
can only serve as the front-end for invoking remote applications. Mobile
computation, therefore, inevitably involves the invocation of applications
running on remote servers. In other words, mobile computation is
usually achieved by the interaction of a front-end application running
on the mobile handset with a server, seamlessly, through the medium of
wireless communication. Therefore, a study of mobile computation
involves the study of the invocation mechanisms at the client end, the
underlying wireless communication, and the corresponding server-side
technologies.
Within a short span of less than two decades, more than half the world’s
population today owns cell phones. The cell phones have achieved
remarkable acceptance all over the world due to their major advantages over
the traditional phones. Besides providing the flexibility of communicating
while on the move, the cell phone system also provides data services such
as Short Message Service (SMS), Multimedia Messaging Service (MMS),
and even email and web browsing while on the move. Further, unlike a
traditional network, in a mobile telecommunication network, even when
the user moves, the current location of the mobile phone is maintained by
the network so that any voice call or SMS can be easily sent to the handset
wherever it may be. This has made it possible for people to communicate
and carry out important work anytime and from anywhere. For this reason,
mobile computing is often referred to as ubiquitous computing as well.
Today, we can say that cellular communication is influencing virtually
everyone’s life in some way or the other. Mobile computing is poised to
achieve higher levels of success in the current decade.
Before we proceed further, a brief narrative of how a cellular
communication system functions is presented in Box 1.1 to enable readers
to familiarize themselves with the architecture of the system.
Basics of Communication Technologies 3
its destination and based on this information the network sends the packet
on its way forward. Further, depending on the traffic conditions, packets
can get stored at a switch for a significant amount of time causing queues
to get built up at various switches. The cumulative delays that a packet
undergoes at various switches can be hundreds of times longer than the
propagation delay. So, the different packets of a voice call can undergo
different amounts of delay causing degraded sound quality. In a voice call,
even a moderate delay at a switch can cause crackling or popping sounds at
the receiver. Unless the switches are built using very high-speed hardware,
the receiver of a call would hear such distracting noises. This was possibly a
reason why packet switching was not used for voice calls until recently. The
modern day networks deploy high-speed, powerful switches and routers.
This has made it possible for voice to be transmitted over packet-switched
networks and hence VoIP (Voice over Internet Protocol) has become a very
popular and cheap medium of communication. Computer networks are
predominantly based on the packet-switching technology.
1.4.3 Internetworks
determines how long a node can transmit. These two policies together are
called the access control policy and form the Media Access Control (MAC)
layer protocol. In other words, the MAC protocol in a LAN consists of two
parts: an access arbitration part that determines when a node can use the
channel and the transmission control policy decides how long it can use
it, once it starts using it. Let us first review some basic aspects of LANs
that are crucial to understanding our subsequent discussions.
Two major LAN architectures are being used: the bus architecture and
the ring architecture. These two architectures use different access control
techniques. We first briefly discuss these two LAN architectures, and then
discuss the associated access control techniques.
In a ring network shown in Fig. 1.3, nodes are placed along the ring.
The nodes transmit in turn. Each node usually transmits for a certain
predetermined period of time. Therefore, packet transmission delays become
predictable and can be made sufficiently small as per requirement. As a
result, ring-based architectures are often preferred in real-time applications.
reliability of ring networks a major concern. Further, ring is a poor fit to the
linear topology normally found in many situations. This made researchers
to look for alternative technologies which can have the advantages of both
the bus and ring architectures. This led to the development of the token
bus architecture. A token bus is a bus-based architecture where the stations
on the bus are logically arranged in a ring with each station knowing the
address of the station to its “left” and “right”.
When the logical ring is initialized, the highest numbered station gets
a chance to start its transmission. After transmitting for a predetermined
duration, this station passes the transmission permission to its immediate
neighbour (left or right as per the convention adopted) by sending a special
control frame called a token. The token propagates around the logical ring.
At any time, only the token holder is permitted to transmit packets. Since
only one station at a time holds the token in a ring network, collisions
cannot occur. An important point that must be kept in mind is that the
physical order in which the stations are connected to the cable need not
be the same as the order of the stations in the logical ring. This is because
a cable is inherently a broadcast medium. Each station would receive
every frame transmitted, and discard those that are not addressed to it.
After a node exhausts it assigned time slot for transmission, it hands over
the token to its logical neighbour. For this, it transmits a special token,
specifically addressed to its logical neighbour in the ring, irrespective of
whether that station is physically adjacent to the concerned node or not.
The MAC protocol in a token ring network should support adding stations
to and removing stations from the logical ring. The protocols based on the
underlying ring architecture hold the advantage of being able to guarantee
the delivery time of a packet.
Receiver: The receiver receives the modulated signals and reverses the
functions of the transmitter component and thereby recovers the transmitted
10 Fundamentals of Mobile Computing
in the core network must allow both voice and control information to be
exchanged between the switching system and the base station. The MSC
is connected to the landline telephone network to allow mobile telephones
to be connected to standard landline telephones. The core network is
responsible for transmitting voice calls, SMS (Short Message Service),
etc. from one phone to another through switches. The core network also
maintains a database that contains information about the subscribers and
the information about billing.
One access point can provide support to a small group of users and can
perform within a range up to a few hundreds of feet. The access point
(or the antenna attached to the access point) is usually mounted on roof
tops but may be mounted elsewhere, if it is practical to do so, as long as
the desired radio coverage is obtained. End users access the wireless LAN
through wireless-LAN adapters, which are integrated within the hand-
held computers. Wireless LAN adapters provide an interface between the
client’s network operating system and the air waves via an antenna.
Basics of Communication Technologies 17
In Fig. 1.6, observe that the access points are connected through a
distribution system which usually uses a fibre optic cable. As shown,
mobile nodes are connected to access points. The 802.11 standard stipulates
that the distribution system may be of any technology, such as Ethernet,
token ring, or any other network type. The majority of actual installations,
however, utilize Ethernet (802.3). An 802.3-based distribution system (also
referred to as the “wired backbone”) consists of switches or hubs that
tie together users (PCs and access points) equipped with 802.3 network
interface cards (NICs). The switch or hub is somewhat analogous to an
802.11 access point. The main difference is that a hub or switch provides
connection over a physical medium and an access point provides wireless
connectivity. In the example of Fig. 1.6, two 802.11 LANs are connected via
a distribution system. A distribution system can also be used to increase
network coverage through roaming between cells. The distribution system
also provides connectivity to the Internet through a switch.
The lowermost layer is called the Radio Frequency (RF) layer. Radio
modem is specified in this layer. This link controls the packet but the bit
levels are specified by the baseband layer. The Link Management Protocol
(LMP) is capable of configuring links with other devices. It provides power
modes, traffic scheduling, packet format, authentication and encryption.
Logical Link Control and Adaptation Protocol (L2CAP) provide connection-
oriented and connectionless data services to the upper layers of the protocol
Basics of Communication Technologies 21
stack. Control information may also be exchanged through it. L2CAP may
include services such as segmentation and re-assembly of data packets. The
Service Discovery Protocol (SDP) enables two or more Bluetooth devices
to support a particular service. In the following, we briefly describe the
functionalities of the different layers of the Bluetooth protocol stack.
Radio layer: It defines the requirements on the Bluetooth transceiver
device that provides the required wireless support for master-slave
communications. It specifies the transceiver characteristics such as the
specific modulation technique used (GFSK, i.e. Gaussian Frequency Shift
Keying), interference performance, radio frequency tolerance, etc. The
Bluetooth radio is a low-power transceiver with a range of up to 10 metres
and uses spread spectrum transmission by frequency hopping.
Baseband: The Baseband is the physical layer of the Bluetooth. As can be
seen in Fig. 1.8, this layer lies on top of the Bluetooth radio layer in the
Bluetooth stack. The functionalities of this layer include link establishment
and power control. It also defines the packet format and timing issues. The
baseband protocol implementation is called a Link Controller (LC).
Link Management Protocol (LMP): LMP is a data link layer protocol
and is responsible for link setup between the Bluetooth devices. The
specific responsibilities that it carries out include link setup, authentication,
and link configuration. Two types of links are possible: Asynchronous
Connectionless Links (ACL) and Synchronous Connection-Oriented (SCO).
The ACL link is used for transmitting the packet-switched data received
from L2CAP. The SCO link is used for real-time data involved in voice
telephony applications.
Logical Link Control and Adaptation Protocol (L2CAP): This layer
provides connection-oriented and connectionless data services to the upper
layers of the protocol stock. Using the services of this layer, the higher
level protocols can transmit and receive L2CAP messages that can be up
to 64 kilobytes in length. L2CAP forms the Bluetooth data packets through
message segmentation while transmitting and also forms messages from
the received Bluetooth data packets.
SUMMARY
FURTHER READINGS
EXERCISES
1. What is the difference between a data network and a voice network?
What are their relative advantages?
2. What types of communication services are usually offered on data
and voice networks?
3. What are the main difficulties that would be experienced if digitized
voice signals are transmitted over a data network? How can these
difficulties be overcome?
4. What is Controller Area Network (CAN)? How is it different from
a LAN? What are the important applications of a CAN?
5. Explain why there is a bound on the length and the number of nodes
that can be connected to a LAN.
6. Determine the minimum packet size for a CSMA/CD network
operating at 1 Gbps and having a length of 100 metres. Clearly
show your assumptions and calculations.
7. What is a transceiver? What is the role of a transceiver in a wireless
communication network?
8. Explain the different hardware components that are used in a
wireless network.
9. What is wireless LAN (WLAN)? Explain the basic wireless LAN
architecture using a suitable schematic diagram.
10. What are the important advantages of a wireless LAN (WLAN) over
a traditional wired LAN?
11. Discuss the architecture of a mobile telecommunication network
using a suitable schematic diagram.
12. Briefly explain how a call can be set up between two mobile phones.
13. Why are standards necessary in networking? Briefly explain any
LAN standard.
14. What do you understand by signal modulation? Briefly explain how
it is achieved. Why is it necessary to modulate a baseband signal on
a carrier signal, before transmitting it?
15. What is the difference between a baseband signal and a broadband
signal? Using a suitable schematic diagram, explain how a broadband
signal is obtained.
16. What is Bluetooth? How is Bluetooth useful in mobile computing?
Describe the protocol stack of Bluetooth.
17. What is a personal area network? Explain the role of Bluetooth in
personal area networking using a suitable example.
18. What are piconets and scatternets? Mention some important
applications of these networks.
19. Discuss the architecture of a mobile telecommunication system using
a suitable schematic diagram.
Introduction to Mobile Computing
2
and Wireless Networking
bridging† between the wireless and the wired mediums. A station must be
recognized by an AP to be able to connect to the network. The AP may
require authentication and this in turn is used as the basic means to keep out
the unauthorized users. In an infrastructureless network, the communication
between hosts occurs directly or via a few intermediate nodes that form
the hops. For example, station A in Fig. 2.2 can communicate with station
C using either the hops A–B, B–C or A–D, D–C.
A recent development in this context, is wireless networking of various
types of devices using the Bluetooth technology. As already discussed in
Chapter 1, the Bluetooth technology can also be used to establish direct
wireless connection of cell phones with devices such as printers, cameras,
scanners, laptop and desk computers. Bluetooth is gradually replacing
cables and infrared as the dominant way of exchanging information
between devices. One of the objectives of the Bluetooth technology is to
enable users to easily connect to a wide range of personal computing and
telecommunication devices, without the need to buy, carry, or lay out
cables. In fact, the Bluetooth technology enables setting up of personal
area networks (PANs) known as piconets and ad hoc networks known
as scatternets. It provides opportunities for rapid deployment of ad hoc
connections, and the possibility of automatic, transparent connections
between devices. It promises to eliminate the need to purchase additional
or proprietary cabling and configuration exercises needed to connect the
individual devices.
†
A network bridge connects multiple network segments at the data link layer
(Layer 2) of the OSI reference model.
Introduction to Mobile Computing and Wireless Networking 27
Application (Tier-2)
Data (Tier-3)
Presentation tier
The topmost level of a mobile computing application concerns the user
interface. A good user interface facilitates the users to issue requests and
to present the results to the them meaningfully. Obviously, the programs
at this layer run on the client’s computer. This layer usually includes web
browsers and customized client programs for dissemination of information
and for collection of data from the user.
Application tier
This layer has the vital responsibility of making logical decisions and
performing calculations. It also moves and processes data between the
presentation and data layers. We can consider the middle tier to be
like an “engine” of an automobile. It performs the processing of user
input, obtaining information and then making decisions. This layer is
implemented using technology like Java, .NET services, cold fusion, etc.
The implementation of this layer and the functionality provided by this
layer should be database independent. This layer of functionalities is
usually implemented on a fixed server.
30 Fundamentals of Mobile Computing
Data tier
The data tier is responsible for providing the basic facilities of data
storage, access, and manipulation. Often this layer contains a database.
The information is stored and retrieved from this database. But, when only
small amounts of data need to be stored, a file system can be used. This
layer is also implemented on a fixed server.
In a cellular mobile system, the area of coverage is split into cells as shown
in Fig. 2.5. Even though the cells have been shown to be non-overlapping
hexagons for simplicity, but in reality cell shapes are irregular and do
overlap to some extent. A base station (BS) is located at the centre of each
cell. The BS in a cell receives communications from all mobile handsets
in the cell and forwards the data to the appropriate handset. Thus, a
base station keeps track of the calls of all handsets in its cell. When a
mobile handset while still continuing a call, moves to another cell, the BS
“hands-off” the call to the BS in the new cell. When a cell covers a crowded
area having too many users, then the users can experience frequent call
drops. To overcome this problem, such cells are split into smaller cells.
First generation
The first generation (1G) cellular system was designed in the late 1960s,
but was commercially deployed in the early 1980s. The first commercial 1G
system in the United States was known as Advanced Mobile Phone System
(AMPS). It became operational in 1982 and supported only voice calls.
This was a completely analog system. In an analog system, analog signals
are transmitted by modulating them on a higher frequency carrier signal,
without first converting the signal into digital form through quantization.
In a completely analog system, it is difficult to support SMS and other data
services. Also, the signals from different users cannot be intermixed on the
same channel, and have to be transmitted in clearly separated channels.
32 Fundamentals of Mobile Computing
Mobile
Features Standards Data speed
gen.
1G Analog transmissions, pri- NMT, AMPS, 600–1200 bps
marily supported voice TACS
communications.
2G Digital transmissions, impro- GSM 9.6 kbps
ved performance by letting
multiple users share a single
channel.
2.5G Enhanced multimedia and GPRS 28 kbps or
streaming video, web browsing. higher
3G Enhanced multimedia and UMTS, HSPDA, 384 kbps or
streaming video capabilities. EDGE, W-CDMA higher
Sub-band 1
Sub-band 2
Band Sub-band 3
Sub-band 4
Sub-band 5
Time
The 1G systems were of multiple access type, since once a caller hanged
up, another caller could use the same frequency. For this reason, the 1G
technology was also called Frequency Division Multiple Access (FDMA).
It was possible to reuse the same frequencies in the non-adjacent cells,
because the transmitter power output was restricted. For example, the cells
shown shaded in Fig. 2.8 could use the same set of frequencies.
When a caller crossed a cell boundary, the channel being used might
not be made available in the new cell as it might already be in use in some
other cell. During handoff, a different channel was possible to be allocated
in this case, otherwise the call got dropped if none were available. Beside
the number of callers that could be accommodated being low, the voice
quality was poor due to analog transmission. Also, it provided no security
at all, since any one could hear a call by tuning into a channel.
Second generation
As already pointed out, the 1G technology had many disadvantages. The
major drawback was the small number of simultaneous calls that could
be made and the high risk of call drops during handoffs. Calls in 1G
were expensive because of the inherent inefficient usage of the bandwidth
spectrum and hence very few could afford to use a cell phone. Further, the
1G networks were not capable of providing several useful services such as
caller identity and SMS. The disadvantages of 1G systems were overcome
by the second generation (2G) cellular systems.
The 2G systems encoded voice and other information digitally before
transmitting them. Digital transmission has many advantages over analog
transmissions. These include noise immunity and better bandwidth utiliza-
tions. The 2G system offered significant advancements in the evolution of
the mobile cellular technologies. Hence the 2G technology rapidly replaced
the 1G technology because of the drastic reductions in the cost of phone
calls and availability of a wider range of services coupled with substantial
improvements in the quality of services. Also, SMSs became possible.
34 Fundamentals of Mobile Computing
2.5 Generation
General Packet Radio Service (GPRS) is an extension of GSM and is
considered to be the 2.5 generation technology. As indicated by the name,
it is based on packet switching compared to circuit switching used in 2G.
This was a significant improvement over 2G and helped to reduce call
costs dramatically. Another important advantage of GPRS is that it allows
users to remain connected to the Internet without incurring additional
charge and supports multimedia capabilities including graphics and video
communications. GPRS deployments began in 2000, followed by EDGE
in 2003. EDGE enhances the capabilities of GPRS, allows faster Internet
browsing, and makes it possible to use streaming applications. Though
this technology provided faster data rates over 2G systems, it is called
2.5G because it did not offer the multi-megabit data rates which are the
characteristics of the 3G system.
Third generation
The 3G systems are often referred to as IMT-2000 (International Mobile
Telecommunications-2000) systems since this was made a global standard
by ITU. The 3G systems support much higher data transmission rates and
offer increased bandwidth, which makes them suitable for high-speed
data applications as well as for high quality traditional voice calls. The
Introduction to Mobile Computing and Wireless Networking 35
Fourth generation
A 4G system provides a faster data rate than that of 3G (at least 10 times
faster) and makes mobile broadband Internet access possible. The 4G
system has made possible high speed Internet access from smartphones
and laptops with USB wireless modems. A few applications that could
not be supported in earlier generations of the cellular phone systems,
have now become possible in 4G including IP telephony, gaming services,
high-definition mobile TV, video conferencing and 3D television. The 4G
technology is expected to help solve the last mile problem that prevents
the mobile users from running applications that are available on wired
networks. There are at present two competing 4G standards: Mobile
WiMAX standard and the Long Term Evolution (LTE) standard.
In the following section, we provide a brief overview of the working of
a few cellular wireless technologies that are being popularly used at present.
Bearer services
Bearer services give the subscribers the capability to send and receive data
to/from remote computers or mobile phones. For this reason, bearer services
are also known as data services (see Box 2.1). These services also enable the
transparent transmission of data between GSM and other networks like
PSTN, ISDN, etc. at rates from 300 bps to 9600 bps. These services are
implemented on the lower-three layers of the OSI reference model. Besides
supporting SMS, e-mail, voice mailbox, and Internet access, this service
provides the users with the capability to execute remote applications. GSM
supports data transfer rates of up to 9.6 kbps.
Teleservices
GSM provides both the voice-oriented teleservices and the non-voice
teleservices, as discussed below.
Telephony: The main goal of GSM was to provide high quality digital
voice transmission, offering the bandwidth of 3.1 kHz of analog phone
systems. Special codecs are used for voice transmission, while other codecs
are used for the transmission of analog data for communication with
traditional computer modems used in fax machines.
Supplementary services
GSM provides certain supplementary services such as user identification,
call redirection, and forwarding of ongoing calls. In addition, standard
ISDN features such as ‘close user groups’ and ‘multiparty’ communication
are available.
Mobile Station (MS): A mobile station (MS) or cell phone contains two
major components: the subscriber identity module (SIM) and the mobile
device. The SIM is a removable smart card. Each mobile device has a
unique identifier that is known as its IMEI (International Mobile Equipment
Identity). Apart from the telephone interface, an MS also offers other types
of interfaces to the users such as USB, Bluetooth, etc. Despite its small size,
a SIM card is a very important component of a GSM network. It contains all
the subscription information of a subscriber and holds the key information
that activates the phone after it is powered on. It contains a microcontroller
to primarily store and retrieve data from the flash storage on the SIM.
Identification information is stored in the SIM card’s protected memory
(ROM) that is not accessible or modifiable by the customer. Additional
flash memory is included in the mobile device to allow storage of other
information such as addresses, pictures, audio and video clips, and short
Introduction to Mobile Computing and Wireless Networking 39
messages. The SIM card contains many other identifiers and tables such
as card type, serial number, a list of subscribed services, and a Personal
Identity Number (PIN).
Base Station Controller (BSC): A BSC manages the radio resource of the
BTSs in the sense that it assigns frequency and time slots for all MSs in
the area. It also manages the handoff from one BTS to another within the
BSS. The BSC also multiplexes the radio channels onto the fixed network
connection to the Mobile Switching Centre (MSC).
Authentication
The purpose of authentication is to protect the network against unauthorized
use. In the GSM context, it helps protect the GSM subscribers by denying
the possibility for intruders to impersonate authorized users. A GSM
network operator can verify the identity of the subscriber, making it highly
improbable to clone someone else’s mobile phone identity.
Authentication can be achieved in a simple way by using a password
such as Personal Identification Number (PIN). This method is not very
secure in GSM networks as an attacker can “listen” the PIN and easily
break the code.
Confidentiality
A GSM network protects voice, data and sensitive signalling information
(e.g. dialed digits) against eavesdropping on the radio path. Confidentiality
of subscriber-dialled information in the GSM network is achieved by
using encryption techniques prescribed by the GSM designers. Data on
the radio path is encrypted between the Mobile Equipment (ME) and
the BTS which protects user traffic and sensitive signalling data against
eavesdropping.
Introduction to Mobile Computing and Wireless Networking 41
Anonymity
A GSM network protects against someone tracking the location of a user
or identifying calls made to (or from) the user by eavesdropping on the
radio path. The anonymity of the subscriber on the radio access link in
the GSM network is achieved by allocating Temporary Mobile Subscriber
Identity (TMSIs) instead of permanent identities. This helps to protect
against tracking a user’s location and obtaining information about a user’s
calling pattern.
CDMA2000 and UMTS were developed separately and are two separate
ITU approved 3G standards. In these networks, coverage is provided by
a combination of various cell sizes, ranging from “in building” pico cells
to global cells provided by satellites, giving service to the remote regions
of the world.
The UMTS was developed mainly for countries with GSM networks,
and it is expected that all GSM networks will be upgraded to UMTS
networks. Because it is a new technology, a whole new radio access
network has to be built. An important advantage of UMTS is that it gives
significantly enhanced capacities to operators.
Introduction to Mobile Computing and Wireless Networking 43
The UMTS specification has been designed so that the UMTS systems
are compatible with GSM networks. Therefore, the UMTS networks can
easily work with any existing GSM/GPRS network. The UMTS systems use
different frequency bands, so the BTSs do not interfere with each other.
Let us now discuss the dissimilarities between these networks. The
UMTS networks are different from the 2G networks in the following
respects:
Higher data rate: The UMTS supports 2 Mbps data rate, which is much
higher than that supported by the 2G mobile systems.
The UMTS network architecture can be divided into three main elements:
User Equipment (UE): The User Equipment (UE) is the name by which
a cell phone is referred to. The new name was chosen because of the
considerably greater functionality that the UE incorporates compared to a
cell phone. It can be thought of as both a mobile phone used for talking
and a data terminal attached to a computer with no voice capability.
Radio Network Subsystem (RNS): The RNS is the equivalent of the Base
Station Subsystem (BSS) in GSM. It provides and manages the wireless
interface for the overall network.
Core Network: The core network is the equivalent of the GSM Network
Switching Subsystem (NSS).
Extensive research has been conducted to study the possible health effects
of continuous exposure to low intensity RF fields produced by mobile
phones. The overall evidence suggests that mobile phone usage of less than
10 years does not pose any increased risk of brain tumour. The effect of
still longer use is unclear due to non-availability of data. Any conclusion
44 Fundamentals of Mobile Computing
SUMMARY
FURTHER READINGS
EXERCISES
1. State true or false against each of the following statements. Give
appropriate reasons for your answer.
(i) Mobile computing and wireless networking are synonymous
terms.
(ii) The Bluetooth technology is an example of an infrastructure-
less network.
(iii) WLAN is an example of an infrastructure-less network.
(iv) A sensor network is essentially based on a single hop wireless
communication.
(v) 2G cellular phones support electronic mail services.
(vi) In the Global Packet Radio Service (GPRS), the customer is
charged for Internet access based on connection time rather
than on total information download.
(vii) GSM stands for Group of Special Mobiles.
(viii) UMTS networks can easily work with the existing GSM/GPRS
networks.
2. What is mobile computing? Mention at least three applications of
mobile computing.
46 Fundamentals of Mobile Computing
A MAC protocol in a wireless medium is much more complex than its wired
counterpart. First, a collision detection scheme is difficult to implement
in a wireless environment, since collisions are hard to be detected by
the transmitting nodes. Also, in infrastructure-less networks, the issue of
hidden and exposed terminals make a MAC protocol extremely inefficient
unless special care is taken to overcome these problems. We elaborate the
hidden and exposed terminal problems in the following:
The hidden terminal problem arises when at least three nodes (A, B, and C), as
shown in Fig. 3.1, communicate among each other. As shown in this figure,
MAC Protocols 49
A B C
For simplicity, we assume that all nodes transmit on the same frequency
at the same time using the entire bandwidth of the transmission channel.
Each sender has a unique random number key, and the sender XORs the
signal with this random number key. The receiver can “tune” into this
signal if it knows the pseudorandom number. Consider an example, where
X, Y are the transmitters and Z is a receiver. Sender X_data = 1 and X_Key
= (010011). Its autocorrelation representation is (–1, +1, –1, –1, +1, +1). The
signal to be calculated at sender X is Xs = X_data X_key = +1X_key =
(–1, +1, –1, –1, +1, +1). Similarly, sender Y_data = 0 and Y_key = (110101)
and the signal to be sent at Y is Ys = –1Y_key = –1(+1, +1, –1, +1, –1,
+1) = (–1, –1, +1, –1, +1, –1). The signal received by receiver Z is Xs + Ys
= (–1, +1, –1, –1, +1, +1) + (–1, –1, +1, –1, +1, –1) = (–2, 0, 0, –2, +2, 0).
At the receiver, in order to receive the data sent by sender X, the signal
54 Fundamentals of Mobile Computing
There are a number of random assignment schemes that are used in MAC
protocols. A few important ones are the following:
• ALOHA
• Slotted ALOHA
• CSMA
• CSMA/CD
• CSMA/CA
receiver sends a CTS (Clear to Send) packet, and the actual data transfer
commences only after that. When the other nodes sharing the medium
sense the CTS packet, they refrain from transmitting until the transmission
from the sending node is complete.
In a contention-based MAC protocol, a node wanting to send a message
first reserves the medium by using an appropriate control message. For
example, reservation of the medium can be achieved by transmitting a
“Ready To Send” (RTS) message and the corresponding destination node
accepting this request answers with a “Clear To Send” (CTS) message. Every
node that hears the RTS and CTS messages defers its transmission during
the specified time period in order to avoid a collision. A few examples of
RTS-CTS based MAC protocols are MACA, MACAW, MACA-BI, PAMAS,
DBTMA, MARCH, S-MAC protocols which have specifically been designed
for sensor networks. In the following, we discuss MACA as a representative
protocol belonging to this category of protocols.
3.6.1 MACA
MACA stands for Multiple Access Collision Avoidance. MACA solves the
hidden/exposed terminal problems by regulating the transmitter power.
A node running MACA requests to use the medium by sending an RTS
to the receiver. Since radio signals propagate omni-directionally, every
terminal within the sender’s radio range will hear this and then refrain
from transmitting. As soon as the receiver is ready to receive data, it
responds with a CTS.
Figure 3.6 schematically shows how MACA avoids the hidden terminal
problem. Before the start of its transmission, it sends a Request To Send
(RTS). B receives the RTS that contains the sender’s name and the receiver’s
name, as well as the length of the future transmission. In response to the
RTS, an acknowledgment from B is triggered indicating Clear To Send
(CTS). The CTS contains the names of the sender and receiver, and the
length of the planned transmission. This CTS is heard by C and the medium
is reserved for use by A for the duration of the transmission.
The IEEE 802.11 is the most widely used standard for WLANs today.
Low cost WLAN cards can be easily purchased from the market to set up
a WLAN. The IEEE 802.11 standard defines the functional aspects of the
medium access control (MAC) sublayer. The IEEE 802.11 defines separate
standards for infrastructure-based and ad hoc networks. The network
interface cards can be set to work in either of these two modes.
This mode of usage is widely used and helps provide Wi-Fi hot spots in a
campus to access the Internet. It is based on the CSMA/CA protocol due
to the obvious advantages of this protocol over the CSMA/CD schemes
58 Fundamentals of Mobile Computing
CSMA, IEEE 802.11 DCF, etc. However, the use of common active/sleep
periods may not be suitable for applications with irregular traffic, because
nodes use contention inside active periods, which would be prohibitive
when nodes wake up without communicating, and may cause collisions
when there is high traffic that cannot be absorbed by the initially envisaged
size of the active periods.
SUMMARY
FURTHER READINGS
Deng, J. and Z. Haas, “Dual Busy Tone Multiple Access (DBTMA): A New
Medium Access Control for Packet Radio Networks”, Florence, Italy,
1998.
Dam, T.V. and K. Langendoen, “An Adaptive Energy-efficient MAC
Protocol for Wireless Sensor Networks”, in SenSys ’03, New York,
USA: ACM Press, pp. 171–180, 2003.
Heidemann, J., W. Ye, and D. Estrin, “Medium Access Control with
Co-ordinated Adaptive Sleeping for Wireless Sensor Networks”,
IEEE/ACM Transactions on Networking, 12, No. 3, pp. 493–506, 2004.
Karn, P., “A New Channel Access Method for Packet Radio”, ARRL/CRRL
Amateur Radio 9th Computer Networking Conference, Sept. 22, 1990.
Lichun Bao, J.J. Garcia-Luna-Aceves, “Hybrid Channel Access Scheduling in
Ad hoc Networks”, Proceedings of the 10th IEEE International Conference
on Network Protocols, 2002.
Rhee, I., A. Warrier, M. Aia, and J. Min, “ZMAC: a Hybrid MAC for
Wireless Sensor Networks”, New York, USA: ACM Press, 2005,
pp. 90–101.
62 Fundamentals of Mobile Computing
EXERCISES
1. What is the role of a MAC protocol? At which ISO/OSI layer does
it operate?
2. What is a hidden terminal? What problem does it create during
wireless communications? Explain your answer using a suitable
schematic diagram.
3. When does the exposed terminal problem arise? Explain your answer
using a suitable example.
4. What are the principal responsibilities of the MAC protocols? How
do MAC protocols for wireless networks differ from those in wired
networks?
5. What are the broad categories of MAC protocols? Name one popular
protocol from each of these categories.
6. Explain the working of a contention-based MAC protocol. Give two
examples of contention-based MAC protocols.
7. What are the different categories of MAC protocols. Identify the
situations under which protocols from one category would be
preferable over the other categories. Explain the working of a
reservation-based MAC protocol.
8. Why are collision-detection based protocols not suitable for wireless
networks?
9. Name one MAC protocol that is used in mobile ad hoc networks.
Briefly explain its working.
MAC Protocols 63
10. Name one MAC protocol that is used in sensor networks. Briefly
explain its working.
11. What is MACA protocol? In which environment is it suitable? Briefly
explain its working. How does MACA protocol solve the hidden/
exposed terminal problems?
12. What do you mean by a schedule-based MAC protocol? Name a
schedule-based MAC protocol. Briefly explain its working.
13. What is FDMA? Briefly explain its working and at least one of its
important applications.
14. What is TDMA? Briefly explain its working and at least one of its
important applications.
15. Explain the basic scheme of the CDMA protocol. What is the role of
a pseudorandom sequence generator in the working of the CDMA
protocol?
16. Briefly explain the IEEE 802.11 standard and discuss its application.
17. Do you agree with the following statement: “In CSMA/CD protocol,
when two nodes transmit on a shared medium, a collision can occur
only when two nodes start transmitting exactly at the same time
instant.” Explain your answer.
18. Identify the specific reasons as to why the MAC protocols designed
for infrastructure-based wireless networks may not work satisfactorily
in infrastructure-less environments.
Mobile Internet Protocol
4
T he Internet is built on top of a collection of protocols, called the
TCP/IP protocol suite. Transmission Control Protocol (TCP) and
Internet Protocol (IP) are the core protocols in this suite. IP is responsible for
routing a packet to any host, connected to the Internet, uniquely identified
by an assigned IP address. This raises one of the most vexing issues caused
by host mobility. In the traditional IP addressing scheme, each LAN is
assigned an address. The nodes in the LAN are assigned an address based
on the LAN address. In the traditional IP addressing scheme, when a host
moves to a different location, it may move to another network. As a result,
it needs to change its IP address. This is an unworkable proposition for
routing messages to a host, as it would keep changing its address as it
moves from one network to another.
In this context, a Mobile Internet Protocol (Mobile IP) was proposed by
the Internet Engineering Task Force (IETF). The mobile IP allows mobile
computers to stay connected to the Internet regardless of their location and
without changing their IP address. In other words, Mobile IP is a standard
protocol that extends the Internet Protocol by making mobility transparent
to applications and to higher level protocols like TCP.
Every mobile user likes to have a continuous network connectivity
irrespective of its physical location. The traditional IP does not support
user mobility. Mobile IP was created by extending IP to enable users to
keep the same IP address while travelling to a different network. Box 4.1
explains how the necessity of mobile IP arose with the introduction of
mobile computers to the Internet.
4.1 Mobile IP
The packet delivery to and from a mobile node has been schematically
shown in Fig. 4.1. In this figure, a correspondent node (CN) is connected
64
Mobile Internet Protocol 65
via a router to the Internet, and the home network and the foreign network
are also connected via a router, i.e. the home agent (HA) and foreign
agent (FA), respectively, to the Internet. Therefore, home agent (HA) is
implemented on the router connecting the home network with the Internet,
a foreign agent (FA) is also implemented on the router connecting the
foreign network with the Internet. The tunnel for the packets towards the
mobile node starts at the home agent and ends at the foreign agent, again
here the foreign agent has the care-of-address (COA).
4.1.2 Terminologies—Mobile IP
Various terminologies associated with mobile IP and used in Fig. 4.1 are
explained below:
Mobile Node (MN): A mobile node is a hand-held equipment with
roaming capabilities. It can be a cell phone, personal digital assistant,
laptop, etc.
Home Network: The home network of a mobile device is the network
within which the device receives its identifying IP address (home address).
In other words, a home network is a subnet to which a mobile node belongs
to as per its assigned IP address. Within the home network, there is no
need of mobile IP.
Home Address (HA): The home address of a mobile device is the IP
address assigned to the device within its home network.The IP address on
the current network is known as home address.
Foreign Agent (FA): The foreign agent is a router in a foreign network
that functions as the point of attachment for a mobile node when it roams
to the foreign network. The packets from the home agent are sent to the
foreign node which delivers it to the mobile node.
Foreign Network: The foreign network is the current subnet to which the
mobile node is visiting. It is different from home network. In other words,
a foreign network is the network in which a mobile node is operating when
away from its home network.
Correspondent Node (CN): The home agent is a router on the home network
serving as the anchor point for communication with the mobile node. It
tunnells packets from a device on the Internet, called a correspondent node
(CN), to the roaming mobile node.
Let us consider the situation, where the corresponding node (CN) wants to
send an IP packet to a mobile node. CN sends the packet to the IP address
of the mobile node as shown in step 1 of Fig. 4.1. The IP address of the MN
is the destination address, whereas the address of CN is the source address.
The packet is passed to the Internet that does not have any information
about the MN’s current location. So the Internet routes the packet to the
router of the MN’s home network. The home agent examines the packet to
determine whether the MN is present in its current home network or not.
In case that MN is not present, then the packet is encapsulated by a new
header that is placed in front of the existing IP header. The encapsulated
packet is tunnelled to the COA, which act as the new destination address
and the HA acts as the source address of the packet as shown in step 2 of
Fig. 4.1.
The encapsulated packet is routed to the foreign agent which
performs decapsulation to remove the additional header and forwards
the decapsulated packet to the MN, which is the actual destination, as
specified by the source node (CN), shown in step 3 of Fig. 4.1.
The MN after receiving the packet from CN, forwards a reply packet
to the CN by specifying its own IP address along with the address of the
CN as shown in step 4 of Fig. 4.1. The MN’s IP address acts as the source
address and the CN’s IP address acts as the destination address. The packet
is routed to the FA. After receiving the packet, FA forwards the packet to
CN.
and abroad. His home office is in Delhi where he spends about 40% of his
time. The rest of the time he spends between the other offices, say, Kolkata,
Mumbai, Chennai, Kathamandu and Singapore.
A problem that arises in this context is: how does he make arrangements
so that he would continue to receive postal mails regardless of his location?
If we can answer this, we can easily understand how IP works in the
context of a mobile device.
There are two broad categories of solutions to this problem being
faced by the business executive: (i) address changing, (ii) decoupling mail
routing from his address. It would be difficult for the business development
executive to inform about his changed address to all those who are likely
to write letters to him each time he moves. Also, by the time, he would
have informed everyone about his new address, it would have become
time for the address to change again. And he certainly cannot decouple the
routing of mail from his address, unless he has set up his own personal
postal system.
A practical solution to this problem is mail forwarding. Let us say that
he leaves Delhi for Singapore for a couple of months. He will inform the
Delhi post office that he will be in Singapore. The Delhi post office would
intercept his mails headed for his normal Delhi address, relabel them, and
forward them to Singapore. Depending on where he is staying, this mail
might be redirected either straight to a new address in Singapore, or to a
Singapore post office where he can pick it up. If he leaves Singapore to go
to another city, say, Kathamandu, he would just call the Delhi post office
and tell them about his new location. When he gets back to home office,
he will cancel the forwarding arrangement and get his mail as usual. The
advantages of this system are many. It is a relatively simple mechanism
to understand and implement. A positive aspect of this scheme is that it
is transparent to everyone sending mails; they still send mail to him at his
Delhi address and the mail reaches wherever he goes. The handling of the
forwarding process is taken care by the Delhi post office as well as the
post office where he presently gets located; the rest of the postal system
does not even know that anything out of the ordinary is going on.
There are some disadvantages of this approach too. The Delhi post
office may allow occasional forwarding for free, but would probably charge
a fee if the business development executive needs this service on a regular
basis. He may also need a special arrangement in the city where he travels
to. He has to keep communicating with his home post office each time he
moves. And perhaps most importantly, every piece of mail has to be sent
through the system twice—first to Delhi and then to wherever he moves,
which is inefficient and introduces additional delay in delivering and also
loads the postal system.
Mobile IP works in a manner very similar to the postal mail forwarding
system. Each network can be considered like a different “city”, and the
internetwork of routers is like the postal system. The router that connects
any network to the Internet is like that network’s “post office”, from an
IP perspective.
70 Fundamentals of Mobile Computing
In the mobile IP protocol, all the data packets to the mobile node go through
the home agent. Because of this there will be heavy traffic between HA and
CN in the network, causing latency to increase. Therefore, the following
route optimization needs to be carried out to overcome this problem.
• Enable direct notification of the corresponding host
• Direct tunnelling from the corresponding host to the mobile host
• Binding cache maintained at the corresponding host
The mobile IP scheme needs to support the four messages shown in Table 4.1.
74 Fundamentals of Mobile Computing
DHCP is an extension to the BOOTP and compatible with it. For example, if
a host is running BOOTP, it can also request configuration (example: static
configuration) from a DHCP server node. The importance of DHCP in a
mobile computing environment is that it provides temporary IP addresses
whenever a host moves from one network to another network.
DHCP supports the following three important mechanisms for IP
address allocation:
SUMMARY
FURTHER READINGS
Jiannong Cao, Liang Zhang, S.K. Das, and Henry Chan, “Design and
Performance Evaluation of an Improved Mobile IP Protocol,” INFOCOM
2004.
Johnson, D., C. Perkins, and J. Arkko, “Mobility Support in IPv6,” Request
for Comments (Proposed Standard) 3775, Internet Engineering Task
Force, June 2004. Available online at http://www.rfc-editor.org/rfc/
rfc3775.txt.
Liu Yu, Ye Min-hua, and Zhang Hui-min, “The handoff schemes in mobile
IP,” Vehicular Technology Conference, 57th IEEE Semiannual Volume 1,
22–25 April 2003, pp. 485–489.
Perkins, E. Charles, “IP Mobility Support for IPv4,” Request for
Comments (Proposed Standard) 3344, Internet Engineering Task Force,
August 2002. Available online at http://www.ietf.org/rfc/rfc3344.txt.
Perkins, E. Charles, “Mobile IP,” Communications Magazine, IEEE Vol. 40,
Issue 5, May 2002, pp. 66–82.
Rajeev Koodli, “Fast Handovers for Mobile IPv6,” Internet Draft, Internet
Engineering Task Force, draft-ietf-mipshop-fast-mipv6-03.txt, October
2005. Available online at http://www.ietf.org/internet-drafts/draft-
ietf-mipshop-fast-mipv6-03.txt.
Rajeev Koodli and Charles E. Perkins, “Mobile IPv4 Fast Handovers,”
Internet Draft, Internet Engineering Task Force, draft-ietf-mip4-
fmipv4-00.txt, February 2006. Available online at http://www.ietf.
org/internet-drafts/draft-ietf-mip4-fmipv4-00.txt.
Stefan Raab and Madhavi W. Chandra, Mobile IP Technology and Applications,
Cisco Press, 2005.
EXERCISES
1. Explain why the traditional IP cannot be used in a mobile network.
What are the main differences between the traditional IP and the
mobile IP? How does mobile IP support mobile hubs?
2. Explain the limitations of IPv4 and how are they overcome by
IPv6.
Mobile Internet Protocol 77
TELNET
DNS
SMTP Application
FTP Layer Message
SNMP
HTTP
Transport
TCP UDP Layer Segment
IGMP ICMP
Internet
IP Layer Packet
ARP RARP
Network Interface
Network Interface Protocols Layer Frame
HTTP (Hyper Text Transfer Protocol): The HTTP protocol is used for
communications between a web server and the client-side application
running on a web browser.
SMTP (Simple Mail Transfer Protocol): The SMTP protocol is used for
sending and receiving e-mails by a mail client.
FTP (File Transfer Protocol): The FTP protocol is used to transfer files
between the computers.
ICMP (Internet Control Message Protocol): The ICMP protocol runs on all
hosts and routers and is mainly used for reporting errors such as a non-
reachable host.
BOOTP (Boot Protocol): The BOOTP protocol is used for booting (starting)
a diskless computer over a network. Since a diskless computer does not
store the operating system program in its permanent memory, the BOOTP
82 Fundamentals of Mobile Computing
protocol helps to download and boot over a network, using the operating
system files stored on a server located in the network (discussed in
Section 4.7).
As already stated in Section 5.1, the TCP/IP protocol consists of four layers
as shown in Fig. 5.2. These layers are: Application layer, Transport layer,
Internet layer, and Network access layer. The functionalities of each of
these layers are discussed below:
Application Layer
Transport Layer
Internet Layer
Network Access Layer
Internet layer : The Internet layer packs data into data packets that are
technically known as IP datagrams. Each IP datagram contains source and
destination address (also called IP address) information that is used to
forward the datagrams between hosts and across networks. The Internet
layer is also responsible for routing of IP datagrams. In a nutshell, this
layer manages addressing of packets and delivery of packets between
networks using the IP address. The main protocols included at the Internet
layer are IP (Internet Protocol), ICMP (Internet Control Message Protocol),
ARP (Address Resolution Protocol), RARP (Reverse Address Resolution
Protocol) and IGMP (Internet Group Management Protocol).
Network access layer: The functions of this protocol layer include encoding
data and transmitting at the signalling determined by the physical layer.
It also provides error detection and packet framing functionalities. As
we will discuss later in Section 5.6, the functionalities of this layer actually
consist of the functionalities of the two lowermost layers of the ISO/
OSI protocol suite, namely data link and physical layers. The data link
layer protocols help deliver data packets by making use of physical layer
protocols. A few popular data link layer protocols are Ethernet, Token
Ring, FDDI, and X.25. Ethernet is possibly the most common data link layer
protocol. The physical layer defines how data is physically sent through
the network, including how bits are electrically or optically signalled by
hardware devices that interface with a network medium, such as coaxial
cable, optical fibre, or twisted pair of copper wires.
84 Fundamentals of Mobile Computing
TCP Portion of
Header Data
Control
Information
1. Behrouz A. Forouzan, Data Communication and Networking, 4th ed., TMH, 2007.
Mobile Transport Layer 85
IP datagram
An IP packet is also called a datagram. A datagram is of variable length
which can be up to 65,536 bytes. It has two fields, namely header and data.
The structure of an IP datagram is schematically shown in Fig. 5.4. In the
following, we discuss some of the important fields of an IP datagram.
Version (Ver): The IP version number is defined in this field, e.g. IPV4
or IPV6.
Header length (Hlen): It defines the header length as multiples of four
bytes.
Service type: It has bits that define the priority of the datagram itself.
Total length: This field is allotted 16 bits to define the length of IP
datagram.
Identification: It is mainly used to identify fragmentation that belongs to
different networks. 16 bits are allotted for this job.
Flags: It deals with fragmentation of the data.
Fragmentation offset: It is a pointer to the offset of the data in the original
datagram.
Time to live: This field is used to define the total number of hops that a
datagram has to travel before discarding the operation.
Protocol: This field has 16-bits. It defines which upper layer protocol data
is encapsulated at that time, say, for example TCP or UDP or ICMP, etc.
Header checksum: It has a 16-bit field to check the integrity of the packets.
Source address: It is a four byte (4 8 = 32) internet address to define
the original source.
Destination address: It is a four byte (4 8 = 32) internet address to
identify the destination of datagram.
The IP datagrams are sent to the link layer and become ready for
transmission to the first sub-network in the path to its destination. The IP
datagrams are also called packets.
86 Fundamentals of Mobile Computing
Port address
In a client-server application, often the client and server programs are
located on different host machines. The client program usually uses a
temporary port number and the server program uses a well-known (or
permanent) port number. These port numbers are used for identification
of the application. A few well-known ports used by some of the popular
TCP/IP protocols and by user applications are given in Table 5.1.
Protocol Port
TELNET 23
SMTP 25
RPC 111
DNS 53
Data encapsulation
When the TCP segments are handed over to Internet Protocol (IP layer), this
layer appends an IP header containing the relevant control information. A
segment after this additional control data is added, is called an IP datagram
(see Fig. 5.4). The network access layer also appends its own header and
now the segment becomes known as a frame/packet. The packet header
includes important information such as the following:
(i) Facilities requests (such as priority)
(ii) Destination sub-network address
The application layer protocols of the TCP/IP protocol suite are shown
pictorially in Fig. 5.5. The following are the three important application
layer protocols.
File Transfer Protocol (FTP): FTP is mainly used for transferring files
from one host to another based on a user command. FTP allows both binary
and text file transfers. Each FTP connection opens two TCP connections,
one for data transfer and the other for transfer of control commands such
as put, get, etc.
Mobile Transport Layer 87
TELNET: This application layer protocol lets users use a remote log-on
facility, using which a user can log-on to a remote system. Both FTP and
TELNET make use of the TCP layer. TCP forwards these data over the
network by invoking the IP layer and the IP layer in turn invokes the link
layer protocol. A problem with this type of transmission is that it becomes
easy to sniff (secretly hear) the data by using the publicly available TCP
sniffer programs such as “TCPdump”. Due to this, at present, most users
and applications use sftp (secure ftp) and ssh (secure shell) protocols. These
protocols essentially serve to encrypt before passing the data on to the TCP
layer. These protocols also perform decryption after receiving the data.
of data transmission by the TCP at the sending host end. The flow control
technique helps to prevent the build-up of congestion in the network and
at the same time helps to prevent buffer overrun at the slow receivers.
If data transmissions occur at a much faster rate than what the network
infrastructure can comfortably support, then data packets get built up at
the routers. When the buffers at routers start to overflow, the packets start
getting lost. Additionally, if data transmissions by a sender take place
at a much faster rate than what a slower receiver can handle, then the
receiver’s buffer starts to get flooded and hence the packets get lost. TCP
handles both these causes of packet loss by reducing the rate at which
data is transmitted at the sender’s end. Thus, a receiver uses the flow
control mechanism to restrict how fast a sender can transmit. However,
to provide an acceptably fast data transmission service, once congestion
disappears the transmission rate at the sender’s end needs to be increased
to a suitable value. Thus we can say that a flow control technique helps
TCP dynamically adjust the transmission rate at the sender’s end, reducing
the transmission rate as congestion starts to develop and increasing it
as congestion starts to disappear. The flow control mechanism deployed
by TCP (called the sliding window protocol) is primarily based on the
concepts of congestion window and advertised window. We now briefly
describe these techniques.
When a sender starts to send data packets, the receiver indicates an
advertised window (or receiver window) to the sender while sending
acknowledgements. The advertised window is usually set equal to the size
of the receive buffer at the receiver. The sender uses the advertised window
size obtained from the receiver to determine the maximum amount of data
Mobile Transport Layer 89
that it can transmit to the receiver without causing buffer overflow at the
receiver. In other words, to prevent buffer overflow at the receiver, the data
packets transmitted by a sender without having received acknowledgments
for them should not exceed the size of the buffer available at the receiving
end.
For each segment sent, a sending host expects to receive an acknow-
ledgment. A congestion window indicates the maximum number of
segments that can be outstanding without the receipt of the corresponding
acknowledgement before the TCP at the sender’s end pauses transmitting
and waits for an acknowledgement to arrive. The TCP at a sender’s end
pauses if the number of segments for which the acknowledgement is
outstanding becomes equal to the congestion window. A sender sets the
congestion window size to 1 and keeps on increasing it until duplicate
acknowledgements are received or until the number of outstanding packets
becomes equal to the size of the advertised window.
Upon receipt of an acknowledgement, TCP detects packet loss using
Retransmission timeout (RTO) and duplicate acknowledgements. After
transmitting a segment, a TCP sender sets the retransmission timer for only
one packet. If an acknowledgement for the packet is not received before
the timer goes off, the packet is assumed to be lost. RTO is dynamically
calculated. Timeouts can take too long. Again the TCP sender assumes that
a packet loss has occurred if it receives three duplicate acknowledgements
consecutively. In TCP, when a receiver does not get a packet that it expects
in a sequence but gets an out of order packet, it considers that the expected
packet might have got lost and it indicates this to the sender by transmitting
an acknowledgment for the last packet that was received in order. Thus,
three duplicate acknowledgement are also generated if a packet is delivered
at least three places beyond its in-sequence location.
In wired networks, packet losses primarily occur on account of
congestions encountered in the transmission path. However, in a wireless
environment packet losses can also occur due to mobility and channel
errors. In wired networks, bit errors are rare. On the other hand, wireless
networks are vulnerable to noise. Noise can cause intermittent bit errors.
Further, there can be intermittent disconnections due to fading and also
due to obstructions that may be encountered by a mobile host. Further,
packets may get lost during handoff. An intermittent disconnection may
cause the TCP at the sender’s end to time out for an acknowledgement
and cause it to retransmit. This would cause unnecessary retransmissions
to occur, even though the packet may be buffered at a router. Also, various
additional causes of packet loss can result in a high rate of packet loss in
a mobile wireless network. These losses would be interpreted by TCP as
symptoms of congestion and force it to operate in slow start. This would
cause the network to operate inefficiently and result in unacceptable slow
data transmission.
90 Fundamentals of Mobile Computing
TCP was designed for traditional wired networks. If used as it is, a few
shortcomings become noticeable. We first review a few relevant aspects
of traditional TCP. Then we discuss how TCP has been extended to work
efficiently in a mobile environment.
Slow start
The slow-start mechanism is used when a TCP session is started.
Instead of starting transmission at a fixed transmission window size,
the transmission is started at the lowest window size and then doubled
after each successful transmission. The rate of doubling is tied to the rate
at which acknowledgements come back. Thus, the doubling of window
size occurs at every round trip time (RTT). RTT is the time that elapses
between a segment is transmitted by a sender and the corresponding
acknowledgement is received. If congestion is detected (indicated by
duplicate acknowledgements), the transmission window size is reduced to
half of its current size and the congestion avoidance process starts. We can
say that this mechanism of rate doubling and reduction to half the previous
value is nothing but a binary search technique deployed to determine the
‘right’ transmission window size.
Mobile Transport Layer 91
Congestion avoidance
The congestion avoidance algorithm starts where the slow start stops.
Once the congestion window reaches the congestion threshold level, then
after that if an acknowledgement is received the window size is increased
linearly, i.e., the window size doubling is avoided. From this point, the TCP
increases its transmission rate linearly by adding one additional packet to
its window at each transmission time. If congestion is detected at any point,
the TCP reduces its transmission rate to half the previous value. Thus the
TCP seesaws its way to the right transmission rate. Clearly, this scheme is
less aggressive than the slow-start phase (note the linear increase against
the exponential growth in slow start).
2. Bakre, A. and B.R. Badrinath, “I-TCP: Indirect TCP for Mobile Hosts,” Proceedings
15th International Conference on Distributed Computing Systems (ICDCS), May 1995.
Mobile Transport Layer 93
host (MH). Thus, the base station maintains two separate TCP connections:
one over the fixed network and the other over the wireless link. The
wireless link usually has poor quality communication, but it gets hidden
from the fixed network at the BS. When a packet is sent by FH to MH, the
packet is received by BS first and then BS transmits it to the MH over the
wireless link. If the mobile host moves out of the current BS region, the
whole connection information and responsibilities that are with the current
BS are transferred to the new BS.
The advantage of the split connection approach of I-TCP is that it
does not need any changes to be made to the standard TCP protocol.
By partitioning a TCP connection into two connections in I-TCP, the
transmission errors in the wireless part would not propagate into the fixed
network, thereby effectively achieving an increase in bandwidth over the
fixed network. An important disadvantage of this scheme is that I-TCP does
not maintain the semantics of TCP as the FH gets the acknowledgement
before the packet is delivered at MH. I-TCP does not maintain the end-to-
end semantics of TCP and assumes that the application layer would ensure
reliability.
Fast retransmission
This approach was suggested by Caceres et al.3 to overcome the delay in
transmissions caused due to intermittent disconnections such as those that
occurs when a mobile host (MH) moves to a foreign agent (FA) during a
TCP communication. As already discussed, TCP transmission behaviour
after a disruption depends on its duration. The extremely short disruptions
(lasting for a time much less than RTO) would appears as short bursts of
packet losses. In this case, the TCP retransmits those packets for which the
timeout occurs and recovers them without slow-start. However, for long
disruptions (lasting for a time much greater than RTO), TCP resorts to
slow-start. This results in inefficiency. As soon as a mobile host registers
at a foreign agent, it starts sending duplicate acknowledgements. As is
standard with TCP, three consecutive acknowledgements for the same
TCP segment are inferred as a packet loss by the host-end TCP, and it is
also inferred that the connection is live, thereby causing the fast retransmit
behaviour of TCP.
The advantage of this scheme is that it reduces the time for the MH
to get reconnected, otherwise FH would wait for RTO unnecessarily. The
disadvantage of this approach is that it does not propose a general approach
for TCP communication in mobile wireless networks. For example, it does
not address the specific error characteristics of the wireless medium.
In this protocol, as in I-TCP, the TCP connection between the fixed host
and the mobile host is segmented into wired and wireless parts—the wired
part connection between the fixed host (FH) and the supervisory host (SH)
and the wireless part connection between the SH and the mobile host (MH).
Many MHs are connected to SH through several base stations as shown
in Fig. 5.8. The SH supervises all the packets transmitted to MH and the
acknowledgements sent by MH. It is also used as an interface between FH
and MH and vice versa.
Freeze-TCP
The basic idea in this scheme is to “freeze” the TCP senders’ streams, little
before a disconnection is to occur. This is done by artificially sending a “Zero
Windows Advertisement” informing the sender that the receiver cannot
96 Fundamentals of Mobile Computing
receive data at the moment. When the sender resumes its connectivity, the
receiver can unfreeze the sender by sending the value of its actual receive
window. The most interesting advantage of this proposal is the avoidance
of the slow-start period upon re-establishment of connectivity. The
freeze-TCP method has the advantage that it does not require the
involvement of the intermediate nodes and hence it can be used if the IP
payload is encrypted. This method offers a promising approach for use in
Virtual Private Networks (VPNs).
SUMMARY
In this chapter, we first reviewed some basic aspects of the TCP/IP protocol
suite as the de facto protocol for the Internet and for a host of other
applications. We then identified the important problems that might arise
when TCP is used as it is in mobile wireless networks. We also discussed
the adaptations that have been extended to make TCP work satisfactorily
in the mobile environment.
FURTHER READINGS
EXERCISES
1. State true or false against each of the following statements. Briefly
explain your answer in each case.
(i) TCP is a peer-to-peer, connection-oriented protocol.
(ii) The link layer is responsible to deliver data packets by making
use of lower layer protocols and also provides error detection
and packet framing functionalities.
(iii) TCP guarantees that data will be delivered without loss,
duplication or transmission errors.
(iv) TELNET encodes multimedia data using the MIME protocol.
2. Explain the following terms associated with TCP/IP stack:
(a) IP, (b) HTTP, (c) SMTP, (d) MIME, (e) FTP, (f) SNMP, (g) ICMP,
(h) ARP, (i) RARP, (j) DNS, (k) IP Addresses, (l) IGMP
3. Write short notes on:
(a) TELNET, (b) FTP, (c) SMTP, (d) TCP/IP vs. ISO/OSI protocol
model.
4. Explain the layered architecture of the TCP/IP protocol suite and
compare it with the ISO/OSI architecture.
Mobile Transport Layer 99
1. Lu, E. and Y. Cheng, “Design and Implementation of a Mobile Database for
Java Phones,” Computer Standards and Interfaces, Elsevier, Vol. 26, pp. 401–410, 2004.
102 Fundamentals of Mobile Computing
ACID properties turn out to be too stringent for realizing any meaningful
database-based application in practice and therefore these properties
require to be relaxed.
Movement of users
The movement of users introduces several complications as far as the
database operations are concerned. The complications arising due to user
mobility must be satisfactorily addressed. Users tend to move from one
cell to another while maintaining the network connection. To support this,
issues such as tracking users, and maintaining the network connection while
crossing the cell boundaries must be addressed. Recovery of transactions is
complicated as it becomes a tricky issue to determine the location at which
the logs are to be maintained. The options available are:
Maintaining logs at the mobile host: This may be difficult due to lack
of sufficient resources such as memory and processing power. As a result,
storing the logs at the mobile hosts and initiating the recovery in case of
failure would be an unacceptable overhead. Also, as the failure rate of a
mobile host is high, this approach gets further complicated and hence not
considered satisfactory.
Maintaining logs at mobile host’s base MSS: This approach incurs
commu-nication overhead because each transaction log must be updated,
introducing one additional round trip delay, which is undesirable.
Mobile Databases 105
Maintaining logs at the current MSS: In this approach, logs are maintained
at the current MSS for all transactions submitted from its cell. When an
MH moves out of the cell, all logs are transferred to the new MSS. This
approach generates a very high network traffic due to the transfer of logs.
Also, it introduces additional complications such as how much resources
should be allotted to a mobile host, particularly the foreign ones, and what
to do with the logs if an MH fails.
Disconnections
A fairly complicated issue in the operation of a mobile database arises due
to the temporary disconnections of mobile users arising out of attempts
to save power. In a typical distributed environment, the non-availability
of a host is considered to be a failure. But here one must distinguish
between a failure and a planned disconnection. In a planned disconnection,
depending on the application, the mobile user can perform some operations
by downloading data beforehand in anticipation. This is popularly called
data hoarding. Another way to deal with the disconnections is by migrating
transaction processing to a non-mobile computer.
One more approach to handle the non-availability of an MH for a
temporary period is by maintaining proxy agents at the MSS. A proxy agent
represents the MH during its absence and participates in communication and
finally hands over control to MH on its reappearance. In this approach, it is
necessary to satisfactorily take care of creation of proxy agents, participate
in communication, hand over control and ensure self-destruction.
But when an MH disappears for a long duration, the proxy agent
does not know what to do. Maintaining it in the wait state may lead to
unnecessary wastage of resources of the MSS. Collecting messages on
behalf of an MH in its absence or use of mailboxes may be an appropriate
solution. When a mobile host is not available in the network, all messages
destined for it can be routed to its mailbox, which will be retrieved by the
corresponding MH after reconnection. For implementation of this concept,
a base MSS must be present for each MH, which again is a very difficult
proposition.
Processing power
Mobile hosts are generally equipped with less powerful CPUs in order to
conserve power. Due to this reason, compute intensive applications such
as a database server are difficult to use. This constraint also forces one to
rethink the way computations are done. For example, it may be required
to find ways to reduce the client-side computations.
Memory
Mobile hosts usually have a very limited main memory as well as secondary
storage. Nonvolatile memory devices such as hard disks consume significant
power for running the motor that drives the read/write heads. Also, hard
disks are usually bulky and heavy. Therefore, all the important applications
and system software requiring storage on permanent memory may be put
into a flash memory, which consumes much less power.
Battery power
Battery power is possibly the most precious and scarce resource of a
mobile host. Not only batteries store very limited amounts of energy, often
recharging them becomes difficult. Most of the battery energy is spent on
non-computational tasks such as transmitting and receiving data over the
wireless medium and some energy is also consumed by the secondary
storage and the input and output devices.
User interfaces
The I/O devices consume significant power and often are bulky. One needs
to find new ways to optimize the power they consume and also the space
they occupy. As a substitute for keyboard, one can use pen-based input
devices, which occupy less space but consume more computing power for
lengthy inputs, particularly for SQL type statements. Thus, a graphical/
symbolic interface with pointing capabilities may suit this environment.
Security
Since mobile handsets are carried across several networks, the prevention
of impersonation of one machine by another is problematic. For example,
Mobile Databases 107
when a mobile computer enters a new cell, the specific data it sends and
receives are subject to theft and unauthorized copying for replay at a later
date.
A mobile computer visiting a new environment consumes some resources
of that environment. These resources includes network bandwidth, CPU
time, and disk storage of the base station. An accounting of this must be
made for both billing purposes and for limiting the impact of visiting
mobiles on the performance of a foreign environment.
Another security concern is how to prevent the visiting mobile computer
from abusing the foreign environment, in term of the bandwidth and the
disk storage it uses.
Asymmetry in communication
In a mobile computing environment, there is a difference in uplink and
downlink bandwidths due to the fact that mobile clients are not able to
transmit at very high speed, due to power restrictions and rather small
data transmission requirements of the mobile handsets. The bandwidth in
the downstream direction (server to mobile handsets) is far greater than
that in the upstream direction (handset to server).
Data dissemination deals with the delivery of data from a data repository
(server) to a large number of clients. The data dissemination model in a
mobile environment is usually different than its wired counterpart due to
the asymmetry in communication.
The model of sending data to clients in a mobile computing environment
is usually push-based. In a push-based data dissemination, data is sent to
the clients by the server without waiting for specific requests from the
client. In a push-based transmission, not only does the server save itself
from handling large numbers of similar queries from a large number
of clients, but also can propagate information whose existence may be
unknown to the clients.
On the negative side, push-based data dissemination unless judiciously
used can overwhelm the clients with unwanted information. Therefore, the
usefulness of a push-based data dissemination technique to a large extent
depends on the accuracy of predicting the requirements of various clients.
A simple solution usually used is to allow the clients to subscribe to specific
services or provide their profile, based on which the information can be
disseminated to them.
108 Fundamentals of Mobile Computing
Faster response times: Replication improves the response times for data
requests since requests are processed on a local server. Further, local
processing decreases the workload at the central database server.
110 Fundamentals of Mobile Computing
Analysis: Detect and reject ”incorrect” queries; possible only for a subset of
relational calculus. Example of the type of incorrect query: Checks whether the
attributes and the relation names of a query are defined in the global Schema
or Checks whether the operations on attributes do not conflict with the types
of the attributes, e.g., a comparison > operation with an attribute of type string.
6.10 Recovery
A database recovery step gets the database back to the last stable state that
was reached before a failure. A transaction processing system (TPS) may fail
for many reasons. These reasons could be varied and may include, among
other things, battery wear out, system failure, human errors, hardware
failure, incorrect or invalid data, computer viruses, software application
errors, natural or man-made disasters. As it is not possible to prevent all
TPS failures, a TPS must be able to detect failures immediately after they
occur. For this, the TPS must be able to detect and correct errors when
they occur and restore the database to a stable state. A TPS recovery takes
place by a recovery manager, based on the backup, journal, and checkpoint
information. We explain these concepts in the following:
SUMMARY
FURTHER READINGS
EXERCISES
1. Explain the different issues that arise in a transaction processing
system having mobile clients for satisfactory operation of an
application. How are these issues resolved?
2. What do you mean by serializability of transaction executions? How
does a DBMS ensure that the transactions are serializable?
Mobile Databases 115
116
Mobile Ad Hoc Networks 117
we shall use the terms mobile ad hoc networks (MANETs) and wireless
ad hoc networks interchangeably.
This chapter is organized as follows: In Section 7.1, we discuss the
basics of mobile ad hoc networks. In Sections 7.2 and 7.3, we present
the characteristics and applications of MANET. In Sections 7.4 to 7.7, we
discuss some basic issues pertaining to ad hoc networks. In Section 7.8,
we discuss various routing issues in MANETs. In Sections 7.9 and 7.10,
we discuss VANETs (Vehicular Ad hoc NETworks) as a special type of
MANET. In Sections 7.11 and 7.12, respectively, we discuss the various
security issues and attacks in MANETs.
Let us try to imagine how a set of mobile devices can communicate with
each other in the absence of any form of fixed networking infrastructures
such as hubs, routers, base stations, etc. It is not hard to visualize that in
this situation, a network can be established through cooperation among
the devices themselves. In a simplistic realization of this concept, a mobile
device wanting to communicate can forward its packets to its neighbours,
and the neighbour nodes in turn can forward those to their neighbours, and
so on until the destination is reached. This essentially forms a simple ad
hoc network. Based on this idea, Fig. 7.1 illustrates a schematic model of a
simple ad hoc network comprising three mobile devices, named S, R, and
D. In this figure, suppose the mobile device S wants to communicate with
the device D. Assume that S and D are not within the transmission range
of each other and cannot directly communicate with each other. However,
they can take the help of node R to relay packets from each other. Observe
that Fig. 7.1 depicts a protocol stack to highlight that even though R is
primarily an independent device and not a networking infrastructure, yet
R is acting as some sort of a router operating at the network (or Internet)
layer to facilitate communication.
118 Fundamentals of Mobile Computing
The nodes in a MANET have low processing capabilities and these are
connected by low bandwidth wireless links. To cope with low processing
capabilities of the nodes and the limited bandwidth availability, a suitable
routing protocol needs to be adopted to make efficient utilization of the
available bandwidth. However, an appropriate routing protocol for a
MANET should keep the computational and communicational overheads
low, since the nodes in a MANET have low computational capability,
storage capacity and battery power. Out of these, battery power is possibly
the most scarce resource. To conserve communication resources, a suitable
routing protocol for a MANET should not make use of frequent flooding
or even make use of periodic updated messages. Since nodes in a MANET
are likely to be mobile, in case a route in use dissolves due to the rapidly
changing topology, a routing protocol for an ad hoc network should be
able to find an alternate route very quickly.
notes, and also can surf the Web if at least one of the hand-held devices
has access to Internet, for example, through a data card. If the mobile
devices are present in sufficient density, network connections among them
can be established seamlessly to form a MANET over which the nodes can
communicate and carry out the network operations.
Environmental monitoring
A popular category of applications of MANETs is the collection of the
various types of data about the environment in which they are deployed.
Continuous data collection from remote locations is considered important
for several applications such as environmental management, security
monitoring, road traffic monitoring and management, etc. Miniaturized
sensors have proved to be an effective means of gathering environmental
information such as rainfall, humidity, presence of certain animals, etc.
As planting sensors in the environment is becoming common, ad hoc
networking is gaining more ground and becoming more prevalent. In this
environmental monitoring application, a large number of sensors nodes
are deployed in the environment. Such ad hoc sensor networks can be
deployed to collect data from remote locations and the sensor nodes can
even respond to some commands issued by the data collection centre.
MANETs efficiently handle the introduction of new sensors into an already
operational sensor network as well as can handle dynamic disconnections
of nodes. Since each sensor acts as a hub, the range over which the sensors
can be spread is tremendously increased, because they do not have to be
deployed around some central station. For this application, use of energy
efficient protocols becomes imperative since it can help increase the life
span of the network.
Military
The present-day military equipment have become quite sophisticated,
have many automated parts and contain one or more computers. This
opens up the scope of setting up an ad hoc network consisting of various
military equipment deployed in a frontline battle field. Ad hoc networking
of these equipment can allow a military setup to take advantage of an
information network among the soldiers, vehicles, and military information
headquarters. For example, an ad hoc network can be automatically set up
at a battlefront among the equipment, and the hand-held devices can collect
information from and disseminate command to the frontline personnel.
Emergency applications
Ad hoc networks do not require any pre-existing infrastructure. These
networks, therefore, can be deployed easily and rapidly in emergency
situations such as a search and rescue operation after a natural disaster,
and for applications such as policing and fire fighting. In these situations,
122 Fundamentals of Mobile Computing
Connectivity
The term connectivity of a node usually refers to the number of neighbours
it has. Here a neighbour of a node is one that is in its transmission range.
The term connectivity is also sometimes used to refer to a link between
the two nodes. The term link capacity denotes the bandwidth of the link.
In a MANET, both the number of neighbouring nodes and the capacities
of the links to different neighbours may vary significantly.
Network topology
The topology of a network denotes the connectivity among the various
nodes of the network. Mobility of the nodes affects the network topology.
Due to node mobility, new links can form and some links may get
dissolved. Other than mobility, nodes can become inoperative due to
discharged batteries or hardware failures, and thereby cause changes to the
topology. The rate at which the topology changes needs to be appropriately
considered in the design of an effective network.
Mobile Ad Hoc Networks 123
User traffic
The design of a MANET is carried out primarily based on the anticipated
node density, average rate of node movements, and the expected traffic.
The traffic in a network can be of various types. A network protocol
should leverage the characteristics of specific traffic types that are expected
to improve its performance. The common traffic types are the following:
• Bursty traffic
• Large packets sent periodically
• Combination of the above two types of traffic
Operational environment
The operational environment of a mobile network is usually either urban,
rural and maritime. These operational environments support the Line of
Sight (LOS) communication. But, there can be a significant difference in
the node density and mobility values in different operational environments,
requiring different designs of mobile networks to suit an operational
environment.
Energy constraint
As already mentioned, no fixed infrastructure exists in a MANET; the
mobile nodes themselves store and forward packets. This additional role
of mobile nodes as routers leads to nodes incurring perennial routing-
related workload and this consequently results in continual battery
drainage. Though this overhead is indispensable if the network is to be
kept operational, the energy spent can be substantially reduced by allowing
the nodes to go into a sleep mode whenever possible.
7.5 Routing
The term link state denotes the state of a connection of one router with one
of its neighbours. A neighbour of a router is one with which it can directly
communicate without taking any help from the intervening routers. Each
router determines its local connectivity information, and floods the network
with this information with a link state advertisement. As a router in the
network receives this link state advertisement, it stores this packet in a link
state packet database (LSPDB). This storage of link state advertisements in
an LSPDB is in addition to the routing table that each router maintains. It
is easy to see that all routers in the network will have identical LSPBDs.
Based on the bits and pieces of information stored in its LSPDB, each router
constructs the connectivity information for the entire network as a graph
using the Dijkstra’s shortest path algorithm. Once a router constructs this
graph, it computes the routing table from this and uses it in all its routing
decisions. Thus, we can say that a router in the link state protocol bases
its routing decisions on messages (link state advertisements) received from
other routers in the network regarding their link states or the state of its
connectivity with other routers.
A basic characteristic of a link state routing protocol is that every router
constructs a graph representing the connectivity between the various nodes
in the network based on the information received from other routers. We
can think of this construction of the map of the entire network from bits
and pieces of information received from other routers as similar to the
solution of a zig-saw puzzle by putting together the different pieces of
the puzzle. This graph representing the network is usually constructed in
the form of a tree with the local router forming the root of the tree. The
graph captures the shortest path route from the root to any other router.
Once a node constructs this tree, it computes the best path from itself to
every other node in the network and stores this information in the form of
a routing table. This contrasts with the distance-vector routing protocols,
in which each router shares its routing table with its neighbours. But in a
link state protocol, only the connectivity related information is exchanged
between routers, and no complete routes are exchanged.
In a link state protocol, each router periodically determines the state
of its links to its neighbours by exchanging hello packets with them across
all its network interfaces. Figure 7.2 shows how a router is connected to
other routers through links established by its network interfaces. Based on
the reply received from its neighbours, the router determines the state of
the link in terms of the delay and other characteristics. Subsequently, the
router forms a short message called the link state advertisement and sends it
to its neighbours. A link state advertisement is also sent whenever a router
experiences a connectivity change. A link state advertisement message
contains:
• The identity of the router originating the message.
• The identities of all its neighbours.
126 Fundamentals of Mobile Computing
The delays from each router in the candidate list to every other router
in the tree are compared. The candidate router having the shortest delay
is moved into the tree and attached to the appropriate neighbour router.
Whenever a router is moved from the candidate list into the tree, it is
removed from the candidate list.
The above two steps are repeated till there are no more routers left
in the candidate list. If different routers somehow have maps that are
inconsistent, then routing loops can form. In the simplest case of formation
of a routing loop, two neighbouring routers determine that the other is the
best path to a given destination, and therefore packets traverse endlessly
between them. Routing loops involving more than two nodes are also
possible.
The reason for the formation of routing loops is fairly simple. Each node
computes its shortest-path tree and its routing table without interacting in
any way with any other node. Therefore, if two nodes start with different
maps, it is easy to have scenarios in which routing loops involving multiple
nodes are created. Examples of these situations can be easily constructed
and hence are not discussed here.
Once the network topology has been determined in the form of a
shortest path tree, a router forms its routing table and uses it to find the
best route to any destination. Based on this, it can determine the optimal
next hop for each destination in the network. Two widely used link state
protocols in traditional networking are OSPF (Open Shortest Path First)
and IS-IS (Intermediate System To Intermediate System).
The distance vector protocols get their name from the fact that they base
their routing decisions on the distance to the destination in terms of the
number of hops that a packet will have to traverse to reach its destination.
You might wonder what exactly the term vector denotes. The term vector
here means that routes are advertised as a vector (distance, direction),
where distance is the number of hops between the two nodes and direction
is defined in terms of the next hop router to which the packets need to
be forwarded. The distance vector protocols are based on the well-known
Bellman-Ford algorithm.
The distance vector routing protocols share everything they know about
the various routes in the network with their neighbours by broadcasting
their entire route table. Each node advertises its entire routing table to its
immediate neighbours only. A router transmits its routing table that has
been formed from its own perspective. That is, it represents the routes
to various routers from itself. For example, “router A is at a distance
of five hops away, in the direction of the neighbour router X.” As this
statement implies, each router learns routes from its neighbouring routers’
perspectives, and based on this forms its own perspective of the routes and
128 Fundamentals of Mobile Computing
then advertises the routes from its own perspective. As a router receives the
routing information of its neighbouring nodes, it updates its own routing
table by examining the received information and in turn informs its own
neighbours of the changes. This is also referred to as “routing by rumour”
because routers are relying on the information they receive from other
routers and have no way to determine if the information is actually valid.
A number of techniques have been suggested to cope with instability and
inaccurate routing information.
As we have seen, the routers using the distance vector protocol do not
have knowledge of the entire path that a packet would take to reach its
destination. Instead, they just know the following vector:
1. Direction in (or the specific network interface over) which a packet
should be forwarded.
2. Its own distance from the destination.
The DV protocol is, therefore, based on calculating the distance and
the direction to any router in a network. The cost of reaching a destination
is calculated using the various route metrics. The two popular distance
vector routing protocols are RIP (Routing Information Protocol) and
IGRP (Interior Gateway Routing Protocol). RIP uses the hop count of the
destination whereas IGRP takes into account the other information such
as node delay and available bandwidth. RIP supports the cross-platform
distance vector routing, whereas IGRP is a Cisco Systems proprietary
distance vector routing protocol.
As we have already mentioned, the distance vector routing protocol
requires each router to periodically send its entire route tables to all its
neighbours. A notable exception to this convention is the Cisco’s Enhanced
IGRP (EIGRP). Though EIGRP is a distance vector protocol, it does not
require transmitting updates periodically. Further, the updates are not
broadcast and do not contain the full route table.
The following are the three important ways in which a MANET routing
protocol differs from routing of packets in a traditional network.
Mobile Ad Hoc Networks 129
Types of communications
In a network, a node can initiate the following types of communications:
Unicast: In this, a message is sent to a single destination node.
Multicast: In this type of transmission, a message is sent to a selected
subset of the network nodes.
Broadcast: In this type of transmission, a message is sent to all the
nodes in the network. Since unrestrained broadcast communications can
choke a MANET, applications usually do not use broadcast communication.
As we shall see, different protocols support different types of
communications with different levels of proficiency. The exact routing
protocol to be deployed in a network is determined based on the results
of a traffic analysis characterizing the transmissions in the network into
unicast, multicast, and broadcast. Since the broadcast transmission is
normally not deployed in a MANET, the routing protocols in a MANET
can broadly be classified into unicast and multicast types.
N1 N3
N2
N4 N5
TABLE 7.1 DSDV Routing Table for the MANET of Figure 7.3 at Node N4
Destination Next hop Metric Sequence no. Install time
N1 N1 1 321 001
N2 N2 1 218 001
N3 N2 2 043 002
N5 N5 1 163 002
Dynamic Source Routing (DSR) (Johnson and Maltz 1996, 2001) protocol
was developed to be suitable for use in a MANET having a reasonably
small diameter of about 5 to 10 hops and when the nodes do not move very
Mobile Ad Hoc Networks 133
fast. DSR is a source initiated on-demand (or reactive) routing protocol for
ad hoc networks. It uses source routing, a technique in which the sender
of a packet determines the complete sequence of nodes through which a
packet has to travel. The sender of the packet then explicitly records this
list of all nodes in the packet’s header. This makes it easy for each node in
the path to identify the next node to which it should transmit the packet
for routing the packet to its destination.
In this protocol, the nodes do not need to exchange the routing table
information periodically, which helps to reduce the bandwidth overhead
associated with the protocol. Each mobile node participating in the protocol
maintains a routing cache which contains the list of all routes that the node
has learnt. Whenever a node finds a new route, it adds the new route to its
routing cache. Each mobile node also maintains a sequence counter called
request id to uniquely identify the last request it had generated. The pair
< source address, request id > uniquely identifies any request in the ad
hoc network. DSR works in two phases: (i) Route discovery and (ii) Route
maintenance. We discuss these two phases in the following.
Route discovery
Route discovery allows any host to dynamically discover the route to any
destination in the ad hoc network. When a node has a data packet to
send, it first checks its own routing cache. If it finds a valid route in its
own routing cache, it sends out the packet using this route. Otherwise, it
initiates a route discovery process by broadcasting a route request packet
to all its neighbours. The route request packet contains the source address,
the request id and a route record in which the sequence of hops traversed
by the request packet, before reaching the destination is recorded.
A node upon getting a route request packet does the following. If a
packet does not have the required route in its routing cache, it forwards
the packet to all its neighbours. A node forwards a route request message
only if it has not yet seen it earlier, and if it is not the destination. The
route request packet initiates a route reply upon reception either by the
destination node or by an intermediate node that knows a route to the
destination. Upon arrival of the route request message at the destination,
this information is piggybacked on to the route reply message that contains
the path information and is sent to the source node.
The route discovery process is schematically shown in Figure 7.4. As
shown in the figure, suppose a node N1 wishes to send a message to the
destination node N8. The intermediate nodes are N2, N3, N4, N5, N6, N7.
The node N1 initiates the route discovery process by broadcasting a route
request packet to its neighbours N2 and N3. Note that each node can have
multiple copies of the route request packet arriving at it. The propagation
of route reply is shown in Figure 7.5, and the acknowledgement messages
from destination to source are indicated by thick arrows.
134 Fundamentals of Mobile Computing
N1-N2-N5-N8
N1-N2-N5-N8 Destination
N1-N2-N5-N8 N2 N8
N5
Source
N1
N7
N4
N3 N6
Route maintenance
A known route can get broken either due to the movement of some
nodes making up the route or the battery of a node forming part of the
route getting exhausted. Route maintenance is the process of monitoring
the correct operation of a route in use and taking any corrective action
when needed. When a host (source) while using a route, finds that it is
inoperative, it carries out route maintenance. Whenever a node wanting to
send a message finds that the route is broken, it would help if it already
knows of some alternative routes. Since the nodes do not exchange any
routing information in this protocol, whenever a node detects that one of
its next hop neighbour node is not responding, it sends back a route error
packet containing its own address and the address of the hop that is not
working. As soon as the source node receives the RouteError message, it
deletes the broken-link-route from its cache. If it has another route to the
destination, it starts to retransmit the packet using the alternative route.
Otherwise, it initiates the route discovery process again.
Mobile Ad Hoc Networks 135
Tree-based protocol
Tree-based schemes establish a single path between any two nodes in
the multicast group. These schemes require minimum number of copies
per packet to be sent along the branches of the tree. Hence, they are
bandwidth efficient. However, as mobility increases, link failures trigger
the reconfiguration of the entire tree. Another complicacy is that when
there are many sources, a node either has to maintain a shared tree, losing
path optimality, or maintain multiple trees resulting in storage and control
overhead. An examples of this category of protocol is the Multicast Ad Hoc
On-demand Distance Vector (MAODV) (Royer and Perkins, 1999) Routing
Protocol.
Mesh-based protocol
Mesh-based schemes establish a mesh of paths that connect the sources and
destinations. They are more resilient to link failures as well as to mobility.
The major disadvantage of this scheme is that multiple copies of the same
packet are disseminated through the mesh, resulting in reduced packet
Mobile Ad Hoc Networks 137
Out of the large varieties of attacks that are possible in a MANET, many
are essentially routing attacks. Several other attacks target the wireless
transmission in a MANET, especially the network connectivity. In this
section, we first discuss a classification of various types of MANET security
attacks and then discuss a few types of attacks that are rather common.
Various attacks on a MANET can be classified into passive and active
attacks, based on the means of attack. Passive attacks target to monitor and
steal the data exchanged in the network, without disrupting the network
operations. It becomes very difficult to identify these attacks since these
do not have any perceivable symptoms. These attacks can be reduced by
using suitable encryption techniques. An active attack, on the other hand, is
destructive and disturbs the normal functionality of the network. Table 7.2
shows a classification of various types of security attacks against MANETs
into active and passive types. We discuss these different types of attacks
in this section. Attacks can also be classified according to the specific layer
of the protocol stack that they target as shown in Table 7.3. Each attack
can be considered to be exploiting the vulnerabilities at one or more layers
of the MANET protocol stack while most attacks target certain security
vulnerabilities at specific protocol layers. The multilayer attacks are those
that exploit the vulnerabilities existing at more than one protocol layer. We
discuss a few of the important types of security attacks in the following.
Routing loop
By sending tampered routing packets, an attacker can create a routing loop.
This will result in data packets being sent around endlessly, consuming
bandwidth and causing dissipation of power for a number of nodes. In this
attack, the packets are prevented from reaching their intended recipients
and thus it can be considered to be a type of denial-of-service (DoS) attack.
Repudiation attack
Repudiation attack refers to the denial of participation in a communication.
In this attack, a malicious user can deny a credit card or bank transaction.
Session hijacking
In a typical session, all the communications are authenticated only at the
beginning of the session. The attacker can spoof the IP address of a node
that has just started a session and hijack the session from the victim and
perform a DoS attack.
Fabrication attack
In AODV routing, when a node detects a broken link while forwarding a
packet (possibly because the next hop node has either moved or has shut
142 Fundamentals of Mobile Computing
down), it sends a route error message towards the packet sender. In the
fabrication attack, a malicious node sends a false route error message to
the packet sender, even when the next hop link is not broken.
Black hole
In this type of attack, a node can set up a route to some destination via
itself, and when the actual data packets are received from other nodes,
these are simply dropped. This node forms a black hole, to which data
packets enter but never leave.
Grey hole
A special case of the black hole attack is the grey hole attack. In this attack,
the attacker selectively drops some kinds of packets that pass through it
but not the others. For example, the attacker might forward routing packets
but not the data packets. This type of attack is more difficult to detect
compared to a black hole attack.
Partitioning
In this kind of attack, the attacker partitions a network by causing some
nodes to split up from the other nodes. That is, one set of nodes is not
able to communicate with the other set of nodes. By analysing the network
topology the attacker can choose to make the partitioning between the
set of nodes that causes the most harm to the system. This attack can be
accomplished in many ways, such as by tampering routing packets as in
the previous attacks. It can also be launched through some physical attack
such as radio jamming.
Blacklist
This attack tries to exploit a loophole in security mechanisms. Some ad
hoc routing protocols try to tackle this security problem by keeping a list
of perceived malicious nodes. Each node has a blacklist of, what it thinks,
bad nodes and thereby avoids using them when setting up routing paths.
An attacker might try to get a good node blacklisted, causing the other
good nodes to add this node to their respective blacklists and so avoid it.
Wormhole
In a wormhole attack, a direct link (tunnel) between the two nodes
is established. This is referred to as wormhole link. The direct link can
be established by making use of a wired line, a long-range wireless
transmission, or an optical link. Through the wormhole link, one node
eavesdrops messages at one end, and tunnells them through the wormhole
link to the other node which then replays them. The tunnel essentially
emulates a shorter route through the network and so naive nodes prefer
Mobile Ad Hoc Networks 143
SUMMARY
Mobile ad hoc networks are becoming very popular. Their use in every
day applications is rapidly increasing. In this chapter, we briefly discussed
the important characteristics of ad hoc networks and compared them with
infrastructure-based wireless networks. We then discussed their various
applications, the challenges in designing an effective MANET, and the
importance of designing effective routing protocols in proper functioning
of an ad hoc network. We identified why the routing task in a MANET is
much more complex than that in a traditional network. We then discussed
a few important routing protocols that have been proposed for use in
MANETs. We discussed VANETs, as a special type of MANET, which are
rapidly emerging as popular networks having many applications. Though
MANETs are handy and appear to be a promising networking technology,
they suffer from many more security vulnerabilities than the infrastructure-
based networks do. To be practically useful, the security concerns for
these networks need to be satisfactorily understood and addressed. We
finally reviewed the security issues in MANETs and discussed the overall
approaches adopted by a few security solutions.
FURTHER READINGS
Johnson, D.B. and D.A. Maltz, “DSR: The Dynamic Source Routing Protocol
for Multihop Wireless Ad Hoc Networks”. In: Ad Hoc Networking,
C.E. Perkins, Ed., Addison Wesley, Boston, 2001.
Lee, S., W. Su, and M. Gerla. “On-demand Multicast Routing Protocol in
Multihop Wireless Mobile Networks”, Mobile Networks and Applications,
Vol. 7, Issue 6, December 2002.
Marina, M.K. and S.R. Das, “Routing Performance in the Presence of
Unidirectional Links in Multihop Wireless Networks”. In: Proc. of the
3rd Symposium of Mobile Ad Hoc Networking and Computing (MobiHoc),
Lausanne, Switzerland, June 2002.
McQuillan, John M., Isaac Richer, and Eric C. Rosen, “The New Routing
Algorithm for the ARPANet,” IEEE Trans. on Comm., 28(5), pp. 711–719,
1980.
Mohan, P. Madhan, Johnson J. James, Murugan K., and V. Ramachandran,
“A Comparative and Performance Study of On-demand Multicast
Routing Protocols for Ad Hoc Networks”, College of Engineering,
Guindy (CEG), Anna University.
Perkins, C.E. and T.J. Watson, “Highly dynamic destination sequenced
distance vector routing (DSDV) for mobile computers”. In: ACM
SIGCOMM’94 Conference on Communications Architectures, London, UK,
1994.
Perkins, E. Belding-Royer and S. Das, “Ad hoc On-demand Distance Vector
(AODV) Routing”, IETF Draft, November 2001.
Royer, E.M. and C.E. Perkins, “Multicast Operation of the Ad Hoc On-
demand Distance Vector Routing Protocol”, Proceeding of the fifth annual
ACM/IEEE international conference on mobile computing and networking,
pp. 207–218, 1999.
Siva Ram Murthy, C. and B.S. Manoj, Ad Hoc Wireless Networks: Architectures
and Protocols, Prentice Hall PTR, New Jersey, USA, May 2004.
Thomas Kunz and Ed Cheng, “On-demand Multicasting in Ad Hoc
Networks: Comparing AODV and ODMRP”, Carleton University.
Toh, C., “A novel distributed routing protocol to support ad hoc mobile
computing”. In: IEEE 15th Annual International Phoenix Conf., pp. 480–486,
1996.
Zhang, Yongguang, Wenke Lee, and Yi-an Huang, “Intrusion detection
for wireless ad hoc networks”, Wireless Networks 9, pp. 545–556, 2003.
Zhou, L. and Z. J. Haas, “Securing Ad Hoc Networks”, IEEE Network 13(6),
pp. 24–30, 1999.
146 Fundamentals of Mobile Computing
EXERCISES
1. What is an ad hoc network? Why the traditional routing strategies
cannot be deployed in a MANET straightaway? Compare the
MANET routing strategies with the routing strategies of traditional
networks.
2. Define the characteristics of MANETs that are important determinants
in the design of an effective ad hoc network.
3. What do you mean by dynamic topology of a MANET? What
problems does it cause in the design of a routing protocol? How are
these problems addressed in a popular MANET routing protocol?
4. Briefly explain why the traditional packet routing protocols for
wired networks cannot be used straightaway in a MANET. Discuss
how the routing protocols for traditional wired networks have been
extended to work in a MANET.
5. Describe at least three applications of mobile ad hoc networks.
6. What are the important design constraints on a MANET? Explain
the implications of these constraints.
7. Can cellular networks and wireless LANs be considered as ad hoc
networks? Explain your answer.
8. Discuss why routing is a more challenging problem in MANETs
when compared to wired networks. Explain the different types of
routing protocols in MANETs.
9. What is “counting-to-infinity” problem? How is this problem
addressed in a MANET?
10. What are the competing issues that are addressed by a routing
protocol in a MANET? How are these achieved?
11. Briefly explain the important classes of MANET routing protocols
and compare their relative advantages. Compare them with respect
to network overhead, routing quality and routing time.
12. What do you mean by unicast, multicast and broadcast
communications in a MANET? Give examples of typical applications
of each of these types of communication.
13. What is the difference between reactive and proactive routing in
MANETs? Give examples of each category of protocols.
14. What is a hybrid routing protocol? What is its advantage over the
other classes of routing protocols?
15. Explain the working of the Destination-Sequenced Distance-Vector
(DSDV) routing protocol using suitable examples.
16. Explain how the security threats in MANETs are different from a
wired network.
Mobile Ad Hoc Networks 147
17. Explain Dynamic Source Routing (DSR). Clearly highlight the route
discovery and route maintenance operations.
18. What is a wireless sensor network? How is it different from a
MANET? Explain an application of a wireless sensor network.
19. Describe the security measures that can be incorporated in each layer
of protocol stack of MANETs.
20. Write short notes on:
(a) Characteristics of a secure ad hoc network
(b) Security attacks in ad hoc networks.
21. Discuss the important security threats in a MANET. What are the
factors responsible for limited security in MANETs?
22. Explain each of following types of attacks associated with ad hoc
networks:
(a) Routing loop (b) Black hole (c) Grey hole (d) Partitioning
(e) Blacklist (f) Wormhole (g) Dropping routing traffic
23. Give an example of a core-based multicast routing protocol for
MANETs. Explain its working.
24. Mention the important differences between a mobile ad hoc network
and a cell phone network.
25. Explain any one routing technique that can be used in a mobile ad
hoc network.
26. What are the different categories of routing protocols for mobile ad
hoc networks?
27. Explain the factors that make mobile ad hoc networks more
vulnerable to security attacks compared to the traditional networks.
Also, explain the major types of security attacks that are possible in
a mobile ad hoc network. How can each of these types of attacks be
overcome?
28. What is the difference between active and passive security attacks
in a MANET? Give an example of each of these types of attacks.
29. What do you understand by active and passive attacks on a MANET?
Name at least five different types of security attacks in a MANET.
Classify these into active and passive attacks. Discuss the security
measures against these attacks.
30. For every layer of MANET protocol stack, discuss at least one type
of security attack that exploits a vulnerability at that layer.
31. A major task of the designer of a wireless sensor network is
prolonging the life of the network. Explain how this is achieved
while designing a MANET.
32. Explain why traditional IP-based routing protocols may not perform
satisfactorily in mobile ad hoc networks.
148 Fundamentals of Mobile Computing
33. What do you mean by size and node density of a MANET? Explain
these two terms and discuss how these two parameters impact the
design of a MANET.
34. What is a VANET? Explain how does it differ from a traditional
MANET? Explain any one application of a VANET.
35. Explain some routing attacks that are possible at the application
layer of a MANET.
Wireless Sensor Networks
8
A wireless sensor network (WSN) is a self-organizing network of tiny
sensor nodes. Each sensor node (also called mote) usually senses certain
physical characteristics of its environment such as temperature, sound,
vibration, precipitation, etc. and then transmits the sensed information
to the user of the network. A WSN is called self-organizing since it gets
setup and configured automatically without requiring any form of manual
intervention.
A schematic diagram depicting the working of a WSN is shown in
Fig. 8.1. As can be observed from the figure, each node of a WSN senses
some specific data pertaining to the environment according to the user’s
specific requirements and the aggregate data is transmitted to the user of
the network. For transmission of the required data, the nodes set up an
ad hoc network among themselves.
Though there are significant differences between the two, WSNs can be
considered to be a special type of MANET. This is because WSNs are
ad hoc networks after all. Also, the network topology of both MANET
and WSNs changes dynamically. MANET topology changes due to user
movements, whereas the topology of a WSN changes continually as nodes
keep failing and node batteries keep getting depleted. In spite of these
superficial similarities, there are significant differences between these two
types of networks as enumered below.
1. Size and sophistication of the sensor nodes: As already discussed in
Chapter 7, a MANET is usually made up of hand-held devices such
as laptops, palmtops, personal digital assistants (PDA) and other
such devices equipped with wireless transceivers. Compared to a
hand-held device, a sensor node is much more limited in power,
computational capacity, and memory. Therefore, sensor nodes
cannot perform complex computations such as encryption and run
Wireless Sensor Networks 151
8.2 Applications
WSNs were conceived about two decades ago essentially for military
applications such as battlefield surveillance and enemy tracking. But,
nowadays WSNs have become popular in several civilian areas such
as habitat monitoring (Cerpa et al., 2001 and Mainwaring et al., 2002),
environment observation and forecasting (Biagioni and Bridges, 2002),
health applications (Akyildiz et al., 2002), and home and office applications
(Srivastava et al., 2001). The following are a few important applications of
WSNs:
Military applications
WSNs have been used to provide the following services in battlefields:
Monitoring enemy troop formations: Wireless sensor networks can be
used by a military commander to gather data about enemy formations. The
gathered data could include troop strength, location of troops, amount and
type of war equipment, etc. Such collected information can be used by the
commander to decide about counter deployments.
Battlefield surveillance: To monitor enemy intrusions or to detect the
presence of enemy troops, sensors can be randomly deployed in inaccessible
and critical regions. This way, intrusions and army advancements can be
easily determined. Based on the surveillance data, safe routes or paths for
the offensive attacks can be worked out.
sensor network in Great Duck Island, Maine, USA, to monitor the behaviour
of storm petrel (small sea birds). The important features of their designed
network were as follows:
Internet connectivity: The sensor network at Great Duck Island (GDI)
was designed to be accessed via the Internet. It was also possible to monitor
and manage the sensor networks deployed in the remote sites over the
Internet.
Tree topology: The nodes were arranged in clusters and the clusters
organized in a tree topology. To start with, three to four clusters of 100
fixed sensor nodes were deployed.
Life of the sensor network: The sensor network was designed to function
for at least a couple of months without the need for recharging. However,
GDI had sufficient solar power to recharge the sensor nodes that were
fitted with small solar panels.
Controller
The controller is possibly the most important component of the sensor
node. Besides responding to certain user commands, it processes the
sensor information, transmits it on the network, and also performs
several network-related operations. A typical controller consists of an
8-bit 4-MHz microcontroller with slow 10-Kbps communication capability
and 8-Kbyte read-only memory and a 512-byte RAM. While a controller
is commonly designed using a microcontroller, SoC (System on Chip) and
ASIC (Application Specific Integrated Circuit) are the other alternatives.
Transceiver Sensor
Battery
Transceiver
In a transceiver, the functionality of both the transmitter and receiver are
combined into a single device. Most WSNs are based on radio frequency
communications among the sensor nodes. WSNs typically use the
licence-free communication frequencies such as the 915-MHz band or the
2.4-GHz band. Even when idle, most sensors consume power at a rate
that is almost equal to the power consumed while receiving signals. This
is because citcuits such as the amplifier and filter continue to operate as
usual. Consequently, when a sensor node is not transmitting or receiving,
it is better to completely shut down the transceiver rather than leave it in
the idle mode.
Wireless Sensor Networks 155
External memory
From an energy perspective, the most appropriate memory is the on-chip
memory of a microcontroller or SoC. For storage of large amounts of data,
flash memories are used due to their low cost and high storage capacity.
Magnetic memories are rarely used due to their high energy consumption,
volume, and weight.
Power source
A sensor node consumes power for sensing, communicating and data
processing. Typically, more energy is required for data communication
than for any other process. Current sensors are able to renew their energy
from solar radiation or from vibrations. Two power saving policies are
being used. These are the Dynamic Power Management (DPM) policy and
the Dynamic Voltage Scaling (DVS) policy. DPM helps conserve power by
shutting down those parts of the sensor node that are idle. The DVS scheme
is based on varying the power levels based on the work load.
Sensors
Sensors are designed to exploit certain physical principles to produce
a measurable response to a change in some physical parameter such as
temperature or pressure. A sensor should be small in size and consume
negligible energy. Sensors fall into different categories based on whether
they are passive or active or omni-directional or narrow-beam sensors.
Passive sensors sense data without disturbing the environment in any
way and consequently consume almost no energy. Active sensors probe by
perturbing the environment in some way. Examples of active sensors are
sonar, ultraviolet devices, and radar. Naturally, these sensors need battery
power for their operation. Narrow-beam sensors sense in a well-defined
direction such as a camera. Omni-directional sensors cannot be ascribed
any direction to their measurements.
Effective design of WSNs must take into account various constraints and
limitations that these networks have to work with. Besides the limited
processing capability and available memory, these networks work with
limited bandwidth and limited network coverage. Further, new application
scenarios lead to new types of challenges. The following subsections
identify areas that constitute some of the important challenges in the
design of an effective WSN.
In WSNs, there are essentially four main types of protocols that have been
proposed. These protocols are briefly discussed below.
In this protocol (Intanagonwiwat et al., 2000 and Estrin et al., 1999), each
sensor node tags its data with one or more attributes. A node interested
in some data floods the network with an interest packet. Interests are
flooded over the network. When a node receives an interest packet from
a neighbour, it responds by sending data to the neighbour to retrace the
path of the interest packet. Each node only knows the neighbour from
whom it got the interest. It is possible that each node would receive
the same interest from more than one neighbour. In this case, multiple
paths can be set up from the source node to the destination node. Among
these paths, one or a few high rate paths are defined and the other paths
remain low rate. Depending on the number of paths that are reinforced,
directed diffusion can be single-path or multi-path routing. If a better
path emerges, the protocol updates the paths. Further, directed diffusion
allows intermediate nodes to cache and aggregate data to improve data
accessibility and energy efficiency.
designed primarily for mobile ad hoc networks, it has been used for sensor
networks as well. The network area is first divided into fixed zones forming
a virtual grid. Inside each zone, nodes collaborate with each other to play
different roles. For example, nodes elect one sensor node to stay awake for
a certain period of time while the others go to sleep mode.
The coverage problem is one of the active issues of the WSNs that
determines how efficiently the sensor network is being covered by a set
of sensor nodes. This problem deals with the QoS of the network ensuring
that the particular sensor network is monitored or observed by at least
one sensor node. It may be broadly classified into the following categories:
• Area coverage where the sensor nodes are deployed.
• Target coverage where the sensor nodes are deployed to cover a
specific set of targets or points.
In the target coverage problem, a fixed number of targets (t1, t2, ,
tm) need to be continuously monitored by a number of sensor nodes (s1,
s2, , sn), while the lifetime of the network needs to be maximized. There
are a specific number of targets which are required to be covered by a set
of sensor nodes. Each target needs to be monitored by at least one sensor
node. Since sensor nodes are provided with only limited resources and
cannot withstand extreme environmental conditions, they are deployed in
large numbers for exceeding the actual requirements.
Some of the possible strategies to cover a specific set of targets are
described below.
K-coverage
In the k-coverage (k 1) approach (Zorbas et al., 2009), a minimal subset of
the sensor nodes is determined that can keep track of the required targets,
with each target being covered by at least k sensor nodes. The activated
nodes collectively gather information about the specific targets and send
it to the base station.
SUMMARY
and hence can communicate only within short distances. The sensor nodes
are constrained in terms of energy, memory, computational capability and
communication bandwidth.
These sensors monitor different conditions at different locations, such
as temperature, humidity, lighting condition, pressure, soil makeup, noise
levels and help to find some current characteristics of certain objects such
as the presence or absence, mechanical stress, speed, direction, size, etc.
WSNs are practically becoming important. Various areas of applications
of sensor networks include critical missions, civil, healthcare, and
environmental disciplines, etc. The low cost of these nodes helps in their
deployment ranging from thousands to million nodes. These nodes can be
deployed either in a random fashion or in a pre-designed fashion.
FURTHER READINGS
EXERCISES
1. Compare WSNs with MANETs with respect to their characteristics,
applications and challenges to their commercialization?
2. Discuss a classification of the routing protocols for sensor networks.
3. Write short notes on each of the following:
(a) Multipath-based Routing (b) QoS-based Routing
(c) Hierarchical Routing (d) Location-based Routing
4. What is flat routing? How is it different from hierarchical routing?
5. Explain hierarchical routing and query-based routing in a wireless
sensor network.
6. What is a wireless sensor network (WSN)? Discuss some important
applications of WSNs.
7. Discuss the architecture of a sensor node in a wireless sensor network.
8. Explain the similarities and differences between a wireless sensor
network and mobile ad hoc network.
9. Explain the constraints and limitations on the operation and design
of WSNs.
10. Explain the main differences between the routing protocols for
WSNs and MANETs. Compare and contrast them with the routing
protocols for traditional wired networks. Discuss the main reasons
behind the differences in the routing approaches.
11. Why is design of a WSN considered to be more challenging than
that of a MANET? Explain your answer.
12. Explain the alternative WSN designs that can be proposed for
monitoring a finite number of discrete targets.
13. Do you agree with the statement: “Wireless sensor networks are a
special type of mobile ad hoc networks.” Justify your answer.
Operating Systems for
9
Mobile Computing
O f late, smartphones are being used not only to make phone calls, but
also to carry out a host of other useful operations such as to make
video conference calls, send multimedia messages, take pictures, play
media files, browse World Wide Web (WWW), run remote applications,
etc. This sophistication of the present-day smartphones enables multiple
tasks to be run on the device. Consequently, a powerful operating system
has become an essential part of every smartphone. However, we need to
keep in mind that the capability of the operating system that is used in
a mobile handset varies a great deal with the degree of sophistication of
the device. In a mobile handset, the operating system (OS) performs two
main responsibilities.
arrive at the same time which he might like to look-up while the call is still
on. Such a scenario requires concurrent execution of multiple tasks. When
multiple tasks contend to use the same set of resources, the OS acts like a
traffic cop—ensuring that different tasks do not interfere with each other.
The operating system of a mobile device on the one hand provides a highly
interactive interface to the user of the device and on the other interfaces
with other devices and networks. An important interface concerns control,
data, and voice communications with the base station using different
types of protocols. Besides, an OS takes care of recognizing inputs from
the keyboard, sending outputs to the display screen, and interfacing with
peripheral devices such as other mobile devices, computers, printers, etc.
For the sake of brevity, we shall refer to the operating system used
in a mobile hand-held device as a mobile OS. At present, the mobile OS
marketplace is dominated by Symbian, Android, Windows mobile, Palm
OS, iOS, and Blackberry OS. In this chapter, after discussing a few basic
concepts relevant to mobile OS and the special constraints under which
a mobile OS is expected to operate, we will survey the evolution and
important features provided by a few popular mobile operating systems.
Finally, we will provide a brief overview of the operating systems designed
for the sensor nodes in a WSN.
services can run more securely and efficiently. On the other hand, the
main problem with the monolithic kernel design is that it makes the kernel
massive, non-modular, hard to tailor, maintain, extend, and configure.
Considering the disadvantages of the monolithic kernel design, the
microkernel design approach has been proposed. The microkernel design
approach tries to minimize the size of the kernel code. Only the basic
hardware-dependent functionalities and a few critical functionalities
are implemented in the kernel mode and all other functionalities are
implemented in the user mode. Most of the operating system services run
as user level processes. The main advantage of this approach is that it
becomes easier to port, extend, and maintain the operating system code. The
kernel code is very difficult to debug compared to application programs.
User Mode
Kernel Mode
Request
Microkernel
Reply
Hardware
(b) Microkernel
The reason for this is that a bug in a kernel code can crash the system,
thus crashing the debugger too. Further, even when some operating system
service crashes while being used by a user, it does not bring down the
entire system. This is one reason as to why a microkernel operating system
could be expected to be more reliable than an equivalent monolithic kernel
operating system. The overall architectural difference between a monolithic
kernel and a microkernel architecture is schematically shown in Figure 9.1.
To restrict the size of the kernel of a mobile OS to the minimum, most
mobile OS are, to different extents, based on the microkernel design.
There are a few special constraints under which the operating system of
a mobile device needs to operate. There are also a few special features
that are required to be supported by a mobile OS, but are not present in
traditional operating systems.
The operating system for a mobile device needs to function in the presence
of many types of constraints which are not present in a traditional computer.
As an example of such a constraint, consider the fact that a mobile device
is powered by severely limited energy stored in a tiny battery. Therefore,
an important constraint for a mobile device lies in avoiding complex
computations and hence entering into a low power sleep mode as soon as
possible. Such a constraint is not usually imposed on a traditional operating
system. Further, the number of times that a mobile device is typically
turned on per day is significantly higher than that of a desktop or any
other computer. Due to this constraint, the mobile OS would need to be
loaded (booted) much faster each time after it is switched on, compared to
a desktop. Consequently, the kernel of a mobile OS needs to be of a very
small size. There are several such constraints which influence the design
of a mobile OS. It can be argued that coping with such constraints is an
important reason why the operating system of a mobile device needs to
differ significantly from a general-purpose operating system. We discuss
below some of the important constraints of a mobile OS.
Limited memory
A mobile device usually has much less permanent and volatile storage
compared to that of a contemporary desktop or laptop. To cope with the
limited memory of a mobile device, the OS must be as small as possible
and yet provide a rich set of functionalities to meet user demands. The
size of the kernel is, therefore, considered to be a very important figure of
merit of a mobile OS.
170 Fundamentals of Mobile Computing
Miniature keyboard
Mobile handsets are either provided with a small keypad or the small-sized
display screen is designed to be used as a keyboard in a touchscreen mode
using a stylus. In both these arrangements, typing in the documents and
entering the string commands is difficult. This mandates the provision of
some facility for word completion prompts and availability of capabilities
for free form handwriting recognition.
Several facilities and services that are normally not expected to be supported
by a traditional operating system, are mandated to be supported by a
mobile OS. We identify a few important ones in the following.
Windows
Phone 7
2010
Standard
Windows Professional
Mobile
Classic
2003
Pocket
PC
2000
Windows CE Windows CE
1.0 2.0
1996 1997
Windows mobile is designed to have a look and feel that is very similar
to the desktop version of Windows. Microsoft obviously planned that
since many users are familiar with the desktop version of Windows, they
would find it easy to operate Windows mobile. Besides the core capabilities
required by a mobile device, many third-party software applications
are available for Windows mobile. These software applications can be
174 Fundamentals of Mobile Computing
9.4.2 Palm OS
consoles, bar code readers and GPS devices. About a decade ago, Palm
OS was a very popular operating system, but has now lost its dominant
market position (Lin and Ye, 2009).
The key features of the current Palm OS (named Garnet) are the
following:
• It is essentially a simple single-tasking operating system. As a result,
only one application can run at a time. The implications of this
are many and easily noticeable. For example, if you are on voice
communication, you cannot use the calculator, or read an SMS.
• It has an elementary memory management system. To keep the
operating system small and fast, Palm OS does not isolate the
memory areas of applications from each other. Consequently, any
misbehaving application can crash the system.
• Palm supplies Palm emulator, which emulates the Palm hardware
on a PC. This allows Palm programs to be developed and debugged
on a PC before being run on the Palm hardware.
• It supports a handwriting recognition-based system for user input.
• It supports a facility called HotSync technology for data
synchronization with desktop computers.
• It supports sound playback and recording capabilities.
• It incorporates a very simple and rudimentary security model in
which a device can be locked by password.
• The different interfaces supported include Serial port/USB, infrared,
Bluetooth and Wi-Fi connections.
• It uses a proprietary format to store calendar, address, task and note
entries and yet are accessible by third-party applications.
9.4.3 Symbian OS
(a) Series 60: The series-60 platform was until recently the leading
smartphone platform in the world. The relatively large sized colour
screen, easy-to-use interface and an extensive suite of applications
make it well-suited to support advanced features such as rich content
downloading and MMS (Multimedia Messaging Service). Series
60 was mainly being used on Nokia’s smartphones and Samsung
handsets.
(b) UIQ interface: UIQ (earlier known as User Interface Quartz) is a
software package developed by UIQ Technology for Symbian OS.
Essentially, this is a graphical user interface layer that provides
capabilities for third-party application developers to develop
applications and effortlessly create user interfaces.
A few other important features supported by the Symbian operating
system are given below:
• It supports a number of communication and networking protocols
including TCP, UDP, PPP, DNS, FTP, WAP, etc. For personal area
networking, it supports Bluetooth, InfraRed and USB connectivity.
• It supports pre-emptive multitasking scheduling and memory
protection. Symbian is a microkernel-based operating system.
• CPU is switched into a low-power mode when the application is
not responding to an event.
• It is optimized for low-power and memory requirements. Applications,
and the OS itself, follow an object-oriented design paradigm.
• All Symbian programming is event-based, and the CPU is switched
into a low-power mode when the applications are not directly
dealing with an event. This is achieved through a programming
idiom called active objects.
• Carbide is an Integrated Development Environment (IDE) toolkit
that is available for C++ application development on Symbian
OS. It essentially works as an Eclipse plug-in and contains editor,
compiler, emulator, libraries and header files required for Symbian
OS development. Development kits are available at Nokia and the
Symbian Foundation websites.
Operating Systems for Mobile Computing 177
9.4.4 iOS
9.4.5 Android
source nature. Google could embed its search engine into Android, the
way Internet Explorer is embedded into Windows. By giving away the
operating system free and focusing on the search advertisement revenue,
Google successfully formed a formidable challenge to Windows mobile
and Symbian. A Gartner survey indicates that by the third quarter of 2011,
Android held 52% share of the mobile OS market compared to that for
Symbian’s 17% and iOS’s 15%.
Starting from 0% market share, in 2008, when the first mobile phone
incorporating Android was announced, it has become the dominant
player and has shown a remarkable rate of growth in market share and
user acceptance. To understand the success of Android, it is important
to understand the difficulties that users were experiencing with other
operating systems and how Android has helped overcome those.
• Since mobile manufacturers use different user interfaces and
interaction styles for their mobile devices depending on the customer
segment targeted, Android provided the ability to seamlessly use
either a phone-based keyboard or a touchscreen.
• Mobile users expect to browse real web pages, and not the simplified
mobile versions of those pages. Many mobile handsets support
browsing alternative sites provided by many website operators
for mobile handsets with small screens and limited interfacing
capabilities. However, Android scores over those operating systems
by providing a built-in full web browser capable of rendering full
web pages and not just small mobile versions.
• An important handicap of the competing operating systems is the
difficulty of development of third-party applications. For example,
an application on iOS has to be approved by Apple before it can
be offered to the users as outlined in the SDK agreement. Apple
does not, in fact, facilitate third party application development and
is implicitly promoting a closed proprietary environment, where
the internal working of the operating system is not exposed to the
developers.
• A prominent advantage that Android holds out is that Android
SDK works in Eclipse environment. Since many developers are
already exposed to these standard technologies, there is a large
pool of developers available for working on projects on the Android
platform.
• It provides an RDBMS SQLite for data storage and data sharing
across various applications.
• It has several innovative pre-installed applications such as Gmail,
Maps, voice search, etc.
Android allows application developers to write code in the Java language. It
facilitates the development of applications with the help of a set of core Java
libraries developed by Google. Though most applications are developed
using Java, applications and libraries can still be written in C and other
Operating Systems for Mobile Computing 179
Application layer
The Android operating system comes with a set of basic applications such
as web browser, email client, SMS program, maps, calendar, and contacts
repository management programs. All these applications are written using
the Java programming language J2ME. Android applications do not have
control over their own priorities. This design is intentional and is intended
to help aggressively manage resources to ensure device responsiveness and
even kill an application when needed.
Application framework
An application framework is used to implement a standard structure for
different applications. The application framework essentially provides a
set of services that an application programmer can make use of. The
services include managers and content providers. Content providers enable
applications to access data from other applications. A notification manager
allows an application to display custom alerts on the status bar.
Kernel
Android kernel has been developed based on a version of Linux kernel.
However, it has excluded the native X Window System and does not
support the full set of standard GNU libraries. Obviously, this makes it
difficult to reuse the existing Linux applications or libraries on Android.
Based on the Linux kernel code, Android implements its own device
drivers, memory management, process management and networking
functionalities. Android is multitasking and allows applications to run
concurrently. For example, it is possible to hear music and read or write
an email at the same time. This layer is the one that is commonly used by
the cell phone users.
Google initially maintained the kernel code they contributed to in
the Linux public distribution. Since 2010, Google no longer maintains its
Android kernel extensions in the Linux public distribution. Now Google
maintains its own code tree. This has marked the branching of Android
from Linux code in the public distribution.
systems are available. Even iOS does not facilitate the development of
third-party applications. However, this has a downside. The design and
development of a good operating system by a vendor is not sufficient to
warrant its wide customer acceptance. It is advantageous to have a variety
of applications available to run on an operating system. As has happened
earlier in the computing history, it becomes a losing game for an operating
system vendor, if it relies on itself alone to develop a large number of
innovative applications on its operating system. In this regard, Android
and Symbian being open operating systems, score over the other market
players.
The royalty-free Linux-based Android has been adopted by all the major
Asian handset makers such as Samsung, HTC, LG, etc. as well as Motorola
and Sony Ericsson (Farooq and Kunz, 2011).
Scheduler Sensor OS
The important operating systems that are available for sensor nodes
include TinyOS, Contiki OS, Lite oS, and MANTIS (Farooq and Kunz, 2011).
SUMMARY
FURTHER READINGS
EXERCISES
1. Explain the special features that an operating system for a mobile
device needs to support compared to the features provided by a
traditional operating system.
2. What is a microkernel operating system? Why is microkernel-based
design being preferred for developing a mobile OS?
184 Fundamentals of Mobile Computing
The World Wide Web (WWW) was originally designed to work with
traditional computers such as desktops and laptops. The WWW makes
implicit assumptions regarding the capabilities of the web clients (desktops
and laptops) and the network over which these are run. Considering that
the early mobile networks supported only voice traffic and the mobile
handsets had rather primitive computing infrastructures and had screens
185
186 Fundamentals of Mobile Computing
and deck model in the context of mobile networks is that a click on a web
page causes downloading of the entire deck associated with the web page
on to the mobile device. This substantially reduces the latency of access.
HDML eventually formed the basis of the WAP standard.
For facilitating the development and portability of applications over
wireless communication networks, telecommunication companies, Ericsson,
Nokia, Motorola, and Unwired Planet founded the WAP forum. The
mandate for WAP forum was to develop technologies that would become
the de facto standards and would help in the formulation of standards by
the appropriate standards bodies. Later the WAP forum became a part of
the Open Mobile Alliance (OMA) which has a much wider membership
and mandate. OMA is a standards body which develops open standards
for the mobile phone industry. In 1998, WML (Wireless Markup Language)
was announced. Both HDML and WML share the same basic programming
model and functionality. However, the main difference between them is
that while WML is XML-based, HDML is not. An important benefit of
WML being XML-based is that WML is a widely accepted standard for
data interchange. Further, a company can use commercially available XML
tools to generate, parse and manipulate WML, and they can also use XSL/
XSLT1 to construct WML decks from XML meta-languages.
10.2 WAP
web access. The working of a WAP-based web access has been shown in
Fig. 10.2. In this, all requests from the mobile device are sent to the WAP
gateway. The WAP gateway transforms them into HTTP request-response
streams, and sends them to the application/content server. The reverse of
this sequence takes place when the application/content server responds to
a specific request. It is the responsibility of the WAP gateway to convert
a WAP request/response to an HTTP request/response. This conversion
is very compute-intensive. To handle this computational workload, the
WAP gateway needs to be a powerful computer. It is not difficult to
see why WAP is often described as a network-centric protocol—most
of the intelligence and computations associated with the WAP protocols
are embedded in the network rather than the simple phone. The WAP
forum released its first specification of WAP (referred to as WAP 1.0) in
the year 1997. The WAP 2.0 was subsequently released. It had backward
compatibility with the previous WAP protocol.
Bearer Interfaces
A bearer is a low-level transport mechanism for network messages.
Considering the diversity of transport technologies, WAP is designed to
operate with SMS (Short Message Service) to GPRS (General Packet Radio
System), UMTS and IP. GPRS is relatively faster, and provides “always-
on” connections for wireless devices. WAP supports circuit-switched bearer
services such as dial-up networking using IP and Point-to-Point Protocol
(PPP). However, packet-switched bearer services are much better suited
than circuit-switched bearer services for mobile devices as they can provide
more reliable services in the unreliable wireless connection environment.
10.3 J2ME
Sun Microsystems Ltd. created the Java language in 1995. Even though
Internet had already made its appearance by 1995, but none of the available
programming languages could effectively work with Internet. Java for the
first time made it possible for programs to be run by making it possible
for web clients to download and run applets. Besides, it had several other
advantages. As we all know, Java was a resounding success and quickly
found widespread acceptance. This was followed by Java Enterprise Edition
(J2EE) for server side programming. Later Java2 Micro Edition (J2ME)
was developed for supporting programming of mobile devices. J2ME has
been targeted for use in very small devices (called J2ME devices) such as
smartphones, interactive television set-top boxes, pagers, PDAs and other
wireless devices. It includes different virtual machines and application
programming interfaces (APIs).
One of the identified design objectives for J2ME was to provide
portability across several mobile platforms, so that the same application
could be run across the mobile devices manufactured by different vendors
192 Fundamentals of Mobile Computing
J2ME takes into account the fact that there are a wide variety of mobile
devices with varying capabilities and hence the need for supporting a
diverse range of features and functions. A J2ME configuration targets
to make it applicable to devices with a specific range of capabilities. A
profile on the other hand, selects a configuration and a set of APIs to
target a specific domain of applications. The selection of an appropriate
configuration and profile are therefore the crucial parts of any application
development. Since lightweight appliances do not need the capabilities of
the entire Java2 platform, by selecting the appropriate configuration and
profile, the resource requirements and the cost of running the applications
can be reduced to a large extent. The J2ME configuration parameters
include the following:
Mobile Application Development and Protocols 193
Configuration layer: The features of Java Virtual Machine (JVM) and the
available Java class libraries for a specific category of devices are defined
in this layer. For profile implementers, this layer plays a vital role, but is
less visible to the users.
Profile layer: The set of application programming interfaces (APIs) available
on a particular family of devices is defined in this layer. Applications are
written for a particular profile, and applications are portable to any device
that supports the specific profile for which it was developed. A device can
support multiple profiles. This is the layer that is most visible to users and
application providers.
Mobile Information Device Profile (MIDP) layer: The Java APIs which
are present in this layer provide reusable functionalities corresponding to
user interface, persistence storage, and networking.
Cell phones are small in size and therefore can easily be carried everywhere
like a wallet. Considering their portability and the powerful feature sets
that they provide, they have now come to play an important part in today’s
society. Now with every passing day, mobile phones implement new and
innovative functionalities and have come to possess a surprisingly large
number of functionalities. For example, many handsets provide facilities for
radio and television reception, timer and clock, Internet access, camera, and
calculator, just to mention a few. These applications are well known and
standard. These are usually developed by the operating system developers
themselves and are bundled with the operating system. However, the true
power and distinguishing features of a handset come into picture with the
third-party developed applications. Therefore, a successful mobile operating
system needs to facilitate the development of third-party applications. In this
regard, open operating systems stand out in facilitating the development of
third-party applications and Android application development tools have
now been well received.
Using the SDK, one can either run the application on the actual Android
device or a software emulator on the host machine. This is achieved by
using the Android Debug Bridge (ADB) available with the SDK. ADB is a
client-server program and includes three main components:
• A client program which runs on the developer’s (called host)
machine. One can invoke a client from a shell by issuing an adb
command.
• A daemon program which runs as a background process on each
emulator or device instance. It is the part that actually manages
the communication with the handset or the emulator and helps in
executing the application.
• A server program which runs as a background process on the host
machine. The server manages communication between the client and
an adb daemon that runs on the emulator or the Android handset.
Content providers: Content providers are used for reading and writing
data that are either private to an application or shared across applications.
By using the content provider, an application can query or modify the
stored data.
Service: A service denotes a background task and not for interacting
through a user interface. For example, a service might play music in the
background while the user is interacting with a different application.
Broadcast receivers: The broadcast receiver responds to broadcast
announcements by an application. For example, a battery monitoring
application might broadcast that the battery is low. Based on this, the music
player might reduce the volume or the screen display may be dimmed.
Mobile Application Development and Protocols 197
SUMMARY
EXERCISES
1. What problems would occur if an attempt is made to enable the
mobile user to browse the web by interfacing the mobile networks
and the mobile devices directly to the WWW with only trivial
extensions to the existing web protocols?
2. Why is HTML-based standard web access not very meaningful in
mobile environments? How does WAP address this issue?
3. What is C-HTML? How did C-HTML address problems that arose
while accessing traditional web using mobile handsets? What are
the shortcomings of C-HTML?
4. What is HDML? What were the problems of traditional web access
that HDML tried to solve? How have these problems been solved?
5. Explain WAP 2.0 protocol and its architecture. Briefly explain why
WAP is called a network-centric protocol.
6. Distinguish between traditional computing devices and the J2ME
devices.
7. What is J2ME? What facilities does J2ME offer to a mobile application
developer? Briefly explain the architecture of J2ME.
8. Write a short note on Android software stack.
9. Using a suitable schematic diagram, explain how a traditional web
access differs from that done using WAP.
10. Briefly write how an application can be developed using the Android
SDK.
11
Mobile Commerce
199
200 Fundamentals of Mobile Computing
Money is now an important element of all business and trade. In older times,
money did not exist. What existed was a simple “barter system” where things
could be exchanged, say, fish for grains, The evolution of currency (money)
gave birth to the concept of a “marketplace”. In a marketplace, commerce
is a function of 4 Ps—Product, Price, Place and Promotions. All these four
components play a vital role for a business transaction to take place. Different
combinations of 4Ps determine the different forms of commerce. Once the
marketplace came into existence, a few pioneers realized that people would be
ready to pay extra if products could be delivered at the customer’s doorsteps.
A small change to two of the Ps, Price and Place, led to the convenience of
getting products at customers’ homes. This concept delighted the customers
and thus, the concept of “Street Vendors” was born. When the postal system
came into being, sellers found a new avenue and started using mails to describe
their products. It ultimately led to the concept of “Mail Order Cataloguing”. A
mail order cataloguer buys goods and then sells those goods to the prospective
customers. A mail order catalogue is a list of the goods that the cataloguer
deals with. From this point, the evolution of the “Teleshopping” networks
was inevitable with the development of the Internet. The latest generation
of commerce is being done over the Internet. The Internet provides a virtual
platform where sellers and buyers can come in contact for sale and purchase of
goods and services, even though they may be thousands of miles apart, belong
to different countries, and might speak different languages. “E-Commerce”
has emerged as a boundary-less trade medium accelerating the pace of
globalization.
The Internet has already reached the home of most customers. In this
context, the distribution channel has started to assume a new meaning to the
e-marketer. With options of paying online through debit and credit cards, on-
line transactions have become purely electronic. In this context, the difference
between E-commerce and M-commerce is that E-commerce is limited to PC
users with an Internet connection, while M-commerce has been adopted by
the mobile phone users.
Advertising
Using the demographic information collected by the wireless service
providers and based on the current location of a user, a good targeted
advertising can be done. The wireless service provider may also keep
track of the history of the purchases made by customers by directing
Mobile Commerce 201
Comparison shopping
Consumers can use their mobile phones to get a comparative pricing
analysis of a product at different stores and also the prices of the related
products. For example, suppose consumers visiting a shop can use their
mobile phones to access a web-based comparison shopping application.
By scanning the bar code on a product, the consumer can see the price of
this product at different shops in the adjacent area. After seeing how the
product is priced at different shops, the consumer may decide to buy from
a shop where it is competitively priced. In a similar manner, consumers
can also access product reviews from consumer organizations or customers.
Mobile ticketing
Mobile phones can be used to purchase movie tickets (called m-tickets)
using credit cards. After the payment is received, a unique bar code is sent
to the purchaser’s mobile phone by an SMS. The purchase can gain entry
to the movie hall by showing the bar code downloaded into the mobile
device to a bar code reader at the entrance. Consider another example. A
customer books a train ticket using the mobile phone. An m-ticket or a
text message is sent to the mobile phone. Inside the train, by showing the
m-ticket on his mobile phone to the ticket collector, the traveller occupies
the seat.
Interactive advertisements
In an interactive advertisement, customers can scan a bar code in an
advertisement for a product appearing on a TV screen using their mobile
phones. By scanning the bar code, the consumer can order the product by
invoking an internet application.
Catalogue shopping
Mobile phones can be used to place orders for products listed in a
catalogue. For example, a consumer might receive a catalogue by SMS
from a catalogue shopping company. Each product on sale is accompanied
by a unique bar code. By scanning the bar codes, the consumer can buy
products directly from the catalogue shopping company.
bar code on a packet using a mobile device, a truck driver can confirm in
real-time that a consignment has been delivered.
Mobile devices
Hand-held devices essentially present user interfaces to the mobile users.
The users specify their requests using the appropriate interface programs,
204 Fundamentals of Mobile Computing
Mobile middleware
The main purpose of mobile middleware is to seamlessly and transparently
map the Internet content to mobile phones that may sport a wide variety of
operating systems, markup languages, microbrowsers, and protocols. Most
mobile middleware also handle encrypting and decrypting communication
in order to provide secure transactions.
Network
Mobile commerce has become possible mainly because of the availability
of wireless networks. User requests are delivered either to the closest
wireless access point (in a wireless local area network environment) or
Mobile Commerce 205
Host computers
Host computers are essentially servers that process and store all the
information needed for mobile commerce applications. Most application
programs used in the mobile commerce are hosted on these. These
applications usually consist of three major components: web servers,
database servers, and application programs and support software. The web
servers help interact with the mobile client. The database servers store data.
The application program is the middleware that implements the business
logic of the mobile commerce application.
Like any other technology, M-commerce has its own advantages and
disadvantages, which are discussed below.
Advantages
The following are the major advantages of M-commerce:
1. For the business organization, the benefits of using M-commerce
include customer convenience, cost savings, and new business
opportunities.
2. From the customer’s perspective, M-commerce provides the flexibility
of anytime, anywhere shopping using just a lightweight device. The
customer can save substantial time compared to visiting several
stores for identifying the right product at the lowest price.
3. Mobile devices can be highly personalized, thereby providing an
additional level of convenience to the customers. For example, a
repeat order for some items can be placed at the touch of a button.
Disadvantages
The following are the major shortcomings of using M-commerce.
1. Mobile devices do not generally offer graphics or processing power
of a PC. The users are therefore constrained to use small screen and
keyboard and low resolution pictures and videos.
2. The small screens of mobile devices limit the complexity of
applications. For example, the menu choice, and text typing capabi-
lity are severely constrained
206 Fundamentals of Mobile Computing
Micropayment
Micropayment is intended for payment for small purchases such as from
vending machines. The mobile device can communicate with the vending
machine directly using a Bluetooth or wireless LAN connection to negotiate
the payment and then the micropayment is carried out. A customer makes
a call to the number of a service provider where the per call charge is
208 Fundamentals of Mobile Computing
equal to the cost of the vending item. Thus, the micropayment scheme is
implemented through the cooperation of the mobile phone operator and
a third party service provider. This approach has been used for vending
from Coca-Cola machines.
SUMMARY
FURTHER READINGS
Dahlberg, T., et al., “Past, present and future of mobile payments research:
a literature review,” Electronic Commerce Research and Applications,
doi:10.1016/j.elerap, 2007.02.001.
Ghosh K. Anup, and T. Swaminatha, “Software Security and Privacy
Risks in Mobile E-Commerce,” Communications of the ACM, pp. 51–54,
February 2001, http://main.mchek.com.
Varshney, U., R.J. Vetter, and R. Kalakota, “Mobile commerce: a new
frontier”, IEEE Computer, Vol. 33, pp. 32–38, October 2000.
Zheng, X. and D. Chen, “Study of mobile payments systems,” IEEE
International Conference on E-Commerce, CEC 2003, pp. 24–27, Digital
Object Identifier 10.1109/COEC.2003.1210227, June 2003.
EXERCISES
1. What do you understand by the mobile payment system? Briefly
explain an application where mobile payment may be useful. Explain
the different payment systems that are available.
2. What do you mean by the 4 Ps of commerce? Explain the different
forms of commerce that are obtained by varying the interpretation
of the Ps.
3. What do you understand by M-commerce? What are the advantages
and disadvantages of M-commerce.
4. Explain any two applications of M-commerce.
5. What do you mean by B2B and B2C commerce? Give examples of
M-commerce for these two categories of commerce.
6. What is RFID? Briefly explain the principle of its working. Explain
a few applications in which RFID is useful.
7. What is micropayment in M-commerce? How is micropayment
achieved?
Glossary
it. For this purpose, he can view all the relevant advertisements for the
product by taking the picture of the bar code using his mobile device.
B2C Catalogue Shopping: Mobile phones can be used to place orders
for products listed in a catalogue. For example, a consumer receives a
catalogue by SMS from a catalogue shopping company. Each product
on sale is accompanied by a unique bar code. By scanning the bar
codes, the consumer can buy products directly from the catalogue
shopping company in a similar way to accessing a web-based catalogue
on his mobile phone.
B2C Information About a Product: Consumers can access additional
information about products through their mobile phones.
B2C Interactive Advertisement: An interactive advertisement allows
customers to scan a bar code appearing on a TV screen using their
mobile phone.
B2C Loyalty and Payment Services: Mobile phones can replace the
physical loyalty cards. Having signed up for a supermarket loyalty
scheme, a unique bar code is sent to a consumer’s mobile phone. After
shopping at the same supermarket, the consumer shows the bar code
at the cash counter and accumulates points based on the total amount
spent.
B2C Mobile Ticketing: Mobile phones can be used to purchase and
redeem tickets. A traveller can buy movie tickets online.
B2C Shopping: Consumers can use their mobile phones to get a
comparative pricing analysis of a product at different stores and also
the prices of the related products.
Bandwidth Constrained, Variable Capacity Links: Wireless links have
significantly lower capacity than their wired counterparts. Also, due to
issues such as multiple access, fading, noise and interference conditions,
the bandwidth of the wireless links can change arbitrarily with time.
Black Hole: In this type of attack, a node can set up a route to some
destination via itself, and when the actual data packets are received
they are simply dropped. This forms a black hole, where data enter
but never leave.
Blacklist: Some ad hoc routing protocols try to tackle the security
problem by keeping a list of perceived malicious nodes. Each node
has a blacklist of, what it thinks, bad nodes and thereby avoids using
them when setting up routing paths.
Bluetooth Baseband: It is concerned with connection establishment and
other tasks such as packet format, timings, etc.
Bluetooth Link Manager Protocol (LMP): It is responsible for link setup
between the Bluetooth devices. It also includes some security issues
such as (i) authentication and (ii) negotiation and control of baseband
packet sizes.
214 Glossary
TCP in Mobile Networks: TCP has become the de facto transport protocol
in the Internet. It has been remarkably successful in supporting many
applications such as web access, file transfer and email.
TCP Port Address: The client program uses a temporary port number
and the server program uses a permanent (well-known) port number.
These port numbers are used for the identification of the application.
TCP Reliable Service: TCP is a reliable transport protocol. The implication
of this is that TCP guarantees that data will be delivered without loss,
duplication or transmission errors. For this, TCP uses the following
schemes: positive acknowledgement, checksum on both header data,
checking sequence numbers to determine the missing segments and
detection of duplicate segments.
TCP Slow-Start: The slow-start mechanism is used when a TCP session is
started. Instead of starting transmission at a fixed transmission window
size, the transmission is started at the lowest window size and then
doubled after each successful transmission.
TCP Stream Delivery Service: TCP is a stream-oriented protocol. A
stream is essentially any ordered sequence of bytes so that a group
of bytes (message) sent in one transmission operation (record) is read
exactly as that group at the receiver application.
TCP/IP Application Layer: This layer provides communication between
applications running on separate hosts. This layer includes protocols
such as http, ftp, telnet, etc.
TCP/IP Data Link Layer: The functions of this layer are related to the
logical interfacing between a sub-network and an end system. Its
functionalities include encoding schemes and also determining the rate
of signalling determined by the physical layer. It also provides error
detection and packet framing functionalities. It delivers data packets
by making use of lower layer protocols. Ethernet is possibly the most
common data link layer protocol.
TCP/IP Internet Layer: It mainly performs data routing and ensures
packet delivery at the destination host. It supports communication
between two hosts. Remember that there can be several applications
or processes running on a host. Once a message reaches a host, it
is demultiplexed using the port number at the transport layer for
delivery to the appropriate application. In a nutshell, this layer manages
addressing of packets and delivery of packets between networks using
the IP address.
TCP/IP Transport Layer: It provides reliable end-to-end data transfer
services. The endpoints of a communication link are the processes.
Thus, to identify the endpoint, not only the computer needs to be
identified, but also the port must be identified since the same computer
may run several applications. The transport layer provides services
232 Glossary
by making use of the services of its lower layer. The details of the
underlying networks are hidden from the application layer by the
transport layer. Sometimes this layer is also referred to as host-to-host
layer. This layer manages the transfer of data by using connection-
oriented (TCP) and connectionless (UDP) transport protocols.
TCP/IP: TCP/IP is a large collection of a number of protocols based
upon the two important protocols TCP and IP. The Transmission
Control Protocol (TCP) and Internet Protocol (IP) are the two important
protocols of the TCP/IP protocol suite. The TCP/IP protocol suite was
developed by DARPA in 1969.
TCP-F (TCP-Feedback): The TCP-F (TCP-Feedback) protocol proposes
that the sender can distinguish between route failure and network
congestion. Similar to Freeze-TCP and M-TCP, the sender is forced
to stop transmission without reducing the window size upon route
failure.
TELNET: It enables the remote log-on facility, by which the user can log-
on the systems directly. Both FTP and TELNET pump in data to the
TCP layer as it is. TCP forwards the same data on the network through
the IP and link layers. As a result, it becomes easy to sniff (secretly
hear) the data by using the publicly available TCP sniffer programs
such as “TCPdump”. Due to this, at present most users use sftp and
ssh which essentially serve to encrypt (and decrypt) data before passing
on to the TCP layer.
Time Division Multiple Access (TDMA): TDMA is an access method
in which multiple users or sources are allotted different time slots to
access the same physical channel. The available time slot is divided
among multiple sources.
Transaction Model: It defines the framework for the definition and
execution of transactions. The integrity constraints on a database
are given by well-known ACID properties (Atomicity, Consistency,
Isolation, Durability), meaning that a transaction is an atomic, consistent
and recoverable unit that does not interfere with other transactions that
are executed concurrently. In some application scenarios, such as the
mobile environment, ACID properties turn out to be too stringent for
realizing any meaningful database in practice and therefore require to
be relaxed.
Transaction: It is a unit of operation that changes a database from a
consistent state into another consistent state. A database is a consistent
state if it satisfies all the defined semantic integrity constraints. A
transaction consists of many read and write operations on the database.
Transmitter: The input to a wireless transmitter may be voice, video,
data or other types of signals to be transmitted to one or more distant
receivers. This signal is called the base band signal. The basic function
Glossary 233
WAP 2.0: WAP 2.0 protocol focuses on the schemes combining wireless
applications with the Internet. The WAP 2.0 provides support for the
protocols such as IP, TCP and HTTP. It is also flexible with air interface
technologies and their corresponding bearers.
Windows CE: Windows CE is a 32-bit multitasking operating system.
Usually, this operating system is delivered on a Read Only Memory.
Wireless Application Environment (WAE): The application layer
includes the micro-browser on the device, WML (the Wireless Markup
Language), WMLS (a client-side scripting language), telephony service,
and a set of formats for the commonly used data (such as images,
phone books, and calendars).
Wireless LAN Cards: End-users access the WLAN through WLAN
adapters (wireless network interface cards) in their hand-held devices.
Nowadays, this card is in-built into the motherboards.
Wireless Local Area Networks (WLANs): WLANs provide connectivity
between computers over short distances via a wireless medium. Typical
indoor applications of WLANs may be in educational institutes, office
buildings and factories where coverage distances are usually less than
a few hundred feet.
Wireless Sensor Networks: Wireless sensor networks (WSNs) are network
systems containing sensor nodes. The sensor nodes can sense certain
physical characteristics and can be used to capture environmental
information such as temperature, sound, motion, etc.
Wireless Session Protocol (WSP): The session layer provides HTTP
functionality, with basic session state management, and a facility for
reliable and unreliable data push and pull.
Wireless Transaction Protocol (WTP): The transaction layer provides
transport services (one-way and two-way) and the related technologies.
Wireless Transport Layer Security (WTLS): The security layer provides
data security and privacy, authentication, as well as protection against
denial-of-service attacks.
Zone Routing Protocol: In ZRP, a routing zone comprises a few mobile
ad hoc nodes within a few hops from the central node. Within this
zone, a table-driven routing protocol is used. This implies that route
updates are performed for nodes within the zone. Each node, therefore,
has a route to all other nodes within the zone. If the destination
node resides outside the source zone, ZRP employs a route discovery
procedure.
Index
235
236 Index
KEY FEATURES
◆ Provides unified coverage of mobile computing and communication aspects
◆ Discusses the mobile application development, mobile operating systems and mobile databases as part of the material
devoted to mobile computing
◆ Incorporates a survey of mobile operating systems and the latest developments such as the Android operating system
THE AUTHORS
PRASANT KUMAR PATTNAIK, PhD (Computer Science), is Associate Professor at the School of Computer
Engineering, KIIT University, Bhubaneswar. He has more than a decade of teaching and research experience. He is
a Senior Member of the International Association of Computer Science and Information Technology (IACSIT), Singapore.
His areas of interest include mobile computing and cloud computing.
RAJIB MALL, PhD, is Professor in the Department of Computer Science and Engineering at the Indian Institute of
Technology Kharagpur. He has vast practical experience in developing industry-oriented software products. Having an
academic experience of a decade and half in IIT Kharagpur, Professor Rajib Mall has guided several doctoral dissertations
and published over a hundred research articles.
ISBN:978-81-203-4632-1