Bluetooth

Check out more papers on Computer Engineering Computer Computer Programming
Contents

Bluetooth Remote access to pc using mobile devices

CHAPTER 1

INTRODUCTION TO RESEARCH

1.1INTRODUCTION:

Bluetooth is a wireless technology of the last decade, there has been a lot of research going on this technology all over the world. The Bluetooth was named after the 10th century Danish King Harald Blatand or Harold Bluetooth. King Blatand was influential in uniting militaristic factions in parts of what are now Norway, Sweden and Denmark - just as Bluetooth technology is designed to allow collaboration between differing industries such as computing, mobile phone and automotive markets. Bluetooth technology was the internal project of Ericssion, which was intended for providing short distance multiple links. Then it was collaborate with Intel in 1997, later the association with Nokia, IBM, Toshiba, Microsoft, Motorola, 3com etc to form a non profitable trade association Bluetooth Special Interest Group (SIG).The formed consortium adopted common code name to Bluetooth for their open source specification. Bluetooth uses 2.4 GHz frequency for transmitting the data at band rate of 1Mbps. In taking account of user's point of view, there are three important features to Bluetooth. (Ali M Aljuaied 2001)

* It is wireless. When you got to client place, you need not have to worry about keeping track of cables to attach all of your components and you can design your application without wondering where all the wires will go.

* It is economical.

* You do not have to think about it. Bluetooth does not require any extraordinary skills to make it work. The devices find one way or another and pairs up a conversation without any user input at all.

Bluetooth technology is a standard and communications protocol which is designed for low power consumption, with a short range (power-class-dependent: 1 meter, 10 meters, 100 meters) based on low-cost transceiver microchips in each device. Bluetooth enabled devices tend to communicate with each other when they are in range. These devices use radio wave communications system, so that they do not have to be in line of sight with other and can even be in other rooms, as long as the received transmission is powerful enough. During the discovery process Bluetooth device transmits class type of device and the supported services of that class

Class

Max permitted power

Range(approx)

Class1

100mW

100meters

Class2

2.5mW

10meters

Class3

1Mw

1 meter

Table reference [www.bluetooth.com]

The popular Bluetooth applications are:

* Mobile phone and hands free headset.

* File transfer between Bluetooth enable devices using Obex application

* The places where traditionally used by IrDA in control equipment.

* In gaming equipments like play station.

* Used to connect the Dial up internet for PC.

1.2 AIMS AND OBJECTIVES OF RESEARCH:

The main research aim of the project is to develop Remote PC manager from mobile through Bluetooth and make it more efficient and reliable for future applications. The following are the research objectives:

* Developing user friendly software for remote management of PC through mobile using Bluetooth.

* Improvement of response time in the existing application.

* To solve the problem occurred in application during the connection and disconnection Process.

1.3 PAST WORKS:

There has been a vast amount of research carried out in Bluetooth related applications all over world of which is this PC remote mobile phone using Bluetooth application, but most of the applications that are made have been having problems related to response time, compatibility with specific mobile such as Nokia and Sony Ericsson, connection and disconnection. Hence, the next few lines will discuss about the background for developing PC remote.

Based on Blueshareware.com

Development done

Deployment year

The first beta type control 1.0 version using Nokia 6600

23 Feb. 2005

Then added applications related to audio and video player

7 march 2005

Then started to test the code on Sony Ericsson

6 Nov 2005

New GUI for phone has been developed with special soft keys

29 Jan 2006

After then they started to have better GUI by correct early problems and adding new applications releasing higher version

Bluetooth remote control 2.0

* The Open java script that allowed others to be modified

* They have added new PowerPoint application.

* It had some drawback such as application could not run in some mobiles and screen turn blank some times.

There has been a lot of modification and re-releases by solving problems like increasing the range of compactable mobile and correcting minor problems.

Bluetooth remote control 3.0

· Win AMP player has been added

· Till this version the power point and any applications was not given importance.

· The development of latest version of the GUI was available in J2me, which decreased the application size.

Bluetooth remote control 4.0

· Though they added, Win AMP could not be launched from it.

· The phone could not be compactable with other stacks.

· Response was improved for some functions.

· The application had problems with the connection and disconnection.

· Less application size than compare to the above version was achieved by better versions of MIDP and CLDC.

Some individuals have been working on this software like Jerome Laban. The project related to two PC remotes, the software developer who is working on compatibility for different types of mobiles such as Orange E200/QTEK 8080 and some are Motorola based mobiles with Blue Soleil third party stack in .NET FRAMEWORK 2.0 where he using different programming languages and client software's.

Version

Features

Date

0.1.0

First release

8/1/2004

0.7.0 Beta1

Multiple clients' problems.

Mobile client crash problem.

8/3/2007

0.8.0

Added the support of mouse controls.

23/7/2007

0.8.3

Added preliminary support for Broadcom Bluetooth stack.

10/9/2007

0.9.0

Added screen control application.

Added application definition file.

30/3/2008

There has been lot of development going on PC remote using Mobile phone Bluetooth many of them are developing many applications based on different software's .The improvement in MIDP, CLDC in the new mobile have increased the applications, and the application code size started to decrease with improvements in them.

1.4 RATIONALE FOR RESEARCH:

After my under graduation I started working in an embedded system based company in India. Lampex electronics Ltd which deals with providing embedded solution to local firm, we had an Electrical billing handheld machine, which we supplied to state of Andhra Pradesh (India) Electricity board, they requested for a short distance wireless technology to upload the data from handheld machine to PC. We have selected IrDA as wireless technology because of low power consumption and less memory application .We have done the work successfully but as a developer, I was not convinced for two reasons:

· The handheld machine and PC transceivers have to be placed face to face.

* We had problem with time slots management, went slaves (handheld machine) are more than two at the same time.

This made me to select Bluetooth technology as my research topic, and then I came across different research topics on Bluetooth related to security, pairing, remote PC manager etc. Then I started working on a Remote PC manager.

Remote PC manager is an application developed using Bluetooth available in your mobile phone to manage a PC. The application had problem related to response time in certain areas of application. The response time is the time an application takes to react to a give input. In this application, we define response time as the time taken to respond when an instruction have been sent from mobile phone to remote pc manager.

CHAPTER 2

LITERATURE REVIEW

AND RESEARCH METHODOLOGY

2.1 RESEARCH APPROACHES:

The following are the approaches towards my research, which have eventually done in stages:

Ø To study about Bluetooth behaviour and comments related to the application from the users.

In the course of research, reading has been done from books, journals and websites regarding Bluetooth and related software is used in the project.

Ø Developing Program and data flow diagrams

An IT related program was developed which had all the modern approaches to the project development and deployment and as well as the data flow diagrams were drawn for the clear view of the data in the program

Ø Implementation

After the development of the programs, implementation has carried out to check its success and working

Ø Testing

The programmable code is tested, verified and made sure that its bug free.

2.2 Justification of Research Approaches:

Mixed research methods have been used for projects as it deals with collecting information about the product and implementation to the product. Using Qualitative research, more data is gathered from journals and textbooks, which showed about the Bluetooth applications. There was also chance to know, to what are hurdles in the existing Bluetooth technology. I have registered in Bluetooth groups and started to ask experts in this field about their feedback regarding the application. I went through some of the existing technologies available in the market and where I could study the functioning of the Bluetooth PC remote. Knowing about the application, I could estimate that projects with modern approach will be needed, in enhancing the application throughput. Online journals also helped me out a lot. Research books also helped me in how to carry out my research and which method would more suit my needs.

Quantitative research is also a very important criterion in my research .I could plan my whole project on Gantt chart and proceed further. So, I had opted with mixed approach, i.e. qualitative and quantitative which made my research easier.

2.3LITERATURE REVIEW:

A lot of research is done on Bluetooth related application by Special Interest Groups (SIG) and developer all over the world because of its futuristic nature. From the past most of the developers have been developing applications on Bluetooth and WLAN. We can see degradation on Wi-Fi when a Bluetooth is close to the Wi-Fi station; the impact of interference is significant. However, the relocation of Bluetooth from the Wi-Fi by 10m will not have great impact on the throughput. So both can coexist but we should be sensible in our expectations and attempts to combine these technologies. [Brent A. Miller, Chatschik Bisdikian 2000]. We present an AFH that modifies it in order to mitigate interference. Frequency hopping in Bluetooth is achieved as follows. Frequencies are listed as even and odd frequencies in the range of 2.402-2.480 GHz. The main idea in BIAS is to wait for association of slot with a “good” frequency in order to transmit a packet.

The basic idea of response times has been about the same for thirty years [Brent A. Miller, Chatschik Bisdikian 2000]:

* If the response time is about 0.1 second user feels that the system is reacting instantaneously, means that no feedback is necessary except to display the result.

* If the response time is about 1.0 second user feels to stay uninterrupted, even though the user will notice the delay. Normally, no feedback is necessary during delays of more than 0.1 but less than 1.0 second, but if its 1 second the user feels that he can directly on the data.

* If the response time is about 10 seconds user's attention is focused on the dialogue. For longer delay such as scanning whole system by anti virus will take long time and user knows about it. Feedback is required especially important if the response time is likely to be highly variable, since users will not know what to expect.

Normally, response time of an application should be as fast as possible [Myers, B., H. Stiel & R. Gargiulo (1998)], but it is also possible for the computer to react so fast that the user cannot keep up with the feedback. For example, a scrolling down in word document application move so fast that the user cannot stop it in time for the desired pages or section within the available window. The fact is that computers with modern processor can go work in few milliseconds can be too fast for the user which indicates the need for user-interface changes, user interface is set according to real-time clock rather than being set to indirect effect of the computer's execution speed.

These applications take advantage in varying degree of Bluetooth capabilities such as to be always on, always connected, mobile and easy to use. Throughout all of this, of course it is important not to lose sight of the requirements to get basic application to operate properly. However most of developers have found the specification of 1.1 to be stable, so future Bluetooth enabled products for general consumer would confine to this specification [Robert Morrow, 2002]. In an indoor environment, multipath is almost present because of furniture and other equipment in building along with the building material themselves, are prone to reflections when they are illuminated from radio source. Unlike the large fading which is seen in radio frequency where distance travel by the wave is in terms of 10 times the wavelength.

According to Morrow the Bluetooth, channel fading could be analysed based on Doppler spread, delay spread and out probability.

* If a Bluetooth Piconet is an indoor environment where an object can move at speed up to a fast walk, then minimum Doppler shift will be about 10 Hz and coherence time is about 40 ms. So, the coherence time will be 1 microsecond smaller than coherence time which leads to slow fading and this could really slow down when 40000 bytes transfer is done.

* Suppose if we take a large room where the delay speed is 50ns and gives coherence bandwidth of 2 MHz, but maximum bandwidth between each hop is only 1MHz, so this leads to flat fading.

* As the Bluetooth channel is flat fading this will effect the Bit Error Rate

BER (Rayliegh equation).

According to Morrow the enhancement has done related to lower level protocol.

* Bluetooth data rate should be increased at the rate of 10 to the present specification.

* Proper implementation of Adaptive frequency hopping should be done.

* The range of Bluetooth has to be increase by Store and forward capability.

* Use of Smart antenna.

The ACL link is based on polling scheme mechanism between master and up to seven active slaves in a Pico net. It can provide both symmetric and asymmetric bandwidth, which is determine by the packet type and frequency with which the device is polled. The ACL payload is protected by CRC check, which is used for retransmission scheme, the value seems to be small about 1.25ms [David, 2002], but it is important when we are dealing with IP streaming because it may lead to retransmission delay. This could be limited by setting the flush timeout setting.

If Bluetooth transmit constantly on same frequency, the maximum raw date rate would be 1 mbps. However [David, 2002], this is not the data rate we will obtain over air interface. Bandwidth required for a 72 bit access code to identify the piconet and 54 bit header to indentify the slave will be about 405microseconds and guard time of 220 microseconds for next frequency hop. So, one slot packet requires a bandwidth of about 1/3 for pay load data and 7/9 and 13/15 for 3 and 5 slots of data respectively. So these counts have at least guard time of 1250 micro second as slot size increases.

User friendly can be defined as easy to learn, easy to use, easy to remember and they increase the user ability to perform the desired task. According to Barrie Shermann, 1985 User friendly means adapting parts of the system to the operator rather than the operator having to adjust to the system.

Donald Norman explains user friendly software design with respect to relationship between visibility, mapping and feedback to the design of usable objects. [The Design of Every day Things,1990]

· Visibility means how easy user can find the function in the software. Poor visibility can cause too many problems to the users.

· Mapping means the relationship between controls, the thing it affects, outcome. Good mapping is one which has buttons which is clearly marked and simply indicates their function.

· Feedback to the design of usable objects means every function on operation must give feedback to the user. When passenger press train door button he gets feedback in terms of voice message saying that “door opening” .Such feedback makes user feel good.

The creation of user friendly software is equal to part of science and art .The science is referred to as usability. The International Organisation for standardization (ISO) defines usability as the effectiveness, efficiency and satisfaction with which the user achieve specified targets. Effectiveness is the accuracy and completeness with which specified user can achieve goal in an environment. Efficiency is the resource expended in relation to the accuracy and completeness of goal achieved. Satisfaction is the comfort and acceptability of work system to its users and other people affected by its use.

The second part is the Art of design, which inspires and often take long time .We are not speaking about art in terms of graphic art, although it plays an important role in development of user friendly software. We are speaking of the designer ability to create a vision of how software can and should be.

2.4 CRITICAL ANALYSIS:

Since this Bluetooth application is an indoor application, it's associated with reflection, diffraction, scattering, and refraction of radio waves. Quality of service means predefined and negotiated data rate, delay and error rate. Since the delay and the error rate are strongly related to the data rate, we focus our present investigations on the data rate. A signal passed over a wireless channel is affected by path loss, narrow, wideband fading and co-channel interference. In the present application the response time is dependent on, the performance metrics include the path loss, the mean access delay and the channel response time.

When a receiver is placed some distance from the transmitter antenna it is logical to say that there will be some loss in signal. As we know that there is high probability of multipath effects in this application, as it plays a significant role in path loss values, thus high path loss of signal will lead to retransmission of signal. So we need to perform multipath mitigation, so we have selected compensate for multipath through diversity combinations. So normal Bluetooth antenna will be replaced by smarter antenna with diversity combinations .The packets that are transferred consecutive to time do not use the same frequency, which in turn avoids the drawbacks of the narrowband transmission. As we know that the link performance obeys the rules for narrow band systems and additionally depends on fading of the individual channels occupied. Therefore, all these methods of improving the physical layer have to be frequency agile.

The access delay measures the time taken to transmit a packet from the time it is passed to the MAC layer until it is successfully received at the destination. The delay is measured at the L2CAP layer. The access layer delays which are caused due to improper management of the Bluetooth instruction. Management of ACL links can decrease this and by keeping slot numbers at a low value as possible, but as file length increases the number of slot tends to increase so we cannot do much to that, but by decreasing the path loss we can definitely resend ACL link commands.

The channel estimation response time measures the time to track changes in the channel state. It is the time to avoid using a bad frequency to the time to start reusing a frequency that is good. The channel response time depends upon the bit error rate (BER), which depends on the frequency hopping rate (good frequency and bad frequency), since the methods used to perform the classification depend on BER measurements per frequency visited. So, proper implementation of adaptive frequency hopping must be done to improve response time.

User friendliness is a thin gap between failure and success of the end product. According to usability studies done by Andy Smith Overall it would seem that roughly only 30 percent of IT systems are fully successful and that too 70 percent either fail or some marginal gain even after providing same function. These successful one have marginal difference with the other such as easy to handle, light weight, high visibility of screen, little more advance feature in hardware and software, robust etc. Natural and efficient products can make user's task seem a lot easier.

CHAPTER 3

BLUETOOTH PC REMOTE

TECHNICAL CONCEPTS

3.1 INTRODUCTION:

Bluetooth was projected to allow low bandwidth wireless connections to become so simple to use such that they flawlessly work into your daily life. A simple example of a Bluetooth application is to update the phone directory of your mobile phone. You would either normally enter the names and phone numbers of all your contacts or use a cable or IR link between your phone and your PC and start an application to synchronize the contact information. With Bluetooth, this can be done automatically and without any user involvement as soon as the phone comes within range of the PC. You can easily see this is expanded to include your calendar, to do list, memos, email, etc. This is just one of many exciting applications for this new technology! The Bluetooth PC remote using Mobile phone also comes into these list of applications that is been developed in using Bluetooth

3.2 SYSTEM ARCHITECTURE:

Bluetooth communications occur in the unlicensed ISM band at 2.4GHz. The transceivers utilize frequency hopping to reduce interference and fading. A classic Bluetooth device has a range of about 10 meters, with a total bandwidth of 1 Mb/sec. This technology supports two types of communication modes [Robert Morrow, 2002].

* Synchronous communication (voice traffic): The synchronous voice communication is provided using circuit switching with a slot reservation at fixed intervals. A synchronous link in Bluetooth technology is referred to as an SCO (synchronous connection-oriented) link.

* Asynchronous communications (data traffic): The asynchronous data communication is provided using packet switching, utilizing a polling access scheme. An asynchronous link in Bluetooth technology referred to as an ACL (asynchronous connection-less) link.

Configuration

Max. Data Rate Upstream

Max. Data Rate Downstream

3 Simultaneous Voice Channels

64 kb/sec X 3 channels

64 kb/sec X 3 channels

Symmetric Data

433.9 kb/sec

433.9 kb/sec

Asymmetric Data

723.2 kb/sec or 57.6 kb/sec

57.6 kb/sec or 723.2 kb/sec

Reference [www.bluetooth.com ]

A combined data-voice SCO packet is defined, which can give 64 kb/sec voice and 64 kb/sec data in each direction.

3.3 THE PICONET:

Bluetooth devices can pair up with one or more other Bluetooth devices in several different ways. The simplest way of connecting two Bluetooth devices, is by connecting point-to-point when there are two Bluetooth devices is known as Pico net. One of the devices acts as the salve and the other as a master. This ad-hoc network is a good example for a Pico net. A simple Pico net network needs to have one master and one or more slave, the Bluetooth can have maximum of seven slaves in a Pico net network.

In the case of multiple slaves, the communication topology is known as point-to-multipoint. In this case, the bandwidth is shared among all the devices in the Pico net. They can communicate up to seven active slaves in a Pico net. In the case of multiple slaves concept the slaves need to have specific address. So each of the active slaves has been assigned 3-bit Active Member address (AM_ADDR). There can be extra slaves who remain synchronized to the master, but these will not have an Active Member address. The slaves are not active and are referred to as parked. In case of both active and parked units, the complete bandwidth is synchronized by the master. A parked device will have an 8-bit Parked Member Address (PM_ADDR), thus we can have maximum number of parked members to 256. A parked device remains synchronized to the master clock and can vary quickly, become active and communicate with other devices in the Pico net.

3.4 THE SCATTERNET:

The process in which two adjacent Pico nets have an overlapping of coverage area is known as scatter net. Slaves in one Pico net can take part in another Pico net as either a master or slave; it can be done through time division multiplexing. In a scatter net, the two (or more) Pico nets are not synchronized in either time or frequency. Each of the Pico nets operates in its own frequency hopping channel while other devices in multiple Pico nets participate at the appropriate time via time division multiplexing.

Let us assume two different Pico nets one consisting of mobile phone and PC, while the adjacent Pico net person consisting of a cell phone, headset and business card scanner.

Dig Ref : www.wirelessadvent .com/channel/blutooth/feartutre/bluetooth .html

The cubicle 1 may set up cubicle 2 business card scanner also transmit the information that is scanned to your PC so that you will have access to his business contacts information.

3.5 AUTHENTICATION AND PRIVACY:

Authentication and privacy are handled at the software protocol layer and it is also provided in the Bluetooth physical layer. A particular connection can be specific to need either one-way, two-way, or no authentication. The authentication is generally done using a challenge or response to the system. The system supports both 40 and 64 bit keys. The authentication of the user is done at application layers. This security mechanism and the related software allow the user to set up his or her devices only to communicate with each other. All Bluetooth devices employ this physical layer security in the same way. Of course, for highly aware applications, it is also recommended that you use more advanced algorithms in the network transport or application layer.

3.6 HARDWARE FOR BLUETOOTH:

Bluetooth hardware can be divided into two modules, they are.

1. Radio Module

2. Link Module.

The Radio Module:

Bluetooth devices operate in 2.4GHz Industrial Scientific Medicine (ISM) band. The frequency is an unlicensed one because of international standards and a few exceptions in certain countries like France (2446.5 to 2483.5 MHz) and Spain (2445 to 2475 MHz .So range of frequency is defined with unlicensed version from 2400 to 2483.5 MHz. These local versions have a reduced frequency band and a different hopping algorithm, the Bluetooth SIG is working with authorities in different countries to open compact ability.

The RF channels used in Bluetooth technology are from 2402 to 2480 MHz with a channel spacing of one MHz. Frequency hopping has been implemented in order to reduce interference and fading effects. So we have 625 microseconds the channel will hop to another frequency within the 2402 to 2480 MHz range, so we get 1600 hops every second. Every Pico net has a unique hopping sequence which is determined by using an algorithm; the uses of Bluetooth device address the master device. All Bluetooth units in the Pico net are then synchronized to this hopping sequence.

All packets are transmitted at the beginning in one of the 625 microsecond time slots, a packet may take 5 time slots. A time division duplex method is used to facilitate full duplex transmission. It is normally done this way, during even numbered slots the master transmits data and odd numbered slots are for a slave to transmits data. In voice data, these time slots can be reserved for synchronous applications.

Bluetooth technology use Gaussian Frequency Shift Keying (GFSK) for modulation. A binary system is used where logical one is represented by a positive frequency deviation and a logical zero is represented by a negative frequency deviation. The data is transmitted at a sign rate of 1 Ms/sec.

The Link Module

The Link Module and Link Manager Software are responsible for the baseband protocols and some other low level link functions. This are related to sending/receiving data, setting up connections, error detection and correction, data whitening, power management and authentication.

The link module in the Bluetooth is responsible for deriving the hop sequence. This can be done by using the BD_ADDR (Bluetooth Device Address) of the master device. All Bluetooth devices are assigned with a 48-bit IEEE 802 address. This 48-bit master device address is used by all other devices in the Pico net to derive the hop sequence.

The Link Module is also responsible for performing three error correction schemes that are defined for Bluetooth:

* 1/3 rate FEC

* 2/3 rate FEC

* ARQ scheme for the data

The purpose of having two FEC (forward error correction) schemes is to reduce the number of retransmissions. The ARQ scheme (automatic retransmission request) is responsible for the data to be retransmitted until an acknowledgement is received indicating a successful transmission (or until a pre-defined time-out occurs). A CRC (cyclic redundancy check) code of 2 bytes is added to each packet and used by the receiver to decide whether the packet arrived is error free or not. Note that the ARQ scheme is only used for data packets, but not for synchronous payloads such as voice.

Bluetooth provides necessities for three low power saving modes to conserve battery life. These states in decreasing order of power are Sniff Mode, Hold Mode, and Park Mode. While in the Sniff mode, a device listens to the Pico net at a reduced rate. The Sniff intervals provide flexibility for different applications and are programmable. The Hold mode is same as the Park mode, except that the AM_ADDR (Active Member address) is retained. In Park mode, the slave clock continues to run and remains synchronized to the master, but whereas the device does not participate at all in the Pico net.

CHAPTER 4

SYSTEM DESIGN

4.1 INTRODUCTION TO SYSTEM DESIGN:

The Basic structure of software has been developed as an application based on Bluetooth technology, using the host controller interface concept. This is one of the most common physical implementation in which external cards are plugged into the host computer .when cond in this manner we need to have some ways to send the data and commands to module to obtain the results. The Bluetooth specification has such provision to have host controller interface. The Bluetooth protocol stack consists of the radio, link controller, link manager and the rest of the protocol stack from the L2CAP and above resides on the Host controller interface (HCI) .Hence the HCI provides the communication between the application at the top layer to the link manager, two ways audio packet transportation and transfer the data packet between module (USB dongle) and host computer.

HCI interface does not require great knowledge or certification, but it is a good idea when you want to implement any software so that it has wide range of compatibility and also provides us in operating the third party protocol also. The Host controller interface can be functionally divided into three parts:

Host controller firmware: This is located on the host controller which performs HCI commands by fetching them from the Bluetooth hardware, link manager commands, hardware status registers, control registers and event registers.

HCI Driver: This is located on the Software unit which receives commands of HCI events, these events are used during the host discover which is done during pairing process. The events of packets can be resolute by HCI driver.

Host Controller Transport Layer: The HCI Driver and Firmware communicate via the Host Controller Transport Layer. Generally these three types of host controller transport layers are PCMCIA, USB and UART.

4.2 PRODUCT FUNCTIONS:

The major functions are divided into two categories:

1. Drive functions

2. Process functions

Drive functions:

These functions perform searching of drives present in your PC and allow you to open them and perform all the operations in the drive. The drive operations present in the program are listed below and they are:

o Opening a file present in the PC

o Creating a file

o Deleting a file

o Sending an attachment

o Other file operations

Process functions: This function performs the Operating system related functions in your PC and allows you to create new process on system and lists all the process running on the system and we can shutdown the Operating system.

The flow chart of project PC remote:

Start the server first and then start the client part code.
The GUI is designed using J2ME with provision to select MIDP and CLDC technology compactable to your mobile.
Then we have security feature added to it, so that only specific user can run the application .If you enter the correct login id and password it will allow you into application.
Then discover process starts and Bluetooth will display the surrounding Bluetooth devices available and we select the required PC in a work group.
Then main menu is divided into two section ,they are drive and process functions
They are sub divided into number of functions which can be seen in the flow chart.
The application has provision to come back out of the application and comes back.

4.3 SYSTEM REQUIREMENTS:

Hardware Requirements:

The hardware is divided into two parts:

Host computer:

USB Dongle (antenna diversity combinations)
300 MB Hard disk
64 MB RAM

Mobile:

44 KB of ROM
40.6 KB of RAM

Software Requirements:

1. Widcomm software (Protocol stack)

2. Sun_java_wireless_toolkit-2(J2ME)

3. JDK-1_5_windows_i586(Java application for server)

4. Windows XP with service pack 2.

CHAPTER 5

REPONSE TIME AND USER FRIENDLY

5.1INTRODUCTION:

Modern networking applications are the important ingredients of business operations, enabling competitive advantage, communication and efficient processes. Whenever application performance decreases, the products itself suffer. Many companies use the application response time as a critical measure to demonstrate the quality of services delivered to end users.

However response time alone only cannot provide insight to the environment surroundings performance. In a home network where too many applications, that compete for resources are available. This could impact one another (such as co-channel interference between home equipment and WLAN frequencies). For good management of business services and to effectively troubleshoot poor response time you need to see the surrounding application performance in order to determine whether other network activity is a contributing factor.

Unfortunately context of response time problems is not easy to come in most of the good company products. There is a confusion of approaches in response time and many products have add-ons that are not well integrated with other modules and metrics, providing no visibility into the context of performance degradations. So we need to have good response and user friendly product for success of the product.

5.2METHODS TO IMPROVE REPONSE TIME:

The improvements of response time in this application are divided into two parts. They are:

* Improving the received signal strength.

* Increasing the probability of getting good channel.

5.2.1Use of smarter antenna:

The improvement of response time is done by improving the input signal received to the module, which is done by removing the existing Bluetooth radio module with smarter dongle .The medium access protocol used in Bluetooth communication is a packet-based Time Division Duplex (TDD) polling scheme. The transmission channel is divided into time slots, each 625μs in length. In the TDD scheme master and slave transmit alternatively. Beam steering is the main principle used in smart Bluetooth antenna .This is controlled by sampling the received signal during the Guard Time (the vacant time that is used for synchronization and/or compensating for a signal distortion.). The interval that is used to get information about the incoming wave chooses the optimum antenna configuration. When the receiving module takes over transmission, it uses the same antenna configuration. This procedure is repeated for each slot. Since the beam of steering is done during the ‘Guard Time', it does not reduce the data rate.

This Bluetooth dongle has two radio units; however, the base band unit receives its signal from only one of these. The micro controller decides between the radios units according to the Received Signal Strength Indicator (RSSI) signals [N.Golmie, 2003][N.Golmie,R.E Van Dyck and A. Soltanian,2001]. Bluetooth baseband controller has an on-chip asynchronous serial interface Universal Asynchronous Receiver and Transmitter (UART), which allows the communication between the hosts i.e. PC and the Bluetooth baseband controller in a full duplex mode. Baseband controller will have an interface to the transceiver and they will make a complete Bluetooth chipset solution. The antenna matrix includes four switches. The signals from antenna 1 and 2 are combined according to the switch settings. Antenna matrix consists of two identical parts, each for every radio part. There are also four control signals SWITCH0/3. These are output signals from the micro controller who controls the microwave switches and determines their position in the specific moment (during receiving and transmitting period).

The module supports three operational modes: mode one is normal Bluetooth operation without diversity. The second mode enables the signals coming from the two antennas are compared in strength and the stronger one is chosen by the micro controller for further processing in the baseband [Marrow 2002](angle diversity concept). In third mode the two signals from the two antennas are combined in the antenna matrix to obtain As in case of mode two, the stronger beam signal is processed in the baseband[Marrow 2002](Space diversity). The micro controller board determines the antenna diagram by controlling the position of the four antenna switches in the antenna matrix. The use of better hardware will decrease the retransmission due to multipath thus saves time during retransmission and increase the RSSI value.

5.2.2Proper implementation of frequency hopping technique:

The received signal strength has been increased now it has to be properly processed and the acknowledgements have to be sent. The data transfer in Bluetooth is done whenever a good channel is appeared, so proper implementation of frequency hopping technique has to be done.

/***********Normal Adaptive frequency hopping *********/

/**********class variables**********/

int clk27to7;

int addIpt;

/**********function*********/

Public freqlockFreq(intchannels1)

{

/*********local variables********/

int channels=0;

double F;

double hopFreq;

channels = channels1;

if(ischannels(hopfreq,channels,channel_map)==0) /********good channels******/

{

F = MODULO(16 * clk27to7, channels);

F = F & 0x7f;

hopFreq = ADD_Mod_h(addIPt, E, F, Y2, channels);

hopFreq = channel_map[hopFreq];

returnhopFreq;

}

return hop_Freq;

}

/****Improved Adaptive frequency hopping ***********/

/**********class variables**********/

int clk27to7;

int addIpt;

/**********function*********/

Public freqlockFreq(intchannels1)

{

/*********local variables********/

int channels=0;

double F;

double hopFreq;

channels = channels1;

if(isOdd(channels)) /********odd channels******/

{

F = MODULO(16 * clk27to7, channels);

F = F & 0x7f;

hopFreq = ADD_Mod_h(addIPt, E, F, Y2, channels);

hopFreq = channel_map[hopFreq];

returnhopFreq;

}

Else /*********even channel*********/

{

F = MODULO( 16 * clk27to7, 79);

F = F & 0x7f;

hopFreq = ADD_mod79(addIpt, E , F, Y2);

if(hopFreq == channels-1){

hopFreq = channels_map[hopFreq] ;

}

else

{

F = MODULO( 16 * clk27to7, channels-1);

F = F & 0x7f;

hopFreq = ADD_mod_h(addIpt, E, F, Y2, channels-1);

hopFreq = channel_map[hopFreq];

}

return hop_Freq;

}

The adaptive frequency hopping technique has been proposed in new version of specification of Bluetooth [1.2] .It is an extension to frequency hopping technique used in earlier version .In this there is no selection of frequency 23 or 79 channels .This is not needed any longer because of ‘channel map' parameter. With the channel map there is possibility of choosing the channels between N min<= N<=79 instead of only two in early hopping. The selection box used in the frequency hopping handle two functions in this method .It matches the derived frequency to AFH channel map and if does not match it remaps using derived frequency[ Robert marrow,2002][ Karlskrona,2004,] .

In the selection box the sub frequency to frequency conversion are made .The sub frequency to frequency vector first lists all the even frequencies starting with frequency 0 and ending with frequency 78 and then all odd frequencies from 1 to 79.So, here lies the problem in earlier algorithm, see step ‘good channels' where a ‘channel' will return a value zero for even channels so you need to remap it, though it could be used as a good frequency, it is discarded just because of an even channel. This is corrected in the next improved method by dividing program in to even and odd channels thus we can use more channels as good channels.

Suppose if we are transmitting a data of length 1Mb in Bluetooth application using HCI (Host Controller Interface).The HCI packet has maximum capacity of 255 bytes(Robert Marrow,2002) of space on each packet. The rate of transmission of Bluetooth is 64 kbps, so time taken will be:

1Mb=1024 bytes (255*4+4);

Time (T) =T1*4+T2;

Time taken for data transfer = (Number of bytes*8(8 bits make a byte))/Bluetooth speed.

T1 = (255*8)/64 ms;

=32 ms.

T2 =4*8/64;

­ = 0.5 ms.

T=32*4+0.5;

=128.5 ms.

The HCI device will have latency delay of 5 ms per packet transfer on average, so for transfer of 1Mb data we need 5 packets (4 *255 + 1*4) for it, so total latency delay for 1 Mb is 25 ms.

Compare between Normal Adaptive Frequency hopping algorithm and Improved Adaptive frequency hopping method. Let us assume time for selecting good channel in Bluetooth is by Adaptive frequency hopping method that is in the range of 75 channels with almost 30 seconds, so each channel selection will be take 0.4 seconds in Bluetooth .Let us assume that good channel falls in between 1 to 20 channels, the chance of getting good channel in normal method could be 6 channel maximum and in improved method could be 10 channel maximum. Let us assume good channel in Normal method could be 1,3,7,9,13 channels and by improved method could be 1,4,6,7,9 channels.

Time normal method =128.5 +25 +5200(time for 1 to 13 channels);

=5353.5 ms.

Time improved method=128.5+25+3600(time for 1 to 9 channels);

=3753.5ms

The difference of 1600 ms has been noticed in this case.

5.3USER FRIENDLY SOFTWARE:

The response time has been improved by using smarter antenna and adaptive methods, now the application has to be user friendly one. In some ways, usability is built on the older idea of user friendliness. The concept of usability is an object designed with a generalized user's psychology andphysiology in mind.

* More capable to use—it takes less time to accomplish a particular task.

* Easier to be trained—operation can be learned by observing the object.

* More enjoyable to use.

How is this application user friendly software?

We can simplify the ISO definition in to simpler one: user friendly is easy to learn, easy to use, easy to remember and they increase the user ability to perform the desired task .The designer combines that information with his talent, skill and experience to create the most beautiful design possible. A user friendly design is one that ideally expresses the software's function, wise consistency, satisfy the audience's requirement and adhere to established design principles.

Some of the developers think that user friendly software should have latest, coolest, Photoshop effect etc. But we must think much deeper scene of beauty-the prefect matching of form to function. The graphical look supports the software's purpose, but never overshadows it. This has been considered in the application, when you see system design flow chart you will see application is clearly divided into functions [Marc Silver, 2005] i.e. drive functions and process functions. The drive functions will be high lighted(cursor is fixed at this position), you can scroll down for process function or select drive function using right button or press left button to Exit the application.

The drive functions are further divided into sub functions such as selection of specific drives and exit function. If select drive is open then you will have existing file in that drive at centre of the screen (select using navigator button), exit function to your left and options to your right end. We can perform all file operation in all drives available in the computer such as creation of file, deletion of file, rename a file, saving of file, cut, copy, paste and we can also send file attachments using the mail server. In process functions we can list all the process running on system, we can also stop process using kill function and we also shutdown the computer using this application.

A step to create user friendly software is that we must understand human behaviour and have to apply this information to the design. Users normally try to apply what they have learned from similar experience from the past [Karel Vredenburg, Scott Isensee, and Carol Righi, 2002].

When you develop any mobile phone application ,we normally have specific keys such as navigator button is used for selection of main function such as file selection, , left or right side for subcategories and left or right side will have back button and up and down button for scrolling .

The most important and most often ignored step in development of software is to thoroughly understand its intended users. They may be older or younger, of a different gender or culture .In their minds, they have their own models of how your software will be. This may or may not coincide with your model. Watching an application for first time can be a surprising and humbling experience for the designer. Assumptions by the designer should be made regarding how functions should be organized or what to be label used [Eric Schaffer, 2004].

Therefore, this application uses same principles of design where functions are clearly expressed into categories and sub categories. From the 1 we can see that functions are clearly divide into drive functions and process functions so that user can easily access them.

A command line interface is a kind of user interface to a computer's OS (operating system) or an application, in which the client responds to a visual prompt on a computer by entering in a command, gets an answer back from the computer. The MS-DOS Prompt application in a Windows operating system is an example for the provision to a command line interface. Today, all users choose the GUI (graphical user interface) offered by Windows, Mac OS, UNIX, Linux and others. Typically, most of today's Unix-based systems offer both a graphical user interface and command line interface. Because a command line interface requires more unique commands, this type of interface is often most difficult to learn, because of the need to memorize dozens of different commands. However, a command line operating system is a very valuable resource and it should not be ignored.

This application is GUI interface on client side (mobile side) and it is GUI and command line interface on the server side of the application, you can start the server from GUI or MS dos prompt. But however the server runs in server dos prompt during its execution. This is done keeping all ages in mind.

To adhere to established design principles are useful to practicing professionals and newcomer in to field .Such as if an element is repeated in multiple screens, then place it in same position on each screen [Marc Silver, 2005]. Don't write all words in upper case as it's difficult to read[ Xristine Faulkner,2000] ,always have means to come out of any screen(any function) etc. If we see the three s we can notice that exit has been placed at same position on the screen in multiple screens.

CHAPTER 6

IMPLEMENTATION CONCEPT

6.1 JAVA BASICS:

Java is a programming language for computers, which enable programmers to write instructions using simple English commands, instead of numeric codes. Once a program (group of instructions) has been written, the high-level instructions are translated into numeric cipher (represents electronic pulses) that computers can understand and execute.

Some basic operations that Java Language performs are:

1. Creating Class Objects, extending Abstract Classes, implementing Interfaces.

2. Handle Exceptions for errors.

3. Multithreading process.

4. String Operations.

5. User defined package.

6. Utility Functions like Date, Time and Collection Elements like Array List, Linked List, Tree to store primitives and Vector to store Objects. Integrator and Enumeration are used to access elements from Collection Classes.

7. String Tokenizer to break the String into words called Token, to take only the desired token based on the implementation of program.

Class:

A class is a blueprint which is used to define the variables and the methods common to all objects of the class. Variables and the Methods of a class define its Properties and Behaviours. An object exhibits the properties and behaviours defined by its class.

Object:

An object is defined as a software bundle of variables and related methods. Java objects are used to model real-world objects in everyday life. An Object is an instance of a class which is created using a “new” operator. The “new” operator function returns a reference to an instance of a Class. This process in java is called instantiation. An object in java encapsulates State and Behaviour (Variable and Methods).

Java Operators

Java Operators are used to manipulate operations using primitive data types and operators can be classified as unary, binary, or ternary means taking one, two, or three arguments respectively. A unary operator in java may appear before (prefix) its argument or after (postfix) its argument. A binary and ternary operator appears between its arguments.

Control Statements

Control statements control the process of execution in a program, based on dynamic or static data values and conditional logic. Java has three main categories of control flow statements.

Constructors

Constructor is where the Object initiated for a Class at run time. A Constructor should have the same name as the Class name. Constructor is not a method so it does not include a return type.Therefore, a Class binds Methods and Variables with Constructor.

Inheritance

Inheritance defines a relationship between super-classes to its sub-class. This means Sub-Class Object can be referenced to reference super class. Java Inheritance mechanism is used to build new classes with having properties from existing classes or Super Class. The inheritance relationship is transitive: if class a extends class b, then a class c, which extends class a, will also inherit from class b. But there is no Multiple Inheritance in Java programming language.

Packages

For small projects, put all java files into on e single file directory it is easy, quick and not much problematic. However if project(s) becoming bigger, the number of java files may increase, then it becomes problematic to maintain those many files under one file directory system. In java it can be avoided with Packages.

Packages in java are the ways of organizing files into unlike directories (files) according to functionality of different modules in project.

A package can contain the following types of files:

Classes, Interfaces, Enumerated types, Annotations

For example, files or Classes in java.io package do something related to Input/Output Operations. But java.net package do something related to Network.

Interfaces

As interfaces are abstracts, that cannot be directly instantiated. So Interfaces do not include constructors. Interfaces are not part of an object's inheritance tree. Object references in Java programming may be specified to be an interface type at least. Interfaces are declared using the interface keyword and they only contain class constant declarations and Method signatures (variable declarations that are declared to be of both static and final). All the classes in Java (the root class of the Java type system, except java.lang.Object) must have exactly one base class, where multiple inheritances of classes are not allowed. However, any number of interfaces can be implemented in a Java class.

Exceptions

Exceptions in java are abnormal, unexpected events or extraordinary conditions that may interrupt the program to run. It could be file that is not found of exception, unable to get exception; connection etc, on such conditions java throws an exception object. Exceptions are normally Java objects. A Large number of unexpected events in Java Project can never escape a java error exception. Exceptions in JAVA are divided into two main categories

1) Compile time Exception.

2) Run time Exceptions or Errors.

An Exception will come into a subclass of the Exception/Error class, both of which are subclasses of Throwable class. Exceptions are normally raised with the throw keyword and handled within a try-catch block.

Threads

Executing two or more tasks concurrently within a single program is Multithreading. A thread in java is a free path of execution within a program. Many threads may run concurrently within a java program. Threads in Java are created and controlled by the java.lang.Thread class. Threads in a Java programme can run concurrently, either asynchronously or synchronously [Scott Oak and Henry Wong, 2002].

String Tokenizer

The StringTokenizer class from util package is used to break strings into tokens (words, numbers, operators, or whatever). String Tokenizer is replaced by regular expression tools in new version of java. To use regular expressions is a more powerful solution and the easiest way to use the Scanner class of until package.

A StringTokenizer constructor breaks the string into tokens and returns a StringTokenizer object for that string. Each time the next Token () is raised, it returns the next token in that string.

AWT

A graphical user interface (GUI) provides a user-friendly method to act together with a program, in JAVA, Abstract Window Toolkit (AWT), is used to create Graphical User Interface for user data to input from forms. User interfaces take many forms. These forms may have difficulty from simple command-line interfaces to the graphical user interfaces provided by Java Class.

IO Streams

Storing of data in variable and arrays is temporary and we may loose data too when programme terminates. File System is best for long term preservation of huge amounts of data even after programme has terminated.

In java Java.IO.* is a package, to perform Input and Output operations like

* Creating a File.

* Reading data from File, Console, Socket

* Writing data to File, Console, Socket

A stream is a logical entity, which either consumes or produces information (Data). When transferring (sending) a stream of data into a file, is said to be Writing a stream. When receiving a stream of data from a file, is said to be Reading a stream. All classes from java.io package have anything to do with input inherit from Input Stream and all classes that have anything to do with output inherit from Output Stream.

SocketJava.net is a package used to establish connection between the Systems and Mobiles.

A Socket in Java represents a TCP network connection; in order to communicate with a remote host or computer using Java, client must first create a Socket, which establishes the TCP connection with a specified host name and port number.

Server Socket

Server uses a ServerSocket through which it accepts network-connections from clients across any-network. The Server system opens the Server Socket then waits or listens for connections from clients system. After getting response from Client System, Server Socket Class creates a Socket for each client connection and then Server handles the network-connections in the normal form with Input and Output operation.

6.2 J2ME:

J2ME (Short for Java 2 Platform Micro Edition) is Sun Microsystems' answer to a consumer wireless device platform. J2ME allows programmers to use Java and the J2ME wireless toolkit to create applications and programs for wireless and mobile devices.

J2ME consists of two elements, they are

àConfigurations

à Profiles

Configurations: It provides developers a set of libraries and a virtual machine for a category of wireless device. There are two configurations in J2ME for developers, one for fixed wireless devices and one for mobile wireless devices.

Profiles: The APIs are built on top configurations to provide a runtime environment for a specific device, such as a PDA, cell phone, set-top box etc. The profile in J2ME manages the application, user interface, networking and I/O.

In order to maintain Java application, manufacturers need to implement a profile for their specific devices. J2ME is aimed directly at consumer devices with limited horsepower. Many such devices (e.g., a mobile phone or pager) have no option other than to download and install software and use what was cond during the manufacturing process.

Small consumers of electronic devices have a way of changing our lives. Mobile phone makes us communicate when away from our home or office. A personal digital assistant (PDAs) makes us access email, browse the internet and run applications of all shapes and forms. With the implementation of Java for such devices, we now have access to the features inherent to the Java language and platform. Java is a programming language that is easy to the user, a runtime environment that provides a secure and portable platform and access to dynamic content.

Although it would be good to have the entire J2SE Application Programming Interface (API) available on a micro device, it's not possible. For example, a mobile phone with its limited display feature cannot provide all the functionalities available in the Window Toolkit, the first graphical user interface released with Java. The "Micro Edition" was introduced to solve the special needs of consumer devices that are outside the scope of J2SE and J2EE.

6.2.1 J2ME ARCHITECTURE:

The modular design implemented in the J2ME architecture enables an application to be scaled based on constraints of a small computing device. J2ME architecture doesn't replace the existing operating system of a small computing device. Instead, J2ME architecture consists of layers which are located above native operating system and referred as CLDC (Connected Limited Device Configuration). The Connected Limited Device Configuration is installed on top of the native operating system forms the run-time environment for small computing devices. [Tim Topley, 2002]

The J2ME architecture comprises three software layers.

· The first layer is known as the configuration layer that includes the Java Virtual Machine (JVM), which directly interacts with the native operating system. The configuration layer also handles communications between the profile and the JVM.

· The second layer is known as the profile layer, which consists of the minimum set of application programming interfaces (APIs) for small computing devices.

· The third layer is known as the Mobile Information Device Profile (MIDP). The Mobile Information Device Profile layer contains of Java APIs for user network connections, persistence storage and user interfaces. It also has an access to MIDP libraries and CLDC libraries.

A small computing device has two components supplied by the OEM (original equipment manufacturer), they are classes and applications. OEM classes are used by the MIDP to access device-specific features such as receiving, sending messages and accessing device-specific persistent data. OEM applications are programs that are provided by the OEM, such as an address book. OEM applications can be accessed by MIDP.

A word of caution is that accessing OEM classes and OEM applications from the MIDP restricts the portability of a J2ME application. Since not all small computing device manufacturers use the same OEM applications or OEM classes.

Layers of J2ME Architecture

Dig ref: J2ME Book.

6.3 JAVAMAIL:

The Java Mail API is a standard extension package for reading, composing, and sending an electronic message. The Java Mail API provides user with a platform independent and protocol-independent framework to build mail and messaging applications. The Java Mail API is available as an elective package for use with Java SE platform and is also included in the Java EE platform [https://www.ece.tufts.edu/~hchang/Projects2001/BTReport-zhong.pdf].

The Java Mail API is therefore designed to satisfy the following runtime and development requirements:

Ø Simple and straightforward class design is easy for a developer to learn and implement in the application.

Ø Use of common concepts and programming models support code development that interfaces well with other Java APIs.

Ø Uses familiar exception-handling.

Ø Supports the development of tough and user friendly mail-enabled applications that can handle a variety of complex mail message formats, data types, access and transport protocols.

6.3.1 JAVAMAIL LAYERED ARCHITECTURE:

The Java Mail architectural components are layered as:

* The Abstract Layer in Java mail declares classes, interfaces and abstract methods that are supported by mail handling functions that all mail systems support. API elements in the Abstract Layer are intended to be sub classed and extended as necessary in order to support standard data types and to interface with message access and message transport protocols as necessary.

* The internet implementation layer implements a part of the abstract layer using internet standards such as RFC822 and MIME.

* Java Mail also uses the JAF (JavaBeans Activation Framework) in order to handle commands and to encapsulate message data that interact with that data. Interaction with message data will be done via JAF-aware JavaBeans, which are not provided by the Java Mail API.

Java Mail clients normally use the Java Mail API and Service Providers implement the Java Mail API. The layered design architecture allows clients to use the same Java Mail API calls to send, receive and store a variety of messages using different data-types from different message stores and using different message transport protocols.

Dig ref : Java mail 1.3 Sun Microsystems September 2003

There are two versions of the Java Mail APIs commonly used today: 1.2 and 1.1.3. While 1.2 versions is the latest one, 1.1.3 is the version included with the 1.2.1 version of the Java 2 Platform, Enterprise Edition (J2EE), so it is still commonly used. The version of the Java Mail API you want to use affects what you download and install. All will work with JDK 1.1.6+, Java 2 Platform, Standard Edition (J2SE) version 1.2.x, and J2SE version 1.3.x.

6.4 JNI (JAVA NATIVE INTERFACE)

The JNI (Java Native Interface) is a programming framework that allows Java code to run in JVM (Java virtual machine) to be called and to call by native application (programs that specifies hardware and operating system platform) and the libraries are written in other languages like assembly [17],C and C++ .

The JNI is used to write native function to handle situations when a specific part application cannot be written in Java programming language such as when standard Java class library does not support the platform-specific features or program library. It is also used for modification of an existing application and it can also be written in another programming language so that it could be accessible to Java applications. Many of the standard library classes also depend on JNI to provide functionality to the developer and the user, e.g. I/O file reading and sound capabilities. Even the performance and platform-sensitive API implementations in the standard library allow all Java applications to access this functionality in a secure way and platform-independent manner. Before deciding to use the JNI, developers should make sure the functionality is not already provided in the standard libraries.

The JNI framework lets our local function (native program) utilize Java objects in the same way that Java code uses these objects. A native function can create Java objects and then inspect and use these objects to perform its tasks. A native function can also inspect and use objects created by Java application code, JNI is sometimes referred to as the "getaway valve" for Java developers because it allows them to add their own functionality to their Java Application that the Java API can't provide. It can be used to interface with code written in other languages also. Java Native Interface (JNI) is used for time-critical calculations or operations like solving complicated mathematical equations, since native code can be faster than Java virtual machine (JVM) code.

6.5 VISUAL C++:

Most of developers think programs were thought of a series of events that are acted upon data. A function is a set of instructions executed step by step. The data was quite separate from the procedures and programming is to keep track of which functions call other functions and what data is changed. To create logic from the potentially confusing situation, structured programming was created. The basic idea behind structured programming is as simple as the idea of divide and conquers. A computer program can be thought as a set of tasks. Any task which is too complex would be broken down into a set of smaller component tasks, until enough that they were easily understood [Davis Chapman, 1998].

Structured programming remains an extremely successful approach for dealing with complex problems. In late 1980s, however, some of the deficiencies of structured programming have become clear. Object-oriented programming provides techniques for managing extremely complexity, achieving reuse of software components, and coupling data with the tasks that manipulate the data.

The fundamental nature of object-oriented programming is to treat data and the procedures that acted upon data as a single "object" a self-contained entity with certain characteristics and name of its own.

6.5.1 C++ AND OBJECT-ORIENTED PROGRAMMING:

C++ fully supports object-oriented programming, which contains the four pillars of object-oriented development: encapsulation, data hiding, inheritance, and polymorphism. The property of programming language being a self-contained unit is known as encapsulation. With data encapsulation, we can do data hiding. Data hiding is the highly appreciated feature that an object can be used without the user knowing or caring how it works internally. In C++ we can do this data hiding and encapsulation through the creation of user-defined types known as classes.

C++ supports the idea to reuse software components through inheritance. A new class, which is an extension of an existing type, can be declared. This new subclass is said to develop from the existing type and is sometimes called a derived type. C++ supports the idea of different objects do "the right thing” all the way through what is called function and class polymorphisms, Poly means many and morph means form. Polymorphism refers as to the same name taking multiple forms.

6.5.2INTRODUCTION TO MFC

The Microsoft Foundation Class (MFC) Library:

A Hierarchy of C++ classes are designed to facilitate Windows programming, an alternative to use Win32 API functions. A Visual C++ Windows application can use either Win32 API MFC or windows programming.

Some characteristics of MFC:

* Offer convenience of REUSABLE CODE: Most of the tasks common to all Windows application are provided by MFC. Our programs can inherit and modify this functionality as needed we don't need to recreate these tasks; MFC handles many clerical details in Windows program.

* Produce smaller executables: Normally 1/3 the size of their API counterparts.

* Can lead to faster program development: But it is very hard to learn, especially for newcomers to object-oriented programming.

Important Derived Classes:

CFile: Support for file operations.

CDC: Encapsulates the device context (Graphical Drawing).

CGdiObject: Base class for various drawing objects (bitmaps, pens, etc.).

CMenu: Encapsulates menu management.

CCmdTarget: Encapsulates message passing process & is parent of:

CWnd: Base class all windows are derived from; most common:

CFrameWindow: Can contain other windows.

("normal" kind of window we've been using).

CView: Encapsulates process of displaying data.

CDialog: Encapsulates dialog boxes.

CWinThread: Defines a thread of execution & is parent of:

CWinApp: Most important classes dealt with in MFC apps: Encapsulates an MFC application Controls following aspects of Windows programs: Start-up, initialization, execution, shutdown an application should have one CWinApp object when instantiated, application begins to run

CDocument: Encapsulates the data associated with a program Primary task in writing MFC program--to create classes Most of them will be derived from MFC library classes.

6.5.3 MFC Template class object:

Normally the Application object creates a template, which coordinates to display document's data àin a view àinside a frame window. It handles coordination in between documents, views and frame windows which are shown below.

6.5.4 The Document/View Architecture:

The Document or View architecture is the foundation that is used to create applications based on Microsoft Foundation Classes library. It allows you to make different parts that compose a computer program including what the user sees as part of your application and the document how a user would work on. This process is done through a combination of separate classes that work as an ensemble. The important parts of the Document/View architecture are a frame, one or more documents, and the view. Combined together, these entities make up a usable application.

The View

A view is the platform that the user is working on to do his or her job. For example, when we are developing a word processing, we need works on a series of words that compose the text. In the same way performing calculations on a spreadsheet application, the user interface he or she is viewing is made up of small boxes called cells. Another user may be working on a graphic document while drawing vertical and horizontal lines and other geometric s. The thing the user is starring at and making changes is called a view.

To allow the users to do any changes on an application, we must need to have a view, which is an object based on the CView class. We can directly use one of the classes derived from CView (normally available in VC++) or we can develop our own custom class from CView or from one of its child classes.

The Single Document Interface (SDI) is referred to a document that can present only one view to the user. This means that the application can display only one document at a time. For an example if the user wants to view another type of document of the current application, he or she must close present document on the application.

Program organized to handle multiple documents which are same or different type's of document simultaneously known as Multiple document interface (MDI) application, well known example of MDI is Microsoft Word.

View: A rendering of a document or a physical representation of the data:

* It provides easy mechanism for displaying data stored in a document.

* It defines how data is to be displayed in a window.

* It defines how the user can interact with it.

6.6 JAVA SERVLETS:

Java servlets are popular one of which is considered as an alternative to CGI programs. The main difference between Java servlets and Java applet is that a Java applet is persistent. This means that once java applet is started, it stays in memory and can fulfil multiple requests, but in a CGI program disappears once it has fulfilled a request. The persistence of Java applets makes it faster because as there is no wasted time in setting up and tearing down the process and Servlets are Java technology's answer to CGI programming. Servlets are programs that can run on a Web server and build Web pages. It provides a solution for the performance problem by executing all requests as threads in one process, or in a load-balanced system, but where as in the CGI(Common Gateway Interface) you need to create a separate process for each request[Hunter, Jason,2002].

Purpose of Java Servlets:

* To Create the Web page dynamically based on data submitted by the user.

* The data changes occur frequently.

Important Packages:

The javax.servlet package consists of interfaces and classes intended to be protocol independent and where as javax.servlet.http package consists of HTTP specific interfaces and classes.

The architecture of servlet:

Servlet Interface is based on the central abstraction concept. All Java Servlets implements this Servlet Interface either directly or indirectly.

Dig ref :Sun java servlets

This life cycle governs the multi-threaded situation that Servlets run in and provides an insight to some of the mechanisms available to a developer for sharing server-side resources.

The Servlet life cycle (see above) is the primary reason Servlets outperforms traditional CGI. Opposed to the single-use of CGI life cycle, Servlets follow a three-phase life: destruction, initialization and service, where destruction and initialization are typically performed once and service is performed many times.

6.7 ROLE OF EACH CONCEPT USED IN BLUETOOTH PC REMOTE PROJECT:

1. JAVABASICS

Language is one of the standard and default package in Basics used to perform basic operations of Java like:

1. Class: Creating Classes, Inner Class, Objects, Extending classes, Implementing Interfaces.

2. Constructors: Used to initialize object through parameterized Constructor, Overloading Constructors,

3. Packages: Packages are used to import classes present in the package and also used to create user defined package.

4. Exceptions: To Handle System Exceptions and also to throw and catch User Defined Exceptions.

5. Multithreading: Using this concept we can create Thread which are lightweight process and is used to perform more task simultaneously.

6. String: To perform String Operations like Comparing, Concatenating, Appending, Replace, Delete, Insert,

7. StringTokenizer: are used to break Strings to words called Tokens depending on the requirement we can take the particular Token.

2. J2ME

1. It is used to create GUI to accept data from user.

2. It is used to store data in Mobiles using Record Store where we can insert update delete values from Record Store.

3. Java Mail API

It is used to send SMS to the specified Mobile number and also attachment to the specified E-mail id.

4. Servlet

It is used to accept request from Mobile through the Bluetooth Server running in the dial up PC and to send response from PC to Mobile.

5. JNI

JNI stands for Java Native Interface used to execute the methods written in other languages like C, C++, VC++ and those methods are called Native Methods. Java cannot interact with the hardware directly, it makes use of JNI to pass the control to VC++ part .VC++ will interact with the hardware and perform the required operation specified by the user and transfer the control to Java through JNI.

6. Bluetooth API

It is used to establish Wireless Connection from Mobile to PC.

7. VisualC++

It will receive control from Java through JNI and will interact with hardware and perform specified operation and will transfer the control to Java through JNI

CHAPTER 7

TESTING AND IMPLEMENTATION

7.1 INTRODUCTION:

Testing the final output is always a necessity in order to produce a flawless prototype. It is very important stage as it includes segregation and coordination of all the previous phases. Testing is all about bringing the software units together and merging it into a complete prototype and verify whether it is working correctly or not as per the objectives. Testing is a process which is used to identify the correctness, completeness and quality of developed computer software.

There are many modern approaches of software testing, but effective testing of complex products is essentially a process of investigation, not merely a matter of creating and following procedures. Real definition of testing is "a process of questioning a product in order to evaluate it", where the "questions" are things the tester tries to do with the product, and the product answers with its behaviour in reaction to the probing of the tester. Although most of the logical processes of testing are nearly identical to that of review or inspection, the word testing is connoted to mean the dynamic analysis of the product putting the product through its paces.

Testing helps us in verifying and validating the software whether it is working as it is intended to be working or not. Testing process involves using static and dynamic methodologies to test the application.

7.2 TESTING OBJECTIVES:

The main purpose of testing is to discover a host of errors, systematically with least amount time and effort, they can be defined as:

* Testing is a process of executing a program with the intention to locate an error.

* Covering the undiscovered error is a successful test.

* A good test case is one that has a high possibility of finding error, if so it exists in the code.

* The tests are insufficient to detect possibly present errors.

* The software confirms more or less to the quality and reliable standards.

7.2.1 TESTING STRATEGIES:

Unit Testing:

Unit testing mainly focuses on verification effort on the smallest unit of software. Using the detailed design and the process specifications approach testing is done to uncover errors within the limit of the code. All individual modules must be successful in the unit test before start of the integration testing begins. In this application developer tests the individual programs up as system. Software units in a system are different modules and routines that are assembled and integrated to form a specific function. Unit testing is first done on each module, independent of one another to locate error, this enables to detect errors. Through these errors resulting from interaction between modules initially avoided.

Link Testing:

Link testing does not test software application but rather the integration of each module in the system. The primary concern is about the compatibility of each module. The developer tests where modules are designed with different parameters, length, type etc.

Integration Testing

After the unit testing we need to perform integration testing. The purpose here is to see whether all the modules can be integrated properly, the emphasis being testing interfaces between modules. This testing activity is considered as testing the design and hence the emphasis on testing module communications. In this project integrating the individual modules is to form the main system. When integrating all the modules integration effects were checked on the system.

White Box Testing

This is a unit testing method where the complete unit will be taken at a time and tested thoroughly at a statement level to find the maximum possible errors. Testing step wise of every piece of code takes place here, taking care that every statement in the code is executed at least once is known as white box testing.

Black Box Testing

This method considers the module as a single unit and checks the unit at interface and communicates with other modules rather getting into details at the last level. Here the module will be treated as a block box where some input is given in order to generate output. Output for a given pair of input combinations are forwarded as inputs to other modules.

7.3 FINAL RESULTS:

After all the technical processes the final results were obtained and their screen shots are explained in this section respectively according to the stage wise. This is a project which deals Pc remote control by mobile phone using the Bluetooth .The server and the GUI in the mobile are explained respectively.

Snapshot of the server getting started:

In the snapshot we can see the local address 00:1C:F0:6C:4C:35 which are address of the dongle. As we are using the third party HCI driver supplied by the Avetana Bluetooth which will be expired in 31.05.2010 but if change the date of system it working as its takes date from the system. Next we can see other fields like license id of the driver Etc.

Snap shot of server when mobiles we select particular driver from PC

Here I am accessing the D drive of my laptop where all files present in them can be viewed. If we see the rat.txt file(from bottom 2nd line after Sarat document and RECYCLER ) as an example for opening a file from the d drive.

In the above screen shot we can see the opening of file rat .txt and matter appears “This is a file which is created from the mobile application to test the working of PC remote through mobile phone Bluetooth” all working similarly.

Server during the list process:

In the screen shot above is a server to display all the process running on a PC, there is process called googleupdaterservice.exe the process will be stopped from the mobile .Here application is doing the kill process command.

The kill process has been done successful, which can be seen in the above screen shot on the server side.

The disconnection of server is addressed in code by sending an error message. Normally connection is checked after every task on server set from the client, we normally get 1111111 222222 33333333 on server after every task has been done and ‘done' message on client. If a disconnection occurs, error 151 is sent to client (mobile). So that it will help the server not going into infinite delay, please turned ON server once again , make sure that server is turned on first than client because of this also error 151 will sent once again.

7.4 CONCLUSION:

Evaluation means “A Process that attempts to systematically and objectively determine the relevance, effectiveness and impact of activities in light of their objectives” (IIME).So the objectives put up should be achieved to meet the aims of the dissertation such as improvement of response time, user friendly and disconnection of server. The total project has been deployed and developed as per the needs stated, it is found to be bug free as per the testing principles that are implemented through all the phases. Mobiles such as Samsung D200, Sony Eriksson 850i, Sony Eriksson P1i, Orbit XDA mobiles have been used for testing, with a memory sixe of 512 Mb of external or internal memory.

ACRONYMS

HCI àHost controller interface, this part of Bluetooth stack.

PC àPersonal computer.

UART àUniversal asynchronous receiver/transmitter, it is data transfer standard

USB à Universal serial bus.

J2ME àJava 2 Platform Micro edition, it provides java API for PDA and Mobiles.

JNI àJava native Interface.

PCMCIAàPersonal computer memory card international association.

References:

1. Bluetooth Revealed (2ndedition,2002) by Brent A. Miller and ChatchickBisdikisan.

2. Bluetooth Operations and Use (2002) by Robert Morrow

3. Bluetooth Application Developer's Guide (2002) by David Kammer, Gordon McNutt, Brain Senese, Jennifer Bray.

4. J2ME in a Nutshell by Kim Topley.

5. Wireless Java with J2ME by Sams.

6. Java threads by Scott Oak and Henry wong.

7. N. Golmie, “ Bluetooth Dynamic Scheduling and Interference Mitigation,”in submitted for review to ACM/MONET'02, 2002.

8. N. Golmie, R.E. Van Dyck and A. Soltanian, “Interference of Bluetooth and IEEE 802.11: Simulation Modeling and Performance Evaluation,” in Proceedings of the Fourth ACM International Workshop on Modeling, Analysis, and Simulation of Wireless and Mobile Systems, MSWIM'01, Rome, Italy, July 2001.

9. Morrow Robert (2002), Bluetooth: Operation And Use, Mcgraw-hill, ISBN: 007138779X

10. Bluetooth SIG. Specification of the Bluetooth System - Wireless Connections Made Easy. Available

[Online]: https://www.bluetooth.com [October 2002].

11. Jennifer Bray, Charles F. Sturman. Bluetooth: Connect Without Cables. Prentice Hall, 2001.

12. Jaap C. Haartsen, Sven Mattisson. Bluetooth - A New Low - Power Radio Interface Providing Short-Range Connectivity. In Proceedings of the IEEE, Volume 88, Number 10, October 2000, pages 1651 -1661.

13. Brent A. Miller, Chatschik Bisdikian. Bluetooth Revealed: The Insider's Guide to an Open Specification for Global Wireless Communications. Prentice Hall, 2000.

14. Myers, B., H. Stiel & R. Gargiulo (1998). Collaboration Using Multiple PDAs Connected to a PC. Proc. ACM CSCW'98 Conf. on Computer Supported Cooperative Work, Seattle,WA. 285-294.

15. David Kammer, Gordon McNutt, Brian Senese, Jennifer Bray. Bluetooth Application Developer's Guide: The Short Range Interconnect Solution. Syngress, 2002

16. Bluetooth Special Interest Group, “Specifications of the Bluetooth System, vol. 1, v.1.0B 'Core' and vol. 2 v1.0B 'Profiles',” December 1999.

17. IEEE Std. 802-11, “IEEE Standard for Wireless LAN Medium Access Control (MAC) and Physical Layer (PHY) Specification ,” June 1997.

18. Federal Communications Commission, “Title 47, Code for Federal Regulations, Part 15,” October 1998.

19. IEEE 802.15.2-2003, “IEEE Recommended Practice for Information Technology -Part 15.2: Coexistence of Wireless Personal Area Networks with Other Wireless Devices Operating in the Unlicensed Frequency Bands,” 2003.

20. J. Lansford, A. Stephens, and R. Nevo, “Wi-Fi (802.11b) and Bluetooth: Enabling Coexistence,” in IEEE Network Magazine, Sept/Oct. 2001, vol. 15, pp. 20-27.

21. B. Treister, A. Batra, K.C. Chen, O. Eliezer, “Adapative Frequency Hopping: A Non-Collaborative Coexistence Mechanism,” in IEEE P802.11 Working Group Contribution, IEEE P802.15-01/252r0, Orlando, FL, May 2001.

22. N. Golmie, “Bluetooth Dynamic Scheduling and Interference Mitigation,” in to appear in ACM Mobile Network, MONET, 2004.

23. Carla F. Chiasserini, and Ramesh R. Rao, “ Coexistence mechanisms for Interference mitigation between IEEE 802.11 WLANs and Bluetooth,” in Proceedings of INFOCOM 2002, 2002, pp. 590-598.

24. N. Golmie, “Bluetooth Adaptive Frequency Hopping and Scheduling,” in Proceedings of MILCOM'03, Boston, MA, October 2003.

25. N. Golmie, R.E. Van Dyck, A. Soltanian, A. Tonnerre, and O. Rebala, “ Interference Evaluation of Bluetooth and IEEE 802.11b Systems,” in ACM Wireless Network, WINET, Vol. 9, pp. 200-211, May 2003.

26. A. Kamerman, “Coexistence between Bluetooth and IEEE 802.11 CCK: Solutions to avoid mutual interference,” in IEEE P802.11 Working Group Contribu- tion, IEEE P802.11-00/162r0, July 2000

27. Rabinovich, M., Xiao, Z., and Aggarwal, A. Computing on the Edge: A Platform for Replicating Internet Applications. In Proceedings of the 8th International Workshop on Web Content Caching and Distribution, (Hawthorne, New York, September 29 through October 1, 2003).

28. B. Miller and R. Pascoe, “Mapping Salutation Architecture APIs to Bluetooth Service Discovery Layer,” Version 1.0, Bluetooth SIG white paper, July 1999.

29. Ali M Aljuaied (September 2001),'Bluetooth Technology and its Implementation in Sensing Devices', NAVAL POSTGRADUATE SCHOOL. (Monterey, California 1-34).

30. Java servlets programming by Hunter, Jason.

31. The complete J2ME reference by James kough.

32. Java servlets and JSP by Andrea Steelman and Joel Muranch.

33. Java API for bluetooth wireless technology (JSR 82) by Sun Microsystems.

34. PDF from IEEE on Bluetooth stack :www.ieee.com

35. Java Beans: Developing components software in java by Elliott Rusty Harold

36. Institutionalization of usability (2004) by Eric Schaffer.

37. User centred design (2002) by Karel Vredenburg, Scott Isensee, and Carol Righi.

38. Usability Engineering (2000) by Xristine Faulkner.

39. Exploring interface design (2005) by Marc Silver.

40. Visual c++ 6 (1998) Davis Chapman.

41. Lewontin, S. and Martin, E. Client Side Load Balancing for the Web. In Proceedings of 6th International World Wide Web Conference. (Santa Clara, California, April 7-11,1997).

42. Vingralek, R., Breitbart, Y., Sayal, M., and Scheuermann, P. Web++: A System For Fast and Reliable Web Service. In Proceedings of the USENIX Annual Technical Conference. (Monterey, California, June 6-11, 1999). USENIX Association.

43. Sayal, M., Scheuermann, P., and Vingralek, R. Content Replication in Web++. In Proceedings 2nd IEEE International Symposium on Network Computing and Applications. (Cambridge, Massachusetts, April 16 - 18, 2003). IEEE, p. 33.

44. Fei, Z., Bhattacharjee, S., Zegura, E., and Ammar, M. A Novel Server Selection Technique for Improving Response Time of a Replicated Service. In Proceedings IEEE INFOCOM 1998. (San Francisco, California, March 1998). IEEE, pp. 783-791.

45. Crovella, M. and Carter, R. Dynamic Server Selection in the Internet. In Proceedings of the 3rd IEEE Workshop on the Architecture and Implementation of High Performance Communication Subsystems. (Mystic, Connecticut, August 1995).

46. Carter, R. and Corvella, M. Server Selection using Dynamic Path Characterization in Wide-Area Networks. In Proceedings of INFOCOM 1997. (Kobe, Japan, April 1997).

47. Cardellini, V., Colajanni, M. and Yu, P. Request Redirection Algorithms for Distributed Web Systems. IEEE Transactions on Parallel and Distributed Systems, Vol. 14, No. 4, April 2003, pp. 355-368.

48. Sayal, M., Breitbart, Y., Scheuermann, P. and Vingralek, R. Selection Algorithms for Replicated Web Servers. In Proceedings of the Workshop on Internet Server Performance. (Madison, Wisconsin, June 1998).

49. Connect Control Datasheet. Check Point Software Technologies Ltd. 2003.

50. Load Balancing System, Chapter 6 in Intel Solutions Manual, Intel Corporation, pp. 49-67.

51. Farrell, R. Review of Web server load balancers. Network World, September 27, 1997.

Did you like this example?

Cite this page

Bluetooth. (2017, Jun 26). Retrieved November 13, 2024 , from
https://studydriver.com/bluetooth/

Save time with Studydriver!

Get in touch with our top writers for a non-plagiarized essays written to satisfy your needs

Get custom essay

Stuck on ideas? Struggling with a concept?

A professional writer will make a clear, mistake-free paper for you!

Get help with your assignment
Leave your email and we will send a sample to you.
Stop wasting your time searching for samples!
You can find a skilled professional who can write any paper for you.
Get unique paper

Hi!
I'm Amy :)

I can help you save hours on your homework. Let's start by finding a writer.

Find Writer