HARGA CD REFERENSI SMS GATEWAY
NO JUDUL PROGRAM SKRIPSI HARGA
1 SMS Layanan dengan Berbagai Format SMS (dasar SMS Gateway dg Java) + CD Referensi Lengkap [ Lihat ] Rp. 400.000,-
2 SMS Layanan Jadwal Kuliah Mahasiswa (Semua Java) + CD Referensi Lengkap [ Lihat ] Rp. 600.000,-
3 SMS Layanan Informasi Data Nilai Mahasiswa (Java n Delphi) + CD Referensi Lengkap[ Lihat ]
(Khusus untuk paket 3 ini, Ada makalah Bab 1- Bab 5....Super Lengkap )
Rp. 800.000,-
4 SMS Informasi Layanan Masyarakat (Java n PHP) + CD Referensi Lengkap [ Lihat ] Rp. 600.000,-
5 SMS Layanan Informasi Akademik (Semua Java) + CD Referensi Lengkap[ Lihat ] Rp. 1.500.000,- (Tanpa bimbingan Online)
 
Home | Profil Kami | Pemesanan | Pembayaran | Lainnya
Tampilkan postingan dengan label tutorial. Tampilkan semua postingan
Tampilkan postingan dengan label tutorial. Tampilkan semua postingan

Minggu, 01 Maret 2009

SMS Gateway Menggunakan Gnokii

Proyek Gnokii ditujukan untuk pengembangan tools dan driver untuk MobileDevice Nokia yang menggunakan system Linux, FreeBSD dan *Nix Lainnya. Dengan gnokii kita bisa mengirim/menerima SMS, membuat panggilan, atau sekedar mengakses phonebook, dengan kata lain kita bisa menggunakan fasilitas-fasilitas yang dimiliki telepon seluler merek Nokia atau selular yang support AT langsung dari komputer, tapi tidak semua produk Nokia yang di support oleh gnokii.


Disini penulis menggunakan Seluler Nokia seri 8250 dengan kabel port serial, dengan Gnokii versi terakhir 0.4.2b (sampai saat artikel ini ditulis).

Langkah membangun SMS GateWay

1. Pertama kali kita perlu mendownload gnokii ( http://www.gnokii.org ) dari situsnya. Namun bila Anda ingin menggunakan Nokia seri 6210 atau 7110, Anda perlu mengambil gnokii versi CVS (belum sepenuhnya jadi). Untuk Anda yang ingin menggunakan Nokia seri 6110 atau dibawahnya bisa langsung mengambil dari situs FTP dan tersedia dalam bentuk binari. 2. Contoh jika anda mendownload versi .rpm file, anda dapat menginstall menggunakan root seperti ini:

  1. rpm –I gnokii-04.2b-i386.rpm

Khusus yang dibahas disini adalah gnokii versi CVS. Pertama kali kita perlu ketikkan perintah berikut :

  1. export CVSROOT=:pserver: anoncvs@subversions.gnu.org :/cvsroot/gnokii

lalu lanjutkan dengan:

  1. cvs login

bila ditanya password, isi dengan blank atau tekan enter lalu lanjutkan lagi dengan mengetik:

  1. cvs co gnokii

Tunggu sebentar, sesaat kemudian akan tersedia direktori gnokii. Masuk kedalam direktori tersebut:

  1. cd gnokii

Lalu ketikkan perintah berikut untuk mulai melakukan kompilasi:

  1. autoconf
  2. autoheader
  3. ./configure

anda dapat dapat mengkonfigure dengan beberapa option sesuai dengan selera anda, dapat dilihat dengan perintah ./configure –help

  1. make

setelah itu tambahkan sebuah group bernama “gnokii” . dapat dibuat dengan perintah user root

  1. groupadd gnokii

lalu install file binari kedalam system dengan perintah diberikut:

  1. make install
  1. make install-suid
  2. make install-strip
  3. make install-ss

Apabila anda ingin menginstall Dokumentasinya juga, anda dapat menguunakan perintah :

  1. make install-docs

Setelah itu hapus semua proses compile yang sudah dilakukan, dengan

  1. make clean
  2. make distclean

Bila tidak ada kesalahan maka proses kompilasi selesai dengan baik. Salin file Docs/sample/gnokiirc. (ada tanda titik di depan): Setelah itu kita edit file tersebut. Didalam file ini ada setting berikut: // Untuk yang menggunakan InfraRed [global] port = /dev/irccomm0 model = 6210 initlenght = default connection = irda bindir = /usr/local/sbin/ // Untuk yang menggunakan Kabel (port) [global] port = model = 6210 initlenght = default connection = bindir = /usr/local/sbin/ Silahkan ganti konfigurasi diatas dengan angka sesuai dengan model telepon Anda (pada baris ketiga) setelah selesai lalu simpan. Kita siapkan telepon selular kita, apabila anda menggunakan setting dgn Infra Merah maka anda dapat nyalakan fasilitas inframerah pada menu lalu tekan angka 9. Setelah aktif, arahkan pada mata inframerah komputer, dan ketikkan: $ gnokii – identify bila semuanya lancar, maka akan muncul IMEI: 449333200459543 Manufacturer : (unknow) Model: NPE-3 Revision: 03.01 Tentunya output diatas akan berbeda dengan milik Anda. Selanjutnya silahkan lanjutkan explorasi terhadap telepon seluler Anda.

SMSD (SMS Daemon):

SMSD (SMS daemon) adalah modul program untuk menerima dan mengirim SMS yang bekerja dengan menggunakan SQL server untuk penampungan semua inbox dan outbox yang ada di seluler anda. Sampai dengan versi ini baru mensupport dengan 2 modul database yaitu MySQL & PostgreSQL. Anda dapat melihat di directory gnokii/smsd terdapat file ‘sms.tables.mysql’ yang adalah structure table yang digunakan, anda tinggal memasukkannya di MySQL database anda. Setting sms daemon: 1. Create database sms

  1. mysqladmin –u root –p create sms

2. Create table-table gnokii dari file ‘sms.tables.mysql’

  1. mysql –u root –p gnokii <>

SMSD tidak ikut terkompile pada saat anda meng-kompile gnokii menggunakan perintah ‘make’, jadi anda harus mengkompile secara tersendiri di directory SMSD. 3. Cara mengkompilenya (Dalam directory Gnokii) :

  1. autoconf
  2. ./configure
  3. cd smsd
  4. vi Makefile (rubah database yang ada di area “DB module”)
  5. make
  6. make libmysql.so
  7. make install

4. Setelah semua berhasil anda dapat mencoba menjalankannya, ada beberapa option yang harus anda perhatikan : -u, --Name User Database -p, --password User Database -d, --Nama Database yang digunakan -c, --Nama Host dari Database Server -r, --reports

   5.   Secara default smsd tidak mengirim/menerima delivery report, anda harus menambahkan option ini saat menjalankan smsd

-m, --Database yang digunakan

      6. Menentukan Database yang digunakan, ‘pg’ untuk PostgreSQL dan ‘mysql’ untuk MySQL.

-l, --libdir path_to_db_module

      Spesifikasikan directory dari DB Module yang digunakan defaultnya di ‘libdir’.

-h, --help

       Menampilkan help.

Contoh :

  1. smsd –u sms –p –d sms –c localhost

Kalau tidak ada error berarti anda sudah berhasil dan bisa mencoba explorasi sendiri dengan menggunakan database yang ada. Anda bisa membuat applikasi sesuai dengan kebutuhan anda dengan menggunakan database MySQL.

Artikel Asal : http://id.wikipedia.org/wiki/SMS_Gateway

Bunafit Komputer (www.bunafit-komputer.com) adalah komunitas Penulis dan Programer yang bermarkas di Yogyakarta. Bunafit Komputer menulis buku Pemrograman dan Internet. Tim programer kami juga menerima jasa pembuatan Program Skripsi Teknik Informatika, Program Tugas Akhir Teknik Informatika dan Program Tesis Ilmu Komputer. Bagi yang membutuhkan contoh program untuk Tugas Akhir, Skripsi atau Tesis, kami sediakan Source Code Program Aplikasi lengkap di www.planetKode.com.

Kebutuhan Perangkat SMS Gateway

Kebutuhan Hard ware

Untuk kebutuhan SMS Gateway tidak terlalu belebihan dan juga fleksibel karena bisa dibuat dengan 1. PC maupun Notebook. Yang mutlak dibutuhkan adalah sebuah komputer, 2. sebuah ponsel dengan 3. kabel data (Kabel berantarmuka serial yang dapat menghubungi ponsel dengan PC) atau dapat munggunakan InfraRed dan piranti lunak sebagai SMS Gateway. Untuk menggunakan InfraRed anda membutuhkan sebuah ponsel yang juga memiliki fasilitas tsb, tapi tidak dianjurkan untuk kebutuhan SMS gateway karena komunikasi dengan InfraRed tidak terlalu baik (jika tergeser gampang putus).

Kebutuhan Software

Disini penulis 1.Menggunakan Linux sebagai Operating System, dimana linux merupakan system operasi terbuka yang popularitasnya semakin semakin menanjak untuk berbagai keperluan komputerisasi baik itu pengolahan database, internetworking atau keperluan lainnya system Linux diakui sangat handal, adapun Distro nya adalah Redhat Ver. 7.2. 2.MySQL Ver. 3.23.52 Max sebagai Database Server dan 3.GNOKII sebagai SMS Gateway.

Artikel Asal : http://id.wikipedia.org/wiki/SMS_Gateway

Bunafit Komputer (www.bunafit-komputer.com) adalah komunitas Penulis dan Programer yang bermarkas di Yogyakarta. Bunafit Komputer menulis buku Pemrograman dan Internet. Tim programer kami juga menerima jasa pembuatan Program Skripsi Teknik Informatika, Program Tugas Akhir Teknik Informatika dan Program Tesis Ilmu Komputer. Bagi yang membutuhkan contoh program untuk Tugas Akhir, Skripsi atau Tesis, kami sediakan Source Code Program Aplikasi lengkap di www.planetKode.com.

Keuntungan SMS Gateway

SMS Gateway merupakan pintu gerbang bagi penyebaran Informasi dengan menggunakan SMS. Anda dapat menyebarkan pesan ke ratusan nomor secara otomatis dan cepat yang langsung terhubung dengan database nomor-nomor ponsel saja tanpa harus mengetik ratusan nomor dan pesan di ponsel anda karena semua nomor akan diambil secara otomatis dari database tersebut. Selain itu , dengan adanya SMS Gateway anda dapat mengustomisasi pesan-pesan yang ingin dikirim. Dengan menggunakan program tambahan yang dapat dibuat sendiri, pengirim pesan dapat lebih fleksibel dalam mengirim berita karena biasanya pesan yang ingin dikirim berbeda-beda untuk masing-masing penerimanya.


Artikel Asal : http://id.wikipedia.org/wiki/SMS_Gateway

Bunafit Komputer (www.bunafit-komputer.com) adalah komunitas Penulis dan Programer yang bermarkas di Yogyakarta. Bunafit Komputer menulis buku Pemrograman dan Internet. Tim programer kami juga menerima jasa pembuatan Program Skripsi Teknik Informatika, Program Tugas Akhir Teknik Informatika dan Program Tesis Ilmu Komputer. Bagi yang membutuhkan contoh program untuk Tugas Akhir, Skripsi atau Tesis, kami sediakan Source Code Program Aplikasi lengkap di www.planetKode.com.

Memahami SMS Gateway

SMS Gateway adalah suatu platform yang menyediakan mekanisme untuk EUA menghantar dan menerima SMS dari peralatan mobile (HP, PDA phone, dll) melalui SMS Gateway’s shortcode (sbg contoh 9221). Di bawah ini disertakan sedikit ilustrasi mengenai penjelasan di atas.

SMS Gateway membolehkan UEA untuk berkomunikasi dengan Telco SMSC (telkomsel, indosat, dll) atau SMS platform untuk menghantar dan menerima pesan SMS dengan sangat mudah, Karena SMS Gateway akan melakukan semua proses dan koneksi dengan Telco. SMS Gateway juga menyediakan UEA dengan interface yang mudah dan standar.

UEA dapat berupa berbagai aplikasi yang memerlukan penggunaan SMS. Seperti berbagai aplikasi web yang telah banyak menggunakan SMS (free sms, pendaftaran, konfirmasi melalui SMS, aplikasi perkantoran, dsb), CMS, acara pengundian di televisi, dll.

UEA melakukan komunikasi dengan SMS Gateway melalui Internet menggunakan standard HTTP GET atau HTTPS (untuk komunikasi yang aman).

Telco SMSC akan menghantar pesan (SMS) tersebut kepada perusahaan SMS Gateway (sesuai dengan nomor yang telah disewa) dengan menggunakan protokol yang khusus. Dan berdasarkan keyword yang telah dituliskan pada SMS, maka sistem SMS Gateway akan menghantar SMS tersebut ke URL yang telah ditentukan. UEA dapat menghantar SMS reply kepada pelanggan melalui SMS Gateway tersebut. Dan UEA dapat menentukan besarnya biaya (charging) yang akan dikenakan kepada pelanggan. Biasanya telah ditentukan regulasi biayanya (microcharging mechanism), contoh Rp 0 (gratis); Rp 500,- ; Rp 1000,- ; Rp2000,- dst.

Suatu perusahaan SMS Gateway biasanya support untuk pesan yang berupa teks, unicode character, dan juga smart messaging (ringtone, picture message, logo operator,dll).

Artikel Asal : http://id.wikipedia.org/wiki/SMS_Gateway

Bunafit Komputer (www.bunafit-komputer.com) adalah komunitas Penulis dan Programer yang bermarkas di Yogyakarta. Bunafit Komputer menulis buku Pemrograman dan Internet. Tim programer kami juga menerima jasa pembuatan Program Skripsi Teknik Informatika, Program Tugas Akhir Teknik Informatika dan Program Tesis Ilmu Komputer. Bagi yang membutuhkan contoh program untuk Tugas Akhir, Skripsi atau Tesis, kami sediakan Source Code Program Aplikasi lengkap di www.planetKode.com.

Rabu, 04 Februari 2009

Operating Mode: SMS Text Mode and SMS PDU Mode

The SMS specification has defined two modes in which a GSM/GPRS modem or mobile phone can operate. They are called SMS text mode and SMS PDU mode. (PDU stands for Protocol Data Unit.) The mode that a GSM/GPRS modem or mobile phone is operating in determines the syntax of some SMS AT commands and the format of the responses returned after execution. Below are the SMS AT commands affected:

  • +CMGS (Send Message)

  • +CMSS (Send Message from Storage)

  • +CMGR (Read Message)

  • +CMGL (List Messages)

  • +CMGW (Write Message to Memory)

  • +CNMA (New Message Acknowledgement to ME/TA)

  • +CMGC (Send Command)

The syntax of the unsolicited result codes below also depends on the mode in which the GSM/GPRS modem or mobile phone is operating:

  • +CMT (Used to forward received SMS messages to the computer / PC.)

  • +CBM (Used to forward received cell broadcast messages to the computer / PC.)

  • +CDS (Used to forward received status reports to the computer / PC.)

These two AT commands are useful to you only if SMS text mode is used:

  • +CSMP (Set Text Mode Parameters)

  • +CSDH (Show Text Mode Parameters)


Comparison of SMS Text Mode and SMS PDU Mode

Below we compare SMS text mode and SMS PDU mode from various aspects. The comparison should help you learn the differences between these two modes and decide which mode should be used by your SMS messaging application.


Syntax of SMS AT Commands and Responses

When the GSM/GPRS modem or mobile phone is operating in different modes, the syntax of certain SMS AT commands and the responses returned after command execution is different. Here's an example for illustration. Let's say you would like to send the SMS message "It is easy to send text messages." to the mobile phone number +85291234567. In SMS text mode, this is the command line that you should enter:


AT+CMGS="+85291234567"It is easy to send text messages.


However, if the GSM/GPRS modem or mobile phone is operating in SMS PDU mode, executing the above command line will cause an error to occur. This is because the syntax of the +CMGS AT command is different in SMS PDU mode. To do the same task, the following command line should be used instead:


AT+CMGS=4207915892000000F001000B915892214365F7000021493A283D0795C3F33C88FE06CDCB6E32885EC6D341EDF27C1E3E97E72E


Defined Values for Certain Parameters

When the GSM/GPRS modem or mobile phone is operating in different modes, the defined values for certain parameters are different. Usually string values are defined for text mode while numeric values are defined for PDU mode. For example, the +CMGL AT command is used to list SMS messages stored in message storage. It takes one parameter that specifies the status of the SMS messages to be retrieved. The following table lists the defined values for the parameter in text mode and PDU mode:


Message status

Defined values in text mode

Defined values in PDU mode

Received unread

"REC UNREAD"

0

Received read

"REC READ"

1

Stored unsent

"STO UNSENT"

2

Stored sent

"STO SENT"

3

All messages

"ALL"

4


Suppose you would like to list all SMS messages from message storage. If the GSM/GPRS modem or mobile phone is operating in SMS text mode, you should assign the string value "ALL" to the +CMGL AT command, like this:


AT+CMGL="ALL"


In SMS PDU mode, the numeric value 4 should be assigned to the +CMGL AT command instead:


AT+CMGL=4


Input/Output Format of SMS Messages Used by SMS AT Commands

When the GSM/GPRS modem or mobile phone is operating in different modes, the input/output format of SMS messages used by SMS AT commands is different. In SMS text mode, headers and body of SMS messages are inputted/outputted as separate parameters/fields. In SMS PDU mode, TPDUs (Transport Protocol Data Units) in hexadecimal format are inputted and outputted. Headers and body of SMS messages are encoded in the TPDUs.

Here is an example for illustration. To send the SMS message "It is easy to send text messages." to the mobile phone number +85291234567, the following command line should be used in SMS text mode. As you can see below, the destination phone number header and message body are provided to the +CMGS AT command as separate parameters.


AT+CMGS="+85291234567"It is easy to send text messages.


To send the same SMS text message in SMS PDU mode, the following command line should be used instead. The message body, destination phone number header and some other headers are encoded in the hexadecimal sequence.


AT+CMGS=4207915892000000F001000B915892214365F7000021493A283D0795C3F33C88FE06CDCB6E32885EC6D341EDF27C1E3E97E72E


Ease of Use

As you can see in the previous example, it is easier to use AT commands in SMS text mode. You do not have to learn about the structure of different types of TPDUs in the bit level and the encoding and decoding of the hexadecimal sequence.


Supported Features of SMS Messaging

Although it is easier to use AT commands in SMS text mode, it supports fewer features of SMS messaging than SMS PDU mode. This is because you do not have complete control over the header values and message body in SMS text mode. Some tasks, although can be done in text mode, require the programmer to have knowledge about PDU mode and TPDU. For example, to request a status report from SMSC in SMS text mode, you have to set bit 5 of the first octet of the SMS-SUBMIT TPDU to 1 by the AT command +CSMP (command name in text: Set Text Mode Parameters). Similar tasks include setting the message validity period and sending a flash SMS message that immediately pops up on the phone screen when it arrives at the destination.


Level of Support

SMS PDU mode is more commonly supported by GSM/GPRS modems and mobile phones than SMS text mode.


Selecting the Operating Mode (AT+CMGF)

The AT command +CMGF (command name in text: Message Format) is used to select the operating mode of the GSM/GPRS modem or mobile phone. It takes one parameter. The value of the parameter can either be 0 or 1. The values 0 and 1 refer to SMS PDU mode and SMS text mode respectively. SMS PDU mode is the default mode if it is implemented on the mobile device.

To find out the operating mode(s) supported by a GSM/GPRS modem or mobile phone, perform a test operation with the +CMGF AT command. Below shows the response returned from my Nokia 6021 mobile phone after the execution of the command line "AT+CMGF=?":


AT+CMGF=?
+CMGF: (0,1)

OK


The information response "+CMGF: (0,1)" indicates Nokia 6021 supports both PDU mode and text mode.

To change the operating mode of a GSM/GPRS modem or mobile phone, perform a set operation with the +CMGF AT command. The following example demonstrates how to set the operating mode to SMS text mode:


AT+CMGF=1
OK


If the operating mode specified is not supported by the GSM/GPRS modem or mobile phone, the final result code "ERROR" will be returned.

To find out the operating mode currently used by a GSM/GPRS modem or mobile phone, perform a read operation with the +CMGF AT command. Here is an example:


AT+CMGF?
+CMGF: 0

OK


The response above indicates the GSM/GPRS modem or mobile phone is using SMS PDU mode.

Source Article : http://www.developershome.com/sms/

Bunafit Komputer (www.bunafit-komputer.com) adalah komunitas Penulis dan Programer yang bermarkas di Yogyakarta. Bunafit Komputer menulis buku Pemrograman dan Internet. Tim programer kami juga menerima jasa pembuatan Program Skripsi Teknik Informatika, Program Tugas Akhir Teknik Informatika dan Program Tesis Ilmu Komputer. Bagi yang membutuhkan contoh program untuk Tugas Akhir, Skripsi atau Tesis, kami sediakan Source Code Program Aplikasi lengkap di www.planetKode.com.

Checking if the GSM/GPRS Modem or Mobile Phone Supports the Use of AT Commands to Send, Receive and Read SMS Messages

After testing the communication between the PC and GSM/GPRS modem/mobile phone, the next thing that you may want to do is to check if the GSM/GPRS modem or mobile phone supports the use of AT commands to send, receive and read SMS messages. Most GSM/GPRS modems support all three functions. However, only some mobile phones support all of them.


Sending SMS Messages

To find out whether a GSM/GPRS modem or mobile phone supports the sending of SMS messages through AT commands, you have to:

  1. Use the AT command +CSMS (command name in text: Select Message Service) to check whether mobile-originated SMS messages are supported.

  2. Perform test operations to check whether +CMGS (command name in text: Send Message) and/or +CMSS (command name in text: Send Message from Storage) are supported.
    (You may want to check the AT commands +CMGW [command name in text: Write Message to Memory] and +CMGD [command name in text: Delete Message] in addition as they are sometimes used together with +CMSS.)


Receiving SMS Messages and Reading SMS Messages from Message Storage

To find out whether a GSM/GPRS modem or mobile phone supports the receiving and reading of SMS messages through AT commands, you have to:

  1. Use the AT command +CSMS (command name in text: Select Message Service) to check whether mobile-terminated SMS messages are supported.

  2. Perform test operations to check whether +CNMI (command name in text: New Message Indications to TE), +CMGL (command name in text: List Messages) and/or +CMGR (command name in text: Read Message) are supported.

If the GSM/GPRS modem or mobile phone supports the +CNMI AT command, it can send a notification or directly forward the message to the PC whenever a new SMS message arrives.

If the GSM/GPRS modem or mobile phone does not support +CNMI but supports +CMGL and/or +CMGR, the PC has to poll the GSM/GPRS modem or mobile phone repeatedly in order to know if any new SMS messages have arrived.

Using the AT Command +CSMS to Check if Mobile-originated SMS Messages and Mobile-terminated SMS Messages are Supported


One use of the AT command +CSMS (command name in text: Select Message Service) is to check the message types supported by the GSM/GPRS modem or mobile phone. There are three message types: mobile-originated SMS messages, mobile-terminated SMS messages and cell broadcast messages.

Mobile-originated SMS messages refer to SMS messages that are sent from a mobile device to an SMSC, i.e. outbound SMS messages.

Mobile-terminated SMS messages refer to SMS messages that are sent from an SMSC to a mobile device, i.e. inbound SMS messages.

Cell broadcast messages are text messages pushed to subscribers located in a certain mobile network area by the network operator. These text messages may contain news, weather information, etc.

Here is an example that demonstrates how to use the +CSMS AT command to check if mobile-originated and mobile-terminated SMS messages are supported. First, send the read command "+CSMS?" to the GSM/GPRS modem or mobile phone. The response returned from our Nokia 6021 to HyperTerminal is shown below:


AT+CSMS?
+CSMS: 0,1,1,1

OK


As you can see, the information response contains four values. The second, third and fourth values indicate whether Nokia 6021 supports mobile-terminated SMS messages, mobile-originated SMS messages and cell broadcast messages respectively. If the value is 1, it means the message type is supported. If the value is 0, it means the message type is not supported.

For Nokia 6021:

  • The third value in the information response is 1, which indicates Nokia 6021 supports mobile-originated SMS messages. So, Nokia 6021 is capable of sending SMS messages to an SMSC.

  • The second value in the information response is 1, which indicates Nokia 6021 supports mobile-terminated SMS messages. So, Nokia 6021 is capable of receiving SMS messages from an SMSC.

If the final result code "ERROR" is returned (as shown below), it is likely that the +CSMS AT command is not supported by the mobile device.


AT+CSMS?
ERROR


To confirm, send the test command "+CSMS=?" to the GSM/GPRS modem or mobile phone. If the final result code "ERROR" is returned (as shown below), it means the mobile device does not support the +CSMS AT command.


AT+CSMS=?
ERROR


Note that +CSMS is a mandatory command in the AT command set for SMS messaging. If it is not supported, normally the whole AT command set for SMS messaging is not supported.

Checking if the AT Commands Required for Sending, Receiving and Reading SMS Messages are Supported

The next thing to do is to check if the AT commands required for sending, receiving and reading SMS messages are supported by the mobile phone or GSM/GPRS modem. As pointed out earlier in this SMS tutorial, you can check if a certain AT command is supported by performing a test operation. Simply execute an AT command with "=?" attached at its end. For example, "AT+CMGS=?".

Before we begin the check, let's go through an overview of the AT commands that are required for sending, receiving and reading SMS messages. You will learn which AT commands should be checked and get a general idea about when these AT commands should be used.

1. Overview of the AT Commands Required

For Sending SMS Messages

To send SMS messages via AT commands, the GSM/GPRS modem or mobile phone has to support either +CMGS (command name in text: Send Message) or +CMSS (command name in text: Send Message from Storage). You may also find +CMGW (command name in text: Write Message to Memory) and +CMGD (command name in text: Delete Message) useful, since they are sometimes used together with +CMSS. +CMSS is used to send an SMS message located in the message storage area. If an SMS message does not exist in the message storage area, you must first use the AT command +CMGW to write the SMS message to the message storage area before you can use the AT command +CMSS to send the SMS message to the SMSC. After message submission, you may use the AT command +CMGD to delete the SMS message to free some space from the message storage area.


For Receiving and Reading SMS Messages

To receive and read SMS messages via AT commands, the GSM/GPRS modem or mobile phone has to support the AT command +CNMI (command name in text: New Message Indications to TE. TE stands for Terminal Equipment, which is the equipment that controls the GSM/GPRS modem or mobile phone. For example, a PC / computer), +CMGL (command name in text: List Messages), or +CMGR (command name in text: Read Messages).

The AT command +CNMI is used to specify how newly arrived SMS messages should be handled. You can tell the GSM/GPRS modem or mobile phone either to forward newly arrived SMS messages directly to the PC, or to save them in message storage and then notify the PC about their locations in message storage.

The AT command +CMGL is used to read all SMS messages that have a certain status (e.g. "received unread", "received read", etc) from the message storage area, while the AT command +CMGR is used to read the SMS message saved at a certain location of the message storage area.

2. Beginning the Check

Now that you've learned the AT commands required for outbound and inbound SMS messaging are +CMGS, +CMSS, +CNMI, +CMGL and +CMGR. You can begin the check by performing a test operation with each of the AT commands. For example, you can execute the command line "AT+CMGS=?" to check whether +CMGS is supported, like this:


AT+CMGS=?
OK


The final result code "OK" indicates the AT command +CMGS is supported. If the GSM/GPRS modem or mobile phone returns the final result code "ERROR", it means the command is not supported.

A quicker way is to copy and paste the following command line to the terminal program and execute it:


AT+CMGS=?;+CMSS=?;+CNMI=?;+CMGL=?;+CMGR=?


As an example, here shows the response returned from my Nokia 6021 to HyperTerminal after the execution of above command line:


AT+CMGS=?;+CMSS=?;+CNMI=?;+CMGL=?;+CMGR=?
+CNMI: (0-2),(0-3),(0,2,3),(0-2),(0,1)

+CMGL: (0-4)

OK


The return of the final result code "OK" indicates all AT commands under test are supported. If the final result code "ERROR" is returned, it means one or more AT commands are not supported.

Source Article : http://www.developershome.com/sms/

Testing the Communication between the PC and GSM/GPRS Modem or Mobile Phone

Suppose you have connected your GSM/GPRS modem or mobile phone to your PC / computer and started a terminal program (such as HyperTerminal on Microsoft Windows). Now you are ready to enter your first command. The first thing that is usually done is to test the communication between the PC and GSM/GPRS modem/mobile phone to confirm that everything is working properly so far. Simply enter "AT" in the terminal program to perform the test. When the GSM/GPRS modem or mobile phone receives "AT", it will send back the final result code "OK" to indicate that it has received your command successfully, like this:


AT
OK


Source Article : http://www.developershome.com/sms/

AT Command Operations: Test, Set, Read and Execution

There are four types of AT command operations:

  • Test operation. A test operation is used to check whether a certain AT command is supported by the GSM/GPRS modem or mobile phone.

  • Set operation. A set operation is used to change the settings used by the GSM/GPRS modem or mobile phone for certain tasks.

  • Read operation. A read operation is used to retrieve the current settings used by the GSM/GPRS modem or mobile phone for certain tasks.

  • Execution operation. An execution operation is used to perform an action or retrieve information/status about the GSM/GPRS modem or mobile phone.

The command syntax for performing an operation will be described in detail in the following sections.

Test Command -- Checks Whether a Certain AT Command is Supported

A test operation is used to check whether a certain AT command is supported by the GSM/GPRS modem or mobile phone. All extended AT commands support the test operation. The syntax is:


command=?


where command is an AT command. When an AT command is used in the above syntax to perform a test operation, it is called a test command.

Here is an example. The AT command +CGMI (command name in text: Request Manufacturer Identification) is used to get the manufacturer name of the GSM/GPRS modem or mobile phone. To test whether +CGMI is supported, you can make use of the test command "+CGMI=?". The complete command line that should be entered is:


AT+CGMI=?


If the GSM/GPRS modem or mobile phone supports the AT command +CGMI, the result code "OK" will be returned, like this:


AT+CGMI=?
OK


If the GSM/GPRS modem or mobile phone does not support the AT command +CGMI, the result code "ERROR" will be returned, like this:


AT+CGMI=?
ERROR


In the above example, the AT command +CGMI does not have any parameters. If the AT command to be tested has parameter(s), the parameter value(s) supported by the GSM/GPRS modem or mobile phone may be printed additionally. Below is an example that illustrates the format of the response. +COMMAND1 is a fictitious AT command that has four parameters.


AT+COMMAND1=?
+COMMAND1: (0,1),(0-10),(0,1,5-10),("GSM","UCS2")

OK


The supported values of each of the four parameters are enclosed in parentheses. Commas are used to delimit the parentheses and the values inside parentheses. A hyphen is used to indicate a range of values. The values inside parentheses can be of the string type.

In the above example, the response of the test command "+COMMAND1=?" provides us the following information:

  • (0,1). The first parameter accepts either 0 or 1.

  • (0-10). The second parameter accepts any integer between 0 and 10.

  • (0,1,5-10). The third parameter accepts 0, 1 or any integer between 5 and 10.

  • ("GSM","UCS2"). The fourth parameter accepts either the string "GSM" or "UCS2".

To a few AT commands, the test operation does not return the parameter values supported. Instead, it returns the values that are allowed to appear in the information response of the AT command. An example is the +CBC AT command (command name in text: Battery Charge). The +CBC command is used to retrieve the connection status and charge level of the battery of the mobile device. Two values are returned in the information response of the +CBC AT command. The format is:


+CBC: connection_status,charge_level


For example, if the battery is placed in the mobile device with no charger connected and the charge level is 80%, the result of the execution of the +CBC AT command will be:


AT+CBC
+CBC: 0,80

OK


If you run the test command "+CBC=?", all the supported values that are allowed to appear in the connection status field and charge level field will be provided. With my Nokia 6021, the result is:


AT+CBC=?
+CBC: (0,1),(0-100)

OK


"(0,1)" means the connection status field in the information response of the +CBC AT command can contain either 0 or 1, while "(0-100)" means the charge level field can contain any integer between 0 and 100.

Set Command -- Changes the Settings Used for Certain Tasks


A set operation changes the settings used by the GSM/GPRS modem or mobile phone for certain tasks. The syntax is:


command=value1,value2,...valueN


where command is an AT command and value1 to valueN are the values you want to set. When an AT command is used in the above syntax to perform a set operation, it is called a set command.

Here is an example. The AT command +CSCA (command name in text: Service Centre Address) is used to set the SMSC (SMS center) address for sending SMS messages. It takes two parameters that specify the SMSC address and type of address. To set the SMSC address to +85291234567, enter the following command line in a terminal program such as MS Windows' HyperTerminal:


AT+CSCA="+85291234567",145


If the set command runs successfully, the result code "OK" will be returned:


AT+CSCA="+85291234567",145
OK


Some AT commands have optional parameters. You can choose not to assign values to them. For example, the second parameter of the +CSCA AT command is optional. If no value is assigned to the second parameter, the GSM/GPRS modem or mobile phone will use the default parameter value, which is 145 if the SMSC address starts with "+" (the plus character). Hence, this command line:


AT+CSCA="+85291234567"


is equivalent to:


AT+CSCA="+85291234567",145


Typically the values you specified with set commands are placed in volatile memory. If the GSM/GPRS modem or mobile phone is switched off or rebooted, the values you specified with set commands will be gone. When the GSM/GPRS modem or mobile phone is powered on again, all settings are back to the defaults.

For some commonly used settings, there are AT commands for saving/restoring the settings to/from non-volatile memory. For example, the AT commands +CSAS (command name in text: Save Settings) and +CRES (command name in text: Restore Settings) can be used to save and restore settings related to SMS messaging such as the SMS center address.

Read Command -- Retrieves the Current Settings Used for Certain Tasks

A read operation retrieves the current settings used by the GSM/GPRS modem or mobile phone for certain tasks. The syntax is:


command?


where command is an AT command. When an AT command is used in the above syntax to perform a read operation, it is called a read command. The read operation is supported by all AT commands that are capable of the set operation.

Here is an example that illustrates how to use a read command. The AT command +CSCA (command name in text: Service Centre Address) is used to set the SMSC (SMS center) address for sending SMS messages. It takes two parameters that specify the SMSC address and type of address. Suppose you set the SMSC address to +85291234567 in Microsoft HyperTerminal, like this:


AT+CSCA="+85291234567",145
OK


After that, if you enter the read command "+CSCA?", the GSM/GPRS modem or mobile phone will return the SMSC address and type of address that you set in the previous step:


AT+CSCA?
+CSCA: "+85291234567",145

OK

Execution Command -- Performs an Action or Retrieve Information/Status about the GSM/GPRS Modem or Mobile Phone

An execution operation is used to perform an action (for example, send or read an SMS message) or retrieve information/status about the GSM/GPRS modem or mobile phone (for example, retrieve the current battery charge level, battery charging status or radio signal strength of the mobile network). The syntax is:


command=value1,value2,...valueN


where command is an AT command and value1 to valueN are the values to assign to the AT command. If the AT command does not have any parameters, the part "=value1,value2,...valueN" should be omitted. When an AT command is used in the above syntax to perform an execution operation, it is called an execution command.

Here is an example illustrating the use of an execution command. The AT command +CMSS (command name in text: Send Message from Storage) can be used to perform an execution operation to send an SMS message stored in message storage. It has three parameters. They specify the index of the memory location that stores the SMS message, the destination phone number and the type of the phone number respectively. To send the SMS message at index 1 to the phone number +85291234567, the following command line can be used:


AT+CMSS=1,"+85291234567",145


Some AT commands have optional parameters. You can choose not to assign values to them. For example, the third parameter of the +CMSS AT command is optional. If no value is assigned to the third parameter, the GSM/GPRS modem or mobile phone will use the default parameter value, which is 145 if the destination phone number starts with "+" (the plus character). Hence, this command line:


AT+CMSS=1,"+85291234567"


is equivalent to:


AT+CMSS=1,"+85291234567",145


Unlike set commands, execution commands do not store the parameter values assigned to them. So, no read command is available for retrieving the last parameter values assigned to an execution command. For example, if you send the command line "AT+CMSS?" to your GSM/GPRS modem or mobile phone, the ERROR result code will be returned:


AT+CMSS?
ERROR

Source Article : http://www.developershome.com/sms/

Result Codes of AT Commands

Result codes are messages sent from the GSM/GPRS modem or mobile phone to provide you information about the execution of an AT command and the occurrence of an event. Two types of result codes are useful to you when dealing with AT commands for SMS messaging:

  • Final result codes

  • Unsolicited result codes

Final Result Codes of AT Commands

A final result code marks the end of an AT command response. It is an indication that the GSM/GPRS modem or mobile phone has finished the execution of a command line. Two frequently used final result codes are OK and ERROR. Only one final result code will be returned for each command line. Thus, you will not see both OK and ERROR in the response of a command line.


1. The OK Final Result Code

The OK final result code indicates that a command line has been executed successfully by the GSM/GPRS modem or mobile phone. It always starts and ends with a carriage return character and a linefeed character.

Here is an example for illustration. Let's say you send the command line "AT+CMGL;+CGMI" to your GSM/GPRS modem. The AT command "+CMGL" is used to list SMS messages stored in the message storage area and the AT command "+CGMI" is used to get the manufacturer name of the GSM/GPRS modem. If everything works properly without any errors, the command line, together with the response returned, should be something similar to this:


AT+CMGL;+CGMI
+CMGL: 1,"REC UNREAD","+85291234567",,"06/11/11,00:30:29+32"
Welcome to our SMS tutorial.
Nokia
OK


As mentioned earlier, when a terminal program such as HyperTerminal of Microsoft Windows sees a carriage return character, it moves the cursor to the beginning of the current line. When it sees a linefeed character, it moves the cursor to the same position on the next line. Hence, the command line you entered, together with the response returned, will be displayed like this in a terminal program such as HyperTerminal of Microsoft Windows:


AT+CMGL;+CGMI
+CMGL: 1,"REC UNREAD","+85291234567",,"06/11/11,00:30:29+32"
Welcome to our SMS tutorial.

Nokia

OK

2. The ERROR Final Result Code

The ERROR final result code indicates that an error occurs when the GSM/GPRS modem or mobile phone tries to execute a command line. After the occurrence of an error, the GSM/GPRS modem or mobile phone will not process the remaining AT commands in the command-line string.

Below are some common causes of error:

  • The syntax of the command line is incorrect.

  • The value specified to a certain parameter is invalid.

  • The name of the AT command is spelt incorrectly.

  • The GSM/GPRS modem or mobile phone does not support one or more of the AT commands, command parameters or parameter values in the command-line string.

Like the OK final result code, the ERROR final result code always starts and ends with a carriage return character and a linefeed character.

Here is an example for illustration. Suppose you want to instruct your GSM/GPRS modem to list SMS messages from the message storage area and get the manufacturer name of the GSM/GPRS modem. You intend to type the command line "AT+CMGL;+CGMI" but make a careless mistake by typing "+CMFL" instead of "+CMGL". The GSM/GPRS modem will return the ERROR final result code, as shown below:


AT+CMFL;+CGMI
ERROR


As an error occurs when the GSM/GPRS modem processes "+CMFL", the GSM/GPRS modem stops the execution of the command line and so the second AT command "+CGMI" is not processed.

If you type the second AT command "+CGMI" incorrectly instead of the first AT command "+CMGL", the GSM/GPRS modem will output the result of the execution of the AT command "+CMGL" before outputting the ERROR final result code, like this:


AT+CMGL;+CGMU
+CMGL: 1,"REC UNREAD","+85291234567",,"06/11/11,00:30:29+32"
Welcome to our SMS tutorial.
ERROR


As mentioned earlier, when a terminal program such as HyperTerminal of Microsoft Windows sees a carriage return character, it moves the cursor to the beginning of the current line. When it sees a linefeed character, it moves the cursor to the same position on the next line. Hence, the command line you entered, together with the response returned, will be displayed like this in a terminal program such as HyperTerminal of Microsoft Windows:


AT+CMGL;+CGMU
+CMGL: 1,"REC UNREAD","+85291234567",,"06/11/11,00:30:29+32"
Welcome to our SMS tutorial.

ERROR


Final Result Code Specific to SMS AT Commands


The final result codes OK and ERROR are available to all AT commands. Unlike OK and ERROR, the +CMS ERROR final result code is only available to SMS AT commands. It notifies you about the occurrence of a message service failure.

1. The +CMS ERROR Final Result Code -- Notifies the Occurrences and Causes of Message Service Failures

The +CMS ERROR final result code is returned when a message service failure occurs. An error code is provided for programmers to check what causes the message service failure. The +CMS ERROR final result code is specific to SMS AT commands, i.e. the +CMS ERROR final result code will only be outputted by AT commands that are used to perform tasks related to SMS messaging. Below are the SMS AT commands that may output the final result code +CMS ERROR:

  • +CMGC (command name in text: Send Command)

  • +CMGD (command name in text: Delete Message)

  • +CMGL (command name in text: List Messages)

  • +CMGR (command name in text: Read Message)

  • +CMGS (command name in text: Sending Message)

  • +CMGW (command name in text: Write Message to Memory)

  • +CMSS (command name in text: Send Message from Storage)

  • +CNMA (command name in text: New Message Acknowledgement to ME/TA)

  • +CNMI (command name in text: New Message Indications to TE)

  • +CPMS (command name in text: Preferred Message Storage)

  • +CRES (command name in text: Restore Settings)

  • +CSAS (command name in text: Save Settings)

  • +CSMS (command name in text: Select Message Service)

The syntax of the +CMS ERROR final result code is:


+CMS ERROR: error_code


Just as the final result codes OK and ERROR, the +CMS ERROR final result code always starts and ends with a carriage return character and a linefeed character. error_code is an integer that is associated to a certain error. A list of some error codes and their meanings can be found in "Table of +CMS Error Codes and Their Meanings".

As mentioned earlier, after the execution of a command line, only one final result code is returned. Hence, when an error occurs, you will not find both +CMS ERROR and ERROR in the command response. For errors related to SMS messaging, the +CMS ERROR final result code is returned. For other errors such as invalid command syntax and unsupported AT command, the ERROR final result code is returned as usual.

Below shows some common causes of +CMS errors:

  • A SIM card is not present in the GSM/GPRS modem or mobile phone.

  • The SIM card requires a password (e.g. PIN, PIN2, PUK and PUK2) but you have not entered it.

  • An invalid memory index is assigned to an AT command.

  • The memory of the GSM/GPRS modem, mobile phone or SIM card for storing SMS messages is full.

  • The SMSC address is unknown or incorrect.

Following is an example that demonstrates the usage of the +CMS ERROR result code. Let's say there is only one SMS text message stored on our Nokia 6021 and it is stored in the memory location at index 1. If we enter the command line "AT+CMGR=11" (it means "to read the SMS message at memory index 11"), Nokia 6021 will return a +CMS error:


AT+CMGR=11
+CMS ERROR: 321


As mentioned earlier, when a terminal program such as HyperTerminal of Microsoft Windows sees a carriage return character, it moves the cursor to the beginning of the current line. When it sees a linefeed character, it moves the cursor to the same position on the next line. Hence, the command line you entered, together with the response returned, will be displayed like this in a terminal program such as HyperTerminal of Microsoft Windows:


AT+CMGR=11
+CMS ERROR: 321


To find out the meaning of the +CMS error code 321, go to "Table of +CMS Error Codes and Their Meanings". From there, we know that the read message operation failed because an invalid memory index was assigned to the AT command +CMGR.

Note that after the occurrence of a +CMS error, the GSM/GPRS modem or mobile phone will not process the remaining AT commands in the command line. Thus, if the command line sent to Nokia 6021 is "AT+CMGR=11;+CGMI" (+CGMI is the AT command for retrieving the manufacturer name of the GSM/GPRS modem or mobile phone), you will get the following result in Windows' HyperTerminal:


AT+CMGR=11;+CGMI
+CMS ERROR: 321


But if the positions of the two AT commands in the command line are exchanged, Nokia 6021 will output the result of the execution of the AT command +CGMI before outputting the +CMS ERROR result code. Below is the result displayed in Windows' HyperTerminal:


AT+CGMI;+CMGR=11
Nokia

+CMS ERROR: 321


1.1. Table of +CMS Error Codes and Their Meanings

The following table lists some of the +CMS error codes and their meanings.


+CMS error code

Meaning

300

Mobile equipment (ME) failure. Mobile equipment refers to the mobile device that communicates with the wireless network. Usually it is a mobile phone or GSM/GPRS modem. The SIM card is defined as a separate entity and is not part of mobile equipment.

301

SMS service of mobile equipment (ME) is reserved. See +CMS error code 300 for the meaning of mobile equipment.

302

The operation to be done by the AT command is not allowed.

303

The operation to be done by the AT command is not supported.

304

One or more parameter values assigned to the AT command are invalid. (For PDU mode)

305

One or more parameter values assigned to the AT command are invalid. (For Text mode)

310

There is no SIM card.

311

The SIM card requires a PIN to operate. The AT command +CPIN (command name in text: Enter PIN) can be used to send the PIN to the SIM card.

312

The SIM card requires a PH-SIM PIN to operate. The AT command +CPIN (command name in text: Enter PIN) can be used to send the PH-SIM PIN to the SIM card.

313

SIM card failure.

314

The SIM card is busy.

315

The SIM card is wrong.

316

The SIM card requires a PUK to operate. The AT command +CPIN (command name in text: Enter PIN) can be used to send the PUK to the SIM card.

320

Memory/message storage failure.

321

The memory/message storage index assigned to the AT command is invalid.

322

The memory/message storage is out of space.

330

The SMS center (SMSC) address is unknown.

331

No network service is available.

332

Network timeout occurred.

340

There is no need to send message acknowledgement by the AT command +CNMA (command name in text: New Message Acknowledgement to ME/TA).

500

An unknown error occurred.


Unsolicited Result Codes of AT Commands

Unsolicited result codes are messages sent from the GSM/GPRS modem or mobile phone to provide you information about the occurrence of an event. For example, you can use the +CNMI AT command (command name in text: New Message Indications to TE) to request the GSM/GPRS modem or mobile phone to send the unsolicited result code "+CMTI" to your computer / PC every time a new SMS message is received from the SMS center.

Here are the unsolicited result codes that are related to SMS messaging:


+CDS

A GSM/GPRS modem or mobile phone uses +CDS to forward a newly received SMS status report to the computer / PC.


+CDSI

A GSM/GPRS modem or mobile phone uses +CDSI to notify the computer / PC that a new SMS status report has been received and the memory location where it is stored.


+CMT

A GSM/GPRS modem or mobile phone uses +CMT to forward a newly received SMS message to the computer / PC.


+CMTI

A GSM/GPRS modem or mobile phone uses +CMTI to notify the computer / PC that a new SMS message has been received and the memory location where it is stored.


Source Article : http://www.developershome.com/sms/

General Syntax of Extended AT Commands

The general syntax of extended AT commands is straightforward. The syntax rules are provided below. The syntax of basic AT commands is slightly different. We will not cover the syntax of basic AT commands in this SMS tutorial since all SMS messaging commands are extended AT commands.

Syntax rule 1. All command lines must start with "AT" and end with a carriage return character. (We will use to represent a carriage return character in this SMS tutorial.) In a terminal program like HyperTerminal of Microsoft Windows, you can press the Enter key on the keyboard to output a carriage return character.

Example: To list all unread inbound SMS messages stored in the message storage area, type "AT", then the extended AT command "+CMGL", and finally a carriage return character, like this:


AT+CMGL


Syntax rule 2. A command line can contain more than one AT command. Only the first AT command should be prefixed with "AT". AT commands in the same command-line string should be separated with semicolons.

Example: To list all unread inbound SMS messages stored in the message storage area and obtain the manufacturer name of the mobile device, type "AT", then the extended AT command "+CMGL", followed by a semicolon and the next extended AT command "+CGMI":


AT+CMGL;+CGMI


An error will occur if both AT commands are prefixed with "AT", like this:


AT+CMGL;AT+CGMI


Syntax rule 3. A string is enclosed between double quotes.

Example: To read all SMS messages from message storage in SMS text mode (at this time you do not need to know what SMS text mode is. More information will be provided later in this SMS tutorial), you need to assign the string "ALL" to the extended AT command +CMGL, like this:


AT+CMGL="ALL"


Syntax rule 4. Information responses and result codes (including both final result codes and unsolicited result codes) always start and end with a carriage return character and a linefeed character.

Example: After sending the command line "AT+CGMI" to the mobile device, the mobile device should return a response similar to this:


Nokia
OK


The first line is the information response of the AT command +CGMI and the second line is the final result code. and represent a carriage return character and a linefeed character respectively. The final result code "OK" marks the end of the response. It indicates no more data will be sent from the mobile device to the computer / PC.

When a terminal program such as HyperTerminal of Microsoft Windows sees a carriage return character, it moves the cursor to the beginning of the current line. When it sees a linefeed character, it moves the cursor to the same position on the next line. Hence, the command line "AT+CGMI" that you entered and the corresponding response will be displayed like this in a terminal program such as HyperTerminal of Microsoft Windows:


AT+CGMI
Nokia

OK

Information Response and Final Result Code

Don't forget the meanings of information response and final result code stated above, since you will see these two terms frequently as you go through this SMS tutorial.


AT+CGMI <-- Command line entered Nokia <-- Information response OK <-- Final result code

Case Sensitivity of AT Commands

In the SMS specification, all AT commands are in uppercase letters. However, many GSM/GPRS modems and mobile phones allow you to type AT commands in either uppercase or lowercase letters. For example, on Nokia 6021, AT commands are case-insensitive and the following two command lines are equivalent:

AT+CMGL

at+cmgl


Source Article : http://www.developershome.com/sms/

Bunafit Komputer adalah komunitas Penulis dan Programer yang bermarkas di Yogyakarta. Bunafit Komputer menulis buku Pemrograman dan Internet. Tim programer kami juga menerima jasa pembuatan Program Skripsi Teknik Informatika, Program Tugas Akhir Teknik Informatika dan Program Tesis Ilmu Komputer. Bagi yang membutuhkan contoh program untuk Tugas Akhir, Skripsi atau Tesis, kami sediakan Source Code Program Aplikasi lengkap di www.planetKode.com.

Introduction to AT Commands

AT commands are instructions used to control a modem. AT is the abbreviation of ATtention. Every command line starts with "AT" or "at". That's why modem commands are called AT commands. Many of the commands that are used to control wired dial-up modems, such as ATD (Dial), ATA (Answer), ATH (Hook control) and ATO (Return to online data state), are also supported by GSM/GPRS modems and mobile phones. Besides this common AT command set, GSM/GPRS modems and mobile phones support an AT command set that is specific to the GSM technology, which includes SMS-related commands like AT+CMGS (Send SMS message), AT+CMSS (Send SMS message from storage), AT+CMGL (List SMS messages) and AT+CMGR (Read SMS messages).

Note that the starting "AT" is the prefix that informs the modem about the start of a command line. It is not part of the AT command name. For example, D is the actual AT command name in ATD and +CMGS is the actual AT command name in AT+CMGS. However, some books and web sites use them interchangeably as the name of an AT command.

Here are some of the tasks that can be done using AT commands with a GSM/GPRS modem or mobile phone:

  • Get basic information about the mobile phone or GSM/GPRS modem. For example, name of manufacturer (AT+CGMI), model number (AT+CGMM), IMEI number (International Mobile Equipment Identity) (AT+CGSN) and software version (AT+CGMR).

  • Get basic information about the subscriber. For example, MSISDN (AT+CNUM) and IMSI number (International Mobile Subscriber Identity) (AT+CIMI).

  • Get the current status of the mobile phone or GSM/GPRS modem. For example, mobile phone activity status (AT+CPAS), mobile network registration status (AT+CREG), radio signal strength (AT+CSQ), battery charge level and battery charging status (AT+CBC).

  • Establish a data connection or voice connection to a remote modem (ATD, ATA, etc).

  • Send and receive fax (ATD, ATA, AT+F*).

  • Send (AT+CMGS, AT+CMSS), read (AT+CMGR, AT+CMGL), write (AT+CMGW) or delete (AT+CMGD) SMS messages and obtain notifications of newly received SMS messages (AT+CNMI).

  • Read (AT+CPBR), write (AT+CPBW) or search (AT+CPBF) phonebook entries.

  • Perform security-related tasks, such as opening or closing facility locks (AT+CLCK), checking whether a facility is locked (AT+CLCK) and changing passwords (AT+CPWD).
    (Facility lock examples: SIM lock [a password must be given to the SIM card every time the mobile phone is switched on] and PH-SIM lock [a certain SIM card is associated with the mobile phone. To use other SIM cards with the mobile phone, a password must be entered.])

  • Control the presentation of result codes / error messages of AT commands. For example, you can control whether to enable certain error messages (AT+CMEE) and whether error messages should be displayed in numeric format or verbose format (AT+CMEE=1 or AT+CMEE=2).

  • Get or change the configurations of the mobile phone or GSM/GPRS modem. For example, change the GSM network (AT+COPS), bearer service type (AT+CBST), radio link protocol parameters (AT+CRLP), SMS center address (AT+CSCA) and storage of SMS messages (AT+CPMS).

  • Save and restore configurations of the mobile phone or GSM/GPRS modem. For example, save (AT+CSAS) and restore (AT+CRES) settings related to SMS messaging such as the SMS center address.

Note that mobile phone manufacturers usually do not implement all AT commands, command parameters and parameter values in their mobile phones. Also, the behavior of the implemented AT commands may be different from that defined in the standard. In general, GSM/GPRS modems designed for wireless applications have better support of AT commands than ordinary mobile phones.

In addition, some AT commands require the support of mobile network operators. For example, SMS over GPRS can be enabled on some GPRS mobile phones and GPRS modems with the +CGSMS command (command name in text: Select Service for MO SMS Messages). But if the mobile network operator does not support the transmission of SMS over GPRS, you cannot use this feature.

Basic Commands and Extended Commands

There are two types of AT commands: basic commands and extended commands.

Basic commands are AT commands that do not start with "+". For example, D (Dial), A (Answer), H (Hook control) and O (Return to online data state) are basic commands.

Extended commands are AT commands that start with "+". All GSM AT commands are extended commands. For example, +CMGS (Send SMS message), +CMSS (Send SMS message from storage), +CMGL (List SMS messages) and +CMGR (Read SMS messages) are extended commands.


Source Article : http://www.developershome.com/sms/

Bunafit Komputer adalah komunitas Penulis dan Programer yang bermarkas di Yogyakarta. Bunafit Komputer menulis buku Pemrograman dan Internet. Tim programer kami juga menerima jasa pembuatan Program Skripsi Teknik Informatika, Program Tugas Akhir Teknik Informatika dan Program Tesis Ilmu Komputer. Bagi yang membutuhkan contoh program untuk Tugas Akhir, Skripsi atau Tesis, kami sediakan Source Code Program Aplikasi lengkap di www.planetKode.com.

How to Use Microsoft HyperTerminal to Send AT Commands to a Mobile Phone or GSM/GPRS Modem?

What is Microsoft HyperTerminal?

Microsoft HyperTerminal is a small program that comes with Microsoft Windows. You can use it to send AT commands to your mobile phone or GSM/GPRS modem. It can be found at Start -> Programs -> Accessories -> Communications -> HyperTerminal. If you cannot find it and you are using Windows 98, then probably you have not installed it. You can go to Control Panel -> Add/Remove Programs -> Windows Setup tab -> Communications list box item -> Details button to install MS HyperTerminal.

Before you start programming your SMS application, you may want to check if your mobile phone, GSM/GPRS modem and SIM card are working properly first. The MS HyperTerminal is a handy tool when it comes to testing your GSM devices. It is a good idea to test your GSM devices beforehand. When a problem occurs, sometimes it is difficult to tell what causes the problem. The cause can be your program, the GSM device or the SIM card. If you test your GSM device and SIM card with MS HyperTerminal and they operate properly, then it is very likely that the problem is caused by your program.

For Linux users, minicom can be used instead of HyperTerminal.

The Procedure for Sending AT Commands to a Mobile Phone or GSM/GPRS Modem Using MS HyperTerminal

To use MS HyperTerminal to send AT commands to your mobile phone or GSM/GPRS modem, you can follow the procedure below:


  1. Put a valid SIM card into the mobile phone or GSM/GPRS modem. You can obtain a SIM card by subscribing to the GSM service of a wireless network operator.

  2. Connect your mobile phone or GSM/GPRS modem to a computer and set up the corresponding wireless modem driver. You should find the wireless modem driver in the CD or disk that was provided by the manufacturer. If the manufacturer does not provide such CD or disk with your mobile phone or GSM/GPRS modem, you can go to the manufacturer's web site and see whether the wireless modem driver can be downloaded there. If the wireless modem driver cannot be found on the web site, you can still use Windows' standard modem driver.

  3. Run MS HyperTerminal by selecting Start -> Programs -> Accessories -> Communications -> HyperTerminal.

  4. In the Connection Description dialog box, enter a name and choose an icon you like for the connection. Then click the OK button.


Figure 5. The screenshot of MS HyperTerminal's Connection Description dialog box in Windows 98.



  1. In the Connect To dialog box, choose the COM port that your mobile phone or GSM/GPRS modem is connecting to in the Connect using combo box. For example, choose COM1 if your mobile phone or GSM/GPRS modem is connecting to the COM1 port. Then click the OK button.

    (Sometimes there will have more than one COM port in the Connect using combo box. To know which COM port is used by your mobile phone or GSM/GPRS modem, follow the procedure below:

    In Windows 98:
    Go to Control Panel -> Modem. Then click the Diagnostics tab. In the list box, you can see which COM port the mobile phone or GSM/GPRS modem is connected to.

    In Windows 2000 and Windows XP:
    Go to Control Panel -> Phone and Modem Options. Then click the Modems tab. In the list box, you can see which COM port the mobile phone or GSM/GPRS modem is connected to.)

Figure 6. The screenshot of MS HyperTerminal's Connect To dialog box in Windows 98.



  1. The Properties dialog box comes out. Enter the correct port settings for your mobile phone or GSM/GPRS modem. Then click the OK button.

    (To find the correct port settings that should be used with your mobile phone or GSM/GPRS modem, one way is to consult the manual of your mobile phone or GSM/GPRS modem. Another way is to check the port settings used by the wireless modem driver that you installed earlier.

    To check the port settings used by the wireless modem driver on Windows 98, follow these steps:
    a. Go to Control Panel -> Modem.
    b. Select your mobile phone or GSM/GPRS modem in the list box.
    c. Click the Properties button.
    d. The Properties dialog box appears. The Maximum speeds field on the General tab corresponds to HyperTerminal's Bits per second field. Click the Connection tab and you can find the settings for data bits, parity and stop bits. Click the Advanced button and you can find the setting for flow control.

    To check the port settings used by the wireless modem driver on Windows 2000 and Windows XP, follow these steps:
    a. Go to Control Panel -> Phone and Modem Options -> Modems tab.
    b. Select your mobile phone or GSM/GPRS modem in the list box.
    c. Click the Properties button.
    d. The Properties dialog box appears. Click the Advanced tab and then click the Change Default Preferences button.
    e. The Change Default Preferences dialog box appears. The Port speed field on the General tab corresponds to HyperTerminal's Bits per second field. You can also find the setting for flow control on the General tab. On the Advanced tab, you can find the settings for data bits, parity and stop bits.)

Figure 7. The screenshot of MS HyperTerminal's Properties dialog box in Windows 98.




  1. Type "AT" in the main window. A response "OK" should be returned from the mobile phone or GSM/GPRS modem.
    Type "AT+CPIN?" in the main window. The AT command "AT+CPIN?" is used to query whether the mobile phone or GSM/GPRS modem is waiting for a PIN (personal identification number, i.e. password). If the response is "+CPIN: READY", it means the SIM card does not require a PIN and it is ready for use. If your SIM card requires a PIN, you need to set the PIN with the AT command "AT+CPIN=".

Figure 8. The screenshot of MS HyperTerminal's main window in Windows 98.



If you get the responses above, your mobile phone or GSM/GPRS modem is working properly. You can start typing your own AT commands to control the mobile phone or GSM/GPRS modem.

Further details about how to use AT commands to send and receive SMS messages will be provided in the following sections.


Source Article : http://www.developershome.com/sms/

Bunafit Komputer adalah komunitas Penulis dan Programer yang bermarkas di Yogyakarta. Bunafit Komputer menulis buku Pemrograman dan Internet. Tim programer kami juga menerima jasa pembuatan Program Skripsi Teknik Informatika, Program Tugas Akhir Teknik Informatika dan Program Tesis Ilmu Komputer. Bagi yang membutuhkan contoh program untuk Tugas Akhir, Skripsi atau Tesis, kami sediakan Source Code Program Aplikasi lengkap di www.planetKode.com.

Introduction to GSM / GPRS Wireless Modems

What is a GSM Modem?

A GSM modem is a wireless modem that works with a GSM wireless network. A wireless modem behaves like a dial-up modem. The main difference between them is that a dial-up modem sends and receives data through a fixed telephone line while a wireless modem sends and receives data through radio waves.

A GSM modem can be an external device or a PC Card / PCMCIA Card. Typically, an external GSM modem is connected to a computer through a serial cable or a USB cable. A GSM modem in the form of a PC Card / PCMCIA Card is designed for use with a laptop computer. It should be inserted into one of the PC Card / PCMCIA Card slots of a laptop computer.

Like a GSM mobile phone, a GSM modem requires a SIM card from a wireless carrier in order to operate.

As mentioned in earlier sections of this SMS tutorial, computers use AT commands to control modems. Both GSM modems and dial-up modems support a common set of standard AT commands. You can use a GSM modem just like a dial-up modem.

In addition to the standard AT commands, GSM modems support an extended set of AT commands. These extended AT commands are defined in the GSM standards. With the extended AT commands, you can do things like:

  • Reading, writing and deleting SMS messages.

  • Sending SMS messages.

  • Monitoring the signal strength.

  • Monitoring the charging status and charge level of the battery.

  • Reading, writing and searching phone book entries.

The number of SMS messages that can be processed by a GSM modem per minute is very low -- only about six to ten SMS messages per minute.


12.2. What is a GPRS Modem?

A GPRS modem is a GSM modem that additionally supports the GPRS technology for data transmission. GPRS stands for General Packet Radio Service. It is a packet-switched technology that is an extension of GSM. (GSM is a circuit-switched technology.) A key advantage of GPRS over GSM is that GPRS has a higher data transmission speed.

GPRS can be used as the bearer of SMS. If SMS over GPRS is used, an SMS transmission speed of about 30 SMS messages per minute may be achieved. This is much faster than using the ordinary SMS over GSM, whose SMS transmission speed is about 6 to 10 SMS messages per minute. A GPRS modem is needed to send and receive SMS over GPRS. Note that some wireless carriers do not support the sending and receiving of SMS over GPRS.

If you need to send or receive MMS messages, a GPRS modem is typically needed.

Which is Better: Mobile Phone or GSM / GPRS Modem?

In general, a GSM/GPRS modem is recommended for use with a computer to send and receive messages. This is because some mobile phones have certain limitations comparing to GSM/GPRS modems. Some of the limitations are described below:

  • Some mobile phone models (example: Ericsson R380) cannot be used with a computer to receive concatenated SMS messages.

    What is a concatenated SMS message?
    A concatenated SMS message is a message that contains more than 140 bytes. (A normal SMS message can only contain at most 140 bytes.) Concatenated SMS works like this: the sender's mobile device breaks a message longer than 140 bytes into smaller parts. Each of these parts are then fitted in a single SMS message and sent to the recipient. When these SMS messages reach the destination, the recipient's mobile device will combine them back to one message.

    What is the cause of the problem?
    When the mobile phone receives the SMS messages that are parts of a concatenated SMS message, it combines them to one message automatically. The correct behavior should be: when the mobile phone receives the SMS messages that are parts of a concatenated SMS message, it forwards them to the computer without combining them.

  • Many mobile phone models cannot be used with a computer to receive MMS messages. Because when they receive a MMS notification, they handle it automatically instead of forwarding it to the computer.

  • A mobile phone may not support some AT commands, command parameters and parameter values. For example, some mobile phones do not support the sending and receiving of SMS messages in text mode. So, the AT command "AT+CMGF=1" (it instructs the mobile phone to use text mode) will cause an error message to be returned. Usually GSM/GPRS modems support a more complete set of AT commands than mobile phones.

  • Most SMS messaging applications have to be available 24 hours a day. (For example, an SMS messaging application that provides ringtone downloading service should be running all the time so that a user can download ringtones any time he/she wants.) If such SMS messaging applications use mobile phones to send and receive SMS messages, the mobile phones have to be switched on all the time. However, some mobile phone models cannot operate with the battery removed even when an AC adaptor is connected, which means the battery will be charged 24 hours a day.

Besides the above issues, mobile phones and GSM/GPRS modems are more or less the same for sending and receiving SMS messages from a computer. Actually, you can consider an AT-command-enabled mobile phone as "GSM/GPRS modem + keypad + display + ...".

There is not much difference between mobile phones and GSM/GPRS modems in terms of SMS transmission rate, since the determining factor for the SMS transmission rate is the wireless network.


Source Article : http://www.developershome.com/sms/

Bunafit Komputer adalah komunitas Penulis dan Programer yang bermarkas di Yogyakarta. Bunafit Komputer menulis buku Pemrograman dan Internet. Tim programer kami juga menerima jasa pembuatan Program Skripsi Teknik Informatika, Program Tugas Akhir Teknik Informatika dan Program Tesis Ilmu Komputer. Bagi yang membutuhkan contoh program untuk Tugas Akhir, Skripsi atau Tesis, kami sediakan Source Code Program Aplikasi lengkap di www.planetKode.com.