ProjectFinal

21
MOBILE BLUETOOTH SERVICES (Final Year B.Tech Project Presentation) Project Guide Asst. Prof. Balu John Presented By Anup Antony (Reg. No. 06401003) Deepu M.P. (Reg. No. 06401006) Prashant Arvind (Reg. No. 064010

Transcript of ProjectFinal

Page 1: ProjectFinal

MOBILE BLUETOOTH

SERVICES(Final Year B.Tech Project

Presentation)

Project Guide

Asst. Prof. Balu John

Presented By

Anup Antony (Reg. No. 06401003)

Deepu M.P. (Reg. No. 06401006)

Prashant Arvind (Reg. No. 06401020)

Page 2: ProjectFinal

CONTENTS

1. Introduction2. Software Requirements3. Hardware Requirements4. System Design5. System Implementation6. Screenshots7. Results8. Conclusion

Page 3: ProjectFinal

1. INTRODUCTION

Mobile Bluetooth Service enables the user to chat with the neighboring Mobile Bluetooth devices and perform file transferring. It also allows us to control certain applications in PC e.g. PowerPoint, Winamp. Mobile Bluetooth Service is divided into 2 modules:

PC ControllerBluetooth Chat

Page 4: ProjectFinal

2. SOFTWARE REQUIREMENTS

Operating System: Windows XP or aboveNet Beans 6.1Sun Java Wireless ToolkitsJ2ME, J2SEJDK 6Bluetooth Drivers for WindowsBluecove-2.1.0

Tools and Technologies Used

Page 5: ProjectFinal

Hardware Requirements Processor: Pentium 4 or above 512MB RAM 40 GB Hard Disk Bluetooth Dongle

Java and Bluetooth enabled phones

3. HARDWARE REQUIREMENTS

Page 6: ProjectFinal

Java

Technologies Used

Java is a platform independent programming language developed by Sun Microsystems. There are mainly three variations of it - J2SE, J2ME and J2EE. J2SE is the standard edition of Java.

J2ME It is a lighter platform of Java. Intended to design applications for mobile devices Contains ‘profiles’ – e.g. MIDP (a de facto standard in mobile phones) to develop mobile user GUI called MIDlets.

Page 7: ProjectFinal

Sun Java Wireless Toolkit

Comprehensive set of tools for building MIDP

applications Helps develop wireless applications using J2ME

Enhances the functionality of J2ME’s CLDC and MIDP Contains emulation environments, tuning features and documentation

Technologies Used (contd…)

Page 8: ProjectFinal

4. SYSTEM DESIGNPC Controller

Page 9: ProjectFinal

SYSTEM DESIGN (…contd)

Bluetooth Chat

Page 10: ProjectFinal

5. SYSTEM

IMLEMENTATION5.1 PC Controller

There are two parts in this module:ServerClient

The SERVER part runs in the desktop PC and the CLIENT is deployed in the java supporting mobile phone.

Page 11: ProjectFinal

5.1 PC Controller (contd)

SERVER

Written in J2SE, imports various Bluetooth packages using Bluecove protocol stack Uses an object of LocalDevice class to set various bluetooth parameters such as discoverable mode, using setDiscoverable() method. A unique service id is created using the UUID class in javax.bluetooth package and a url is created for this service using the btspp (bluetooth serial port profile) protocol. A stream connection is then opened with this URL and an input and an output stream objects are created A thread is spawned off implicitly to handle incoming stream messages from the client.

Page 12: ProjectFinal

5.1 PC Controller (contd)

SERVER (contd)

The receiver thread takes the input as byte stream, converts into string and takes corresponding actions to control the various applications by simulating keystrokes

Keystrokes are simulated using an object of Robot class by calling keyPress() and keyRelease() methods

Programs are invoked using an instance of Runtime class by calling the exec() command. It returns an instance of Process class which handles the various subprocesses

Page 13: ProjectFinal

5.1 PC Controller (contd)

CLIENT

Written in J2ME and deployed in a mobile phone as .jar fileIt’s a MIDP application, providing user interface & functions Once it is launched startDeviceInquiry() method is invoked which searches for active devices in Bluetooth range.After discovery is complete, all devices are listed using an object of List class by appending them to the listThe user can select the intended PC after which service discovery routine is invoked.If the corresponding UUID is matched, the user is successfully connectedStream is created to handle data flow between the PC and phone using a Sending thread and a Receiving thread

Page 14: ProjectFinal

5.1 PC Controller (contd)

CLIENT (contd)

User can select Winamp or Powerpoint listed in the MIDletIn Winamp, a list of operations (play, pause etc.) are displayed using an instance of ChoiceGroup classUpon selection of a function, the index corresponding to the item in the choice group is retrieved and a string is written onto an instance of OutputStream and sent to the PC

In Powerpoint, the implementation is similar, except that a Form displays a choice of predefined PPTs.User can select any and the operations will be providedWindows batch file(.bat) is used to invoke files in the PC using the exec() method in Robot class

Page 15: ProjectFinal

5.2 Bluetooth Chat

There are two modules in this application

Initiate Chat

Join Chat

Initiate ChatThe application starts off with the startDeviceInquiry() method and lists all available bluetooth enabled devices in vicinityThis is followed by service discovery which finds and finally allows user to connect to the other end, checking the UUID

Page 16: ProjectFinal

5.2 Bluetooth Chat (contd)

After the various security prompts the user is displayed a Form in the Midlet which acts as the chat window. It has a TextField to enter textThe message typed is written onto the form using the append() methodTwo threads –to send and receive- are created when connection is established to handle data transferJoin ChatThis is similar to entering a chat room, as the name saysHere, the user’s mobile is published to the network by making it discoverableIt can wait for messages from the sender which initiates a chatThe other device which initiates a chat can select this device

Page 17: ProjectFinal

6. SCREENSHOTS

Application Select in MBServices PC Controller Main Screen

Page 18: ProjectFinal

SCREENSHOTS(contd)

Chat Option Selection

Page 19: ProjectFinal

SCREENSHOTS(contd)

Chat Window

Page 20: ProjectFinal

7. RESULTS

PC Controller was successfully implementedVarious windows applications could be opened and switched between each other

One-to-one chatting between two mobile users was successfully implementedIntegration of both the modules was successfully done; the user could switch between PC controller and Bluetooth Chat.

Page 21: ProjectFinal

8. CONCLUSION

Mobile Bluetooth Services used the client-server model to accomplish the various tasks and functionsThe message passing between PC and mobile and mobile-to-mobile was facilitated using Threads in java

The PC controller could efficiently run and control the windows applications. Chat module though efficient, had minor issues with the phones in which they were deployed due to certain mismatches in the phone software and its support for .jar files