A. B. M. Omar Faruk
Masters in Security & Mobile Computing
The Royal Institute of Technology (KTH), Sweden

About Me  |  Recent Courses  |  Recent Activities  |  Completed Projects  Special Interests  |  Favourite Links  |   Contact 


  Communicate with Mobile phones via AT commands from PC
 Introduction

It is always nice to send SMS from mobile phones. But it would be far better If we could use easily copy/paste contents in mobile like what can be easily done in PC. That's why I was planning to write a small application which can be able to send SMS directly from PC. To communicate with mobile from PC we need to send AT commands. If we want to send SMS then we have to use a specific set of AT commands in right order with correct parameters. To know more about SMS & AT commands you can check references at the end of this article. Later I've decided to make this application a generic one so that someone can send any AT command & use it as a replacement of hyperterminal. Improvements are done to communicate with both type connection - data cable & infrared. I faced some small problems to make this application work with infrared communication. Later I fixed this reading the last article in the reference section. 
 Features in Brief

  • Send SMS from PC via mobile phone which is connected using data cable or infrared
  • Send custom AT commands & response is displayed aside
  • In brief, this can be used instead of Hyperterminal program to send AT commands
 Source Code & Binaries

 Changing Communication Type - Data Cable / Infrared

Anyone can easily change the communication type from the user interface. If mobile phone is directly connected with serial port via data cable then choose that option. Otherwise choose infrared option if necessary. While testing with infrared I've found that If the driver for mobile device is not installed then It wont work unless we set RtsEnable property of serial port as true. So make sure to do this change in your application before demonstration using infrared.
 Sending SMS using AT Commands

  • Connect the mobile device with PC using data cable or infrared communication.
  • Before running the application you may have to install Microsoft .NET Framework 2.0 if its not already installed.
  • Now run the application & select serial port in which mobile is connected. Click on connect button & It will look like the following window. Screenshot
  • To start sending SMS, select AT+CMGF=1 command from listbox & then click Send AT Command Button.
  • Then select AT+CSCS="GSM" command from listbox & send that AT command
  • Now its time to enter the phone number of receiver of SMS. Type it in receiver textbox & send AT+CMGS command
  • Final step is to type text in SMS Textbox. Then select SMS Text command to send SMS. Hope it works. Lets check what is displayed after sending SMS successfully. Screenshot
  • We can send AT commands to know about mobile device model, manufacturer & other device specific information. Some examples are shown below. Screenshot
  • Don't forget to click on Disconnect button before closing the application.
 References


Last Updated : 14th February, 2007


Real Time Web Analytics