Piconet manager over Bluetooth - PowerPoint PPT Presentation

1 / 44
About This Presentation
Title:

Piconet manager over Bluetooth

Description:

Forwarding node in a peer-to-peer style network (Bluetooth Piconet) ... To make life easier in case you don't know the device address of ... – PowerPoint PPT presentation

Number of Views:214
Avg rating:3.0/5.0
Slides: 45
Provided by: cn11
Category:

less

Transcript and Presenter's Notes

Title: Piconet manager over Bluetooth


1
Piconet manager over Bluetooth
  • Students Names
  • Project Supervisor

Peri Eran Priscu Robert
Yoram Yihyie
Winter Semester 2003/4
2
(No Transcript)
3
Bluetooth Overview
Bluetooth - Chip technology enabling seamless
voice and data connections between a wide range
of devices through short-range digital two-way
radio. It is an open specification for
short-range communications of data and voice
between both mobile and stationary devices. For
instance, it specifies how mobile phones,
computers and PDAs interconnect with each other,
with computers, and with office or home phones.
(Web Definition)
Piconet - A network of devices connected in an ad
hoc fashion using Bluetooth technology. A piconet
is formed when at least two devices, such as a
portable PC and a cellular phone, connect. A
piconet can support up to eight devices. When a
piconet is formed, one device acts as the master
while the others act as slaves for the duration
of the piconet connection. A piconet is sometimes
called a PAN (Personal Area Network).
4
Bluetooth Overview
- Bluetooth Specification Protocol Stack
5
Bluetooth Overview
- The Bluetooth Radio
The Bluetooth radio accomplishes spectrum
spreading by frequency hopping in 79 hops
displaced by 1 MHz, starting at 2.402GHz and
finishing at 2.480GHz.
Power Classes  Each device is classified into 3
power classes, Power Class 1, 2 3.
Power Class 1 is designed for long range (100m)
devices, with a max output power of 20 dBm
Power Class 2 for ordinary range devices (10m)
devices, with a max output power of 4 dBm
Power Class 3 for short-range devices (10cm)
devices, with a max output power of 0 dBm
6
Bluetooth Overview
- The Physical Channel
Bluetooth operates in the 2.4 GHz ISM band. In
the US and Europe, a band of 83.5 MHz width is
available in this band, 79 RF channels spaced 1
MHz apart are defined.
The channel is represented by a pseudo-random
hopping sequence hopping through the 79. Two or
more Bluetooth devices using the same channel
form a piconet. There is one master and one or
more slave(s) in each piconet.
7
Bluetooth Overview
- Host Controller Interface (HCI)
The HCI provides a command interface to the
baseband controller and link manager, and access
to hardware status and control registers.
Essentially this interface provides a uniform
method of accessing the Bluetooth baseband
capabilities.
The HCI exists across 3 sections, the Host -
Transport Layer - Host Controller. Each of the
sections has a different role to play in the HCI
system. 
8
Bluetooth Overview
- Host Controller Interface (HCI)
HCI Firmware , is located on the Host Controller
, (e.g. the actual Bluetooth hardware device).
The HCI firmware implements the HCI Commands for
the Bluetooth hardware by accessing baseband
commands, link manager commands, hardware status
registers, control registers, and event
registers.
9
Bluetooth Overview
- Host Controller Interface (HCI)
HCI Driver , which is located on the Host (e.g.
software entity). The Host will receive
asynchronous notifications of HCI events, HCI
events are used for notifying the Host when
something occurs.
10
Bluetooth Overview
- Host Controller Interface (HCI)
The HCI Driver and Firmware communicate via the
Host Controller Transport Layer , i.e. a
definition of the several layers that may exist
between the HCI driver on the host system and the
HCI firmware in the Bluetooth hardware. These
intermediate layers, the Host Controller
Transport Layer, should provide the ability to
transfer data without intimate knowledge of the
data being transferred.
11
Bluetooth Overview
- Logical Link Control and Adaptation Protocol
The Logical Link Control and Adaptation Layer
Protocol (L2CAP) is layered over the Baseband
Protocol and resides in the data link layer.
L2CAP provides connection-oriented and
connectionless data services to upper layer
protocols with protocol multiplexing capability,
segmentation and reassembly operation, and group
abstractions.
L2CAP permits higher level protocols and
applications to transmit and receive L2CAP data
packets up to 64 kilobytes in length.
12
Bluetooth Overview
- RFCOMM Protocol
RFCOMM is a simple transport protocol, which
provides emulation of RS232 serial ports over the
L2CAP protocol.
The RFCOMM protocol supports up to 60
simultaneous connections between two BT devices.
The number of connections that can be used
simultaneously in a BT device is
implementation-specific. For the purposes of
RFCOMM, a complete communication path involves
two applications running on different devices
(the communication endpoints) with a
communication segment between them.
13
Bluetooth Overview
- Service Discovery Protocol (SDP)
The service discovery protocol (SDP) provides a
means for applications to discover which services
are available and to determine the
characteristics of those available services.
A specific Service Discovery protocol is needed
in the Bluetooth environment, as the set of
services that are available changes dynamically
based on the RF proximity of devices in motion,
qualitatively different from service discovery in
traditional network-based environments. The
service discovery protocol defined in the
Bluetooth specification is intended to address
the unique characteristics of the Bluetooth
environment.
SDP is a simple protocol with minimal
requirements on the underlying transport. It can
function over a reliable packet transport (or
even unreliable, if the client implements
timeouts and repeats requests as necessary).
14
Bluetooth Overview
- Bluetooth - Profiles
The profiles have been developed in order to
describe how implementations of user models are
to be accomplished. The user models describe a
number of user scenarios where Bluetooth performs
the radio transmission. A profile can be
described as a vertical slice through the
protocol stack. It defines options in each
protocol that are mandatory for the profile. It
also defines parameter ranges for each protocol.
The profile concept is used to decrease the risk
of interoperability problems between different
manufacturers' products.    
There are 13 "profiles" described in version 1.1
of the specification. These profiles are general
behaviors through which Bluetooth units
communicate with other units. The 13 profiles
described here constitute the basis for the user
models and their profiles. The profiles also
provide the foundation for future user models and
profiles.
15
Bluetooth Overview
- Service Discovery Application Profile (SDAP)
Generic Access Profile (GAP)
Dial-up Networking Profile
File Transfer Profile
Synchronisation Profile
Serial Port Profile
Generic Object Exchange Profile (GOEP)
LAN Access Profile
Headset Profile
Object Push Profile
Cordless Telephony Profile
16
Hardware Overview
The desktop computers we used in the Computer
Networks Lab were Inter Pentium 4 based running
at 2 GHz with 512 MB of ram. All the machines
were double boot machines preinstalled with both
Windows XP Professional and various versions and
distributions of Linux Operating System
17
Hardware Overview
In our various testing we used a couple of iPAQ's
3870. Those machines feature a StrongArm CPU
running at 206 MHz, 64 MB of RAM memory, SD
memory expansion slot and built-in Bluetooth
transceiver. This model is equipped with the
Microsoft 2002 Pocket PC Operating System.
18
Our Work Project Objectives
Set up the project we based on, and make it work
on RedHat 9.
Automation of all the resources distribution of
the piconet (IP handling, automated login and
logoff ect.). This goal was not fully achieved.
We have, however, managed to provide with a
semi- automated IP distributing system.
Build an automated/semi-automated pairing
mechanism on a Linux machine. Already
implemented in the hardcore of the utility we
used (BlueZ-pan).
Transferring messages from the Master to the
Slave and form Slave to Slave via the Master
(Demo) this goal was not achived because we
had to rebuild the whole network, so this goal
got out of our scope.
19
Previous Project we based on - Objectives
Design a Bluetooth based Personl Information
Kiosk System (PIKS) on a wireless network of
PDAs, and then implement it using Compaq iPaq
3870 with integrated Bluetooth and point to
multipoint Bluetooth devices.
Implement a PIKS using the BlueZ stack on a PC
(with Ericsson's devices) and the iPaqs.
Linux based server will use the BlueZ stack to
discover clients and communicate.
20
Previous Project we based on - Testing
The implementation they used was based on RFCOMMd
(RFCOMM deamon) which was incorporated into the
RFCOMM module, and was no longer available as a
stand-alone deamon. All this led to the
conclusion that their script was no longer
suitable for newer versions of BlueZ.
We were successful in connecting the iPAQ 3870 or
the other linux machine, but we could not
connect them both simultaneously, nor could we
connect two iPAQ's.
it seemed that the system could not establish
more then one IP connection
The single connection problem was in fact a part
of their Implementation
gt ppp "noauth 192.168.0.1192.168.0.2"
21
Our Solution - Overview
While we were studding the problem and looking
for a way to establish multilink PPP connection
using the basic agenda of our predecessors, we
found an article witch explains thoroughly how
to implement a PAN (Private Area Network) over
BlueZ.
Implementing the new found solution meant
conceding the use of the iPAQ. The reason the
iPAQ's Windows OS inability in communicating
with the Linux's Bluetooth BlueZ stack,
specifically the iPAQ Bluetooth Manager lacked
support for the "PAN" profile we needed to
implement our solution
that PAN connection is possible if an iPAQ is
installed with a Linux OS. Lately, such a
project was completed in the Network Laboratory
at the Technion, and maybe someone will continue
our work in that direction
22
Upgrading the system
As a basic step in our work, we decided that all
work will be done on the latest available Linux
Red Hat Version, which at this point is version 9
23
Installing BlueZ
In our opinion the BlueZ package can be installed
during the installation of this Linux Version,
It is a part of the latest Kernels.
RPM is a powerful command line driven package
management system capable of installing,
uninstalling, verifying, querying, and updating
computer software packages USE THEM!
After upgrading the system, we tried to run the
previous project on the new system, we could not
succeed because the new implementation of the
RFCOMM lacked the RFCOMMd that was used in the
former solution.
We will use the new system to build a Private
Area Network using the BlueZ PAN Bluetooth
profile rather then the PPP over an emulated
serial port
24
PAN profile overview
The Bluetooth PAN feature offers (amongst other
features) IP support over Bluetooth (i.e.
L2CAP), comparable to Wireless LAN on a PC more
or less. Participants in a BlueZ PAN can take on
the following roles
PAN user (PANU) Client of a NAP or client-type
member of a GN
Group ad-hoc Network (GN) controller
Forwarding node in a peer-to-peer style network
(Bluetooth Piconet)
Interconnects up to 7 (active) PANUs to a real
peer-to-peer network
25
PAN profile overview
The Bluetooth PAN feature offers (amongst other
features) IP support over Bluetooth (i.e.
L2CAP), comparable to Wireless LAN on a PC more
or less. Participants in a BlueZ PAN can take on
the following roles
Network Access Point (NAP)
Acts as proxy, router or bridge between an
existing network infrastructure (typically LAN)
and (up to 7 active) wireless clients (PANUs)
26
PAN profile overview
  • WAN Wide Area Network.
  • LAN Local Area Network.
  • NAP Network access point.
  • PAN - Personal Area Network
  • PANU Personal Area Network Unit.

MASTER
WAN
Lan interface
NAP
SLAVES
Panu
Panu
Panu
Panu
27
PAN general setup
Now you have to add this lines to
/etc/modules.conf
alias net-pf-31 bluez alias bt-proto-0
l2cap alias bt-proto-2 sco alias bt-proto-4
bnep alias tty-ldisc-15 hci_uart alias bt-proto-3
rfcomm
Not on Mandrake 10
Now Activate the Bluetooth
gt service Bluetooth start
28
PAN general setup
To make use of the PAN functionality of BlueZ, it
is necessary to install or build a few BlueZ
packages see the project book for the details.
In order to verify the right working of the
Bluetooth hardware we will use the hciconfig
utility
gt hciconfig
hci0 Type USB BD Address
0003C9230423 ACL MTU 37710 SCO MTU 160
UP RUNNING PSCAN ISCAN RX bytes69
acl0 sco0 events8 errors0 TX bytes30
acl0 sco0 commands8 errors0
29
PAN ? SDP
The Bluetooth 'Service Discovery Protocol' may be
used within 'pand' to register GN or NAP as
SDP-searchable services.
To use SDP
Make sure that the SDP daemon ('sdpd') is
running
SDP is activated with 'pand' when 'pand' is
started as GN or NAP
gt pand --listen --role ltGN NAPgt --sdp
An explicit connection between PANU and GN or NAP
is also possible
gt pand --connect ltdestination BT device addressgt
--service ltGN NAPgt
30
PAN Search Functionality
To make life easier in case you don't know the
device address of your desired communication
partner, the optional parameter --search'
allows you to search for PAN communication
partners
gt pand --role PANU --search duration
Using SDP, the search can pe performed
selectively
gt pand --role PANU --search --service NAP --sdp
31
PAN Interfaces
During connection establishment, a virtual
network interface 'bnep0' is created on both
nodes. This interface can be configured using
'ifconfig
gt ifconfig bnep0 10.0.0.1
On the PANU creates a private IP network in the
10.x.x.x address range. Now it should be
possible that the nodes ping each other!
32
PAN Interfaces
The Linux "hotplug" mechanism that claims
responsible for IP address assignment (static
address or DHCP) for classic Ethernet adapters
can do the same job for our PAN as well
For static addresses, 'ifcfg-bnep0' could look
like follows
DEVICEbnep0 BOOTPROTOstatic IPADDR10.0.0.1
NETMASK255.0.0.0 ONBOOTno
For DHCP , 'ifcfg-bnep0' could look like follows
DEVICEbnep0 BOOTPROTODHCP ONBOOTno
33
PAN Interfaces
The file 'ifcfg-bnep0' itself is processed
whenever 'bnep0' is created. The 'bnepX' network
interfaces ('bnep0' is the first of them) are
created (and deleted) in a fully dynamic way.
At this point, we have a Bluetooth connection
active between too computers, we have IP address
and ping capabilities !
34
Now What?
Now we wanted to connect one of the computers to
the Ethernet via the Bluetooth connection
35
802.1d Ethernet Bridging
"802.1d Ethernet Bridging" is a component of the
2.4.x Linux kernel. The initial idea of this
feature is to tie separate layer 2 networks
together into one new network. For BlueZ PANs,
however, we "only" make use of its ability to
combine separate network interfaces into a (one)
new one.
The bridge kernel module, however, requires an
additional control SW package, called "bridge
utils", which most likely is not part of your
Linux distribution.
See project book for detailed information
36
802.1d Ethernet Bridging
After having a working 'brctl' program. To create
a PAN bridge on the GN, enter
gt brctl addbr pan0 gt ifconfig pan0 10.0.0.1
The 'pan0' interface now is the unique interface
to proxy any subsequently created 'bnepX'
interface.
To create a NAP, add the interface of the
"infrastructure" network (typically 'eth0') to
the bridge
gt brctl addif pan0 eth0
37
802.1d Ethernet Bridging
Once the bridge port 'bnep0' (or any further port
'bnepX') has been created on the GN, just add it
gt brctl addif pan0 bnep0 gt ifconfig bnep0 0.0.0.0
Here is where our problems began
38
The routing tables
The main idea change (manually) the machines
routing table in order to direct the packages to
and from the correct machine
gt route del default gt route add default gw
10.0.0.1
After configuring the 'bnepX' network interfaces
on the different machines, we have established a
private network over the 10.0.0.x IP address
range.
10.0.0.1
Master
Slave
10.0.0.2
Slave
10.0.0.3
Slave
10.0.0.4
39
The routing tables
In order to establish an Internet gateway we need
to configure a few additional things
We have to set up a Network Address Translation
(NAT) for all the packages leaving eth0 on the
master Linux machine
Enable IP forwarding on the master
40
Our system

External Lan gateway - 132.68.52.59
10.0.0.1
Master
Slave
10.0.0.2
Slave
10.0.0.3
Slave
10.0.0.4
41
Conclusions
It is evident that this technology is still in
its early stages of adoption in the Linux
environment
Although a lot of material can be found on the
web, there is no centralized authority that can
standardize and give coherent documentation and
support for Bluetooth
Even when working by the book, there are a lot of
things that don't work as they should or dont
work seamlessly, for example
Bluetooth modules that we used had to be hard
rested after every connection loss.
we experienced spontaneous connection loss
without any reason.
However
42
Conclusions cont.
We proved that creating an IP network using
Bluetooth piconet is possible and feasible with
today's means
Bluetooth based network will not have any
advantages over the very common and fast
developing wireless networks based on the "WiFi"
standard
But in some cases, Bluetooth networks will have
advantages, for example
in an environment already equipped with Bluetooth
devises it could save the cost of deploying a
second wireless network
it is possible to transform information based on
IP between devices that are equipped with a
Bluetooth transceiver but not with WiFi like
some phones or PDA's
We have learned a grate deal about the new and
fascinating Bluetooth technology and various
aspects of the Linux OS through this project
43
What's next?
We strongly encourage other teams to continue our
work in various directions
Improve the network stability
Connect various devices to the piconet
Develop a client-server application over IP for
controlling peripheral devices such as robots
Controlling various devices over the web
And many more
44
Thanks
We would like to thank the Network Lab staff for
its tremendous help throughout this project,
special thanks to
Yoram Yihyie
Hai
Yoram Or-Chen
Vlad
And all the others
Write a Comment
User Comments (0)
About PowerShow.com