Simulation of Bluetooth Environment

lowlyoutstandingΚινητά – Ασύρματες Τεχνολογίες

24 Νοε 2013 (πριν από 4 χρόνια και 7 μήνες)

105 εμφανίσεις




Simulation of Bluetooth Environment

Introduction to Wireless and Mobile Systems

Sudhindra Rao



The Bluetoooth protocol is a short distance(10m to 100m) wireless
communication protocol designed to work on freely available radio frequency of

2.4 GHz. This frequency band is under the ISM band which are free to use
without regulations. This technology promises to replace wired networks with
wireless ones and provide freedom and improvements which are not possible
with wireless communications. W
ith this technology devices can communicate to
each other wirelessly without being hampered by any interferences from other
devices. I try to simulate the behaviour of devices and the state transitions
involved in setting up a Bluetooth piconet. Interestin
g insight gained by the
simulations using a discrete event simulator called simjava has been presented.

Introduction to Bluetooth

The Bluetooth wireless technology was created to solve a simple problem ie to
replace the cables used on mobile devices with r
adio frequency waves. The
technology is a simple low
cost, low power technique easily available to all users.
The radio frequency used is part of the freely available ISM band (2.4GHz).

A few interesting features of the Bluetooth technology can be quoted

from [2] :

Fast frequency hopping to minimize interference

this means that
Bluetooth can provide robust data transfers/communication even in the
presence of hostile radio frequency interference.

Adaptive power output to minimize interference

ence caused due
to Bluetooth devices would be minimal. Also power control ensures that
signals reach the desired destination.

Short data packets

Since Bluetooth is for short distance message
communication shorter data packets ensure faster delivery(even

which is very critical with devices like mouse/keyboard.

Continuous variable slope data(CVSD) for voice communication

help withstand high error rates.

Flexible packet types with 1,3,5 slots allocated can support short bursts
nd longer voice data.

Used with mobile devices hence power control is integral part of
Bluetooth(1mW transmission power).




Bluetooth devices form quick ad
hoc "piconet"’’s and communicate among the
connected devices. Use of radio technology ensures there ar
e no line
restrictions. Several piconets can be joined together using a common node
creating a scatternet.

A piconet consists of a master(self
proclaimed) which can communicate with 8
other active nodes(slaves). If there are more than 8 nodes the

rest of the nodes
are marked as passive by the master. If one of the active node disconnects any
of these nodes can change over to active.

Bluetooth Piconet formation

We discuss the formation of a piconet as explained in [1] for completeness. [1]
should b
e referred to, for further details.

To form a piconet, the Bluetooth radio needs two parameters: the hopping
pattern of the radio it wishes to connect to and the phase within that pattern.
Bluetooth radios each have a unique "Global ID" that is used to cre
ate a hopping
pattern. In forming a piconet, the master radio(one who wants to initiate
communication) shares its Global ID with the other radios, which then become
slaves and provide all the radios with the correct hopping pattern. The master
also shares
its clock offset (represented by the clock dial) with the slaves in the
piconet, providing the offset into the hopping pattern.

Normally, radios not connected to the piconet are in "Standby" mode, where
radios are listening for other radios to find them
("Inquire") and/or are listening for
a request to form a piconet ("Page"). When a radio issues an Inquire command,
listening radios will respond with their FHS packet (Global ID and clock offset),
providing the inquiring radio with a list of Bluetooth radi
os in the area.

To form a piconet, a Bluetooth radio will page another radio with its Global ID
(obtained by a previous inquiry). The paged radio will respond with its Global ID,
and the master radio passes the paged radio an FHS packet. The paged radio
hen loads the paging radio's Global ID and clock offset, thus joining the master's

On joining the piconet, it is assigned a 3
bit Active Member Address (AMA)
allowing other radios on the piconet to address it. Once the piconet has eight
radios act
ive, any more radios are assigned an 8
bit Passive Member Address
(PMA) and put in “Park” mode. Any free AMA can be assigned to another radio
wishing to join the piconet. This combination of AMA and PMA allows over 256
radios to actively reside on a picone
t although only the eight radios with the
AMAs can actively transfer data.




Figure 1: Bluetooth state diagram : Setup of Piconet. [1]

Figure 1 shows the state transition diagram for nodes in a piconet as depicted in
[1]. Every node as explained starts w
ith a listen in Standby mode. A master
switches to inquiry mode when it has to find radios nearby. I hops around 32
freqeuncy bands and searches for a slave. Slaves respond with their hopping
pattern after a delay of 2 slots. Slaves listen for about 10ms o
n a channel every
1.25sec. The master hops on 16 channels(based on its estimate of clock offset)
and hopes to receive response from the slave. On successful response a slave is
added to the network. Once the ID and the FHS pattern is known for a slave the
communication can begin. In page mode the master checks if the slave is alive. If
alive it connects to the slave and can transfer data.

The parked/passive nodes can be in Park, Sniff, Hold mode. In park mode they
communicate with the master using beacon si
gnals. In sniff mode the slaves can
send data if a channel is free on an interval(used with devices like keyboards). In
Hold mode the radio wakes up at given interval but no data is transferred. A radio
in parked mode can get an active address if another c
ommunicating node

With this information about piconet we simulate the Bluetooth network using
simjava[3]. Simjava is chosen over others as it is built on Java and can be easily
integrated with other java tools. Also creating applets and shari
ng the
results/simulation is inbuilt in simjava.




We further present the state diagram of the simulation and attach a copy of the
results and simulation source code. The state diagram shown here is a little
modified version of the state diagram seen in lit
erature and would help
understand the simulation constraints and assumptions.

Figure 2: Master state diagram detail

Figure 3: Slave state diagram detail.

Some assumptions and simplification
s for the simulation are :


We assume a maximum of 16 nodes only

This helps us complete the
simulation in limited time.






Connect a
passive node

Add to active

Add to active list

Add to passive list


active list


Page nodes




Connected to









The node ID and the frequency that they respond to is the same.


We start the simulation from the Inquiry/inquiry scan state rather than

standby and return to those states instead of standby.


[1] James Kardach, “Bluetooth Architecture Overview”, Intel Technology Journal
Q2, 2000 (

[2] Dharma Agrawal and Qing
An Zeng, “Introduction to Wireless and Mobile
Systems”, Brooks/Cole (Thomson Learning) 2003, (Chapter 14)


Additional references:


[5] Bluet
ooth Primer