Top Banner
Bluetooth Remote Control This paper appears in: Information and Communication Technologies, 2006. ICTTA '06. 2nd On page(s): 2674 - 2677 Location: Damascus Print ISBN: 0-7803-9521-2 INSPEC Accession Number: 9061937 Digital Object Identifier: 10.1109/ICTTA.2006.1684832 Date of Current Version: 16 å月 2006 Professor Yih - Ran Sheu Student Yao - Wei Tseng Student Id MA020203 PTT Production Rate 100 1
24

Bluetooth Remote Control This paper appears in: Information and Communication Technologies, 2006. ICTTA '06. 2nd On page(s): 2674 - 2677 Location: Damascus.

Dec 26, 2015

Download

Documents

Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Bluetooth Remote Control This paper appears in: Information and Communication Technologies, 2006. ICTTA '06. 2nd On page(s): 2674 - 2677 Location: Damascus.

Bluetooth Remote Control

This paper appears in: Information and Communication Technologies, 2006. ICTTA '06. 2nd

On page(s): 2674 - 2677 Location: Damascus

Print ISBN: 0-7803-9521-2 INSPEC Accession Number: 9061937

Digital Object Identifier: 10.1109/ICTTA.2006.1684832  Date of Current Version: 16 å月 2006

Professor : Yih - Ran SheuStudent : Yao - Wei TsengStudent Id : MA020203PTT Production Rate :100 %

1

Page 2: Bluetooth Remote Control This paper appears in: Information and Communication Technologies, 2006. ICTTA '06. 2nd On page(s): 2674 - 2677 Location: Damascus.

Outline•Abstract•Introduction•System Design•System Applications a. Controlling PC via Bluetooth enabled Mobile a-1. Server Application a-2. Client Application a-3. Client Application interfaces a-4. Client Application

programming

b. Controlling electronic devices b-1. Using Java and JNI to control LPT port

c. The Electrical circuit Unit•Test And Result•Conclusion

2

Page 3: Bluetooth Remote Control This paper appears in: Information and Communication Technologies, 2006. ICTTA '06. 2nd On page(s): 2674 - 2677 Location: Damascus.

Abstract(1/2)

•Based on client-server application.

•The client application runs on mobile phone and the server application runs on PC using J2ME and J2SE respectively.

•Can be used to control PC’s via mobile phone.

3

Page 4: Bluetooth Remote Control This paper appears in: Information and Communication Technologies, 2006. ICTTA '06. 2nd On page(s): 2674 - 2677 Location: Damascus.

Abstract(2/2)

•It can open the Internet Explorer, Media player, Power Point, MSN messenger and control the mouse.

•Can be also used to control electrical devices using the parallel (LPT) port of PC.

4

Page 5: Bluetooth Remote Control This paper appears in: Information and Communication Technologies, 2006. ICTTA '06. 2nd On page(s): 2674 - 2677 Location: Damascus.

Introduction

•Bluetooth wireless networks and increased use of handheld devices like mobile phones have encouraged mobile vendors to develop their mobile system and applications .

•"Bluetooth remote control" application which runs on mobile phones and helps users control their PCs and electrical devices remotely.

5

Page 6: Bluetooth Remote Control This paper appears in: Information and Communication Technologies, 2006. ICTTA '06. 2nd On page(s): 2674 - 2677 Location: Damascus.

System Design (1/2)

•The main system consists of two parts: the client

application and the server application.

•The client application runs on mobile phone and uses J2ME. The server application runs on PC and uses java (JSR-82 standards) and J2SE platform.

6

Page 7: Bluetooth Remote Control This paper appears in: Information and Communication Technologies, 2006. ICTTA '06. 2nd On page(s): 2674 - 2677 Location: Damascus.

System Design (2/2)

•The connection between the client and the server is realized via the Bluetooth technology.

•Four steps(Initialize stuck 、 discover devices 、 discover services and open connections as shown in figure 1) are necessary to establish a connection between the client and the server .

7

Page 8: Bluetooth Remote Control This paper appears in: Information and Communication Technologies, 2006. ICTTA '06. 2nd On page(s): 2674 - 2677 Location: Damascus.

Figure 1

8

Page 9: Bluetooth Remote Control This paper appears in: Information and Communication Technologies, 2006. ICTTA '06. 2nd On page(s): 2674 - 2677 Location: Damascus.

System Applications

•Control the PC from a mobile phone via Bluetooth.

•Control fans connected to the parallel port of a PC from a mobile phone via Bluetooth.

9

Page 10: Bluetooth Remote Control This paper appears in: Information and Communication Technologies, 2006. ICTTA '06. 2nd On page(s): 2674 - 2677 Location: Damascus.

Controlling PC via Bluetooth enabled Mobile• Control various applications in PC such as

Office 、 IE and mouse.

• Server program and client program are needed to be installed(The application is a client-

server application ).

• Bluetooth finding a proper device (PC), it asks for permission to control it. The server gives back this permission to the mobile phone and allows the control .

10

Page 11: Bluetooth Remote Control This paper appears in: Information and Communication Technologies, 2006. ICTTA '06. 2nd On page(s): 2674 - 2677 Location: Damascus.

Server Application

•Use RFCOM protocol.

•The server program waits for the client request . Upon the client request, the server opens a Stream with the client to receive data. The received data is then analyzed in the server to create the appropriate action.

11

Page 12: Bluetooth Remote Control This paper appears in: Information and Communication Technologies, 2006. ICTTA '06. 2nd On page(s): 2674 - 2677 Location: Damascus.

Client Application

•The client program should be installed to the mobile phone.

•It is a J2ME platform based .

•Include: device discovery, service discovery, opening connection, and controlling the PC .

12

Page 13: Bluetooth Remote Control This paper appears in: Information and Communication Technologies, 2006. ICTTA '06. 2nd On page(s): 2674 - 2677 Location: Damascus.

Client Application interfaces• Start interface, search interface, connection

interface and main interface(figure 2).

• The start interface has start application and exit.

• The second interface is the search interface.

• The main interface consists of program icons (IE 、 OFFICE) .If we press the options button we can either research for devices or add connection.

13

Page 14: Bluetooth Remote Control This paper appears in: Information and Communication Technologies, 2006. ICTTA '06. 2nd On page(s): 2674 - 2677 Location: Damascus.

Figure 2

14

Page 15: Bluetooth Remote Control This paper appears in: Information and Communication Technologies, 2006. ICTTA '06. 2nd On page(s): 2674 - 2677 Location: Damascus.

Client Application programming•Use the J2ME language with the JSR-82

technology which supports the Bluetooth functions.

•The JSR82 contains two basics libraries: javax.bluetooth. and javax. obex.

15

Page 16: Bluetooth Remote Control This paper appears in: Information and Communication Technologies, 2006. ICTTA '06. 2nd On page(s): 2674 - 2677 Location: Damascus.

Controlling electronic devices(1/2)•The client program is installed to the

mobile; it allows the connection with the PC. The server program is installed to the PC; it allows receiving data from the mobile phone.

•This data controls the parallel port of the PC where two fans are connected. Pressing certain mobile buttons produces commands to switch the two fans on/off separately or together (see figure 3).

16

Page 17: Bluetooth Remote Control This paper appears in: Information and Communication Technologies, 2006. ICTTA '06. 2nd On page(s): 2674 - 2677 Location: Damascus.

Controlling electronic devices(2/2)• Sending and receiving data between the

mobile phone and the PC via Bluetooth connection.

•Controlling the parallel port using JAVA language.

•Designing and implementing a control circuit that allows connecting two fans to the parallel

port of the PC.

17

Page 18: Bluetooth Remote Control This paper appears in: Information and Communication Technologies, 2006. ICTTA '06. 2nd On page(s): 2674 - 2677 Location: Damascus.

Figure 3

18

Page 19: Bluetooth Remote Control This paper appears in: Information and Communication Technologies, 2006. ICTTA '06. 2nd On page(s): 2674 - 2677 Location: Damascus.

Using Java and JNI to control LPT port•Writing native Java class to send to the

parallel port.

•Java Native Interface (JNI) which allows writing any program in C++ and loads it into JAVA after saving the program in Dynamic Linkable Library

(DLL)as shown in figure 4.

19

Page 20: Bluetooth Remote Control This paper appears in: Information and Communication Technologies, 2006. ICTTA '06. 2nd On page(s): 2674 - 2677 Location: Damascus.

Figure 4使用 JNI之後, Java虛擬機器會開放一扇門戶,和 Java程式可以突破 Java 虛擬機器的限制,直接呼叫底層作業系統的原生函式庫。

20

Page 21: Bluetooth Remote Control This paper appears in: Information and Communication Technologies, 2006. ICTTA '06. 2nd On page(s): 2674 - 2677 Location: Damascus.

The Electrical circuit Unit• The electrical circuit controls turning the two

fans on/off separately according to LPT outputs.

• The circuit are the fans and the transistors D313.

• When a phone button is pressed, the client program, installed in the phone, sends a command to a PC connected to the phone via Bluetooth. The server application, installed in the PC, receives the command, translates it, and sends it to the LPT port.

21

Page 22: Bluetooth Remote Control This paper appears in: Information and Communication Technologies, 2006. ICTTA '06. 2nd On page(s): 2674 - 2677 Location: Damascus.

Test And Result - First Application

• Run the sever application in windows background.• Start the client application in the mobile phone.• Clicking on the search menu, the phone starts

looking for the server.• Once the name of the server is found, a new menu

appears which allow the user to choose any of the listed programs such as Ms Office, Internet Explorer, and Media Player.

• The user can even chose the mouse icon so he can use the joystick of the mobile as a mouse of the PC.

22

Page 23: Bluetooth Remote Control This paper appears in: Information and Communication Technologies, 2006. ICTTA '06. 2nd On page(s): 2674 - 2677 Location: Damascus.

Test And Result - Second Application•When the client application finds the server,

new menu appears with the following options:

•"Pressing number 1" which will turn on the fan-1

•"Pressing number 2" will turn on the fan-2.

•"Pressing number 0" will turn off both fans.

•"Pressing number 3" will turn on both fans.

23

Page 24: Bluetooth Remote Control This paper appears in: Information and Communication Technologies, 2006. ICTTA '06. 2nd On page(s): 2674 - 2677 Location: Damascus.

Conclusion

•"Bluetooth Remote Control" Making a device able to do things it is not normally asked to do, since the mobile normal job is to receive and make calls, now this mobile can control other devices. Such applications are both easy to use and available for everyone.

24