Documents
Resources
Learning Center
Upload
Plans & pricing Sign in
Sign Out

Design and implementation of Blu

VIEWS: 8 PAGES: 33

									 Design and Implementation of a Bluetooth Based Kiosk System   Yahav Bar yosef
                                                               Tsachi Nissim

                   Technion - Computer Networks Lab

Design and Implementation of a Bluetooth Based
                Kiosk System
                   Part II



                            Final Report




 Tsachi Nissim      33072281
 Yahav Bar yosef    33968553

 Supervisor : Gil Zussman
Design and Implementation of a Bluetooth Based Kiosk System                                                                              Yahav Bar yosef
                                                                                                                                         Tsachi Nissim


Table of contents
1. INTRODUCTION ................................................................................................... 5

1.1. Project objectives ...........................................................................................................................................5

1.2. Part I overview ...............................................................................................................................................5

1.3. Part I Future goals.........................................................................................................................................5


2. CHOOSING THE PROTOCOL .............................................................................. 6

3. BLUEZ ................................................................................................................... 7

3.1 What is BlueZ .................................................................................................................................................7

3.2 BlueZ features .................................................................................................................................................7

3.3 BlueZ structure ...............................................................................................................................................7

3.4 BlueZ packages ...............................................................................................................................................8

       Bluez_libs .....................................................................................................................................................8

       Bluez_utils....................................................................................................................................................8

       Bluez_fw – Firm Ware ................................................................................................................................8

       SDP – service discovery protocol ...............................................................................................................8

       PAN – Personale Area Networking ...........................................................................................................8

       DUN – Dial Up Networking........................................................................................................................8

       Hci_emu – Device Emulator.......................................................................................................................8

       Hci_dump – HCI level event monitor ........................................................................................................8

3.4 BlueZ modules and Daemons ........................................................................................................................8

3.4 Establish a connection ..................................................................................................................................12


4. LAP - LAN ACCESS PROFILE ........................................................................... 13
    PPP Operation..................................................................................................................................................16
    Service Discovery ............................................................................................................................................18


5. IMPLEMENTATION ............................................................................................. 19

6. PROXY ARP ........................................................................................................ 20

7. INSTALLATION AND CONFIGURATION SCENARIO- STEP BY STEP ........... 21
Design and Implementation of a Bluetooth Based Kiosk System                                                                            Yahav Bar yosef
                                                                                                                                       Tsachi Nissim

8. REFERENCES AND SOURCES ......................................................................... 22

9. APPENDIX........................................................................................................... 23

Devices and Technologies ...................................................................................................................................23
  Compaq iPack PDA .........................................................................................................................................23
  Overview .........................................................................................................................................................23
  Specifications...................................................................................................................................................24




                                                                                 4
Design and Implementation of a Bluetooth Based Kiosk System                  Yahav Bar yosef
                                                                             Tsachi Nissim




1. Introduction

 1.1. Project objectives

 The project objectives are:
    Design a Bluetooth based Personl Information Kiosk System (PIKS) on a wireless
       network of PDA’s, 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 Eriksson's devices) and the iPaqs.
       Linux based server will use the Bluez stack to discover clients and communicate.



 1.2. Part I overview

In the first part of the project, we learned the Bluetooth and PIKS theory and experimented with
the iPaq 3870 – checking its capabilities.
The process of learning the PIKS theory involved in developing an application in Java which
uses XML to transfer screens of data from the PIKS server to the clients. The screens contained
buttons and text, and was designed to be as simple as possible. We used a PDA emulator which
provided a PALM like environment to the client application. After we finished learning and
experimenting with the emulator, we started working with the iPaq PDAs which didn’t support
applications we used so far. We had to find a programming environment which would allow us
to develop and install the application on the iPaq.
Seeking a suitable programming environment, we came across the Visual Embedded Tools –
which allowed us to develop several applications for iPaq, but it didn’t supply us with a way to
use the Bluetooth capabilities of the iPaq. We run some simulations over virtual COM port over
RFCOMM, supplied by the iPaq’s Bluetooth Manager. Several performance tests were done
after which we concluded that the range for operating the devices is around 50-100 meters in an
open space. Having difficulties finding a suitable and accessible stack we decided to try another
mean of communication.


 1.3. Part I Future goals

The end of the first part presented us with several future goals – there were some issues we
couldn’t solve mainly due to difficulties we had.

      Find a way to overcome the SDP problem between iPaq and Ericsson devices - the
       iPaq devices couldn’t discover the Ericsson devices.
      Implement a system based on the principle of service proposals without polling
       mechanisms, e.g., a client is provided with the information automatically when
       passing near a PIKS AP.
      Implement a system based on wireless LAN and compare it with the one
       implemented with Bluetooth.



                                              5
Design and Implementation of a Bluetooth Based Kiosk System                 Yahav Bar yosef
                                                                            Tsachi Nissim

We came into a crossroad – Find the best way to connect the clients to the Access Point. The
Ericsson devices which supported multipoint connections had to communicate with the CSR
chips installed in the iPaqs and we didn’t have a suitable stack at hand. At this point we
searched for a Bluetooth stack implementation with an open source which will allow us to
develop our server application and adapt the stack configuration to fit both hardwares.



1.4. Motivation

There are many places were the need to quick and focused information emerges, and you don't
always have time to stand in lines or go and look for the info center.
Examples for these places are malls, airports, universities, companies, theme parks and so on.
Imagine yourself in the airport: You have just arrived, and you need to catch your flight.
Instead of standing in lines you take out your PDA and in several seconds, using the PIKS
system, you get the exact time of your departure, the departure gate and you are all set to go.
The PIKS will allow replacement of many existing services providing better quality of service.
In the second part of the project our main goal is implementation of this system on the iPaqs.




2. Choosing the Protocol
2.1. The two options we had

We had to choose between two options. The first was to use Wireless LAN expansion cards
which would be installed on the iPaqs, and use the Wireless LAN Access Point provided along.
This solution has the following advantage. The Wireless LAN expansion cards are easy to install
and operate, they have a full stack that can be installed on the iPaqs and with the appropriate
development tool (Visual Embedded) – applications could be developed and run on the devices
quite quickly and easily. The main disadvantage was that these kinds of projects are already
implemented, and there is no real challenge in doing it again.
The other solution was using Bluetooth with the BlueZ stack implementation. The main reason
for choosing this technology was that it is more innovative and there are no known
implementations of projects of this kind. The disadvantage is that there is no guarantee that it
would work: BlueZ is developed as freeware, it has poor documentation and examples, and the
development environment (Linux) is new to us.


2.2 The decision

We decided to choose the Bluetooth technology mainly due to reasons mentioned above. Other
reasons were to exploit the existing Bluetooth capability of the iPaq. As the iPaq has an
integrated Bluetooth chip – it would be more intuitive to use it. Saving power and money was
also an important factor – no need to use external hardware (WLAN card, expansion pack and
Access Point) that uses much more power than a Bluetooth chip.




                                              6
Design and Implementation of a Bluetooth Based Kiosk System                  Yahav Bar yosef
                                                                             Tsachi Nissim

A major factor was to open the way for future works on IP over Bluetooth Stack, supplying the
infrastructure for future projects.
The complete comparison between the two technologies can be found in part I of the project.



3. BlueZ

3.1 What is BlueZ

BlueZ is the official Linux Bluetooth protocol stack. It provides support for core Bluetooth
layers and protocols. It is an Open Source project distributed under GNU General Public
License (GPL). BlueZ kernel is part of the official Linux kernel since version 2.4.6.


3.2 BlueZ features

   BlueZ features consist of a flexible, efficient and modular architecture, support for
   multiple Bluetooth devices, multithreaded data processing, hardware abstraction,
   standard socket interface to all layers. Currently BlueZ consists of:
    - BlueZ Core
    - HCI UART, USB, PCMCIA and Virtual HCI drivers
    - L2CAP protocol module
    - RFCOMM protocol module
    - BNEP protocol module
    - SCO module
    - Configuration and testing utilities



3.3 BlueZ structure




                                              7
Design and Implementation of a Bluetooth Based Kiosk System                 Yahav Bar yosef
                                                                            Tsachi Nissim




3.4 BlueZ packages


      Bluez_libs

      Bluez_utils

      Bluez_fw – Firm Ware

      SDP – service discovery protocol

      PAN – Personale Area Networking

      DUN – Dial Up Networking

      Hci_emu – Device Emulator

      Hci_dump – HCI level event monitor



3.4 BlueZ modules and Daemons

HCI - Host Controller Interface

The HCI provides an abstraction standard to interface the Bluetooth hardware, dictating the
operations which the core Bluetooth stack should carry out at the interface to the hardware
specific driver. Essentially this interface provides a uniform method of accessing the
Bluetooth baseband capabilities.


                                              8
Design and Implementation of a Bluetooth Based Kiosk System                    Yahav Bar yosef
                                                                               Tsachi Nissim




The HCI Daemon

The HCI Daemon provides access to the HCI layer. Its main utilities are:

hciconfig - HCI device configuration utility which can be operated with the following
parameters:
       hciconfig hciX [up Open and initialize HCI device
       down Close HCI device
       reset Reset HCI device
       rstat] Reset stat conters
       auth Enable Authentication
       noauth Disable Authentication
       encrypt Enable Encryption
       noencrypt Disable Encryption
       piscan Set page scan and inquiry scan mode
       noscan Disable scan modes
       iscan Set inquiry scan mode only
       pscan Set page scan mode only
       inq [length] Inquiry of devices
       ptype [type] Set packet type
       lm [mode] Get/Set default link mode
       lp [policy] Get/Set default link policy
       conn Show active connections
       features Show features
       name [name] Get/Set local name
       class [class] Get/Set class of device
       version Display version information

hciattach - HCI UART driver initialization utility - a simple utility that initializes a given
serial port.


                                                9
Design and Implementation of a Bluetooth Based Kiosk System               Yahav Bar yosef
                                                                          Tsachi Nissim


hcitool - Generic writing and monitoring to the HCI interface




L2CAP

The L2CAP layer is based around the concept of channels. Each one of the end-points of an
L2CAP channel is referred to by a channel identifier. Channel identifiers (CIDs) are local
names representing a logical channel end-point on the device. Implementations are free to
manage the CIDs in a manner best suited for that particular implementation, with the
provision that the same CID is not reused as a local L2CAP channel endpoint for multiple
simultaneous L2CAP channels between a local device and some remote device.

The following utilities are available for the L2CAP layer:

l2ping - L2CAP ping

l2test - L2CAP testing




                                              10
Design and Implementation of a Bluetooth Based Kiosk System                   Yahav Bar yosef
                                                                              Tsachi Nissim


SDP


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). SDP uses a request/response model where each
transaction consists of one request protocol data unit (PDU) and one response PDU.
However, the requests may potentially be pipelined and responses may potentially be
returned out of order. SDP uses a request/response model where each transaction consists of
one request protocol data unit (PDU) and one response PDU. In the case where SDP is used
with the Bluetooth L2CAP transport protocol, only one SDP request PDU per connection to a
given SDP server may be outstanding at a given instant. In other words, a client must receive
a response to each request before issuing another request on the same L2CAP connection.
Limiting SDP to sending one unacknowledged request PDU provides a simple form of flow
control.




SDP Daemon

Server Daemon that listens on L2CAP and UNIX sockets. It should respond on incoming SDP
queries, maintain SDP database, allow record registration via UNIX socket, etc.


The following utilities are available through the SDP daemon:

sdptool ADD




RFCOMM

RFCOMM is a simple transport protocol, which provides emulation of RS232 serial ports
over the L2CAP protocol.The protocol is based on the ETSI standard TS 07.10. Only a
subset of the TS 07.10 standard is used and an RFCOMM - specific extension is added, in the
form of a mandatory credit based flow control scheme. 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.


RFCOMM Daemon




                                              11
Design and Implementation of a Bluetooth Based Kiosk System                 Yahav Bar yosef
                                                                            Tsachi Nissim

The rfcommd, provides the RFCOMM service. It listens for RFCOMM requests and then
establishes the serial connection and hands it to a program such as pppd.


The following utilities are available through the RFCOMM daemon:

rfcomm bind : allows binding a RFCOMM serial port, e.g., “/dev/rfcomm0” to a particular
Bluetooth device.


PPP

PPP is the IETF Point-to-Point Protocol. PPP-Networking is the means of taking IP packets
to/from the PPP layer and placing them onto the LAN.



PPP Daemon

The PPP daemon - pppd - is the program that makes the PPP connection. PPP daemon manages
the dialing process (often using a separate program) and then negotiates the connection with your
ISP. The negotiation process includes a set of steps, using a set of protocols such as LCP (Link
Control Protocol), authentication protocols, NCP (Network Control Protocol) and IPCP (Internet
Protocol Control Protocol).



3.4 Establish a connection

There are several ways to establish a connection between the PDAs and the Server (e.g.
PAN, DUN). We chose LAP which use PPP/RFCOMM. The reason for choosing this
scenario is because it seemed to be stable, relatively simple and well understood.




                                             12
Design and Implementation of a Bluetooth Based Kiosk System                  Yahav Bar yosef
                                                                             Tsachi Nissim

4. LAP - LAN Access Profile
The LAN Access Profile for Bluetooth devices consists of 2 parts. Firstly, this profile defines
how Bluetooth-enabled devices can access the services of a LAN using PPP. Secondly, this
profile shows how the same PPP mechanisms are used to form a network consisting of two
Bluetooth-enabled devices.

Scope
  This profile defines how PPP networking is supported in the following situations.

       LAN Access for a single Bluetooth device.
       LAN Access for multiple Bluetooth devices.
       PC to PC (using PPP networking over serial cable emulation).



Protocol Stack & Entities Used

PPP is the IETF Point-to-Point Protocol. PPP-Networking is the means of taking IP packets
to/from the PPP layer and placing them onto the LAN. This mechanism is not defined by this
profile but is a well-understood feature of Remote Access Server products.



Roles/Configurations
Two roles are defined for bluetooth devices in this profile, LAN Access Point (LAP) and
Data Terminal (DT):

LAN Access Point (LAP) – This is the Bluetooth device that provides access to a LAN (e.g.
Ethernet, Token Ring, Fiber Channel, Cable Modem, Firewire, USB, Home Networking).
The LAP provides the services of a PPP Server. The PPP connection is carried over
RFCOMM. RFCOMM is used to transport the PPP packets and it can also be used for flow
control of the PPP data stream. In our case, the LAP is a PC running Linux, with an Ericsson
Bluetooth dongle connected via USB.

Data Terminal (DT) - This is the device that uses the services of the LAP. Typical devices
acting as data terminals are laptops, notebooks, desktop PCs and PDAs. The DT is a PPP
client. It forms a PPP connection with a LAP in order to gain access to a LAN. In our case,
the DT is the iPaq PDA. This profile assumes that the LAP and the DT each have a single
Bluetooth radio unit.




                                              13
Design and Implementation of a Bluetooth Based Kiosk System                   Yahav Bar yosef
                                                                              Tsachi Nissim

Profile Scenarios
Three scenarios are covered by this profile:

      LAN Access by a Single PC: In this scenario a single DT uses a LAP as a wireless
       means for connecting to a Local Area Network (LAN). Once connected, the DT will
       operate as if it were connected to the LAN via dial-up networking. The DT can access
       all of the services provided by the LAN.
      LAN Access by Multiple DTs: Here, multiple DTs use a LAP as a wireless means for
       connecting to a Local Area Network (LAN). Once connected, the DTs will operate as
       if they were connected to the LAN via dial-up networking. The DTs can access all of
       the services provided by the LAN. The DTs can also communicate with each other
       via the LAP.

      PC to PC Connection:. This is where two Bluetooth devices can form a single
       connection with each other. This scenario is similar to a direct cable connection
       commonly used to connect two PCs. In this scenario, one of the devices will take the
       role of a LAP, the other will be a DT.

We implemented the first and second scenarios using BlueZ stack.



Profile Operation/Fundamentals
The following is a brief summary of the interactions between a DT and a LAP. Subsequent
sections in the profile provide more detail for each of the following steps.

1: The first step is to find a LAP that is within radio range and is providing a
PPP/RFCOMM/L2CAP service. For example, the DT user could use some application to
find and select a suitable LAP. The iPaq, for instance, uses its SDP service to discover the
PC.

2: If there is no existing baseband physical link, then the DT requests a baseband physical
link with the selected LAP. At some point after the physical link establishment, the devices
perform mutual authentication. Each device insists that encryption is used on the link. We
disabled the authentication part of the connection just to make things quicker and easier.

3: The DT establishes a PPP/RFCOMM/L2CAP connection. The iPaq – after discovering
the LAP – connects to this service simply by tapping on the LAP icon.

4: Optionally, the LAP may use some appropriate PPP authentication mechanism. For
example, the LAP may challenge the DT’s user to authenticate himself or herself; the DT
must then supply a username and password. If these mechanisms are used and the DT fails to
authenticate itself, then the PPP link will be dropped. Again, this mechanism was disabled in
our implementation.

5: Using the appropriate PPP mechanisms, a suitable IP address is negotiated between the
LAP and the DT. The LAP gives the DT an IP which it can use.


                                               14
Design and Implementation of a Bluetooth Based Kiosk System                 Yahav Bar yosef
                                                                            Tsachi Nissim

6: IP traffic can now flow across the PPP connection.

7: At any time the DT or the LAP may terminate the PPP connection.



Initialization: LAN Access Point (LAP) Service

This procedure initiates the configuration of the device as a LAP. This operation involves
setting the following parameters:

      All the configurable parameters, (For example, maximum number of users,
       discoverability mode, etc.) – all of this configurations are accessible through a
       number of “.conf” files. Each daemon has its own conf file.
      The required Bluetooth PINs and/or link keys.
      Any appropriate PPP configuration options (e.g. authentication, compression) can be
       configured. In order to ensure interoperability, a LAP shall not require connecting
       DTs to perform any PPP authentication, until the LAP administrator has configured
       PPP authentication.

  When initialization is complete, the device will be able to accept PPP connections.



Establish LAN Connection
Normally the DT will initiate the establishment of a connection to the LAN, for example, a
user will walk into an airport and approach the Access Point (LAP) to get some data.

Step One:

       The first step is to select a LAP and a suitable PPP/RFCOMM service that it provides.
       This selection may be done in one of the following ways:

      The DT user is presented with a list of LAPs that are within radio range, and the
       services that they provide. The user can then select a LAP/service from the list
       provided.
      The DT user is presented with a list of services that are being provided by the LAPs
       that are within radio range. Where the same service is provided by multiple LAPs (i.e.
       identical ServiceClass-IDs), the application may choose to show the service only
       once. The user can then select a service from the list provided. The DT will
       automatically select a suitable LAP that provides the selected service.
      The DT user enters the name of the service that is required. The DT will
       automatically select a suitable LAP that provides the required service.
      Some application on the DT automatically searches for and selects a suitable
       LAP/service.

       Whatever means is used, the result of the selection process must be a LAP that is
       within radio range and a PPP/RF



                                             15
Design and Implementation of a Bluetooth Based Kiosk System                  Yahav Bar yosef
                                                                             Tsachi Nissim

Step Two (Optional):

       The DT user (or application) is allowed to enter a Bluetooth Authentication PIN or
       link key supplied by the application.

Step Three (Optional):

       The DT user (or application) is allowed to enter a username and password for PPP
       authentication.

Step Four:

       When the user (or application) activates the connection, then a PPP application is
       started, to attempt to establish a connection to the selected access point/service.



Disconnect LAN Connection
  Either the LAP or the DT may terminate the LAN Connection at any time



Shutdown: LAN Access Point (LAP) Service
This procedure stops the device from acting as a LAP.

      The PPP Server is shutdown
      Optionally, a product may take steps to prevent unauthorised Bluetooth access at a
       later time by deleting some of the stored link keys.



PPP Operation
   PPP/RFCOMM operation in this profile is similar to PPP operation in normal dial-up
networking, except that this profile omits the use of AT commands; PPP starts as soon as the
RFCOMM link is established. By contrast, in dial-up net-working, AT commands are used to
establish the link, then PPP starts communicating.

Initialize PPP
  On the LAP, the existence of a PPP Server shall be registered in the Service Discovery
Database. A device in the DT role does not register PPP in the Service Discovery Database.
However, it is possible for a device to be both a LAP and a DT; therefore the device could
register PPP in the Service Discovery Database as defined above.




                                             16
Design and Implementation of a Bluetooth Based Kiosk System                  Yahav Bar yosef
                                                                             Tsachi Nissim

   PPP is a packet-oriented protocol, whereas RFCOMM expects serial data streams.
Therefore, the PPP layer must use the serialization mechanisms such as those defined in 'PPP
in HDLC framing'



Establish PPP Connection

   If there is no existing RFCOMM session between the LAP and the DT, then the device
initiating the PPP connection shall first initialise RFCOMM. The device obtains the
RFCOMM Server channel to use from the service information it discovered earlier.

  Using the Link Control Protocol (LCP), the LAP and DT negotiate a PPP

   Depending upon its capabilities and configuration, a LAP may have multiple PPP sessions
in operation simultaneously.



PPP Authentication Protocols
   Optionally, a LAP may be configured to use one or more of the PPP authentication
protocols. These protocols allow a network administrator to control access to the network.
The use of these PPP protocols does not form part of this profile. They are mentioned here
for information only.

PPP supports a number of authentication protocols including the following:

      PPP Challenge Handshake Authentication Protocol (CHAP)
      Microsoft PPP CHAP Extensions
      PPP Authentication
      PPP Extensible Authentication Protocol (EAP)



Disconnect PPP Connection
The following reasons will cause PPP to terminate the connection:

   1. User intervention.
   2. Failure of the RFCOMM/L2CAP connection. The RFCOMM/L2CAP connection
      may fail for several reasons. For example, when the radio link has failed or the device
      has been out of range for an excessive amount of time.
   3. Termination by the LAP, if the access point can no longer provide the appropriate
      service. The reasons that would cause this are very dependent on the implementation
      of the LAP, but they could include (a) detection of duplicate IP addresses, (b) loss of
      connection to the LAN, (c) loss of connectivity to the PPP Server, or (d) loss of
      connection to the required IP subnet.



                                             17
Design and Implementation of a Bluetooth Based Kiosk System                  Yahav Bar yosef
                                                                             Tsachi Nissim

   4. Some implementation-specific policy decision made by an application that is running
      on the LAP or the DT.

  When the PPP connection is terminated, either by user intervention or automatically by the
LAP, then the PPP layer takes the following steps:

   1. Gracefully terminate the IPCP connections. This will cause the IP interface to be
      disabled.
   2. Gracefully terminate the LCP connections,
   3. Disconnect the RFCOMM connection (as defined in Serial Port Profile)

   When the RFCOMM/L2CAP connection suddenly terminates, then the PPP layer takes the
following steps:

   1.   Terminate the IPCP connections. This will cause the IP interface to be disabled.
   2.   Terminate the LCP connections.



Service Discovery
  A LAP will be capable of providing one or more services for connecting to a LAN. For
example, different services could provide access to different IP subnets on the LAN. The
DT’s user must be able to choose which of the LAN access services he/she requires.

SDP Service Records

  Each LAP will provide one Service Class for PPP/RFCOMM services. A LAP may
contain multiple instances of this Service Class; e.g. access to multiple subnets. Where the
access point provides more than one PPP/RFCOMM service, the service selection is based
on service attributes. These services are made public via the SDP.




                                              18
Design and Implementation of a Bluetooth Based Kiosk System                   Yahav Bar yosef
                                                                              Tsachi Nissim

5. Implementation
Our first steps were to operate the Ericsson device on the HCI layer including configuration
of the HCI daemon with the appropriate parameters and running many tests and simulations
in order to get the unit to work properly. One of the utilities we used was the hcitool, which
provides scanning, configuring connections and sending arbitrary HCI commands to the
device.
We then continued to configure the SDP. As we decided to use the LAN Access Profile
(LAP), we had only to add it (without implementing it) as one of the services provided by
our server. From this point on, our Ericsson device published its service that could be
discovered by other Bluetooth devices.
The next stage was configuring the RFCOMM module, which will then provide a serial
connection to which will be used to build the PPP connection.
Another module that had been configured was the PPP module.



            Server side                                         Client side


            >HCID
            >SDPD
            >RFCOMMD

                                                       >SDP
           Listens for                                 >“connect to LAN AP”
         connections …


         PPPD starts


                                   ip/ppp
                                 established
     time




The above figure describes the steps needed to build the modules hierarchy: first we invoke
the HCI daemon which initializes the device. Then the SDP daemon which publishes the
services provided by the Ericsson unit (Server side). Then, the RFCOMM daemon which
listen for incoming connections, conducts a serial connection and invokes the PPP daemon.
On the client side, the SDP is used to discover the services of the server, and then an attempt
for connection is made. The PPP daemon provides two IPs per connection, an IP for the
Server and an IP for the client – this IP among other configurations such as DNS, is
configured in the “na” (Network Access) file which is located usually in /dev/ppp/peers/
directory.



                                               19
Design and Implementation of a Bluetooth Based Kiosk System                Yahav Bar yosef
                                                                           Tsachi Nissim

6. Proxy ARP

Proxy ARP (Address Resolution Protocol) - basically means that a particular machine will
respond to ARP requests for hosts other than itself. Using Proxy ARP with subnetting in
order to make a small network of machines visible on another Internet Protocol (IP) subnet.
This makes all the machines on the local network appear as if they are connected to the main
network, thus, saving some valuable IP addresses to the organization.
Motivation – The entire throughput of the established piconet already goes through the
Master unit (our Access Point), meaning a PDA can not access the network by it self due to
the nature of BT, so making the master unit PC a proxyarp is both intuitive and it saves the
use of real IP addresses




                       Proxyarp diagram

                           A                                  B



                                           LAN



                                                              A responds to ARP
                                                              requests for the BT
                                                              dongle with its MAC
        Bluetooth dongle



                               Wireless




                                             20
Design and Implementation of a Bluetooth Based Kiosk System                   Yahav Bar yosef
                                                                              Tsachi Nissim

7. Installation and configuration scenario- step by step

1. At first install the RedHat 9 OS (this version has BlueZ integrated in the OS).

2. Install the following packages:
     Sdp
     Libs
     Util

All can be found at bluez.sourceforge.net . A complete HOWTO can be also found in our
web site.

All the configuration files mentioned here can be found in the section “configuration files”

3. Edit configuration file for the HCI daemon, “hcid.conf”.
Edit configuration file for the RFCOMM daemon, “rfcommd.conf”.

4. Run the script: “create_dev”, this script creates devices for the Rfcomm layer.

5. Edit the configuration file: “modules.conf” found under “\etc\modules.conf”
You should add some aliases to BT components.

6. Configure the “na” file (network access) found under “\etc\ppp\peers\", see an example
Configuration files in the section “configuration files”. This file contains many network
configurations needed for the IP connection, e.g. IP addresses- for both the remote and local
unit, DNS address etc.

7. Compile the app “bluez_chat.c” found on the web site, make it an executable file and copy
it to “\etc\ppp\peers\”.

8. Run our pre-made super script “run” that will run all the tasks that need to be done with a
routine schedule.

All scripts, conf files, app, and examples needed may for you to run the project successfully
may be found too on our web site.




                                              21
Design and Implementation of a Bluetooth Based Kiosk System                Yahav Bar yosef
                                                                           Tsachi Nissim




8. References and Sources

   1.   http://bluez.sourceforge.net
   2.   Specification of the Bluetooth System v1.0B (December 1st 1999).
   3.   http://bluetooth.ericsson.se/bluetooth.
   4.   www.palowireless.com/infotooth




                                            22
Design and Implementation of a Bluetooth Based Kiosk System                Yahav Bar yosef
                                                                           Tsachi Nissim

9. APPENDIX

Devices and Technologies


Compaq iPack PDA




Overview

The iPAQ Pocket PC H3800 is not much bigger than a calculator and comes standard with
applications like Microsoft® Pocket Word™, Excel™, Outlook™, Internet Explorer™, and
Windows Media™ Player.


      Slim and Powerful - TFT screen with 65,000+ colors, increased battery life, fastest
       available processor in a sleek, award-winning design

      Wireless-enabled - Integrated Bluetooth for wireless link to Bluetooth phones,
       printers, and PCs.

      Expandable - Wireless Packs, Expansion Packs, internal SD memory slot; expand
       with anything from wireless to multimedia to GPS and more.

      Industry-leading handheld capabilities for enterprise- Ultra-mobile presentation
       tools, Voice Command and Control, iPAQ File Store, data encryption tool, Java
       virtual machine, and Pocket PC 2002




                                            23
Design and Implementation of a Bluetooth Based Kiosk System                          Yahav Bar yosef
                                                                                     Tsachi Nissim




Specifications
Processor           206 MHz Intel StrongARM SA-1110 32-bit RISC Processor


Memory              64-MB SDRAM, 32-MB Flash ROM Memory


Input Method        Handwriting recognition, soft keyboard, character
                    recognition, voice recorder, inking


Interfaces          Front Panel        5 buttons plus five-way joystick; (1 on/off
                    Buttons            and front light button and (2 to 5)
                                       customizable application buttons)
                    Navigator Button 1 Five-way joystick – up, down, left, right
                                     and push
                    Side Panel         1 – voice recorder
                    Recorder Button
                    Stylus Eject       1
                    Button
                    Active Bluetooth 1
                    Indicator
                    Directional Pad    1
                    Infrared Port      IrDA standard, 115 Kb per second
                    Speaker            1
                    Light Sensor       1
                    Microphone         1
                    Communications     Interface with USB/serial connectivity that
                    Port               connects to cradle or directly to PC via
                                       serial or USB cable
                    Stereo Audio       1 (standard 3.5 mm)
                    Output Jack


Cradle Interfaces   Connector          1
                    Cable              1 USB or Serial cable connects to PC
                    DC Jack          1
                    connector for AC
                    Adapter
                    Stylus Holder      2 holes on left and right front
                    Stabilizing Arm    1 Arms engage the sides of Pocket PC
                    Release Button     when no Expansion Pack is in use


Display             64K color (65,536 colors) 16-bit touch-sensitive reflective
                    thin film transistor (TFT) liquid crystal display (LCD)
                    Viewable image size – 2.26 in wide x 3.02 in tall (5.7 cm
                    wide x 7.7 cm tall)



                                                   24
Design and Implementation of a Bluetooth Based Kiosk System                          Yahav Bar yosef
                                                                                     Tsachi Nissim


Power Supply         1400 mAh Lithium Polymer rechargeable (in docking cradle
                     or with AC Adapter)
                     NOTE: Battery life will vary based on an estimated typical
                     use pattern of an average user, the configuration of the
                     computer and the usage pattern of the individual user. Use of
                     some attachments may significantly decrease battery life.


Audio Capabilities   Audio record and playback (play MP3 music or audio
                     programs from the Web, as well as records and plays back
                     voice notes or meeting notes)
                     One-touch instant-record button
                     AudiblePlayer link on Compaq CD
                     Integrated speaker, stereo headphone jack
                     Integrated microphone


Ergonomic Design     Instant-on/off and frontlight
Features             5-way joystick
                     Touch-sensitive display for stylus or fingertip
                     5 customizable application launch buttons – Calendar,
                     Contacts, Inbox, iPAQ Tasks, and Recorder buttons
                     4 alarm settings
                     Speaker on front-side of unit


Compaq Software      These are all applications in the OS, not part of 
Bundle               Compaq Software Bundle
                     Powered by Microsoft Windows for Pocket PC 2002 and
                     Microsoft ActiveSync‫5.3 ג‬
                     Calendar, Contacts, Tasks, Voice Recorder, Notes, Pocket
                     Word (with Spell Checker), Pocket Excel, Pocket Internet
                     Explorer, Windows Media Player 8 (MP3, audio and video
                     streaming), Calculator, Solitaire, Inbox (with Spell Checker
                     for email), Microsoft Reader (eBooks), File Explorer, MSN
                     Messenger, Terminal Services Client, VPN Client, Server
                     Sync client, Infrared Beaming


Compaq Exclusive     These are the extras that Compaq put in ROM
Applications         iPAQ Task Manager (utilities for Backup/Restore to Memory
(on device)          Card, Self Test, Auto Run, Align Screen, Clock, Expansion
                     pack, File Explorer, Microphone AGC, Power Status, Sounds
                     Memory); iPAQ File Store


Applications on      These are the extras on the Compaq CD-ROM
companion CD-        IBM Via Voice Voice Command and Control of PIM
ROM                  applications (Calendar, Contacts, Inbox), iPresenter
(downloadable to     PowerPoint convertor for Pocket PC, Dashboard (enhanced
device)              Today Screen application that shows 2 days appointments,
                     program launcher): Data Encryption Package (link), Jeode
                     Java Virtual Machine, Quick View Plus, Audible Manager
                     and Audible Player (Service plan required to download and
                     play Audible content- link), eWallet, ListPro, Wordlogic
                     Predictive Keyboard, StarTap (trial version), Xcellenet
                     Device Management Agent, Sega Game Pack, Vegas Game
                     Pack, Compaq Wireless LAN Drivers, Eletel Messaging



                                                    25
Design and Implementation of a Bluetooth Based Kiosk System                          Yahav Bar yosef
                                                                                     Tsachi Nissim

                      Software, iPAQ Reference Guide on PDF and eBook.
                      Interactive device demo.
                      Peacemaker Pro application on 230297-002 and 230398-002
                      (NA Retail)


                      Microsoft Components on Compaq CD-ROM

                      Microsoft ActiveSync 3.5 (Desktop device synchronization),
                      Connection Wizard, Microsoft Money for Pocket PC
                      (Desktop version required for synchronization between
                      desktop and Pocket PC-link), Pocket Streets (Desktop version
                      of MapPoint 2002, Streets and Trips 2002 or AutoRote 2002
                      download Pocket PC 2002 update-link), Outlook‫,2002 ג‬
                      Internet Explorer 6.0 (for desktop-link), Windows Media
                      Player 8.0 for Pocket PC and 7.1 for desktop), Microsoft
                      Reader (for the PC), Microsoft Reader Activation Pack (link
                      to activate device and download free content), Microsoft
                      Reader eBooks, (selection of free books for the Pocket PC),
                      AvantGo (link), MSN Mobile (link)
                      NOTE: Programs could vary based on SKU. Some programs
                      could require link to various websites.


Operating System      Microsoft Pocket PC 2002


Service and Support One-year Limited Warranty. Optional CarePAQ‫ ה‬available
                    for Next Business Day replacement (at additional change).




                                                   26
Design and Implementation of a Bluetooth Based Kiosk System   Yahav Bar yosef
                                                              Tsachi Nissim




                                         27
Design and Implementation of a Bluetooth Based Kiosk System                             Yahav Bar yosef
                                                                                        Tsachi Nissim


Glossary


A
AP        Access Point - a (short range) wireless basestation which allows a wireless device to access a
network

ACK        Acknowledgement protocol

ACL       Asynchronous Connectionless Link - used for data communications over Bluetooth

AGC        Automatic Gain Control

AMPS       American Mobile Phone System, US cellular standard

API        Application Programming Interface

ARIB       Japanese Association of Radio Industries and Businesses

ARQ        Automatic Repeat Request (protocol)

AWGN       Additive White Gaussian Noise




B
BER        Bit Error Rate (or Ratio), a measure of the quality of a wireless link

BPSK      Binary Phase Shift Keying modulation

BQA       Bluetooth Qualification Administrator

BQB       Bluetooth Qualified Body

BQRB      Bluetooth Qualification Review Board

BQ PRD    Bluetooth Qualification Program Reference Document

BQTF      Bluetooth Qualification Test Facility

BS        Base station - the fixed radio component of a cordless link, single channel or multi channel.
          Term also used in cellular radio

BT        Bandwidth-Time product for GMSK modulation
          Sometimes the abbreviation BT is also used as shorthand for Bluetooth (non-preferred usage)



                                                    28
Design and Implementation of a Bluetooth Based Kiosk System                             Yahav Bar yosef
                                                                                        Tsachi Nissim

BTR          Bit Timing Recovery, used to permit synchronization across a radio link




C
CDMA           Code Division Multiple Access

CF             Compact Flash, a standard for plug-in add-ons for PDAs, digital cameras, MP3 players etc

CRC            Cyclic Redundancy Check, a form of error control

CSMA           Carrier Sense Multiple Access

CVSD            Continuously Variable Slope Delta Modulation, the speech coding scheme used by Bluetooth




D
DCA            Dynamic Channel Assignment

DECT            Digital Enhanced Cordless Telecommunications, the ETSI standard

(Originally, prior to 1995, Digital European Cordless Telecommunications)

DLC            Data Link Control layer, protocol layer of the OSI stack

DPIT          Designated Profile Interoperability Testers

DSP           Digital Signal Processing

DUN           Dial Up Networking

Duplex        Simultaneous two way communication




E
EMC            ElectroMagnetic Compatibility

ETSI           European Telecommunications Standards Institute




F

                                                      29
Design and Implementation of a Bluetooth Based Kiosk System                                  Yahav Bar yosef
                                                                                             Tsachi Nissim

FCC          US Federal Communications Commission

FDD           Frequency Division Duplex

FDMA          Frequency Division Multiple Access

FEC           Forward Error Correction - a method of protecting against corruption of transmitted bits

FHS           Frequency Hop Synchronization - a type of packet used in Bluetooth used to allow device
discovery

FHSS          Frequency Hopping Spread Spectrum, hopping a carrier amongst a pseudorandom sequence of
channels

FSK           Frequency Shift Keying




G
GAP            Generic Access Profile of DECT

GFSK           Gaussian Frequency Shift Keying, the modulation scheme used by Bluetooth

GMSK           Gaussian filtered Minimum Shift Keying

GPRS           Generalized Packet Radio Service, of GSM

GPS            Global Positioning System

GSM            Global System for Mobile, the digital cellular radio system specified by ETSI, adopted
worldwide




H
Handoff       The procedure whereby communications between a cordless device and an access point are
automatically routed via an alternative access point (or possibly via an alternative channel to the same one)
when this is necessary and appropriate to maintain or improve communications

Handover      Another term for Handoff

HCI            Host Controller Interface

HDLC           High level Data Link Control - type of protocol

HIPERLAN       High Performance Radio Local Area Network, an ETSI 5GHz wireless networking standard




                                                       30
Design and Implementation of a Bluetooth Based Kiosk System                              Yahav Bar yosef
                                                                                         Tsachi Nissim


I
IEEE 802.11    WLAN data communication standard

IN             Intelligent Network

IS54          US Digital AMPS standard

IS95          US CDMA cellular standard

ISM           Industrial, Scientific and Medical - the unlicensed 2.5 GHz frequency band used by Bluetooth.

ISO           International Standards Organization

IWP           Interworking Profile

IWU           Interworking Unit




J, K

L
L2CAP          Logical Link Control and Adaptation Protocol

LAN            Local Area Network

LM or LMP      Link Manager (Protocol)

LNA            Low Noise Amplifier




M
MAC            Medium Access Control, protocol layer




N
NACK           Not Acknowledge - a form of protocol where action is taken if no acknowledgement is received

NWK/NWL       Network Layer, protocol layer



                                                     31
Design and Implementation of a Bluetooth Based Kiosk System                              Yahav Bar yosef
                                                                                         Tsachi Nissim




O
OBEX            Generalised Multi-Transport) Object Exchange Protocol

OS             Operating System




P
PAN           Personal Area Network

PCMCIA        Personal Computer Manufacturers' Card Industry Association, a standard for plug-in PC cards,
now usually known simply as PC Card

PCS            Personal Communications Service

PDA            Personal Digital Assistant

PHL or PHY     Physical Layer, lowest protocol layer

Piconet       A single network of a Bluetooth master and (up to seven) slave device(s)

PIT            Profile Interoperability Testers

PSM            Protocol & Service Multiplexer, used in Bluetooth




Q

R
RFCOMM         Serial Port Emulation, part of the Bluetooth protocol stack

RFI             Radio Frequency Interference

RFID           Radio Frequency Identification

RLAN            Radio Local Area Network

RSSI           Received Signal Strength Indication




                                                       32
Design and Implementation of a Bluetooth Based Kiosk System                                  Yahav Bar yosef
                                                                                             Tsachi Nissim


S
Scatternet   A collection of interconnected Bluetooth piconets

SCO             Synchronous Connection Oriented link - used for voice communications over Bluetooth

SDLC            Synchronous Data Link Control

SDP             Service Discovery Protocol

Simplex         One way communication

SMS             Short Message Service, as used in a cellular network

SNR             Signal to Noise Ratio




T
TCRL            Test Case Reference List, part of the Qualification Program, a list of relevant test cases

TCS             Telephony Control protocol Specification

TCH             Traffic Channel

TDD             Time Division Duplex

TDM              Time Division Multiplexing

TDMA             Time Division Multiple Access




U, V
UMTS             Universal Mobile Telecommunication Service, being standardised by ETSI

UPF              UnPlug Fest, interoperability testing conferences (restricted attendance) organised by the
Bluetooth SIG

VCO               Voltage Controlled Oscillator




W, X, Y, Z
WLAN              Wireless Local Area Network



                                                       33
Design and Implementation of a Bluetooth Based Kiosk System   Yahav Bar yosef
                                                              Tsachi Nissim




                                         34

								
To top