Simulation of Bluetooth Environment

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

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

96 εμφανίσεις


-

1

-

Simulation of Bluetooth Environment

Introduction to Wireless and Mobile Systems

Sudhindra Rao

03/11/04

Abstract

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


Interfer
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
with
retransmissions)


which is very critical with devices like mouse/keyboard.



Continuous variable slope data(CVSD) for voice communication


can
help withstand high error rates.



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



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


-

2

-

Bluetooth devices form quick ad
-
hoc "piconet"’’s and communicate among the
connected devices. Use of radio technology ensures there ar
e no line
-
of
-
sight
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
t
hen loads the paging radio's Global ID and clock offset, thus joining the master's
piconet.

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.


-

3

-


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
disconnects.


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.



-

4

-

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 :

1.

We assume a maximum of 16 nodes only


This helps us complete the
simulation in limited time.

Inquiry

Transfer

Page

Connected

Beacons

Connect a
passive node

Add to active
list

Add to active list

Add to passive list

Transfer
data

Remove
from
active list

Inquiry
Scan

Page nodes

Page

Scan

Communicate

Connected to
master

Park/Hold

Passive
mode
connection

Become
active

Disconnected


-

5

-

2.

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

3.

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

standby and return to those states instead of standby.



References:

[1] James Kardach, “Bluetooth Architecture Overview”, Intel Technology Journal
Q2, 2000 (
http://www.intel.co
m/technology/itj/q22000/articles/art_1.htm
)

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

[3]Simjava
http:/
/www.dcs.ed.ac.uk/home/hase/simjava/


Additional references:

[4]
http://www.ensc.sfu.ca/~ljilja/cnl/presentations/jeffrey/btpresentation/index.htm

[5] Bluet
ooth Primer
http://www.holtmann.org/lecture/bluetooth/bt_primer.pdf

[6]Palowireless.com
http://www.palowireless.com/infotooth/glossary.asp#Paging%20Procedure