Thursday, September 15, 2011

Mobremote: An insider's view

A usual morning at college with an ongoing data structures class suddenly hit us (Me and Nitesh) with a new software idea. Remote Control via text messages!

A lot has already been achieved in Remote Control, now that mobile devices are faster, slimmer and easy to use. But we had a different idea in our mind. To create something that eliminates the cost factor of a fancy cellphone. We started searching and we came across loads of different software, but we found some things common in almost all of them:

1. Either the user requires a second cellphone attached to his computer and controls the computer via another cellphone with him.

2. The cellphone as well as the computer have a fast internet connection and the client running on the computer talks with the cellphone via a protocol delivering the computer's current state on the cellphone's screen.

3. The cellphone updates a part of a common web server/user profiles (3rd party over which user has very little control) and the client would read the profile. This mostly is facilitated via a sms gateway (generally owned by a 3rd party website) which is most cases demands premium sms charges or subscription to their service.

In all the above mentioned, there are charges involved that the user needs to pay in order to control his computer remotely, either overhead of a second cellphone, bandwidth charges or lastly, premium sms or subscription charges.

The solution of these problems became the central idea behind our project and we named it MOBREMOTE. (short for Mobile Remote)

Mobremote provides the user with ability to send text messages containing the desired command to execute on his computer. There is absolutely NO need of an internet connection on the user's cellphone. The only requirement is that of an existing gmail account and the client computer only requires a minimal internet connection (even dialups would do!) which is generally cheaper than the cost of an additional cellphone and mostly better than subscription charges.

1. NO premium charges of sending the text message
2. NO internet connectivity required on the cellphone (saving extra bandwidth charges)
3. NO monthly subscription charges
4. Full Control over what can be remotely done with the cellphone (with different layers of security at each level)

So how do implement our idea? It's plain and simple. We came across a platform known as txtWeb which runs in India, United States Of America and Canada. The platform is run by Intuit, based in United States itself. Their primary aim is to bring the power of internet to user's cellphone for no extra charges except the cost of a standard text message. txtWeb has dedicated numbers assigned for each of these countries.

The path that we followed in implementing Mobremote was:

User's cellphone sends message at txtweb's number->> Process message and check for correctness->> Forward the message's content to user's specified gmail account->>Create a separate application to run on user's computer->>The application would periodically check for incoming commands in user's gmail account->> If the received message from user's gmail inbox passes all security checks, execute the specified command in the message.

This was the ultimate solution for us to go ahead and bring convert our idea into reality. So we started building a text-message handling application. We hosted the application on Google AppEngine for reliability, security as well as diagnostic reasons. Next we map a keyword on txtWeb's website that would point to our application hosted on AppEngine. By doing so, we ensure that when the user sends a message with our keyword and his details to txtWeb, txtWeb would in turn run our application with the message as a parameter and return the result back to the user (or forward the message to user's gmail account, sending back a success message to user's cellphone). We designed a format in which the user is required to specify his details in the text message.

Mobremote's current format is:
@mobremote -k (security key) -e ( -s command -c (command to execute)

Security key (5 digits entered in the Mobremote software installed on the user's computer) is implemented as a part of Mobremote’s security in order to protect the user’s computer from unwanted/fake commands from any other person other than the owner of the computer himself. The user is required to fill in the details specified in braces and send the text message to one of the txtWeb's numbers (9243342000 or 9900173324 for India, and 898932 for US and Canada).

The command is specified as digits ending with a $ sign. Mobremote currently supports 9 most basic commands the user may need when he/she is not physically near their computer.
The number to command mapping is as follows:

0:Stop listening to incoming commands from cellphone

1:Lock computer

2:Sleep Computer

3:Hibernate computer

4:Log off user

5:Restart computer

6:Shutdown computer

7:Force shutdown computer

8:End Unresponsive program

EXAMPLE: If your gmail id is with the configured security key as 12345 and you want to restart your computer, you will send to the appropriate txtWeb number: @mobremote -k 12345 -e -s command -c 5$

We offer several help options to our users via text messages like:

1. To get information on mobremote, send “@mobremote” (without quotes) to the above txtWeb number which applies to you according to your location.
2. To get the format of sending commands, send “@mobremote format”
3. To get a list of supported commands, send “@mobremote help”
4. To view an example, send “@mobremote example”

So, uptil now, our text message has travelled from user's cellphone to his/her gmail account. As stated above, we create another application that would run on the user's machine and regularly check for any incoming emails in the format of Mobremote. So we started writing code to create a good user interface along with added security to extend what the user can accomplish by using Mobremote. We wrote code in C++ utilizing Qt framework to provide a user friendly GUI. The user is required to fill in his details in the Mobremote software which includes his gmail account details, mobile number and security key and set the software in Running mode in order to listen to incoming commands from user's cellphone.

The Gmail ID and security key is required to be sent in the text message from user’s cellphone, so the user needs to remember these details entered on his/her computer. Mobremote executes commands only when it verifies user’s identity via his/her gmail account ID and security key.

The software installed on the end user's machine uses PHP with IMAP+SSL to securely fetch email messages containing commands sent from user's cellphone. To provide a scripting environment, we require installation of Apache.

We bought our own domain and created a website for our project.

After 6 months of coding, testing, debugging, finally we packed everything into a installer and it was ready to be distributed. We uploaded both 32 and 64 bit installer for Windows XP/Vista/7 along with Wampserver (contains Apache for Mobremote to make use of) in the download section of our website

Developing Mobremote was truly a learning and fun-filled experience. Of course, there were times when we were so frustrated that we wanted to smash our computer itself, but in the end it worked out well and we were good to go. Mobremote is written in around 5 computer languages all working together to provide remote control facility to the user. Ahead of time, we plan to add more features to Mobremote, including starting/stopping applications, automated downloads, facebook/twitter status updates and the list goes on!

Mobremote was developed with an open mind so it's free to use and re-distribute. However, we do not share our source code with anyone. Developers who are willing to contribute to our project can visit For Devs for more details.

Technorati Tags: mobremote, remote, sms, mobile, cellphone, software, free, txtweb, remote-control

No comments:

Post a Comment