I thought of exploring this concept and try to develop my own applications that can receive the SMS and then perform some operations.
2. Your browser breaks apart that address
3. A program on the web server, called the web server process, takes the request for index.html and looks for this specific file.
4. The web server reads the index.html file from the web server’s hard drive.
5. The web server returns the contents of index.html to your browser.
6. Your web browser uses the HTML markup that was returned from the server to build the rendition of the webpage on your computer screen
Just to put everything in perspective, Facebook, Twitter, Gmail all have some Application server that is listening to your request and respond back with the information.
The platforms like http://www.google.com/mobile/sms/, http://www.txtweb.com, http://www.textmarks.com/ can convert the SMS to an HTTP request and can convert the HTTP response back to a SMS. This is important since you can now communicate with the application server by sending the SMS.
The concept is described in the following diagram
Step3,4. The SMS platform will convert this SMS to an HTTP request and send it to the application server via internet.
Step 5,6. The Application server will act on the request and then create a HTTP response and send it back to the SMS platform via internet
Step 7. The SMS platform will now convert the HTTP response back to an SMS and send it to the mobile phone via Mobile carrier.
The building blocks of my application are
1. SMS platform
2. Application server hosted on public domain
3. Application to find the bus routes
For SMS platform I used used txtweb (http://www.txtweb.com). It is very simple to use and configure.
The following diagram explains how it work
And I get a response as
Vijayanagar Bus Station=>Vijay Nagar Maruthi Mandir=>R P C Layout=>BHEL Factory=>Veerabhadra Nagar=>Dwaraka Nagar=>Hoskerehalli=>Kamakya (Depot 13)=>Banashankari BDA Complex=>Banashankari Bus Stand=>Jayanagar 5th Block East=>Ragigudda=>BTM Mico Layout=>BTM 16th Main=>Central Silk Board (ORR)=>HSR 14th Main=>Agara=>Jn of Sarjapura Road=>ECO Space (RMZ)=>New Horizion College (ORR)=>J.P.Morgan=>Marathahalli (Mulitplex ORR)=>Spice Garden=>AECS Layout=>Kundalahalli Colony=>I Gate (Perot Systems)=>Sathya Sai Hospital=>ITPL Main Gate
1. You will register a keyword (@bmtcvolvo) on txtweb
2. You then associate the keyword to a URL. So @bmtcvolvo is associated to a URL lets say http://www.testURL.com/bmtcresponse.php
When you do that the txtweb will create a mapping table that will say that if a sms contains @bmtcvolvo the http request is to be sent to http://www.testURL.com/bmtcresponse.php
3. When you send a SMS @bmtcvolvo 500k, the txtweb platform receives it and then finds the mapping for the keyword @bmtcvolvo. It then forms a request
4. Now my application knows that GET parameter txtweb-message is the bus number.
5. I have fetched the data from BMTC site to construct a database of the bus routes. This table is used to find the route information for 500K
6. The application will then send back the information in the form of http response which basically means to print a html page.
7. The txtweb platform will convert this information into an SMS and send it back to the phone.
Once I got it running, I fulfilled my goal of updating Facebook and twitter based on the exactly same approach. All my Facebook updates also contain a “via rPhone” tag just to keep people confuse that I have some new cool phone!!!.
Hopefully my commuting time will become more enjoyable than before.