Showing posts with label mobile. Show all posts
Showing posts with label mobile. Show all posts

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.

Advantages:
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 (gmailid@gmail.com) -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 dev@gmail.com 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 dev@gmail.com -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 www.mobremote.com 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 www.mobremote.com/download

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

Saturday, June 25, 2011

Internship @ A Service Provider

The summer of 2011 was getting stressful than the last semester. As usual, i had a BIG to-do list. One of the task was sorta necessary and i was looking forward to it i.e. a 21 day internship, to be done as a part of our Bachelor of Engineering's course in Computer Science.
This year, BSNL a.k.a. Bharat Sanchar Nigam Limited (India's Largest Internet Service Provider) was hosting training for 2/3 year engineering students of Electronics/Electrical/Computer Science students. The RTTC (Regional Telecom Training Center) which is only one for a particular state was nearby my home. I initially joined their 4 weeks programme.

The RTTC is quite big, consisting of 3 floors, equipped with large lecture halls, conference rooms, seminar halls, a library, communication labs along with a separate MSC (Mobile Switching Center) and offices of the instructors (or rather employees of BSNL)

The first day, our mentor (more of a batch in-charge) T. D. Mishra, introduced himself and other senior employees present there. He handed over our schedule to us along with the timings. The four weeks were divided into separate units that include sessions, labs as well as visits to telephone exchanges. The lectures started with the overview of telecom networks and job opportunities for engineering students in the field of telecommunication. In the first week, we covered The PCM Principle along with Digital Switching. These topics demonstrate how every bit of your voice that u speak in your telephone reaches from point A to point B within no time via a huge network starting from the local loop(the line from your home which connects to the service provider's nearest exchange) to the ISP's switching modules, trunk lines (hopping from one exchange to the other) via copper or optical fibers to the correct exchange which further routes the signal to the nearest exchange the called person is connected to and finally transmitting it via another local loop to the correct telephone which decodes the signal back to comprehensible voice that the other person is able to hear and respond to in a similar manner.


Fun Fact: A mobile number generally is over 100 digits long! This includes all codes and identification numbers that can be used to pin-point a particular SIM card uniquely in the entire world. But when limited to within a country and considering the large amount of Service providers present, subscribers need to only remember 10 digits.

The second week was fun, conceptually as well as physically. We had a fiber optic systems session, coupled with SDH and DWDM concepts. Then two labs relating to fiber optics, where we understood how practically SDH systems are laid out in a large service provider's network, how they actually work and in what manner are they easy to troubleshoot.

Fun fact: A single optical fiber can be used to such an extent that it can facilitate simultaneous 1,25,000 calls via wavelength windows and loads of multiplexing. This is the reason why tariffs exist that reduce calls costs to only a few cents per minute.

Following this, the most interesting lab was where we got to join two optical fibers by fusion spilicing. The week ended with our first exchange visit where we got to enter all the rooms that stated "No Entry" or "Not Allowed" :-) including the MDF (Main Distribution Frame) Room, Switching and Power/Backup rooms.


Side View of MDF room (Click to view Full size image)
       
The third week seemed small to me, but it had great sessions, especially the GSM and CDMA parts as well as the visit to the Mobile Switching Center. I could not manage to get pictures of the inside of the MSC, but it was fascinating how it served millions of subscribers simultaneously.

Fun Fact: GSM is the most widely used mobile communication standard, because of which it is termed as "Global Systems for Mobile Communications"


(Click to view full size image)
Fig: A section of the MDF installed in an exchange. The mesh of wires terminating into vertical white boxes(called as modules) interconnect the subscriber's landline to the exchange's switching system
The final week was the best of them all as it included the concept of Intelligent Networks (seriously, that was a wow!), how SSP's, SCP's and SMP's work together in a secure manner to provide amazing services throughout the country. The last visit was to the biggest exchange in the city. Except for WiMAX, every other technology was implemented, including the 16Mbps-100Mbps fiber lines that provided high end connectivity to subscribers (IIRC it was implemented by using a HUAWEI box). Further, the exchange had separate 2G (more in number) and 3G racks (comparatively less in number) which were mostly implemented by Ericsson. The CDMA division was implemented by ZTE's BTS's (Base Trans-Receive Station, what is referred to as a "mobile tower" by the general public) and a software named Netnumen provided all possible controls for both physical and radio configurations. Amongst all these, the MSC's HLR's and VLR's were held in their own server racks (MSC is a collective term consisting of all mobile related registers). HLR or the "Home Location Register" (is populated with cell phone numbers local to a resident area) and VLR or the "Visitor Location Register" (temporary register, which is populated by roaming cellphone numbers) is an integral part of every MSC. By registers i mean to imply databases with focus on regular backups.

Fun Fact: BSNL's NIB (National Internet Backbone) consists of five Cisco 12416 routers interconnected in a mesh, each costing nearly 1 million dollars (~5 Crores INR)


The meaning of internship is not limited to going to a company and performing a task for a specified period of time, rather it involves regular learning, hands on experience along with the huge amount of life lessons that u get in a very short period of time. Special thanks to Mr. T.D. Mishra for sticking by me and answering even the most stupid question i had. After the completion of my training, everytime i move around and see cellphone towers(technically called as BTS's) it reminds me of my days at BSNL.

Technorati Tags: BSNL, internship, mobile, rttc, training, GSM, CDMA, NIB, server, telecommunication