Archive for July, 2009

Before I start explaining, you must be sure that your handset supports SMS read functionality using an AT command.

How can I test whether my handset supports or not?

Answer is pretty simple, try executing AT+CMGR=? AT Command. If it returns ”\r\nOK\r\n” then congratulation your handset modem supports Read SMS functionality.

Reading an SMS from memory location is always a big headache J. I waste lot of time just to read an SMS using AT command.

If you know SMS memory location then task will be simpler.

  1. First of all set memory type.  Use  AT+CPMS=”ME” command  to set memory from which you are going to read SMS.
  2. After that execute  AT+CMGR=”messageID”  to read message.

Tip : Whenever you execute AT command never forget quotation mark (“), Carriage Return etc.

You will get message text directly if you are working under TEXT mode. In case of PDU mode you need to convert PDU into Original Message Text by writing some algorithms.

If you want indication for incoming SMS in your application then you need to enable this functionality.

Try “AT+CNMI=?” Command to test whether new message indication functionality is available in your handset or not.

If result does not contain any error and will return some parameters then congratulation again J

Now, use “AT+CNMI=2,1,0,1” AT command to enable new message indication to TE (terminal equipment).

Last but not the least, don’t forget to use “AT+CSMS=0” AT command set  ISO 8859-1 character set.


Read Full Post »

If you are writing an application which sends SMS using AT commands then, you must read this post. Few days ago I started to develop an application which is completely AT command based. Here I am going to explain the things that I learnt from experience.

First and the foremost thing before you start developing an application based on AT command , know which mode (text/pdu) your mobile handset supports.

If handset supports TEXT mode then work is simple.

  1. First you need to set text mode by using AT+CMFG=1 Command.
  2. And then use AT+CMGS=”+CellPhoneNumber” <enter>.
  3. If command execute successfully then It will return “>” as a response.  
  4. After getting success response simply write your message ex. “this is test SMS”. This will submit SMS to network and will return the Message ID.
  5. If you want to send long message i.e. greater than 160 character length message then, this is really very useful.

 I will cover how to send long message in my succeeding posts.

 If handset supports PDU mode then work will be little lengthy and need some more efforts. 

  1. For PDU mode, you need to set pdu mode by using AT+CMFG=0 Command.
  2. And then write AT+CMGS=<length><CR> command for modem to response. Here you can’t send the length of actual message. You need to convert the text into 7-bit or 8-bit encoding scheme. I included some useful links and sample application at the bottom of the page to accomplish this task.
  3. If command execute successfully then It will return “>” as a response.  
  4. After getting success response, send <PDU><ctr-z/esc > sequence. This will submit SMS to network and will return the Message ID.
  5. If you want to send long message i.e. greater than 160 character length message then, this is really very useful.

 Reference :

  1. PDU message format : http://www.dreamfabric.com/sms/
  2. Complete information about all AT Commands : http://www.developershome.com/sms/operatingMode.asp
  3. Text to PDU converter : http://nerdlabs.org/tools/pdu.php

 Sample Application :

  1. PDU Decoder : http://www.codeproject.com/KB/IP/PDUDecoder.aspx
  2. Sample Applications : http://www.scampers.org/steve/sms/samples.htm

Do share new things with me.

Read Full Post »

If you want better rank in Google Search Engine then, why not to follow guidelines given by Google itself. Read the article below to know what Google officials have to say for Search engine optimization.

I have taken much of the information from the Google SEO guideline document.

1. Title Tag


  • Title should be unique and accurately described the page content.
  • Write unique page title for each page of your website. So that Google know how each page is different from other.
  • Title can be short or long. If your title is large then Google will show only portion of it.


  • Writing Title which has no relation to the page content.
  • Using Blank or unnamed title like “New Page 1” or “Untitled”
  • Using Single title for all the pages or group of pages.
  • Using unneeded keywords in title.

2. Description Meta Tag


  • Write description that would be both informative and interesting.
  • Unique description for each page.


  • Writing Title which has no relation to the page content.
  • Writing Generic description like “page about…” or “this is the page that…” or something like that.
  • Filling it with only keywords.
  • Writing single description for each page.

3. Improve URLs Structure


  • Use words in the URL link that are relevant to your website content.
  • Proper directory structure should be there.
  • Unique URL to reach any document.


  • Using page name like “WebPage1.html”
  • Using long URLs or session ids or querystring variables.
  • Using directory names like “Dir1” or “Folder1” etc.
  • Using directory name that does not relate to page content.
  • Mixing www. And without www. URLS
  1. 4. Website Navigation Should be Simple


  • Good linking structure from top to bottom with proper manner.
  • Use text links to navigate from one page to other. So that crawler can easily understand your website.
  • Use “breadcrumb” navigation (ex. Yoursitename >> items >> productname). Using breadcrumb navigation not only gives idea about where you are in the website, but also allow user to go to previous section very easily.
  • Use HTML site map page with XML site map file. This is huge benefit for SEO purpose.
  • Have meaningful and useful 404 page. Visit Google’s widget for 404 Page.


  • Creating complex navigation links web.
  • Using image, javascript, dropdowns or flash object for website navigation.
  • Linking broken or dead links in Site map.
  • Using unorganized sitemap page.
  • Using vague message like “page not found”.

5. Quality of Content


  • Write easy and meaningful content.
  • Organize the different topics in the content.
  • Include keywords that user always search. See the search volume of keywords that you have included in your content.
  • Write Fresh and Unique content.
  • Offer exclusive content or services.
  • Create content for users not for search engine. J John chow is also telling the same thing please read more about John chow


  • Spelling and Grammatical mistakes.
  • Coping existing content.
  • Avoid unnecessary keywords.

6. Anchor tag text



  • Writing the generic content like “Click Here”.
  • Unrelated anchor text.
  • Lengthy anchor text like sentences or paragraph.
  • Using CSS that makes text and link identical in look.
  • Using excessive keywords.

7. Heading Tag


  • Distinguish the main points and sub points and use heading tag appropriately.
  • Not use too many heading tags on the page. This will confuse user about the end of the content.
  • Create proper page structure using heading tag.


  • Writing unrelated content in heading tag.
  • Avoid using heading tag where <em> or <strong> tag is appropriate.
  • Putting whole page content into heading tag.
  • Using tag if you only want to give style.

8. Image Tag


  • Give reasonably good file and brief description about what the images is all about.
  • Write very good description when you use image as a link. (Must).
  • Store all the website images under one common directory.
  • Use JPEG,GIF, PNG and BMP images because this are the common file types that all browser can easily understand.


  • Giving random file name like image1.jpeg or pic1.gif etc.
  • Extremely lengthy file name
  • Writing keywords and long sentences in alt tag.

9. Use robots.txt Effectively

Basic Idea : robots.txt is the file which tells google.com about the pages that user do not wish to crawl. This file stay under the root directory. Google web master tool help you to create this file.


  • Use secure method for some sensible content.
  • .htaccess, encryption, password protection are the better alternatives.


  • Allowing search result kind of pages to be crawled.

10. rel=”nofollow” attribute of Link (anchor tag)


  • Use nofollow set to the link for which you don’t want to pass your reputation to other.

Ex. If you want to inform others about the spam link then you can use nofollow for such link to avoid passing your reputation on to it.

Use nofollow set to the link for which you don’t want to pass your reputation to

  • Write <meta name=”robots” content=”nofollow”> if you’re interested in nofollowing all of the links on a page.

This are the guidelines and best practices given by the Google Web Master team. Hope you enjoy reading this article.

Read Full Post »