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

Rabu, 04 Februari 2009

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/