This action might not be possible to undo. Are you sure you want to continue?
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 that’s increasing. Over 90% of those mobiles have Bluetooth technology creating a new digital global marketplace for any brand that wants to reach its audience.
Removes the need to use printed leaflets and reduce wastage.
Culturally relevant Today, marketing is more about "medium first, message second." 1
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- Introduction
The 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.
The modules are • •
Interface Module Bluetooth Module Database Module
CHAPTER 2 REQUIREMENTS ANALYSIS
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:
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 doesn’t 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
PC with Bluetooth 4
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.
1 Functional Diagrams: 6 .3.
1a 7 .3.Fig .
1b 8 .Fig 3.
1c 9 .Fig 3.
1d 10 .Fig 3.
ComponentModel Imports System.vb Imports Brecham.Xml. ' Read settings.Windows.Runtime.XPath Imports System. 11 .Sockets Imports InTheHand.CHAPTER 4 SAMPLE CODE Mainform.InteropServices Imports System.Forms. _ ByVal bInvert As Long) As Long #Region " New " Public Sub New() Try ' This call is required by the Windows Form Designer.Form Private Declare Function FlashWindow Lib "user32" _ (ByVal hwnd As Long.Text Imports InTheHand.Net.Net Imports System.Xml Imports System.Obex.Forms Public Class MainForm Inherits System.Windows.Obex 'eg ObexClientSession 'eg GuiObexSessionConnection Imports Brecham.IO Imports System. InitializeComponent() ' Add any initialization after the InitializeComponent() call.net Imports InTheHand.
DisplaySplashScreen = My.SelectedFolder = My.Settings.Application.Color Settings.YPosition = My.Settings.StationList Settings. If Me.Info.Volume = My.Settings.KeepOnTop Settings. Settings.TopMost = False MessageBox.OK.Reload() ' Set settings.Settings.YPosition Catch ex As ApplicationException ' If error occurs.DisplayVisualizations = My.Settings.DisplayVisualizations Settings.TopMost = True Then Me.Settings.RotateStationInfo Settings.TopMost = False 12 .Settings.DisplayCoverArt = My.XPosition = My.AutoPlay = My.DisplayCoverArt Settings.Application.KeepOnTop = My. cancel topmost. MessageBoxIcon.StartWithWindows = My. cancel topmost.ToolTips = My.SelectedFolder Settings.Error) Catch exc As Configuration.RotateStationInfo = My. _ My.Volume Settings.Settings.DisplaySplashScreen Settings.Show("An unhandled error has occurred in " & My.Settings.Color = My.SettingsPropertyWrongTypeException ' If error occurs.Message. If Me.Settings.StartAsIcon Settings. MessageBoxButtons.Title.TopMost = True Then Me.StationList = My.StartWithWindows Settings.LastButtonSelected Settings.Settings.LastButtonSelected = My.StartAsIcon = My.Settings.My.Settings.XPosition Settings.Title & vbCrLf & _ "The system returned the following information:" & vbCrLf & ex.ToolTips Settings.Settings.Settings.Info.Settings.Settings.AutoPlay Settings.
Error) Catch excep As AccessViolationException ' If error occurs.Application.Message. 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 . If Me. MessageBoxIcon.Application.Info. _ My. cancel topmost.Info.Title.Title.Application. _ My.OK.TopMost = False MessageBox.MessageBox.Show("An unhandled error has occurred in " & My.Title & vbCrLf & _ "The system returned the following information:" & vbCrLf & excep. MessageBoxButtons. MessageBoxButtons.TopMost = True Then Me.OK.Title & vbCrLf & _ "The system returned the following information:" & vbCrLf & exc.Info.Show("An unhandled error has occurred in " & My.Info.Application.Message.
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 .
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. compute whole hours and get remainder Do intHours = Int(intRemainder \ 3600000) intRemainder = intRemainder Mod 3600000 Loop Until intRemainder <= 3600000 ' there are 60000 milliseconds in one minute.DoEvents() ' updates tick counter intTicks intTicks = uTime ' there are 86400000 milliseconds in one day. compute whole minutes and get remainder Do intMinutes = Int(intRemainder \ 60000) 15 . compute whole days and get remainder Do intDays = Int(intTicks \ 86400000) intRemainder = intTicks Mod 86400000 Loop Until intRemainder <= 86400000 ' there are 3600000 milliseconds in one hour.
Length = 1 Then strMinutes = "0" & Trim(CStr(intMinutes)) & ":" ElseIf Trim(CStr(intMinutes)).Length = 2 Then strDays = Trim(CStr(intDays)) & ":" End If ' format hours If intHours = 0 And intDays = 0 Then strHours = "" ElseIf Trim(CStr(intHours)). compute whole seconds and get remainder Do intSeconds = Int(intRemainder \ 1000) intRemainder = intRemainder Mod 1000 Loop Until intRemainder <= 1000 ' format days If intDays = 0 Then strDays = "" ElseIf Trim(CStr(intDays)).Length = 2 Then 16 .Length = 1 Then strHours = "0" & Trim(CStr(intHours)) & ":" ElseIf Trim(CStr(intHours)).intRemainder = intRemainder Mod 60000 Loop Until intRemainder <= 60000 ' there are 1000 milliseconds in one second.Length = 1 Then strDays = " " & Trim(CStr(intDays)) & ":" ElseIf Trim(CStr(intDays)).Length = 2 Then strHours = Trim(CStr(intHours)) & ":" End If ' format minutes If intMinutes = 0 Then strMinutes = "00" & ":" ElseIf Trim(CStr(intMinutes)).
ComponentModel. ByVal e As System.Length = 1 Then strSeconds = "0" & Trim(CStr(intSeconds)) ElseIf Trim(CStr(intSeconds)).RunWorkerCompleted SyncLock SuccessSendCountLocking SuccessSendCount += 1 17 .strMinutes = Trim(CStr(intMinutes)) & ":" End If ' format seconds If intSeconds = 0 Then strSeconds = "00" 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.RunWorkerCompletedEventArgs) Handles BackgroundWorker1.
Second.Resources.SubItems.Enabled = False btnBluetoothDevice1.Fuchsia SaveOneFileBlueAddress(DevicesInfo(0). OneFileName. DevicesInfo(3).RunWorkerCompletedEventArgs) Handles BackgroundWorker2.Refresh() Dim LWL As ListViewItem LWL = ListView1.Resources. DevicesInfo(4). DevicesInfo(2).Text = "Success to send for " & DevicesInfo(1) & ".Threading.Add(DuSec) ListView1. DevicesInfo(1)) LWL. WorkerTime1.Insert(0.Items(0).End SyncLock btnBluetoothDevice1.RunWorkerCompleted SyncLock SuccessSendCountLocking SuccessSendCount += 1 18 ." & " Type:" & DevicesInfo(2) Label12. DuSec. Now) Label12.Text = "Ready" Dim DevicesInfo() As String DevicesInfo = Split(Worker1. "OK. "-!@#$%^-") Dim DuSec As Integer = 0 DuSec = DateDiff(DateInterval.ComponentModel.ToString) OneFileRemoveTempPAT(DevicesInfo(0)) btnBluetoothDevice1. DevicesInfo(1).BackColor = Color. ByVal e As System.BackgroundImage = My. DevicesInfo(5).Items. " & DuSec & " Seconds .BackgroundImage = My.Value = 0 System.FuchsiaGradient SyncLock SendCountLock SendCount -= 1 End SyncLock btnBluetoothDevice1.Tag = "" btnBluetoothDevice1. Final".Thread.GrayGradient ProgressBar1.SubItems.Add("Success") LWL.Sleep(500) End Sub Private Sub BackgroundWorker2_RunWorkerCompleted(ByVal sender As Object.
WorkerTime2.Threading.Tag = "" btnBluetoothDevice2. DevicesInfo(4). Now) Label12.ToString) OneFileRemoveTempPAT(DevicesInfo(0)) btnBluetoothDevice2.Add(DuSec) ListView1. OneFileName.RunWorkerCompletedEventArgs) Handles BackgroundWorker3.SubItems.ComponentModel. "-!@#$%^-") Dim DuSec As Integer = 0 DuSec = DateDiff(DateInterval. " & DuSec & " Seconds .Items(0)." & " Type:" & DevicesInfo(2) Label12.GrayGradient ProgressBar2. DevicesInfo(5).Refresh() Dim LWL As ListViewItem LWL = ListView1. DevicesInfo(3).BackgroundImage = My.Thread. "OK.Sleep(500) End Sub Private Sub BackgroundWorker3_RunWorkerCompleted(ByVal sender As Object. ByVal e As System.Resources.Insert(0.Add("Success") LWL.FuchsiaGradient SyncLock SendCountLock SendCount -= 1 End SyncLock btnBluetoothDevice2.Text = "Ready" btnBluetoothDevice2.Value = 0 System.RunWorkerCompleted SyncLock SuccessSendCountLocking SuccessSendCount += 1 19 . DevicesInfo(2). DevicesInfo(1)) LWL.Text = "Success to send for " & DevicesInfo(1) & ". DuSec.BackgroundImage = My. Final".End SyncLock btnBluetoothDevice2.Fuchsia SaveOneFileBlueAddress(DevicesInfo(0).Second.Enabled = False Dim DevicesInfo() As String DevicesInfo = Split(Worker2.Items. DevicesInfo(1).SubItems.Resources.BackColor = Color.
Tag = "" btnBluetoothDevice3.ToString) OneFileRemoveTempPAT(DevicesInfo(0)) btnBluetoothDevice3.Sleep(500) End Sub Private Sub BackgroundWorker4_RunWorkerCompleted(ByVal sender As Object. DevicesInfo(4).Insert(0.Second.BackgroundImage = My.Fuchsia SaveOneFileBlueAddress(DevicesInfo(0).Text = "Success to send for " & DevicesInfo(1) & ".Refresh() Dim LWL As ListViewItem LWL = ListView1. OneFileName.Add("Success") LWL.BackColor = Color. Now) Label12.SubItems.End SyncLock btnBluetoothDevice3.RunWorkerCompleted SyncLock SuccessSendCountLocking SuccessSendCount += 1 20 . WorkerTime3.Value = 0 System.Resources.SubItems.Add(DuSec) ListView1.BackgroundImage = My. ByVal e As System. DevicesInfo(1). DevicesInfo(2).Enabled = False Dim DevicesInfo() As String DevicesInfo = Split(Worker3. DuSec. "OK." & " Type:" & DevicesInfo(2) Label12.FuchsiaGradient SyncLock SendCountLock SendCount -= 1 End SyncLock btnBluetoothDevice3.Threading. " & DuSec & " Seconds .RunWorkerCompletedEventArgs) Handles BackgroundWorker4. DevicesInfo(5).Items(0).ComponentModel. "-!@#$%^-") Dim DuSec As Integer = 0 WorkerTime1 = Now DuSec = DateDiff(DateInterval.Thread. DevicesInfo(3). DevicesInfo(1)) LWL.Items.Text = "Ready" btnBluetoothDevice3.Resources. Final".GrayGradient ProgressBar3.
GrayGradient progressBar4.Second.Resources.RunWorkerCompletedEventArgs) Handles BackgroundWorker5.BackColor = Color.RunWorkerCompleted SyncLock SuccessSendCountLocking 21 .Fuchsia SaveOneFileBlueAddress(DevicesInfo(0).Add(DuSec) ListView1. Final".Refresh() Dim LWL As ListViewItem LWL = ListView1.Add("Success") LWL.Sleep(500) End Sub Private Sub BackgroundWorker5_RunWorkerCompleted(ByVal sender As Object. DevicesInfo(2). "OK.Value = 0 System. DuSec.Text = "Success to send for " & DevicesInfo(1) & ".Text = "Ready" btnBluetoothDevice4.End SyncLock btnBluetoothDevice4.Resources. "-!@#$%^-") Dim DuSec As Integer = 0 WorkerTime1 = Now DuSec = DateDiff(DateInterval. Now) Label12.Tag = "" btnBluetoothDevice4. DevicesInfo(1).BackgroundImage = My. DevicesInfo(4).FuchsiaGradient SyncLock SendCountLock SendCount -= 1 End SyncLock btnBluetoothDevice4.BackgroundImage = My.ComponentModel. WorkerTime4. DevicesInfo(3).SubItems. " & DuSec & " Seconds . DevicesInfo(1)) LWL.ToString) OneFileRemoveTempPAT(DevicesInfo(0)) btnBluetoothDevice4.Items. ByVal e As System.SubItems.Enabled = False Dim DevicesInfo() As String DevicesInfo = Split(Worker4." & " Type:" & DevicesInfo(2) Label12. DevicesInfo(5).Items(0).Thread.Insert(0.Threading. OneFileName.
Second. WorkerTime5. DevicesInfo(3).RunWorkerCompleted 22 .ToString) OneFileRemoveTempPAT(DevicesInfo(0)) btnBluetoothDevice5.Text = "Success to send for " & DevicesInfo(1) & ".Thread.SuccessSendCount += 1 End SyncLock btnBluetoothDevice5.SubItems.Value = 0 System.Enabled = False Dim DevicesInfo() As String DevicesInfo = Split(Worker5. DevicesInfo(1). DevicesInfo(1)) LWL. " & DuSec & " Seconds .BackgroundImage = My.BackgroundImage = My.Insert(0. "OK.Sleep(500) End Sub Private Sub BackgroundWorker6_RunWorkerCompleted(ByVal sender As Object.FuchsiaGradient SyncLock SendCountLock SendCount -= 1 End SyncLock btnBluetoothDevice5.Resources. Final".ComponentModel.SubItems.Items." & " Type:" & DevicesInfo(2) Label12.GrayGradient ProgressBar5. DevicesInfo(2). OneFileName.Add(DuSec) ListView1.Fuchsia SaveOneFileBlueAddress(DevicesInfo(0). DevicesInfo(4).Items(0).RunWorkerCompletedEventArgs) Handles BackgroundWorker6. ByVal e As System.BackColor = Color.Threading. DuSec. DevicesInfo(5).Resources. Now) Label12.Text = "Ready" btnBluetoothDevice5.Add("Success") LWL.Refresh() Dim LWL As ListViewItem LWL = ListView1.Tag = "" btnBluetoothDevice5. "-!@#$%^-") Dim DuSec As Integer = 0 WorkerTime1 = Now DuSec = DateDiff(DateInterval.
Add(DuSec) ListView1. DevicesInfo(1)) LWL. "-!@#$%^-") Dim DuSec As Integer = 0 WorkerTime1 = Now DuSec = DateDiff(DateInterval.Enabled = False Dim DevicesInfo() As String DevicesInfo = Split(Worker6.Resources. DevicesInfo(4).Threading.Resources.Insert(0.Second.SubItems.Refresh() Dim LWL As ListViewItem LWL = ListView1.Thread.Add("Success") LWL. OneFileName. Final". DevicesInfo(1). Now) Label12.BackgroundImage = My.GrayGradient ProgressBar6.SyncLock SuccessSendCountLocking SuccessSendCount += 1 End SyncLock btnBluetoothDevice6. DuSec.Value = 0 System.BackColor = Color. DevicesInfo(2).SubItems.Text = "Ready" btnBluetoothDevice6.ToString) OneFileRemoveTempPAT(DevicesInfo(0)) btnBluetoothDevice6." & " Type:" & DevicesInfo(2) Label12. "OK.Text = "Success to send for " & DevicesInfo(1) & ".Items.BackgroundImage = My.FuchsiaGradient SyncLock SendCountLock SendCount -= 1 End SyncLock btnBluetoothDevice6.Tag = "" btnBluetoothDevice6. DevicesInfo(5). WorkerTime6. " & DuSec & " Seconds .Items(0).Sleep(500) End Sub 23 . DevicesInfo(3).Fuchsia SaveOneFileBlueAddress(DevicesInfo(0).
Fuchsia SaveOneFileBlueAddress(DevicesInfo(0).Resources.Insert(0. "OK. DevicesInfo(1)) LWL. OneFileName. DevicesInfo(1).RunWorkerCompletedEventArgs) Handles BackgroundWorker7.Add("Success") LWL.ComponentModel.ToString) OneFileRemoveTempPAT(DevicesInfo(0)) btnBluetoothDevice7.Tag = "" btnBluetoothDevice7.Items. DevicesInfo(4). " & DuSec & " Seconds .SubItems.Thread.Refresh() Dim LWL As ListViewItem LWL = ListView1. DevicesInfo(3).Text = "Success to send for " & DevicesInfo(1) & ". ByVal e As System.Threading.Second.RunWorkerCompleted SyncLock SuccessSendCountLocking SuccessSendCount += 1 End SyncLock btnBluetoothDevice7.Sleep(500) End Sub 24 .Text = "Ready" btnBluetoothDevice7.GrayGradient ProgressBar7.SubItems.Value = 0 System. Final".Items(0)." & " Type:" & DevicesInfo(2) Label12.Resources. Now) Label12.FuchsiaGradient SyncLock SendCountLock SendCount -= 1 End SyncLock btnBluetoothDevice7.BackgroundImage = My. DevicesInfo(5).Private Sub BackgroundWorker7_RunWorkerCompleted(ByVal sender As Object. DevicesInfo(2).Enabled = False Dim DevicesInfo() As String DevicesInfo = Split(Worker7. WorkerTime7.BackgroundImage = My.BackColor = Color.Add(DuSec) ListView1. "-!@#$%^-") Dim DuSec As Integer = 0 WorkerTime1 = Now DuSec = DateDiff(DateInterval. DuSec.
args. Nothing. args.UtcNow Dim elapsed As TimeSpan Dim putStream As ObexPutStream = Nothing WorkerTime1 = Now Try putStream = args.Abort("User cancelled") Exit While End If length = args.CancellationPending) Then e. rate-limited.Source.Read(buffer. 0.Source. ByVal e As System.DoWork Dim args As BgWorkerArgs = CType(e.Cancel = True putStream.Source. 0.lastProgress If (elapsed > updatePeriod) Then ReportProgress1(args. args. 250) Dim lastProgress As DateTime = DateTime.Connection. 0.Position.UtcNow .UtcNow End If End While ReportProgress1(args.Source.Argument. BgWorkerArgs) Dim buffer(1023) As Byte Dim length As Int32 Dim updatePeriod As New TimeSpan(0.Length) While (True) If (BackgroundWorker1.Length) 25 .Position. 0.ComponentModel.Object.ObexClientSession.Name.Source. 0.Length) ReportProgress1(0. length) ' Progress reporting.Length) If (length = 0) Then Exit While End If putStream.Length) lastProgress = DateTime.DoWorkEventArgs) Handles BackgroundWorker1. args.Source.Source.Put(args.Write(buffer. buffer. elapsed = DateTime.Private Sub BackgroundWorker1_DoWork(ByVal sender As System.
Close() End If args. BgWorkerArgs) Dim buffer(1023) As Byte Dim length As Int32 Dim updatePeriod As New TimeSpan(0.Connection.ProgressChanged ProgressBar1. "-!@#$%^-") Dim args As BgWorkerArgs = CType(e.ProgressChangedEventArgs) Handles BackgroundWorker1.Close() args.UtcNow 26 .ProgressPercentage End Sub Private Sub BackgroundWorker2_DoWork(ByVal sender As System.Argument. Int32) End If BackgroundWorker1.0 * position) / length.ObexClientSession. 0.Object.ComponentModel.ComponentModel.ReportProgress(progressPercentage) End Sub Private Sub BackgroundWorker1_ProgressChanged(ByVal sender As Object.Dispose() End Try End Sub Private Sub ReportProgress1(ByVal position As Int64.DoWorkEventArgs) Handles BackgroundWorker2. ByVal e As System.Value = e. 250) Dim lastProgress As DateTime = DateTime. ByVal e As System. 0.DoWork Dim DevicesInfo() As String DevicesInfo = Split(Worker2. ByVal length As Int64) Dim progressPercentage As Int32 If length = 0 Then progressPercentage = 100 Else progressPercentage = CType((100.Finally If Not IsNothing(putStream) Then putStream.Source. 0.
Position.Put(args.Dim elapsed As TimeSpan Dim putStream As ObexPutStream = Nothing WorkerTime2 = Now ' Try putStream = args.Name.Length) lastProgress = DateTime.lastProgress If (elapsed > updatePeriod) Then ReportProgress2(args.Source.UtcNow .UtcNow End If End While ReportProgress2(args. length) elapsed = DateTime.Source.Source. Nothing. args.ObexClientSession. args.ObexClientSession. 0.Connection.Connection.Source.Position.Read(buffer. 0.Length) Finally If Not IsNothing(putStream) Then putStream.Close() End If args. args.Dispose() End Try End Sub 27 .CancellationPending) Then e. args.Close() args.Length) If (length = 0) Then Exit While End If putStream.Source.Source.Source.Length) While (True) If (BackgroundWorker2.Source. buffer.Abort("User cancelled") Exit While End If length = args.Cancel = True putStream.Length) ReportProgress2(0.Write(buffer.
ByVal length As Int64) Dim progressPercentage As Int32 If length = 0 Then progressPercentage = 100 Else progressPercentage = CType((100.0 * position) / length.DoWork Dim DevicesInfo() As String DevicesInfo = Split(Worker3. ByVal e As System. "-!@#$%^-") Dim args As BgWorkerArgs = CType(e.ComponentModel.Put(args.Name. 250) Dim lastProgress As DateTime = DateTime.Private Sub ReportProgress2(ByVal position As Int64.ReportProgress(progressPercentage) End Sub Private Sub BackgroundWorker2_ProgressChanged(ByVal sender As Object. Int32) End If BackgroundWorker2. args. 0.Object.Connection.DoWorkEventArgs) Handles BackgroundWorker3.ObexClientSession. ByVal e As System. args.UtcNow Dim elapsed As TimeSpan Dim putStream As ObexPutStream = Nothing WorkerTime3 = Now ' Try putStream = args.ProgressChanged ProgressBar2.Value = e.Source. Nothing. 0. 0.Source.Argument.ComponentModel.ProgressPercentage End Sub Private Sub BackgroundWorker3_DoWork(ByVal sender As System.Length) ReportProgress3(0.Length) 28 . BgWorkerArgs) Dim buffer(1023) As Byte Dim length As Int32 Dim updatePeriod As New TimeSpan(0.ProgressChangedEventArgs) Handles BackgroundWorker2.
Source. 0. rate-limited.Abort("User cancelled") Exit While End If length = args.UtcNow .While (True) If (BackgroundWorker3.Write(buffer.Close() End If args. args. ByVal length As Int64) Dim progressPercentage As Int32 If length = 0 Then progressPercentage = 100 Else 29 .Read(buffer.Position.Connection.Length) If (length = 0) Then Exit While End If putStream.Dispose() End Try End Sub Private Sub ReportProgress3(ByVal position As Int64.CancellationPending) Then e.Close() args.Source.Source.Length) lastProgress = DateTime.Source. 0.Position.lastProgress If (elapsed > updatePeriod) Then ReportProgress3(args.Length) Finally If Not IsNothing(putStream) Then putStream. elapsed = DateTime. args.UtcNow End If End While ' The final update of the progress bar ReportProgress3(args.Source.Cancel = True putStream.Source. length) ' Progress reporting. buffer.ObexClientSession.
0 * position) / length.progressPercentage = CType((100.ReportProgress(progressPercentage) End Sub 30 . Int32) End If BackgroundWorker3.
design and code generation. • Code verification: Coding is a phase where the project takes it living.2 Verification Testing: • Requirement verification: For the successful completion of project requirement verification plays a major role.1 Software Testing Software testing is a critical element of software quality assurance and represents the ultimate review of specification. naming of the variables. For an efficient project to be implemented proper coding should have to be carried out. which is aimed at ensuring that the system works accurately and efficiently before live operation commences.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. The next sages of the project should be carried out only after getting the approval from the client. System testing is a stage of implementation. 5.CHAPTER 5 TESTING 5. 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. 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. Code verification should have to carry for the proper maintenance of the project. Verification for the comment. function definition etc should have to be verified in this phase 5. 31 .
Specification-based testing: Specification-based testing aims to test the functionality of software according to the applicable requirements. boundary value analysis.• 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. all-pairs testing. fuzz testing.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.creating tests to satisfy some criteria of code coverage application using public and private APIs • (e.g. the test object.improving the coverage of a test by Mutation testing methods Static testing . Types of white box testing The following types of white box testing exist: • API testing (application programming interface) .White box testing includes all static testing introducing faults to test code paths • • 5. model-based testing.4.4 Testing methods 5. the tester inputs data into. This level of testing usually requires thorough test cases to be provided to the tester. Black box testing methods include: equivalence partitioning.4. and only sees the output from. exploratory testing and specification-based testing. Thus. who then can simply verify that for a 32 . traceability matrix.2 Black box testing: Black box testing treats the software as a "black box"—without any knowledge of internal implementation. 5.. the test designer can create tests to cause all statements in the program to be executed at least once) • Fault injection methods .testing of the Code coverage .
5. and the disadvantage of "blind exploring. Integration testing: Integration testing is any type of software testing that seeks to verify the interfaces between components against a software design. the output value (or behavior). Unit testing alone cannot verify the functionality of a piece of software. Unit testing is also called component testing.given input. Therefore. Integration testing works to expose defects in the interfaces and interaction between integrated components (modules). These type of tests are usually written by developers as they work on code (white-box style). usually at the function level. Software components may be integrated in an iterative way or all together ("big bang")." on the one hand.1 Low Level Testing: Unit testing: Unit testing refers to tests that verify the functionality of a specific section of code." on the other. but rather is used to assure that the building blocks the software uses work independently of each other. In an object-oriented environment. and the minimal unit tests include the constructors and destructors. to ensure that the specific function is working as expected. One function might have multiple tests. 5. 5. Progressively larger groups of tested software components 33 . black box testing has the advantage of "an unaffiliated opinion.5 Testing levels Tests are frequently grouped by where they are added in the software development process. to catch corner cases or other branches in the code. Normally the former is considered a better practice since it allows interface issues to be localised more quickly and fixed. or by the level of specificity of the test. either "is" or "is not" the same as the expected value specified in the test case. this is usually at the class level.
.corresponding to elements of the architectural design are integrated and tested until the software works as a system.2 High Level Testing: Acceptance testing Acceptance testing can mean one of two things: 1. Versions of the software. 2.e. Sometimes. Acceptance testing may be performed as part of the hand-off process between any two phases of development. Acceptance testing performed by the customer. known as beta versions.5. i. often in their lab environment on their own hardware. are released to a limited audience outside of the programming team. before integration or regression. Alpha testing Alpha testing is simulated or actual operational testing by potential users/customers or an independent test team at the developers' site. 34 . The software is released to groups of people so that further testing can ensure the product has few faults or bugs. A smoke test is used as an acceptance test prior to introducing a new build to the main testing process. beta versions are made available to the open public to increase the feedback field to a maximal number of future users. Beta testing Beta testing comes after alpha testing. Alpha testing is often employed for off-the-shelf software as a form of internal acceptance testing. before the software goes to beta testing.5. is known as user acceptance testing (UAT).
It gives out various input forms and output forms of various functions involved at several points of our project.CHAPTER 6 SCREEN SHOTS 6.0 INTRODUCTION This session is concerned with the result and the output screens of our project.1 SCREEN SHOTS 6.1 Uploading the campaign file to be sent 35 . 6.1.
6.2 The main interface displaying the devices searched using Bluetooth and the processing result 36 .1.
3 Manual sending a file to a particular device 37 .6.1.
6.1.4 Displaying the result of search devices with the device type icons 38 .
1.5 The result of the campaign 39 .6.
6.1.6 The values or results of various variables in the current session 40 .
7 File details and option to vary the search time 41 .1.6.
6.1.8 Devices in the coverage area 42 .
9 Database containing the campaign information 43 .6.1.
44 .1. It consists of three modules • Interface Module • Bluetooth Module • Database Module 7. File: It contains the exit option 2.CHAPTER 7 IMPLEMENTATION 7. Info : It contains the About dialog box which displays the copyrights.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. and also the type of devices he wishes to send. Info 1. manually selecting a particular device and sending a file to that device. Options: Contains two sub menu items Manual send: Contains options for searching the Bluetooth enabled devices in the area. 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. 3. File 2. Options 3. version and users details. Apart from that he can set the number of tries to a device.1 PROJECT IMPLEMENTATION: The project is implemented in the form of an application. Also displays the result of the file transfer.
ignored. 7. Status: It displays the status of the running thread. 2. 6. 4. This results in 45 . Info: Gives the information about the processed details such as success.The image of the file sent can be seen if its a jpeg/bmp file. The content can be seen if it’s a text file. • Paging: The device will invoke a baseband procedure called paging. OBEX is the OBject EXchange protocol . 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 application starts searching for Bluetooth enabled devices in the coverage area. There are 7 tabs in the interface which gives various results of the campaign 1. b. The device picks one out the responding devices.1. SR1: Displays the processing result of the sent file to the recipients. 7.The main interface contains a play button which when clicked. Coverage: It gives the information about the detected devices in the coverage area and displays the names of the devices. The file transfer is done using the OBEX protocol. SR2: Displays the type of the detected device through an image. 3. This will result in the following events: All nearby access points respond with a. current info: Gives information about the various variable values of the current session which includes 5. Their addresses. The campaign can be stop at anytime by clicking the stop button.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. rejected etc. The detected devices are displayed in the interface and the uploaded file is sent to the detected devices. 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.
provided it realizes a reliable transport base. the application cannot proceed further. among other required initializations. in particular whether email access or access to the relevant host is possible from this access point or not. Put 4. which provides the same basic functionality as HTTP but in a much lighter fashion. OBEX. The information regarding the other services offered at the access point may be presented to the user. uses a client-server model and is independent of the transport mechanism and transport API. 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. • L2CAP channel: With information obtained from SDP. OBEX Push Operation The operation has five parameters 1. Get 46 . In the first phase.synchronization of the device with the access point. Let us assume that the service is available. Future implementations are likely to support also TCP/IP as a transport. in terms of its clock offset and phase in the frequency hop. the device will create an L2CAP channel to the access point. an ACL link will be used. Connect 2. 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. RFCOMM is used as sole transport layer for OBEX . • Link establishment: The LMP will now establish a link with the access point. Disconnect 3. As the application in this case is email. otherwise. This may be directly used by the application or another protocol like RFCOMM may be run over it.
5.4 DATABASE MODULE: The Database is developed using MS ACCESS. Last seen. Duration. Abort 7. Status code which gives information about the result of the sent message. the class of device. • OneFileBeam: It records various device details such as the Sent ID. Description: The Database consists of various tables which record different kinds of data. File sent. • 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. Last Used. Name of the device. File size etc. Manufacturer. Sent Blue ID. 47 .
48 . Bluetooth marketing is sure to replace conventional forms of marketing in many places and fields. Moreover Bluetooth Proximity Marketing is used to deliver content within a particular area enabling high degree of relevancy. MMS or WAP. with over 70% of the mobile phones released every year coming with Bluetooth. in the coming years. So. or combine the online/offline or mobile world in this way. Unlike cellular marketing such as SMS. Bluetooth is free to deliver and does not require personal information such as a mobile telephone number for the technology to work. No other advertising platform enables brands to deliver targeted content in specific areas. thus producing greater returns for the campaign.CHAPTER 8 CONCLUSION Mobile phones enabled with Bluetooth technology are becoming a burgeoning market.
that helps in scanning the content to be sent to the customer which makes the application more reliable. the proximity area of the Bluetooth can be increased so that the scope of improving the market is more.CHAPTER 9 FUTURE SCOPE AND FURTHER EXTENSIONS Since it is a Bluetooth based application. We an also implement an anti-virus protection. By using the BAP Bluetooth access points. there is a scope in further extending the features of the application. 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. the final success and failure reports can be generated in the form of a graph. Further we can also implement some options which make the application more user friendly such as scheduling of the campaign. 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 . 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. that is.
com/reference/OBEX 50 .en.microsoft.tutorial-reports. www.wikipedia.com/en/references.bluecellnetworks.html www.bluetomorrow.com/about-bluetooth-technology.com www. msdn.aspx. OBEX reference.BIBILIOGRAPHY • • • • • • • www.html http://www.com/en-us/library/aa923533.huetouch.search.org www. Bluetooth tutorial.com/book/print/202. www.
Bluetooth integration is further fuelled by the demand for mobile and wireless access to LANs. The immediate need for Bluetooth came from the desire to connect peripherals and devices without cables. and automatically synchronizing PDA. will have many beneficial uses. The advantages and rapid proliferation of LANs suggest that setting up personal area networks. This not only makes the network easier to use but also extends its reach. the need for networks that are simple to install and maintain. The technology also offers wireless access to LANs. where the backbone is wired but the interface is free to move. There is also the commercial need to provide "information push" capabilities. laptop. low complexity. low power and low cost. allowing such innovative solutions as a mobile hands-free headset for voice calls. intended to replace the cable(s) connecting portable and or fixed electronic devices. which is important for handheld and other such mobile devices and this has been partially incorporated in Bluetooth. Internet over mobile and other existing networks. PSTN. A.1 BLUETOOTH TECHNOLOGY: 51 . Bluetooth’s main strength is its ability to simultaneously handle both data and voice transmissions. is growing. with minimal user effort. and cell phone address book applications. The standard defines a uniform structure for a wide range of devices to communicate with each other. print to fax capability. connections among devices in the proximity of the user. Bluetooth could also be used in home networking applications. the mobile phone network and the Internet for a host of home appliances and portable handheld interfaces. The available technology-IrDA OBEX (IR Data Association Object Exchange Protocol) is based in IR links that are limited to line of sight connections. Its key features are robustness. that is. With increasing numbers of homes having multiple PCs.APPENDIX BLUETOOTH INTRODUCTION: Bluetooth is the name given to a new technology standard using short-range radio links.
Instead. baby monitors. they can take immediate advantage of hardware and software systems. 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. 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. It may seem that an application must use all protocols shown however not all applications will make use of all the protocols shown. Given below is an overview of the protocols in the specification. which are also compliant with the Specification.g. 52 .Since Bluetooth operates in the unlicensed ISM band that is also used by other devices such as 802. Bluetooth uses Frequency Hop Spread Spectrum (FHSS) to avoid any interference. These specifications allow for developing interactive services and applications over interoperable radio modules and data communication protocols. 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. applications run over one or more vertical slices from this protocol stack. In simpler terms. there is possibility of interference. microwave ovens etc. garage door openers.11 networks. PROTOCOL STACK: The Bluetooth Special Interest Group (SIG) has developed the Bluetooth Protocol Stack. 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. matching applications (e. corresponding client and server application) in remote devices must run over identical protocol stacks.. To achieve this interoperability. 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 complete Bluetooth protocol stack is shown in figure below. 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 addition. RFCOMM is used as sole transport layer for OBEX . Along with the protocol itself. LMP. vCal. the OBEX protocol defines a folder-listing object. WAP. OBEX also provides a model for representing objects and operations. OBEX. 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. IrMC. UDP/TCP/IP. OBEX.The Bluetooth Protocol Stack Model PROTOCOL LAYER PROTOCOLS IN THE STACK: • • • • Bluetooth Core Protocols Baseband. AT-commands Adopted Protocols PPP. which is used to browse the contents of folders on remote device. In the first phase. L2CAP. uses a client-server model and is independent of the transport mechanism and transport API. provided it realizes a reliable transport base. vCard. which provides the same basic functionality as HTTP but in a much lighter fashion. the "grammar" for OBEX conversations between devices. SDP Cable Replacement Protocol RFCOMM Telephony Control Protocol TCS Binary. Future implementations are likely to support also TCP/IP as a 53 .
data. but OBEX uses binaryformatted type-length-value triplets called "Headers" to exchange information about a request or an object. One of OBEX's earliest popular applications was in the Palm III personal digital assistant. In OBEX. receives its response. These are much easier to parse by devices with limited resources. OBEX is commonly implemented over an IrLAP/IrLMP/Tiny TP stack on an IrDA device. OBEX is the foundation for many higher-layer "profiles": • In the IrDA: o o Point and Shoot profile Infrared Financial Messaging (IrFM) profile Generic Object Exchange Profile Object Push Profile (phone to phone transfers) File Transfer Profile (phone to PC transfers) Synchronization Profile Basic Imaging Profile Basic Printing Profile 54 • In the Bluetooth SIG: o o o o o o . In fact. HTTP is normally layered above a TCP/IP port. This PDA and its many successors use OBEX to exchange business cards. Other such "bindings" of OBEX are possible. makes a single request. OBEX is implemented above Baseband/Link Manager/L2CAP/RFCOMM stack. a single transport connection may bear many related operations. even applications. recent additions to the OBEX specification allow an abruptly closed transaction to be resumed with all state information intact. HTTP transactions are inherently stateless. But OBEX differs in many important respects: • Transports. • Session support. and closes the connection. generally an HTTP client opens a connection.transport. In Bluetooth. • Binary transmissions. 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. HTTP uses human-readable text.
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.) This will result in the following events: All nearby access points respond with a..g. In the following figure. or PDA) to another. Object types include. (If not.jpg. The device picks one out the responding devices. • Inquiry: The device on reaching a new environment would automatically initiated an inquiry to find out what access points are within its range. • Paging: The device will invoke a baseband procedure called paging. smart-phone. but are not limited to. the required protocol stack presented for this usage model is presented. entire folders or directories or streaming media formats.doc files.ppt.• 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. and Radio layers although those are used underneath.xls. . PC. . this usage model offers a possibility to browse the contents of the folders on a remote device. . Also. . it’ll do so when the email application asks for a link. Baseband. and .wav. b. their addresses. The figure does not show the LMP. This results in 55 .
an ACL link will be used. This may be directly used by the application or another protocol like RFCOMM may be run over it. the device will create an L2CAP channel to the access point. • L2CAP channel: With information obtained from SDP. As the application in this case is email. the application cannot proceed further. Let us assume that the service is available. • Link establishment: The LMP will now establish a link with the access point.synchronization of the device with the access point. among other required initializations. the access point will send a security request for "pairing". the same 56 . Encryption will be invoked if secure mode is used. in particular whether email access or access to the relevant host is possible from this access point or not. otherwise. Note that the PIN is not transmitted over the wireless channel but another key generated from it is used. The information regarding the other services offered at the access point may be presented to the user. • 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. • 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. then at this stage. This feature allows existing applications developed for serial ports to run without modification over Bluetooth platforms. in terms of its clock offset and phase in the frequency hop. so that the PIN is difficult to compromise. 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. • PPP: If a PPP link is used over serial modem as in dial up networking. This will be successful if the user knows the correct PIN code to access the service.
critically important to us. Everyone knows that email services. Apple talk can now send and receive data over the link. in order to break into a Bluetooth device. • Network Protocols: The network protocols like TCP/IP. 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). Bluetooth technology has been popping up in the news.application will now be able to run PPP over RFCOMM (which emulates the serial port). and various measures are already in place to provide for the secure use of Bluetooth technology. The truth is. all communication technologies are facing the issue of privacy and identity theft. Yes. most of the news involves confusion and misinformation regarding the security of Bluetooth. these issues are easily combatable. are overdramatized and blown out of proportion. is: Bluetooth requires similar security measures. company networks. a hacker must: 1. Force two paired Bluetooth devices to break their connection 57 . Unfortunately. IPX . This link will allow the user to login to his email account. The information and data we share through these communication technologies is both private and in many cases. Bluetooth Security Bluetooth Technology Faces Security Threats Today. like most scares. Recent reports have surfaced describing ways for hackers to crack Bluetooth devices security codes. However. What Bluetooth users need to realize. Recently. Bluetooth technology is no exception. it is true: There have been some Bluetooth cell phones that have been hacked into. Are the Threats Serious? The good news: Most of the recent Bluetooth security scares. and home networks all require security measures.
Steal the packets used to resend the PIN. The SIG suggests users create a longer PIN (8 digit is recommended). then 3. be using very expensive developers’ equipment. Decode the PIN The hacker must of course be within range of the Bluetooth device and. according to the Bluetooth SIG. 58 .2.
This action might not be possible to undo. Are you sure you want to continue?
We've moved you to where you read on your other device.
Get the full title to continue reading from where you left off, or restart the preview.