Advanced Remote Control For Pc Using Smartphone

DOI : 10.17577/IJERTV3IS031835

Download Full-Text PDF Cite this Publication

Text Only Version

Advanced Remote Control For Pc Using Smartphone

Rubinder Singh Nitin Kumar Bisret Narula

Dept. of Information Technology Dept. of Information Technology Assistant Professor

G.T.B.I.T G.T.B.I.T G.T.B.I.T

New Delhi, India New Delhi, India New Delhi, India

AbstractThe Smartphone and Tablets have arisen as unique computational resource for many purposes. This paper introduces a system by which a computer can be controlled wirelessly through an android device. The aim is to transform a Smartphone into a remote controller for the PC. Almost everything on the computer could be controlled through phone from keyboard to mouse to specific applications like PowerPoint, Media Players or even it can be used for the virtual gaming as well. To send wireless signals Wi-Fi or Bluetooth could be used which is already in the Smartphone. This paper also represents a prototype application with a protocol and some algorithms to show how the system can be implemented.

KeywordsAndroid, remote, pc controls, wireless mouse,wireless keyboard, accelerometer,virtual gaming.

  1. INTRODUCTION

    Android is an operating system for cell phone devices based on Linux. It was developed in 2005 by a newly established company, Android, Inc. The aim of this company was to enter in the mobile world. The Android operating system purchased by Google corporation and then the development work further done by Google [1]-[3]. The Android is licensed by business- friendly licenses (Apache/MIT) so that anyone can freely expand it and use it for a variety of purposes [4].

    The client application is based on the android OS. This application provides the interface for the user to interact with the system. It provides different screens for different tasks like one for touchpad and a different one for the media player and similarly different screen for other controls.

    The server of is the java based and cross platform application. It provides the interface by which the user can connect with client application. The server continuously listens to the connected port for the packets sent by the client application and parses them to recognize the events and performs the respective operation on the computer system. A server system responds to the requests from the clients over a network. The Server can run on dedicated computer, but there are many networked computers which are capable of hosting servers. In many cases, the computer provides many services and has several servers running. Server is operated in a client-server architecture. Servers are the programs of computer which are running to serve the requests of the other computer on the network. Thus, the server performs several tasks for the clients. The client connects to a server through the network and can on the same computer.

    The aim is to make more efficient use of the android Smartphone. As the android phones are very popular for their rich features, this application gives advancement to those features. The application has many advance features like the motion gaming feature to play game via remote. The application converts the android device into a wireless racing wheel which will make the user to drive the vehicle in racing games. Application uses the android Smartphone phone so no separate hardware or device is needed to control the computer system, the phone will be converted into a remote which make this application much more efficient for the user.

    This application is an advance featured remote to control the computer system wirelessly connected via Bluetooth or Wi-Fi. This application turns the android Smartphone into a wireless keyboard/mouse, a media player controller, a presentation controller, a virtual gaming, a safety device etc.

    Version and compatibility CLIENT

    The android SDK version 15 is used for the development of this application. The application is compatible with ICS and above.

    SERVER

    The application is developed on java SE 1.7 platform. As java is used to develop this application so it is platform independent

    A third party library is used to use the functioning of the Bluetooth of the computer system. The name of the library used is BlueCove 2.1.0. [5]-[6]

  2. SYSTEM ARCHITECTURE

    The application consists of mainly two parts one is the client (android device) and the other is server (computer system) which will be connected via Bluetooth or Wi-Fi.

    The clientserver architecture of computing is a network system that distributes tasks between the providers of resource or services, called servers, and requesters, called clients. The clients and servers communicate with a network on separate hardware, but both client and server can be on the same system. A server runs many server programs which share their resources with their clients. A client does not share any resources, but requests the server's content or service function. Clients therefore initiate the communication sessions with servers which always await the incoming requests. In this app however only one to one model is used meaning there can be only one remote (client) and one server (computer).

    1. CLIENT (ANDROID DEVICE)

      The user interacts with the client by gestures like tilt, finger touch or drag. The client recognizes all different types of gestures and sends them to the server.

      Figure 2.1 Client

      The figure 2.1 shows the client side contains five entities:

      1. Mouse: The touchpad in the mobile devices gives a perfect result to control the mouse pointer [7]. So the functioning of mouse is mapped on the touch screen of the android device. To control the pointer on the computer system the android gestures are used. When the figure moves on the touch screen the application records the sequence of the coordinates. Then the recorded coordinates inserted into the packet and send directly to the server. The interpolation is used on the server to obtain perfect path of the pointer from these coordinates. For the click of the mouse, keystrokes are recorded into the packet and send to the server then the server will decrypt the packet and obtain the keystroke to control the system [8].

      2. Keyboard: The keyboard of the computer system is mapped on the soft keypad of the android device. The android application records the keystrokes of the android soft keypad. As the user type any key on the android soft keypad the code of that key recorded and inserted into the packet which further sent to the server. The server will then decrypt arrived packet and follows the instructions given in the packet. Hence the respective key will be typed on the computer system [9].

      3. Media Players: The media player controls are mapped with use of the keyboard shortcuts on the media player controller buttons. The remote will show all the buttons used for the controlling the running media player. Whenever a button is pressed or released it will be recorded in the packet to be sent. The packet will then decrypt at server side and the server will perform respective function.

      4. Presentation: The presentation controller provides the interface to control the running presentation it has controls to go to next slide, previous slide etc. It also has some advanced controls like user can go to a specific slide no by entering the number of the slide [10].

      5. Game Controller: The game controller provides an interface to control games on computer. It checks the tilt of the android device and sends it to the pc in order to steer the car in game, also the volume buttons of phone are used for pause/resume the game.

        The tilting is an android feaure used in this application. Tilting is the movement of phone left or right, backwards or forwards and can be detected with change in the angle of the phone.

        An acceleration sensor used to measures the acceleration applied to an android device, also includes the force of gravity [11]. As in figure 2.2, the coordinates returned by the accelerometer are converted into polar coordinates, with the help of which the angle of the phone will be computed. A java function [Math.atan2 (double, double)] is used for the conversion of the coordinates. The coordinates are passed to this method and this will returns the angle theta for the phone. This angle is used in virtual gaming to control the running object [12].

        Figure 1.2 coordinates of android

      6. Encoder: The encoder encodes every packet into the protocol before sending them to server.

    2. SERVER ( COMPUTER SYSTEM)

      Figure 2.2 Server

      The server (figure 2.3) is a platform independent application which can run on any operating system. Some techniques are applied on server side to decrypt the signals and to execute the decrypted instructions. The server connects to the client via Bluetooth or Wi-Fi for the signal transmission.

      The server has mainly four functions:

      Figure 2.3 Function flow of server

      As in figure 2.4:

      1. Listener: It runs in a separate thread infinitely waiting for new packets to arrive on the server, as soon as the packet is received it passes the packet to decoder.

      2. Decode: The decode function is used to expand the upcoming packet from the client. This packet is then parsed to execute the instructions. Decoder passes the decoded information to the parser.

      3. Parser: It parses the decoded information, and passes it to the appropriate controller function.

      4. Computer controller: This is a set of functions that process the parameters after they have been received and parsed correctly. There is a different function for each different event e.g. a different function for mouse movement and a different one for keyboard controlling and similarly for gaming etc.

    3. CONNECTIVITY

    Figure 2.4 Server Client connectivity

    As shown in figure 2.5, the application can be connected via two methods:

    1. Bluetooth: Both server and client have the same UUID (Universal Unique Identity) in order to connect. The client searches all visible Bluetooth devices, to recognize the server out of those devices it uses the UUID and automatically sends a request to the server. After the connection is established RFFCOM protocol is used to transmit the signal [13].

    2. Wi-Fi: The connection via Wi-Fi needs a router to connect both these devices. The router provides an IP address to both the devices. The IP address will be shown on the application, this IP address needs to be entered in server side application to connect via Wi-Fi. The TCP protocol is used afterwards to send signals to server which uses these signals control the computer. The application via Wi-Fi can be controlled from a distance from where the Wi-Fi signals are reachable [14]-[15].

  3. Algorithm

    As the frequency of the touch screen is much lower than the touchpad of the computer the points recorded from touch screen are not consecutive because of this pointers movement will be abrupt. The Bezier curve is used to solve this problem. The coordinates between two points are generated using Bezier curve formula to make a perfect sequence of points to move the pointer smoothly. Hence the touchpad effect is simulated over the touch screen [16]-[19].

    The following algorithm is used in this system:- Interpolation using Bezier curve

    Step 1: Start

    Step 2: Declare variables previousX, previousY, newX, newY, currentX, currentY, finalX, finalY, count, loopcontrol, arrayX[], arrayY[], speedupX, speedupY, flagFC, flagD1, flagD2.

    Step 3: Initialize variables :count=0, loopcontrol=0, arrayX[]=3, arrayY[]=3, flagFC=true, flagD1=true, flagD2=true, speedupX=2, speedupY=2.

    Step 4: Read value of newX and newY. Step 5: If newX = 0 and newY = 0

    Set flagFC = false count = 0

    else

    If flagFC = true previousX = newX previousY = newY count = 0

    loopcontrol = 0 else

    loopcontrol++

    If newX previousX >= 4 speedupX = 4

    elseif newX – previousX >= 6 speedupX = 15

    elseif newX – previousX >= 10 speedupX = 30

    elseif newX – previousX = 1 speedupX = 1

    else

    speedupX = 2

    If newY previousY >= 4 speedupX = 4

    elseif newY – previousY >= 6

    speedupX = 15 elseif newY – previousY >= 10

    speedupX = 30

    elseif newY – previousY = 1 speedupY = 1

    else

    speedupY = 2

    If newX previousX = 0 and newY previousY = 0

    Set flagD2 = true

    Else

    Set flagD2 = false.

    information about event generated by the user at client side (Shown in Table 3.1).

    Table 4.1 Packets in the protocol

    PACKET TYPE

    PARAMETER

    1

    PARAMETER

    2

    K

    (K is sent for the keyboard key events)

    P or R

    (P will be sent when the key is pressed)

    (R will be sent when the key is released)

    Key code

    (It contains the code of key which is pressed or released)

    G

    (G is sent for the game motion events)

    Sensitivity

    (It contains the sensitivity of motion)

    Angle of tilt

    (It contains the angle at which the device is tilted)

    P

    (P is sent for the mouse move events)

    X Coordinate (contains the X coordinate of pointer)

    Y Coordinate (contains the Y coordinate of pointer)

    M

    (M is sent when the mouse key events)

    P or R

    (P will be sent when the key is pressed)

    (R will be sent when the key is released)

    Key code

    (contains the code of the key pressed or released)

    if newX previousX >= 2 and newY previousY >= 2

    Else

    Else Step 6: Stop

    Set flagD1 = true

    Set flagD1 = false

    arrayX[count] = current + (newX – previousX) * speedup

    arrayY[count] = currentY + (newY – previousY) * speedup

    previousX = newX previousY = newY

    if count = 2

    If flagD1 = true and flagD2 = true Repeat u 0 to 0.005

    finalX = (1 u)3 * currentX + 3 * (1 – u)2 * u * arrayX[0] + 3 * (1 – u)1 * u2 * arrayX[1] + u3 * arrayX[2];

    finalY = (1 u)3 * currentY + 3 * (1 – u)2 * u * arrayY[0] + 3 * (1 – u)1 * u2 * arrayY[1] + u3 * arrayY[2];

    move mouse at finalX and finalY. currentX = arrayX[count]

    currentY = arrayY[count]

    Set flagD1 = true count ++

    Figure 4.2 Protocol Elaborated

  4. PROTOCOL

    The packet sent for this application contains the CSV (Comma Separated Values) format in it. It contains three different values one is for packet type and other two are parameters as shown in figure 3.1. The Parameter1 and Parameter2 always depend on theParameter1.

    Figure 4.1 Packet

    There are four different types of Packets that can be transmitted from the client to server as shown in figure 7, the packet type specifies the server about what to expect in the rest of the packet. The two parameters contain the specific

  5. RESULT

    With the help of this application, we are now able to control our computer system from distance which depends on the range of our Bluetooth or Wi-Fi device. We got wireless keyboard and mouse to control our computer system. The mouse pad is simulated over the touch screen of the android phone and the keyboard keys are mapped on the android soft keypad which makes the keypad behave like the system keyboard to control all the functioning of the computer system. The media player controller can be used with the help of buttons given on the android toch screen to control the media running on the computer system. Many media player can be controlled with this application. The motion gaming controller works for all the motion games. The user can play car or bike racing games using the android device as the steering of the vehicle moving.

    1. Client

        1. Start screen: As shown in figure 5.1, the start screen provides three buttons, two for connections like Wi-Fi and

          Bluetooth and the third one is to change the name of the user. Bluetooth button is to redirect to the page of Bluetooth connectivity and the Wi-Fi button is to redirect to the page of Wi-Fi connectivity.

          Figure 5.1 Start Screen

        2. Home screen: The home screen is shown in figure 5.2; it provides the options for the controls on a drawer which can be slides from the left side. The user can choose this drawer to swap between controls.

          Figure 5.2 Home Screen

        3. Mouse screen: The figure 5.3 shows the touchpad on the touch screen which will work like a touchpad to control the pointer. The two buttons shown at the bottom are the right and left click buttons for the mouse. The android soft keyboard is linked with the keyboard symbol at the top right corner; the user can use the keyboard after pressing this logo which will pop up an android soft keyboard.

          Figure 5.3 Mouse Screen

        4. Keyboard screen: The keyboard is shown in figure 5.4. All the keys on this screen are mapped as the keyboard of the computer system. The user can use keyboard for typing on the computer system. The extra button for delete is provided so that the user can access the delete button easily.

          Figure 5.4 Keyboard Screen

        5. Media player controller: The media player controller has all the buttons to control a media player. The figure 5.5 shows the controls for the VLC media player. The same layout will be shown for every media player selected by the user. It contains all the necessary controls for a media player.

          Figure 5.5 Media Player Controller

        6. Presentation controller: As in figure 5.6, the two arrows will move the slide toward right or left. The start button will used to start the slide show in PowerPoint. The first slide button is used to restart the slide and it will show the first slide. The end button can be used to end the slide show.

      When the mouse pointer appears on the slide the hide mouse button will hide the mouse pointer. Sometimes the user needs to black the screen for discussion, the black screen button turn the screen in black color. By this user can control the presentation with his android device.

      request to the client having a predefined UUID (Universal Unique Identity).

      Figure 5.9 Bluetooth Connection

  6. CONCLUSIONS & FUTURE SCOPE

  1. Sever

    Figure 5.6 Presentation Controller

    This application makes the android Smartphone a wireless remote for our computer system. We can easily handle the computer controls with the use of this application. The virtual motion gaming removes the use of gaming remotes like joystick etc. The media players in the computer system will be controlled with the help of this application. The software is

    1. Home screen: The home screen (figure 5.7) will show the options for the connection type. The user can choose the type of the connection he is using. The Bluetooth button is for Bluetooth connectivity and the Wi-Fi button is for Wi-Fi connectivity.

      Figure 5.7 Home Screen

    2. Wi-Fi: The Wi-Fi button will redirect the user to the Wi-Fi screen (figure 5.8). The user needs to enter the IP address shown on the android device screen. The connect button will send a request to the specified IP address on a pre- defined port. Disconnect button will however disconnect the already made connection.

      Figure 5.8 Wi-Fi Connection

    3. Bluetooth: There is only one button on this screen (shown in figure 5.9); this button will send a connection

capable of removing most of the limitations of the previously developed software. This software is capable of controlling the computer much efficiently. The advance feature of controlling motions in the computer via an android device is introduced in this software. Most of the media players can be controlled with the use of this application. All the controls defined in this paper are successfully implemented on this software. Our main aim is to improve the quality of previously developed android remotes and introducing new feature of motion sensing control for the computer.

In future this technology could be used to control other things also rather than just computer, like it could be used to control household appliances. Using this technology a person could use his smartphone to control the fan of his room and likewise other things also.

ACKNOWLEDGMENT

It would not have been possible to write this paper without the guidance and support of guide (Miss Bisret Narula) for her commendable supervision, monitoring and unvarying support all the way through the course of this Research work. The blessing, help and directions given by her time to time task through a variety of stages.

REFERENCES

  1. Wei-Meng Lee, Beginning Android 4 Application Development, Indianapolis, Indiana, John Wiley & Sons, Inc. 2012.

  2. Jonathan Simon,Head First Android Development,

    United States of America, 2011. Donn Felker with Joshua Dobbs, AndroidTM Application

    Development For Dummies® Wiley Publishing, Inc. 111 River Street Hoboken, NJ 07030-5774

  3. Marko Gargenta, Learning Android,Gravenstein Highway North, Sebastopol, OReilly Media, Inc.

  4. Xu JunWu; Zhang Jin, "Research on Wireless Application Programming with Java Bluetooth," Internet Computing & Information Services (ICICIS), vol., no., pp.294,297, 17-18 Sept. 2011.

  5. Timothy J. Thompson, paul J. kline,Bluetooth application programming with java api,

  6. Kyeong-kyuny Cheong, Insoo Kim, Sung-kwon Park, and Yong-jin Park,User Performance Measures for Evaluating Interactive TV Pointing Devices, IEEE Transactions on Consumer Electronics,

    Vol.57, No. 3, August 2011

  7. Margrit Betke, Member, IEEE, James Gips, Member, IEEE, and Peter Fleming, The Camera Mouse: Visual Tracking of Body Features to Provide Computer Access for People With Severe Disabilities, IEEE TRANSACTIONS ON NEURAL SYSTEMS AND REHABILITATION ENGINEERING, VOL. 10, NO. 1, MARCH 2002.

  8. Dr. Khanna SamratVivekanand Omprakash,Concept of Remote controlling PC with Smartphone Inputs from remote place with internet,International Journal of Advanced Research in Computer Science and Software Engineering,Volume 2, Issue 1, January 2012.

  9. Torunski, E.; El-Saddik, A.; Petriu, E., "Gesture recognition on a mobile device for remote event generation," Multimedia and Expo (ICME), 2011 IEEE International Conference on , vol., no., pp.1,6, 11- 15 July 2011 doi: 10.1109/ICME.2011.6012188

  10. Wu Shyi-Shiou; Wu Hsin-Yi, "The Design of an Intelligent Pedometer Using Android," Innovations in Bio-inspired Computing and Applications (IBICA), 2011 Second International Conference on ,vol., no., pp.313,315, 16-18 Dec. 2011 doi: 10.1109/IBICA.2011.83

  11. Jon Lazar, Using Sensors with the Android, Arduino and LEGO Projects, print ISBN 978-1-4302-4929-0, NewYork, USA 2013

  12. Salminen, T.; Hosio, S.; Riekki, J., "Enhancing Bluetooth connectivity with RFID," Pervasive Computing and Communications, 2006. PerCom 2006. Fourth Annual IEEE International Conference on , vol., no., pp.6 pp.,41, 13-17 March 2006

  13. SENTHIL KUMAR, PADMAVATHY, ANDROID BASED SECURITY AND REMOTE SURVEILANCE SYSTEM, Graduate Research in Engineering and Technology (GRET): An International Journal, Department of Electrical and Electronics Engineering, G.K.M College of Engineering and Technolog, Anna University, Chennai,

    India

  14. Sagari, Shweta; Baid, Akash; Seskar, Ivan; Murase, Tutomu; Oguchi, Masato;Raychaudhuri, Dipankar, "Performance evaluation of mobile hotspots in densely deployed WLAN environments," Personal Indoor and Mobile Radio Communications (PIMRC), 2013 IEEE 24th International Symposium on , vol., no., pp.2935,2939, 8-11

    Sept. 2013

  15. Sohel, F.A.; Dooley, L.S.; Karmakar, G.C., "A Novel Half-Way Shifting Bezier Curve Model," TENCON 2005 2005 IEEE Region 10 , vol., no., pp.1,6, 21-24 Nov. 2005 doi: 10.1109/TENCON.2005.300930

  16. Hong Wu Bai; Zhenglin Ye; Mao Shi, "An improved approximate arc- length parameterization method for Bezier curves," Computer-Aided Industrial Design and Conceptual Design, 2006. CAIDCD '06. 7th International

  17. Kawabata, K.; Liang Ma; Jianru Xue; Nanning Zheng, "A path generation method for automated vehicles based on Bezier curve," Advanced Intelligent Mechatronics (AIM), 2013 IEEE/ASME International Conference on , vol., no., pp.991,996, 9-12 July 2013

  18. Yamaguchi, Curves and Surfaces in Computer Aided Geometric Design, ISBN 978-3-642-48952-5, 1st ed. 1988, XI, 378

Leave a Reply