review fin

Upload: dheeraj-yalamanchili

Post on 29-May-2018

220 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/8/2019 Review Fin

    1/59

    CHAPTER 1

    INTRODUCTION

    1.0 Introduction

    Advertising is changing rapidly. New digital and online media are now becoming the

    preferred choice for people who want news and information delivered to them in a more

    targeted and personal way . As a direct result, more traditional types of advertising like

    newspapers, magazines and leafleting have seen a tremendous decline in their advertising

    revenues and in some cases have stopped trading. Communication over the last decade has

    transformed the entire marketing proposition and continues to do so, offline to online and

    now from online to mobile.

    Bluetooth Proximity Marketing is the means where content such as advertising

    images, multimedia, games, videos or messages are delivered to mobile phones for free,

    within a defined geographical location, legally bypassing the use of traditional cellular

    networks, with the help of Bluetooth. 70% of the 900 million phones sold each year are

    Bluetooth enabled creating a huge market for this form of mobile marketing.

    1.1 Why Bluetooth Marketing?

    Coverage

    1 billion mobiles are now sold annually across the world and its a number thats

    increasing. Over 90% of those mobiles have Bluetooth technology creating a new

    digital global marketplace for any brand that wants to reach its audience.

    Environmentally friendly

    Removes the need to use printed leaflets and reduce wastage.

    Culturally relevant

    Today, marketing is more about "medium first, message second."

    1

  • 8/8/2019 Review Fin

    2/59

    Targeted

    Controlling the message content within geographical areas enables a high degree of

    relevancy producing greater returns for your brand or campaign. No other advertising

    platform enables brands to deliver targeted content in specific areas, or combine the

    online/offline or mobile world in this way.

    1.2 What can be sent? Files

    o Text files

    o Still images

    o Animated images

    o Video clips

    o Sound samples

    vCard - the mobile phones equivalent of a business card.

    Customized coupons

    Java applications such as games

    1.3 The Application- IntroductionThe Bluetooth proximity marketing application is a service provided to the advertisers

    by certain Bluetooth based companies or service providers. It can be provided as a web based

    application or system based application which can be sold as a product along with Bluetooth

    hardware such as BAP (Bluetooth Access Point). In this project we develop a system based

    application. The advertiser requires three main facilities in the application- create campaign

    by uploading the content, run the campaign and check on the results of the campaign. Based

    on this, various features of application can be divided into three modules.

    2

  • 8/8/2019 Review Fin

    3/59

    The modules are

    Interface Module

    Bluetooth Module

    Database Module

    CHAPTER 2

    REQUIREMENTS ANALYSIS

    2.0 Introduction

    Requirements Analysis is the process of understanding the customer needs and expectations

    from a proposed system or application and is a well-defined stage in the Software

    Development Life Cycle model. Requirements are a description of how a system should

    behave or a description of system properties or attributes. It can alternatively be a statement

    of what an application is expected to do.

    2.1 User Requirements

    The advertiser is the user of this application. He should be guided through a well defined

    interface with various options.

    1. Creating a campaign :

    3

  • 8/8/2019 Review Fin

    4/59

    Campaign type: The user should be able to create different types of campaign like File

    based, vCard, Promotion etc. So the application should provide appropriate options

    for each type, for eg. file upload for File based. File based has wide usage with its

    ability to send varied content.

    Target devices: The user should be able to choose the type of devices he wishes to

    send the advertising content. Eg: Smart phones

    Sending type: The user can be given an option to either simultaneously send to all

    devices or choose a device from the list of Bluetooth enabled devices in the coverage

    displayed through the search result. In the second case, he should be able to view the

    result there itself.

    2. Running the campaign : The user should be to start the campaign anytime and stop at his

    will. He should be able to run previously run campaign again anytime.

    3. Results : The MAC address, the name of the device has to be displayed along with the list

    of devices which processed or not processed the message. Apart from the user has to know

    the details of the result of campaign as to who accepted the message, who rejected and the

    overall success of the campaign.

    4. Black list : The user can be given an option to select devices to which he doesnt wish to

    send the message.

    The application should have Database connectivity to store the campaign and result details

    2.2 System Requirements:

    Software OS: Windows XP SP2 and above

    Application Development: MS Visual Studio (VB.NET)

    Database: MS Access

    All the above should be suitably upgraded according to the versions used

    Hardware PC with Bluetooth

    4

  • 8/8/2019 Review Fin

    5/59

    Hard Disk : sufficiently 5GB free space

    RAM: 1 GB (min)

    Bluetooth enabled devices in the vicinity for testing.

    CHAPTER 3

    SOFTWARE DESIGN

    3.0 Introduction

    Software design is an approach to problem solving and part of software development process.

    It can be based on requirements analysis and elicitation and may include various functional

    diagrams which represent the functionality of the software.

    5

  • 8/8/2019 Review Fin

    6/59

    3.1 Functional Diagrams :

    6

  • 8/8/2019 Review Fin

    7/59

    Fig .3.1a

    7

  • 8/8/2019 Review Fin

    8/59

    Fig 3.1b

    8

  • 8/8/2019 Review Fin

    9/59

    Fig 3.1c

    9

  • 8/8/2019 Review Fin

    10/59

    Fig 3.1d

    10

  • 8/8/2019 Review Fin

    11/59

    CHAPTER 4

    SAMPLE CODE

    Mainform.vb

    Imports Brecham.Obex 'eg ObexClientSession

    Imports Brecham.Obex.Net 'eg GuiObexSessionConnection

    Imports System.ComponentModel

    Imports System.Xml

    Imports System.Xml.XPath

    Imports System.Runtime.InteropServices

    Imports System.IOImports System.Text

    Imports InTheHand.net

    Imports InTheHand.Net.Sockets

    Imports InTheHand.Windows.Forms

    Public Class MainForm

    Inherits System.Windows.Forms.Form

    Private Declare Function FlashWindow Lib "user32" _

    (ByVal hwnd As Long , _

    ByVal bInvert As Long ) As Long

    #Region " New "

    Public Sub New ()

    Try

    ' This call is required by the Windows Form Designer.

    InitializeComponent()

    ' Add any initialization after the InitializeComponent() call.

    ' Read settings.

    11

  • 8/8/2019 Review Fin

    12/59

    My.Settings.Reload()

    ' Set settings.

    Settings.AutoPlay = My.Settings.AutoPlay

    Settings.Color = My.Settings.Color

    Settings.DisplayCoverArt = My.Settings.DisplayCoverArt

    Settings.DisplayVisualizations = My.Settings.DisplayVisualizations

    Settings.DisplaySplashScreen = My.Settings.DisplaySplashScreen

    Settings.KeepOnTop = My.Settings.KeepOnTop

    Settings.LastButtonSelected = My.Settings.LastButtonSelected

    Settings.RotateStationInfo = My.Settings.RotateStationInfo

    Settings.SelectedFolder = My.Settings.SelectedFolder

    Settings.StartAsIcon = My.Settings.StartAsIcon

    Settings.StartWithWindows = My.Settings.StartWithWindows

    Settings.StationList = My.Settings.StationList

    Settings.ToolTips = My.Settings.ToolTips

    Settings.Volume = My.Settings.Volume

    Settings.XPosition = My.Settings.XPosition

    Settings.YPosition = My.Settings.YPosition

    Catch ex As ApplicationException

    ' If error occurs, cancel topmost.

    If Me.TopMost = True Then Me.TopMost = False

    MessageBox.Show( "An unhandled error has occurred in " &

    My.Application.Info.Title & vbCrLf & _

    "The system returned the following information:" & vbCrLf & ex.Message,

    _

    My.Application.Info.Title, MessageBoxButtons.OK,

    MessageBoxIcon.Error)

    Catch exc As Configuration.SettingsPropertyWrongTypeException

    ' If error occurs, cancel topmost.

    If Me.TopMost = True Then Me.TopMost = False

    12

  • 8/8/2019 Review Fin

    13/59

    MessageBox.Show( "An unhandled error has occurred in " &

    My.Application.Info.Title & vbCrLf & _

    "The system returned the following information:" & vbCrLf &

    exc.Message, _

    My.Application.Info.Title, MessageBoxButtons.OK,

    MessageBoxIcon.Error)

    Catch excep As AccessViolationException

    ' If error occurs, cancel topmost.

    If Me.TopMost = True Then Me.TopMost = False

    MessageBox.Show( "An unhandled error has occurred in " &

    My.Application.Info.Title & vbCrLf & _

    "The system returned the following information:" & vbCrLf &

    excep.Message, _

    My.Application.Info.Title, MessageBoxButtons.OK,

    MessageBoxIcon.Error)

    End Try

    End Sub

    #End Region

    #Region "BG Worker Arg"

    Class BgWorkerArgs

    ' Fields

    'Private ReadOnly m_putStream As ObexPutStream

    Private ReadOnly m_name As String

    Private ReadOnly m_source As Stream

    Private ReadOnly m_connection As ObexSessionConnection

    ' Properties

    Public ReadOnly Property Name() As String

    Get

    Return m_name End Get

    13

  • 8/8/2019 Review Fin

    14/59

    End Property

    Public ReadOnly Property Source() As Stream

    Get

    Return m_source

    End Get

    End Property

    Public ReadOnly Property Connection() As ObexSessionConnection

    Get

    Return m_connection

    End Get

    End Property

    ' Constructor

    Public Sub New (ByVal name As String , ByVal source As Stream, ByVal conn As

    ObexSessionConnection)

    If IsNothing(name) Then Throw New ArgumentNullException( "name" )

    If IsNothing(source) Then Throw New ArgumentNullException( "source" )

    If IsNothing(conn) Then Throw New ArgumentNullException( "conn" )

    m_name = name

    m_source = source

    m_connection = conn

    End Sub

    End Class

    #End Region

    #Region " Get Search Time "

    Private Shared Function GetSearchTime( ByVal uTime As Integer ) As String

    Dim intDays As Integer

    Dim intHours As Integer

    Dim intMinutes As Integer Dim intSeconds As Integer

    14

  • 8/8/2019 Review Fin

    15/59

    Dim intRemainder As Integer

    Dim intTicks As Integer

    Dim strDays As String

    Dim strHours As String

    Dim strMinutes As String

    Dim strSeconds As String

    ' initialize string variables

    strDays = ""

    strHours = ""

    strMinutes = ""

    strSeconds = ""

    Try

    Application.DoEvents()

    ' updates tick counter intTicks

    intTicks = uTime

    ' there are 86400000 milliseconds in one day, compute whole days and get remainder

    Do

    intDays = Int(intTicks \ 86400000)

    intRemainder = intTicks Mod 86400000

    Loop Until intRemainder

  • 8/8/2019 Review Fin

    16/59

    intRemainder = intRemainder Mod 60000

    Loop Until intRemainder

  • 8/8/2019 Review Fin

    17/59

    strMinutes = Trim( CStr (intMinutes)) & ":"

    End If

    ' format seconds

    If intSeconds = 0 Then

    strSeconds = "00"

    ElseIf Trim( CStr (intSeconds)).Length = 1 Then

    strSeconds = "0" & Trim( CStr (intSeconds))

    ElseIf Trim( CStr (intSeconds)).Length = 2 Then

    strSeconds = Trim( CStr (intSeconds))

    End If

    ' return time string

    Return strDays & strHours & strMinutes & strSeconds

    Catch ex As NullReferenceException

    Return ""

    Catch exc As ArithmeticException

    Return ""

    End Try

    End Function

    #End Region

    #Region " Form-Level Variables "

    variables declared here

    #End Region

    #Region "Worker"

    Private Sub BackgroundWorker1_RunWorkerCompleted( ByVal sender As Object , ByVal

    e As System.ComponentModel.RunWorkerCompletedEventArgs) Handles

    BackgroundWorker1.RunWorkerCompleted

    SyncLock SuccessSendCountLockingSuccessSendCount += 1

    17

  • 8/8/2019 Review Fin

    18/59

    End SyncLock

    btnBluetoothDevice1.BackgroundImage = My.Resources.FuchsiaGradient

    SyncLock SendCountLock

    SendCount -= 1

    End SyncLock

    btnBluetoothDevice1.Tag = ""

    btnBluetoothDevice1.Enabled = False

    btnBluetoothDevice1.Text = "Ready"

    Dim DevicesInfo() As String

    DevicesInfo = Split(Worker1, "-!@#$%^-" )

    Dim DuSec As Integer = 0

    DuSec = DateDiff(DateInterval.Second, WorkerTime1, Now)

    Label12.Text = "Success to send for " & DevicesInfo(1) & ", " & DuSec & " Seconds - "

    & " Type:" & DevicesInfo(2)

    Label12.Refresh()

    Dim LWL As ListViewItem

    LWL = ListView1.Items.Insert(0, DevicesInfo(1))

    LWL.SubItems.Add( "Success" )

    LWL.SubItems.Add(DuSec)

    ListView1.Items(0).BackColor = Color.Fuchsia

    SaveOneFileBlueAddress(DevicesInfo(0), DevicesInfo(1), DevicesInfo(2),

    DevicesInfo(3), DevicesInfo(4), DevicesInfo(5), "OK, Final" , OneFileName,

    DuSec.ToString)

    OneFileRemoveTempPAT(DevicesInfo(0))

    btnBluetoothDevice1.BackgroundImage = My.Resources.GrayGradient

    ProgressBar1.Value = 0

    System.Threading.Thread.Sleep(500)

    End Sub

    Private Sub BackgroundWorker2_RunWorkerCompleted( ByVal sender As Object , ByVal

    e As System.ComponentModel.RunWorkerCompletedEventArgs) Handles

    BackgroundWorker2.RunWorkerCompleted

    SyncLock SuccessSendCountLockingSuccessSendCount += 1

    18

  • 8/8/2019 Review Fin

    19/59

    End SyncLock

    btnBluetoothDevice2.BackgroundImage = My.Resources.FuchsiaGradient

    SyncLock SendCountLock

    SendCount -= 1

    End SyncLock

    btnBluetoothDevice2.Tag = ""

    btnBluetoothDevice2.Text = "Ready"

    btnBluetoothDevice2.Enabled = False

    Dim DevicesInfo() As String

    DevicesInfo = Split(Worker2, "-!@#$%^-" )

    Dim DuSec As Integer = 0

    DuSec = DateDiff(DateInterval.Second, WorkerTime2, Now)

    Label12.Text = "Success to send for " & DevicesInfo(1) & ", " & DuSec & " Seconds - "

    & " Type:" & DevicesInfo(2)

    Label12.Refresh()

    Dim LWL As ListViewItem

    LWL = ListView1.Items.Insert(0, DevicesInfo(1))

    LWL.SubItems.Add( "Success" )

    LWL.SubItems.Add(DuSec)

    ListView1.Items(0).BackColor = Color.Fuchsia

    SaveOneFileBlueAddress(DevicesInfo(0), DevicesInfo(1), DevicesInfo(2),

    DevicesInfo(3), DevicesInfo(4), DevicesInfo(5), "OK, Final" , OneFileName,

    DuSec.ToString)

    OneFileRemoveTempPAT(DevicesInfo(0))

    btnBluetoothDevice2.BackgroundImage = My.Resources.GrayGradient

    ProgressBar2.Value = 0

    System.Threading.Thread.Sleep(500)

    End Sub

    Private Sub BackgroundWorker3_RunWorkerCompleted( ByVal sender As Object , ByVal

    e As System.ComponentModel.RunWorkerCompletedEventArgs) Handles

    BackgroundWorker3.RunWorkerCompleted

    SyncLock SuccessSendCountLockingSuccessSendCount += 1

    19

  • 8/8/2019 Review Fin

    20/59

    End SyncLock

    btnBluetoothDevice3.BackgroundImage = My.Resources.FuchsiaGradient

    SyncLock SendCountLock

    SendCount -= 1

    End SyncLock

    btnBluetoothDevice3.Tag = ""

    btnBluetoothDevice3.Text = "Ready"

    btnBluetoothDevice3.Enabled = False

    Dim DevicesInfo() As String

    DevicesInfo = Split(Worker3, "-!@#$%^-" )

    Dim DuSec As Integer = 0

    WorkerTime1 = Now

    DuSec = DateDiff(DateInterval.Second, WorkerTime3, Now)

    Label12.Text = "Success to send for " & DevicesInfo(1) & ", " & DuSec & " Seconds - "

    & " Type:" & DevicesInfo(2)

    Label12.Refresh()

    Dim LWL As ListViewItem

    LWL = ListView1.Items.Insert(0, DevicesInfo(1))

    LWL.SubItems.Add( "Success" )

    LWL.SubItems.Add(DuSec)

    ListView1.Items(0).BackColor = Color.Fuchsia

    SaveOneFileBlueAddress(DevicesInfo(0), DevicesInfo(1), DevicesInfo(2),

    DevicesInfo(3), DevicesInfo(4), DevicesInfo(5), "OK, Final" , OneFileName,

    DuSec.ToString)

    OneFileRemoveTempPAT(DevicesInfo(0))

    btnBluetoothDevice3.BackgroundImage = My.Resources.GrayGradient

    ProgressBar3.Value = 0

    System.Threading.Thread.Sleep(500)

    End Sub

    Private Sub BackgroundWorker4_RunWorkerCompleted( ByVal sender As Object , ByVal e

    As System.ComponentModel.RunWorkerCompletedEventArgs) Handles

    BackgroundWorker4.RunWorkerCompleted

    SyncLock SuccessSendCountLockingSuccessSendCount += 1

    20

  • 8/8/2019 Review Fin

    21/59

    End SyncLock

    btnBluetoothDevice4.BackgroundImage = My.Resources.FuchsiaGradient

    SyncLock SendCountLock

    SendCount -= 1

    End SyncLock

    btnBluetoothDevice4.Tag = ""

    btnBluetoothDevice4.Text = "Ready"

    btnBluetoothDevice4.Enabled = False

    Dim DevicesInfo() As String

    DevicesInfo = Split(Worker4, "-!@#$%^-" )

    Dim DuSec As Integer = 0

    WorkerTime1 = Now

    DuSec = DateDiff(DateInterval.Second, WorkerTime4, Now)

    Label12.Text = "Success to send for " & DevicesInfo(1) & ", " & DuSec & " Seconds - "

    & " Type:" & DevicesInfo(2)

    Label12.Refresh()

    Dim LWL As ListViewItem

    LWL = ListView1.Items.Insert(0, DevicesInfo(1))

    LWL.SubItems.Add( "Success" )

    LWL.SubItems.Add(DuSec)

    ListView1.Items(0).BackColor = Color.Fuchsia

    SaveOneFileBlueAddress(DevicesInfo(0), DevicesInfo(1), DevicesInfo(2),

    DevicesInfo(3), DevicesInfo(4), DevicesInfo(5), "OK, Final" , OneFileName,

    DuSec.ToString)

    OneFileRemoveTempPAT(DevicesInfo(0))

    btnBluetoothDevice4.BackgroundImage = My.Resources.GrayGradient

    progressBar4.Value = 0

    System.Threading.Thread.Sleep(500)

    End Sub

    Private Sub BackgroundWorker5_RunWorkerCompleted( ByVal sender As Object , ByVal

    e As System.ComponentModel.RunWorkerCompletedEventArgs) Handles

    BackgroundWorker5.RunWorkerCompleted SyncLock SuccessSendCountLocking

    21

  • 8/8/2019 Review Fin

    22/59

    SuccessSendCount += 1

    End SyncLock

    btnBluetoothDevice5.BackgroundImage = My.Resources.FuchsiaGradient

    SyncLock SendCountLock

    SendCount -= 1

    End SyncLock

    btnBluetoothDevice5.Tag = ""

    btnBluetoothDevice5.Text = "Ready"

    btnBluetoothDevice5.Enabled = False

    Dim DevicesInfo() As String

    DevicesInfo = Split(Worker5, "-!@#$%^-" )

    Dim DuSec As Integer = 0

    WorkerTime1 = Now

    DuSec = DateDiff(DateInterval.Second, WorkerTime5, Now)

    Label12.Text = "Success to send for " & DevicesInfo(1) & ", " & DuSec & " Seconds - "

    & " Type:" & DevicesInfo(2)

    Label12.Refresh()

    Dim LWL As ListViewItem

    LWL = ListView1.Items.Insert(0, DevicesInfo(1))

    LWL.SubItems.Add( "Success" )

    LWL.SubItems.Add(DuSec)

    ListView1.Items(0).BackColor = Color.Fuchsia

    SaveOneFileBlueAddress(DevicesInfo(0), DevicesInfo(1), DevicesInfo(2),

    DevicesInfo(3), DevicesInfo(4), DevicesInfo(5), "OK, Final" , OneFileName,

    DuSec.ToString)

    OneFileRemoveTempPAT(DevicesInfo(0))

    btnBluetoothDevice5.BackgroundImage = My.Resources.GrayGradient

    ProgressBar5.Value = 0

    System.Threading.Thread.Sleep(500)

    End Sub

    Private Sub BackgroundWorker6_RunWorkerCompleted( ByVal sender As Object , ByVal

    e As System.ComponentModel.RunWorkerCompletedEventArgs) HandlesBackgroundWorker6.RunWorkerCompleted

    22

  • 8/8/2019 Review Fin

    23/59

    SyncLock SuccessSendCountLocking

    SuccessSendCount += 1

    End SyncLock

    btnBluetoothDevice6.BackgroundImage = My.Resources.FuchsiaGradient

    SyncLock SendCountLock

    SendCount -= 1

    End SyncLock

    btnBluetoothDevice6.Tag = ""

    btnBluetoothDevice6.Text = "Ready"

    btnBluetoothDevice6.Enabled = False

    Dim DevicesInfo() As String

    DevicesInfo = Split(Worker6, "-!@#$%^-" )

    Dim DuSec As Integer = 0

    WorkerTime1 = Now

    DuSec = DateDiff(DateInterval.Second, WorkerTime6, Now)

    Label12.Text = "Success to send for " & DevicesInfo(1) & ", " & DuSec & " Seconds - "

    & " Type:" & DevicesInfo(2)

    Label12.Refresh()

    Dim LWL As ListViewItem

    LWL = ListView1.Items.Insert(0, DevicesInfo(1))

    LWL.SubItems.Add( "Success" )

    LWL.SubItems.Add(DuSec)

    ListView1.Items(0).BackColor = Color.Fuchsia

    SaveOneFileBlueAddress(DevicesInfo(0), DevicesInfo(1), DevicesInfo(2),

    DevicesInfo(3), DevicesInfo(4), DevicesInfo(5), "OK, Final" , OneFileName,

    DuSec.ToString)

    OneFileRemoveTempPAT(DevicesInfo(0))

    btnBluetoothDevice6.BackgroundImage = My.Resources.GrayGradient

    ProgressBar6.Value = 0

    System.Threading.Thread.Sleep(500)

    End Sub

    23

  • 8/8/2019 Review Fin

    24/59

    Private Sub BackgroundWorker7_RunWorkerCompleted( ByVal sender As Object , ByVal

    e As System.ComponentModel.RunWorkerCompletedEventArgs) Handles

    BackgroundWorker7.RunWorkerCompleted

    SyncLock SuccessSendCountLocking

    SuccessSendCount += 1

    End SyncLock

    btnBluetoothDevice7.BackgroundImage = My.Resources.FuchsiaGradient

    SyncLock SendCountLock

    SendCount -= 1

    End SyncLock

    btnBluetoothDevice7.Tag = ""

    btnBluetoothDevice7.Text = "Ready"

    btnBluetoothDevice7.Enabled = False

    Dim DevicesInfo() As String

    DevicesInfo = Split(Worker7, "-!@#$%^-" )

    Dim DuSec As Integer = 0

    WorkerTime1 = Now

    DuSec = DateDiff(DateInterval.Second, WorkerTime7, Now)

    Label12.Text = "Success to send for " & DevicesInfo(1) & ", " & DuSec & " Seconds - "

    & " Type:" & DevicesInfo(2)

    Label12.Refresh()

    Dim LWL As ListViewItem

    LWL = ListView1.Items.Insert(0, DevicesInfo(1))

    LWL.SubItems.Add( "Success" )

    LWL.SubItems.Add(DuSec)

    ListView1.Items(0).BackColor = Color.Fuchsia

    SaveOneFileBlueAddress(DevicesInfo(0), DevicesInfo(1), DevicesInfo(2),

    DevicesInfo(3), DevicesInfo(4), DevicesInfo(5), "OK, Final" , OneFileName,

    DuSec.ToString)

    OneFileRemoveTempPAT(DevicesInfo(0))

    btnBluetoothDevice7.BackgroundImage = My.Resources.GrayGradient

    ProgressBar7.Value = 0

    System.Threading.Thread.Sleep(500) End Sub

    24

  • 8/8/2019 Review Fin

    25/59

    Private Sub BackgroundWorker1_DoWork( ByVal sender As System.Object, ByVal e As

    System.ComponentModel.DoWorkEventArgs) Handles BackgroundWorker1.DoWork

    Dim args As BgWorkerArgs = CType (e.Argument, BgWorkerArgs)

    Dim buffer(1023) As Byte

    Dim length As Int32

    Dim updatePeriod As New TimeSpan(0, 0, 0, 0, 250)

    Dim lastProgress As DateTime = DateTime.UtcNow

    Dim elapsed As TimeSpan

    Dim putStream As ObexPutStream = Nothing

    WorkerTime1 = Now

    Try

    putStream = args.Connection.ObexClientSession.Put(args.Name, Nothing ,

    args.Source.Length)

    ReportProgress1(0, args.Source.Length)

    While (True )

    If (BackgroundWorker1.CancellationPending) Then

    e.Cancel = True

    putStream.Abort( "User cancelled" )

    Exit While

    End If

    length = args.Source.Read(buffer, 0, buffer.Length)

    If (length = 0) Then

    Exit While

    End If

    putStream.Write(buffer, 0, length)

    ' Progress reporting; rate-limited.

    elapsed = DateTime.UtcNow - lastProgress

    If (elapsed > updatePeriod) Then

    ReportProgress1(args.Source.Position, args.Source.Length)

    lastProgress = DateTime.UtcNow

    End If

    End WhileReportProgress1(args.Source.Position, args.Source.Length)

    25

  • 8/8/2019 Review Fin

    26/59

    Finally

    If Not IsNothing(putStream) Then

    putStream.Close()

    End If

    args.Source.Close()

    args.Connection.ObexClientSession.Dispose()

    End Try

    End Sub

    Private Sub ReportProgress1( ByVal position As Int64, ByVal length As Int64)

    Dim progressPercentage As Int32

    If length = 0 Then

    progressPercentage = 100

    Else

    progressPercentage = CType ((100.0 * position) / length, Int32)

    End If

    BackgroundWorker1.ReportProgress(progressPercentage)

    End Sub

    Private Sub BackgroundWorker1_ProgressChanged( ByVal sender As Object , ByVal e As

    System.ComponentModel.ProgressChangedEventArgs) Handles

    BackgroundWorker1.ProgressChanged

    ProgressBar1.Value = e.ProgressPercentage

    End Sub

    Private Sub BackgroundWorker2_DoWork( ByVal sender As System.Object, ByVal e As

    System.ComponentModel.DoWorkEventArgs) Handles BackgroundWorker2.DoWork

    Dim DevicesInfo() As String

    DevicesInfo = Split(Worker2, "-!@#$%^-" )

    Dim args As BgWorkerArgs = CType (e.Argument, BgWorkerArgs)

    Dim buffer(1023) As Byte

    Dim length As Int32

    Dim updatePeriod As New TimeSpan(0, 0, 0, 0, 250) Dim lastProgress As DateTime = DateTime.UtcNow

    26

  • 8/8/2019 Review Fin

    27/59

    Dim elapsed As TimeSpan

    Dim putStream As ObexPutStream = Nothing

    WorkerTime2 = Now

    '

    Try

    putStream = args.Connection.ObexClientSession.Put(args.Name, Nothing ,

    args.Source.Length)

    ReportProgress2(0, args.Source.Length)

    While (True )

    If (BackgroundWorker2.CancellationPending) Then

    e.Cancel = True

    putStream.Abort( "User cancelled" )

    Exit While

    End If

    length = args.Source.Read(buffer, 0, buffer.Length)

    If (length = 0) Then

    Exit While

    End If

    putStream.Write(buffer, 0, length)

    elapsed = DateTime.UtcNow - lastProgress

    If (elapsed > updatePeriod) Then

    ReportProgress2(args.Source.Position, args.Source.Length)

    lastProgress = DateTime.UtcNow

    End If

    End While

    ReportProgress2(args.Source.Position, args.Source.Length)

    Finally

    If Not IsNothing(putStream) Then

    putStream.Close()

    End If

    args.Source.Close()

    args.Connection.ObexClientSession.Dispose()

    End Try End Sub

    27

  • 8/8/2019 Review Fin

    28/59

    Private Sub ReportProgress2( ByVal position As Int64, ByVal length As Int64)

    Dim progressPercentage As Int32

    If length = 0 Then

    progressPercentage = 100

    Else

    progressPercentage = CType ((100.0 * position) / length, Int32)

    End If

    BackgroundWorker2.ReportProgress(progressPercentage)

    End Sub

    Private Sub BackgroundWorker2_ProgressChanged( ByVal sender As Object , ByVal e As

    System.ComponentModel.ProgressChangedEventArgs) Handles

    BackgroundWorker2.ProgressChanged

    ProgressBar2.Value = e.ProgressPercentage

    End Sub

    Private Sub BackgroundWorker3_DoWork( ByVal sender As System.Object, ByVal e As

    System.ComponentModel.DoWorkEventArgs) Handles BackgroundWorker3.DoWork

    Dim DevicesInfo() As String

    DevicesInfo = Split(Worker3, "-!@#$%^-" )

    Dim args As BgWorkerArgs = CType (e.Argument, BgWorkerArgs)

    Dim buffer(1023) As Byte

    Dim length As Int32

    Dim updatePeriod As New TimeSpan(0, 0, 0, 0, 250)

    Dim lastProgress As DateTime = DateTime.UtcNow

    Dim elapsed As TimeSpan

    Dim putStream As ObexPutStream = Nothing

    WorkerTime3 = Now

    '

    Try

    putStream = args.Connection.ObexClientSession.Put(args.Name, Nothing ,

    args.Source.Length)ReportProgress3(0, args.Source.Length)

    28

  • 8/8/2019 Review Fin

    29/59

    While (True )

    If (BackgroundWorker3.CancellationPending) Then

    e.Cancel = True

    putStream.Abort( "User cancelled" )

    Exit While

    End If

    length = args.Source.Read(buffer, 0, buffer.Length)

    If (length = 0) Then

    Exit While

    End If

    putStream.Write(buffer, 0, length)

    ' Progress reporting; rate-limited.

    elapsed = DateTime.UtcNow - lastProgress

    If (elapsed > updatePeriod) Then

    ReportProgress3(args.Source.Position, args.Source.Length)

    lastProgress = DateTime.UtcNow

    End If

    End While

    ' The final update of the progress bar

    ReportProgress3(args.Source.Position, args.Source.Length)

    Finally

    If Not IsNothing(putStream) Then

    putStream.Close()

    End If

    args.Source.Close()

    args.Connection.ObexClientSession.Dispose()

    End Try

    End Sub

    Private Sub ReportProgress3( ByVal position As Int64, ByVal length As Int64)

    Dim progressPercentage As Int32

    If length = 0 Then

    progressPercentage = 100 Else

    29

  • 8/8/2019 Review Fin

    30/59

    progressPercentage = CType ((100.0 * position) / length, Int32)

    End If

    BackgroundWorker3.ReportProgress(progressPercentage)

    End Sub

    30

  • 8/8/2019 Review Fin

    31/59

    CHAPTER 5

    TESTING

    5.1 Software TestingSoftware testing is a critical element of software quality assurance and represents the

    ultimate review of specification, design and code generation. System testing is a stage of

    implementation, which is aimed at ensuring that the system works accurately and efficiently

    before live operation commences.

    Testing Objectives:

    Testing is a process of executing a program with the intend of finding errors .

    Preparing a test case that has high probability of finding at undiscovered error. Testing to erase out all kinds of bugs from the program.

    5.2 Verification Testing:

    Requirement verification:

    For the successful completion of project requirement verification plays a major role.

    Once the required analysis is done the required analysis document created should

    have to be verified with the client to ensure for the perfectness of the analysis done.The next sages of the project should be carried out only after getting the approval

    from the client.

    Code verification:

    Coding is a phase where the project takes it living. For an efficient project to be

    implemented proper coding should have to be carried out. Code verification should

    have to carry for the proper maintenance of the project. Verification for the comment,

    naming of the variables, function definition etc should have to be verified in this phase

    5.3 Software verification and validation

    Software testing is used in association with verification and validation:

    Verification: Verification is the process of evaluating a system or component to

    determine whether the products of a given development phase satisfy the

    conditions imposed at the start of that phase.

    31

  • 8/8/2019 Review Fin

    32/59

    Validation: Validation is the process of evaluating a system or component during

    or at the end of the development process to determine whether it satisfies specified

    requirements.

    5.4 Testing methods

    5.4.1 White box testing:

    White box testing is when the tester has access to the internal data structures and algorithms

    including the code that implement these.

    Types of white box testing

    The following types of white box testing exist:

    API testing (application programming interface) - testing of the

    application using public and private APIs Code coverage - creating tests to satisfy some criteria of code coverage

    (e.g., the test designer can create tests to cause all statements in the program to

    be executed at least once) Fault injection methods - improving the coverage of a test by

    introducing faults to test code paths Mutation testing methods Static testing - White box testing includes all static testing

    5.4.2 Black box testing :

    Black box testing treats the software as a "black box"without any knowledge of internal

    implementation. Black box testing methods include: equivalence partitioning, boundary valueanalysis, all-pairs testing, fuzz testing, model-based testing, traceability matrix, exploratory

    testing and specification-based testing.

    Specification-based testing : Specification-based testing aims to test the functionality

    of software according to the applicable requirements. Thus, the tester inputs data into,

    and only sees the output from, the test object. This level of testing usually requires

    thorough test cases to be provided to the tester, who then can simply verify that for a

    32

  • 8/8/2019 Review Fin

    33/59

    given input, the output value (or behavior), either "is" or "is not" the same as the

    expected value specified in the test case.

    Therefore, black box testing has the advantage of "an unaffiliated opinion," on the one hand,

    and the disadvantage of "blind exploring," on the other.

    5.5 Testing levels

    Tests are frequently grouped by where they are added in the software development process,

    or by the level of specificity of the test.

    5.5.1 Low Level Testing:

    Unit testing:

    Unit testing refers to tests that verify the functionality of a specific section of code, usually at

    the function level. In an object-oriented environment, this is usually at the class level, and the

    minimal unit tests include the constructors and destructors.

    These type of tests are usually written by developers as they work on code (white-box style),

    to ensure that the specific function is working as expected. One function might have multipletests, to catch corner cases or other branches in the code. Unit testing alone cannot verify the

    functionality of a piece of software, but rather is used to assure that the building blocks the

    software uses work independently of each other.

    Unit testing is also called component testing .

    Integration testing:

    Integration testing is any type of software testing that seeks to verify the interfaces between

    components against a software design. Software components may be integrated in an iterative

    way or all together ("big bang"). Normally the former is considered a better practice since it

    allows interface issues to be localised more quickly and fixed.

    Integration testing works to expose defects in the interfaces and interaction between

    integrated components (modules). Progressively larger groups of tested software components

    33

  • 8/8/2019 Review Fin

    34/59

    corresponding to elements of the architectural design are integrated and tested until the

    software works as a system.

    .5.5.2 High Level Testing:

    Acceptance testing

    Acceptance testing can mean one of two things:

    1. A smoke test is used as an acceptance test prior to introducing a new build to the main

    testing process, i.e. before integration or regression.

    2. Acceptance testing performed by the customer, often in their lab environment on their

    own hardware, is known as user acceptance testing (UAT). Acceptance testing may be

    performed as part of the hand-off process between any two phases of development.

    Alpha testing

    Alpha testing is simulated or actual operational testing by potential users/customers or an

    independent test team at the developers' site. Alpha testing is often employed for off-the-shelf

    software as a form of internal acceptance testing, before the software goes to beta testing.

    Beta testing

    Beta testing comes after alpha testing. Versions of the software, known as beta versions, are

    released to a limited audience outside of the programming team. The software is released to

    groups of people so that further testing can ensure the product has few faults or bugs.

    Sometimes, beta versions are made available to the open public to increase the feedback field

    to a maximal number of future users.

    34

  • 8/8/2019 Review Fin

    35/59

    CHAPTER 6

    SCREEN SHOTS

    6.0 INTRODUCTION

    This session is concerned with the result and the output screens of our project. It gives out

    various input forms and output forms of various functions involved at several points of our

    project.

    6.1 SCREEN SHOTS

    6.1.1 Uploading the campaign file to be sent

    35

  • 8/8/2019 Review Fin

    36/59

    6.1.2 The main interface displaying the devices searched using Bluetoothand the processing result

    36

  • 8/8/2019 Review Fin

    37/59

  • 8/8/2019 Review Fin

    38/59

    6.1.4 Displaying the result of search devices with the device type icons

    38

  • 8/8/2019 Review Fin

    39/59

    6.1.5 The result of the campaign

    39

  • 8/8/2019 Review Fin

    40/59

  • 8/8/2019 Review Fin

    41/59

    6.1.7 File details and option to vary the search time

    41

  • 8/8/2019 Review Fin

    42/59

    6.1.8 Devices in the coverage area

    42

  • 8/8/2019 Review Fin

    43/59

    6.1.9 Database containing the campaign information

    43

  • 8/8/2019 Review Fin

    44/59

    CHAPTER 7

    IMPLEMENTATION

    7.1 PROJECT IMPLEMENTATION:

    The project is implemented in the form of an application. It consists of three modules

    Interface Module

    Bluetooth Module

    Database Module

    7.1.1 INTERFACE MODULE:

    The interface of the application is a Visual Basic form containing various options which

    interact with the advertiser accordingly.

    There is a menu bar containing three menu items

    1. File

    2. Options3. Info

    1. File : It contains the exit option

    2. Options : Contains two sub menu items

    Manual send: Contains options for searching the Bluetooth enabled devices in the

    area, manually selecting a particular device and sending a file to that device. Also

    displays the result of the file transfer.

    Sending options: This interface gives the facility for the user to create a new

    campaign by uploading a new file or use the previous file to run the existing

    campaign. Apart from that he can set the number of tries to a device, and also the type

    of devices he wishes to send.

    3. Info : It contains the About dialog box which displays the copyrights, version and users

    details.

    44

  • 8/8/2019 Review Fin

    45/59

    The main interface contains a play button which when clicked, the application starts

    searching for Bluetooth enabled devices in the coverage area. The detected devices are

    displayed in the interface and the uploaded file is sent to the detected devices.

    There are 7 tabs in the interface which gives various results of the campaign

    1. SR1 : Displays the processing result of the sent file to the recipients.

    2. SR2 : Displays the type of the detected device through an image.

    3. Info : Gives the information about the processed details such as success, ignored,

    rejected etc.

    4. current info : Gives information about the various variable values of the current

    session which includes

    5. files : It gives the information about the file sent to the detected devices and also gives

    the user an option to vary the search time.The image of the file sent can be seen if its a

    jpeg/bmp file. The content can be seen if its a text file.

    6. Coverage : It gives the information about the detected devices in the coverage area

    and displays the names of the devices.

    7. Status : It displays the status of the running thread.

    The campaign can be stop at anytime by clicking the stop button.

    7.1.2 BLUETOOTH MODULE:

    The Bluetooth Module mainly explains how the files are transferred to the detected

    destinations using the Bluetooth protocol stack which includes detecting of the devices and

    establishing the connection between the local and the target devices. The file transfer is done

    using the OBEX protocol. OBEX is the OBject EXchange protocol .

    First the Bluetooth enabled devices within the range are detected using Inquiry: The device on reaching a new environment would automatically initiated an

    inquiry to find out what access points are within its range. This will result in the

    following events: All nearby access points respond with

    a. Their addresses.

    b. The device picks one out the responding devices.

    Paging: The device will invoke a baseband procedure called paging. This results in

    45

  • 8/8/2019 Review Fin

    46/59

    synchronization of the device with the access point, in terms of its clock offset and

    phase in the frequency hop, among other required initializations.

    Link establishment: The LMP will now establish a link with the access point. As theapplication in this case is email, an ACL link will be used. Various setup steps will be

    carried out as described below.

    Service Discovery: The LMP will use the SDP (Service Discovery Protocol) to

    discover what services are available from the access point, in particular whether email

    access or access to the relevant host is possible from this access point or not. Let us

    assume that the service is available, otherwise, the application cannot proceed further.

    The information regarding the other services offered at the access point may be

    presented to the user.

    L2CAP channel: With information obtained from SDP, the device will create an

    L2CAP channel to the access point. This may be directly used by the application or

    another protocol like RFCOMM may be run over it.

    File Transfer using OBEX Protocol

    IrOBEX (shortly OBEX) is a session protocol developed by the Infrared Data Association

    (IrDA) to exchange objects in a simple and spontaneous manner. OBEX, which provides the

    same basic functionality as HTTP but in a much lighter fashion, uses a client-server model

    and is independent of the transport mechanism and transport API, provided it realizes a

    reliable transport base. In the first phase, RFCOMM is used as sole transport layer for

    OBEX . Future implementations are likely to support also TCP/IP as a transport.

    OBEX Push Operation

    The operation has five parameters

    1. Connect

    2. Disconnect

    3. Put4. Get

    46

  • 8/8/2019 Review Fin

    47/59

    5. Abort

    7.4 DATABASE MODULE:

    The Database is developed using MS ACCESS.

    Description: The Database consists of various tables which record different kinds of data.

    Beaming setting : It records the details of the uploaded file, the limit try count which

    is the chosen number of tries by the application to send that particular file to the

    devices if not processed and type of devices chosen for sending.

    OneFileBeam: It records various device details such as the Sent ID, Name of the

    device, Sent Blue ID, the class of device, Manufacturer, Status code which gives

    information about the result of the sent message, Last seen, Last Used, File sent,

    Duration, File size etc.

    47

  • 8/8/2019 Review Fin

    48/59

    CHAPTER 8

    CONCLUSION

    Mobile phones enabled with Bluetooth technology are becoming a burgeoning

    market, with over 70% of the mobile phones released every year coming with Bluetooth.

    Unlike cellular marketing such as SMS, MMS or WAP, Bluetooth is free to deliver and does

    not require personal information such as a mobile telephone number for the technology to

    work. Moreover Bluetooth Proximity Marketing is used to deliver content within a particular

    area enabling high degree of relevancy, thus producing greater returns for the campaign. No

    other advertising platform enables brands to deliver targeted content in specific areas, or

    combine the online/offline or mobile world in this way. So, in the coming years, Bluetooth

    marketing is sure to replace conventional forms of marketing in many places and fields .

    48

  • 8/8/2019 Review Fin

    49/59

    CHAPTER 9

    FUTURE SCOPE AND FURTHER EXTENSIONS

    Since it is a Bluetooth based application, there is a scope in further extending the features of

    the application. We an also implement an anti-virus protection, that helps in scanning the

    content to be sent to the customer which makes the application more reliable.

    Further we can also implement some options which make the application more user friendly

    such as scheduling of the campaign. Here we can give the user the option of setting the

    scheduling times to run the campaign for a particular day, for a particular time. We can also

    implement a feature with which the user can be able to check the progress in the marketing

    using the pie charts or bar diagrams by using the required information from the Database, that

    is, the final success and failure reports can be generated in the form of a graph.

    By using the BAP Bluetooth access points, the proximity area of the Bluetooth can beincreased so that the scope of improving the market is more. The application which we

    developed now is a desktop application and it can be further extended as a Web Application

    as there is a great demand for business connecting through the internet communities

    49

  • 8/8/2019 Review Fin

    50/59

    BIBILIOGRAPHY

    www.tutorial-reports.com/book/print/202, Bluetooth tutorial.

    www.en.wikipedia.org

    www.huetouch.com

    www. msdn.microsoft.com/en-us/library/aa923533.aspx, OBEX reference.

    www.bluecellnetworks.com/en/references.html

    www.bluetomorrow.com/about-bluetooth-technology.html

    http://www.search.com/reference/OBEX

    50

  • 8/8/2019 Review Fin

    51/59

    APPENDIX

    BLUETOOTH INTRODUCTION:

    Bluetooth is the name given to a new technology standard using short-range radio

    links, intended to replace the cable(s) connecting portable and or fixed electronic devices.

    The standard defines a uniform structure for a wide range of devices to communicate with

    each other, with minimal user effort. Its key features are robustness, low complexity, low power and low cost. The technology also offers wireless access to LANs, PSTN, the mobile

    phone network and the Internet for a host of home appliances and portable handheld

    interfaces. The immediate need for Bluetooth came from the desire to connect peripherals and

    devices without cables. The available technology-IrDA OBEX (IR Data Association Object

    Exchange Protocol) is based in IR links that are limited to line of sight connections.

    Bluetooth integration is further fuelled by the demand for mobile and wireless access to

    LANs, Internet over mobile and other existing networks, where the backbone is wired but the

    interface is free to move. This not only makes the network easier to use but also extends its

    reach. The advantages and rapid proliferation of LANs suggest that setting up personal area

    networks, that is, connections among devices in the proximity of the user, will have many

    beneficial uses.

    Bluetooth could also be used in home networking applications. With increasing numbers of

    homes having multiple PCs, the need for networks that are simple to install and maintain, is

    growing. There is also the commercial need to provide "information push" capabilities, which

    is important for handheld and other such mobile devices and this has been partially

    incorporated in Bluetooth. Bluetooths main strength is its ability to simultaneously handle

    both data and voice transmissions, allowing such innovative solutions as a mobile hands-free

    headset for voice calls, print to fax capability, and automatically synchronizing PDA, laptop,

    and cell phone address book applications.

    A.1 BLUETOOTH TECHNOLOGY:

    51

  • 8/8/2019 Review Fin

    52/59

    Since Bluetooth operates in the unlicensed ISM band that is also used by other devices such

    as 802.11 networks, baby monitors, garage door openers, microwave ovens etc, there is

    possibility of interference. Bluetooth uses Frequency Hop Spread Spectrum (FHSS) to avoid

    any interference. A Bluetooth channel is divided into time slots each 625 micro second in

    Bluetooth supports two kinds of links:

    Asynchronous Connectionless (ACL) links for data transmission

    Synchronous Connection oriented (SCO) links for audio/voice transmission.

    PROTOCOL STACK:

    The Bluetooth Special Interest Group (SIG) has developed the Bluetooth Protocol Stack.

    These specifications allow for developing interactive services and applications over

    interoperable radio modules and data communication protocols. Given below is an overview

    of the protocols in the specification. The main objective of these specifications is to set down

    the protocols that must be followed by companies when manufacturing and developing both

    software and hardware to interoperate with each other. To achieve this interoperability,

    matching applications (e.g., corresponding client and server application) in remote devices

    must run over identical protocol stacks. Different applications may run over different

    protocol stacks however they will all have one imperative factor that will allow them to be

    interoperable and that will be the use of a common Bluetooth data link and physical layer.

    The complete Bluetooth protocol stack is shown in figure below. It may seem that an

    application must use all protocols shown however not all applications will make use of all the

    protocols shown. Instead, applications run over one or more vertical slices from this protocol

    stack. The main principle in mind when developing the Bluetooth Protocol Architecture has

    been the maximization and the re-use of existing protocols for different purposes at the higher

    layers. The one main advantage is that existing (legacy) applications can be adapted to work

    with the Bluetooth Technology. The Bluetooth Protocol Architecture also allows for the use

    of commonly used application protocols on top of the Bluetooth-Specific protocols. In

    simpler terms, this permits new applications to take full advantage of the capabilities of the

    Bluetooth technology and for many applications that are already developed by vendors; they

    can take immediate advantage of hardware and software systems, which are also compliant

    with the Specification.

    52

  • 8/8/2019 Review Fin

    53/59

    The Bluetooth Protocol Stack Model

    PROTOCOL LAYER PROTOCOLS IN THE STACK:

    Bluetooth Core Protocols Baseband, LMP, L2CAP, SDP

    Cable Replacement Protocol RFCOMM

    Telephony Control Protocol TCS Binary, AT-commands

    Adopted Protocols PPP, UDP/TCP/IP, OBEX, WAP, vCard, vCal, IrMC, WAE

    OBEX Protocol

    IrOBEX (shortly OBEX) is a session protocol developed by the Infrared Data Association(IrDA) to exchange objects in a simple and spontaneous manner. OBEX, which provides the

    same basic functionality as HTTP but in a much lighter fashion, uses a client-server model

    and is independent of the transport mechanism and transport API, provided it realizes a

    reliable transport base. Along with the protocol itself, the "grammar" for OBEX

    conversations between devices, OBEX also provides a model for representing objects and

    operations. In addition, the OBEX protocol defines a folder-listing object, which is used to

    browse the contents of folders on remote device. In the first phase, RFCOMM is used as soletransport layer for OBEX . Future implementations are likely to support also TCP/IP as a

    53

  • 8/8/2019 Review Fin

    54/59

    transport. One of OBEX's earliest popular applications was in the Palm III personal digital

    assistant. This PDA and its many successors use OBEX to exchange business cards, data,

    even applications.

    OBEX is similar in design and function to HTTP in that a client uses a reliable transport to

    connect to a server and may then request or provide objects. But OBEX differs in many

    important respects:

    Transports . HTTP is normally layered above a TCP/IP port. OBEX is commonly

    implemented over an IrLAP/IrLMP/Tiny TP stack on an IrDA device. In Bluetooth,

    OBEX is implemented above Baseband/Link Manager/L2CAP/RFCOMM stack.

    Other such "bindings" of OBEX are possible.

    Binary transmissions . HTTP uses human-readable text, but OBEX uses binary-

    formatted type-length-value triplets called "Headers" to exchange information about a

    request or an object. These are much easier to parse by devices with limited resources.

    Session support . HTTP transactions are inherently stateless; generally an HTTP

    client opens a connection, makes a single request, receives its response, and closes the

    connection. In OBEX, a single transport connection may bear many relatedoperations. In fact, recent additions to the OBEX specification allow an abruptly

    closed transaction to be resumed with all state information intact.

    OBEX is the foundation for many higher-layer "profiles":

    In the IrDA:

    o Point and Shoot profile

    o Infrared Financial Messaging (IrFM) profile

    In the Bluetooth SIG:

    o Generic Object Exchange Profile

    o Object Push Profile (phone to phone transfers)

    o File Transfer Profile (phone to PC transfers)

    o Synchronization Profile

    o Basic Imaging Profile

    o Basic Printing Profile

    54

  • 8/8/2019 Review Fin

    55/59

    In the OMA:

    o SyncML binding

    File Transfer

    The file transfer usage model (See also the file transfer profile) offers the ability to transfer

    data objects from one device (e.g., PC, smart-phone, or PDA) to another. Object types

    include, but are not limited to, .xls, .ppt, .wav, .jpg, and .doc files, entire folders or directories

    or streaming media formats. Also, this usage model offers a possibility to browse the contents

    of the folders on a remote device. In the following figure, the required protocol stack

    presented for this usage model is presented. The figure does not show the LMP, Baseband,

    and Radio layers although those are used underneath.

    Protocol Stack for File Transfer Applications

    ESTABLISHING CONNECTIONS IN BLUETOOTH:

    This section describes the basic procedures to be followed by two or more Bluetooth devices

    to start a connection between themselves.

    Inquiry: The device on reaching a new environment would automatically initiated aninquiry to find out what access points are within its range. (If not, itll do so when the

    email application asks for a link.) This will result in the following events:

    All nearby access points respond with

    a. their addresses.

    b. The device picks one out the responding devices.

    Paging: The device will invoke a baseband procedure called paging. This results in

    55

  • 8/8/2019 Review Fin

    56/59

    synchronization of the device with the access point, in terms of its clock offset and

    phase in the frequency hop, among other required initializations.

    Link establishment: The LMP will now establish a link with the access point. As theapplication in this case is email, an ACL link will be used. Various setup steps will be

    carried out as described below.

    Service Discovery: The LMP will use the SDP (Service Discovery Protocol) to

    discover what services are available from the access point, in particular whether email

    access or access to the relevant host is possible from this access point or not. Let us

    assume that the service is available, otherwise, the application cannot proceed further.

    The information regarding the other services offered at the access point may be

    presented to the user.

    L2CAP channel: With information obtained from SDP, the device will create an

    L2CAP channel to the access point. This may be directly used by the application or

    another protocol like RFCOMM may be run over it.

    RFCOMM channel: Depending on the need of the email application an RFCOMM

    or other channel (in case of other applications) will be created over the L2CAP

    channel. This feature allows existing applications developed for serial ports to run

    without modification over Bluetooth platforms.

    Security: If the access point restricts its access to a particular set of users or otherwise

    offers secure mode communications to people having some prior registration with it,

    then at this stage, the access point will send a security request for "pairing". This will

    be successful if the user knows the correct PIN code to access the service. Note that

    the PIN is not transmitted over the wireless channel but another key generated from it

    is used, so that the PIN is difficult to compromise. Encryption will be invoked if

    secure mode is used.

    PPP: If a PPP link is used over serial modem as in dial up networking, the same

    56

  • 8/8/2019 Review Fin

    57/59

    application will now be able to run PPP over RFCOMM (which emulates the serial

    port). This link will allow the user to login to his email account.

    Network Protocols: The network protocols like TCP/IP, IPX , Apple talk can nowsend and receive data over the link.

    Bluetooth Security

    Bluetooth Technology Faces Security Threats

    Today, all communication technologies are facing the issue of privacy and identity theft.Bluetooth technology is no exception. The information and data we share through these

    communication technologies is both private and in many cases, critically important to us.

    Everyone knows that email services, company networks, and home networks all require

    security measures. What Bluetooth users need to realize, is: Bluetooth requires similar

    security measures.

    Recently, Bluetooth technology has been popping up in the news. Unfortunately, most of thenews involves confusion and misinformation regarding the security of Bluetooth. Recent

    reports have surfaced describing ways for hackers to crack Bluetooth devices security codes.

    Are the Threats Serious?

    The good news: Most of the recent Bluetooth security scares, like most scares, are over-

    dramatized and blown out of proportion. The truth is, these issues are easily combatable, and

    various measures are already in place to provide for the secure use of Bluetooth technology.

    Yes, it is true: There have been some Bluetooth cell phones that have been hacked into.

    However, it is most likely the case that those who have experienced these security breaches

    have not taken the appropriate precautions to protect their devices.

    According to the Bluetooth Special Interest Group (SIG), in order to break into a Bluetooth

    device, a hacker must:

    1. Force two paired Bluetooth devices to break their connection

    57

  • 8/8/2019 Review Fin

    58/59

    2. Steal the packets used to resend the PIN, then

    3. Decode the PIN

    The hacker must of course be within range of the Bluetooth device and, according to the

    Bluetooth SIG, be using very expensive developers equipment. The SIG suggests users

    create a longer PIN (8 digit is recommended).

    58

  • 8/8/2019 Review Fin

    59/59