AT-Command
Pengenalan AT-Command (Perintah AT)
Perintah AT (AT Command) digunakan untuk berkomunikasi dengan terminal melalui port pada komputer.
Penggunaan peritah AT dapat memberi kemudahan untuk mengetahui
- kekuatan sinyal dari terminal,
- mengirim pesan,
- menambahkan item pada buku alamat,
- mematikan terminal
dan banyak fungsi lainnya.
Setiap vendor biasanya memberikan referensi tentang daftar perintah AT yang tersedia.
Berikut beberapa perintah AT:
***********************************************
1. AT+CMGD
Delete an SMS in the SMS memory
* Test Command : AT+CMGD=?
- Response : OK
* Write Command : AT+CMGD=<index>
-------------------------------------------
# Parameter Write Command
<index> Index of message in the selected memory <mem 1>
-------------------------------------------
- Response : OK/ERROR/+CMS ERROR
***********************************************
2. AT+CMGL
List SMS
* Test Command : AT+CMGL=?
- Response : +CMGL:(list of supported <stat>)
-------------------------------------------
# Parameter Response Test Command
<stat>
0 "REC UNREAD" : received unread messages (default)
1 "REC READ" : received read messages
2 "STO UNSENT" : stored unsent messages
3 "STO SENT" : stored sent messages
4 "ALL" : all messages
-------------------------------------------
* Write Command : AT+CMGL [<stat>]
-------------------------------------------
# Parameter Write Command
<stat>
0 "REC UNREAD" : received unread messages (default)
1 "REC READ" : received read messages
2 "STO UNSENT" : stored unsent messages
3 "STO SENT" : stored sent messages
4 "ALL" : all messages
-------------------------------------------
- Response If PDU mode (+CMGF=0) and command are successful: +CMGL:<index>,<stat>,[<alpha>],<length><CR><LF><pdu>[<CR><LF>+CMGL:<index>,<stat>,[alpha],<lenght><CR><LF><pdu><CR><CR><LF>[...]]
-------------------------------------------
# Parameter Response Write Command
<pdu>:The PDU begins with the service-center address (according to GSM04.11), followed by the TPDU according to GSM03.40 in hexadecimal format
otherwise : +CMS ERROR: <err>
-------------------------------------------
***********************************************
3. AT+CNMI
Display new incoming SMS
* Test Command : AT+CNMI=?
- Response : +CNMI: (list of supportes <mode>s),(list of supported <mt>s),(list of supported <bm>s),(list of supported <ds>s),(list of supported <bfr>s)
-------------------------------------------
# Parameter Response Test Command
<mode>
0 :
Buffers unexpected messages (but is equivalent to rejecting; see <bfr>)
1 :
Discard indication and reject new received message unsolicited result codes when TA-TE linkis reserved. Otherwise foward them directly to the TE. (only with S25ff)
2 :
Buffers unexpected messages if serial interface is occupied, otherwise they are output (only models before S25)
<mt>
0 :
Suppresses unexpected messages for incoming short messages.
1 :
Unexpected messages of a received short message (SMS-DELIVER) that is stored on a chip card are output in the form +CMTI: <mem>,<index>
2 :
Unexpected messages of a received short message (SMS-DELIVER) (except class 2 and the message "Waiting indication Group: store message") are output in the form +CMT:[<alpha>],<length><CR><LF><pdu>(<alpha> is not supported) Class 2 and the message "Waiting Indication Group: store message" are output as <mt>=1
3 :
Unexpected messages of a received short message (SMS-DELIVER) class 3 are output as <mt>=2. Messages with other data coding schemes are output as <mt>=1. NOTE:<mt>=2 and <mt>=3 are not possible unless the Phase 2+ compatibility has been activated by means of +CSMS=1
<bm>
0 :
Suppresses unexpected messages for incoming cell broadcast messages
2 :
Outputs unexpected messages for cell broadcast messages in the form +CBM: <length><CR><LF><pdu>
<ds>
0 :
Suppresses unexpected messages for incoming SMS status reports
2 :
Outputs unexpected messages for SMS status reports in the form +CDS:<length><CR><LF><pdu>
<bfr>
1 :
Buffered unexpected messages are rejected when switching from <mode> 0 to <mode> 2.
<mem>
See +CPMS
<index>
Index of the record on the chip card
<alpha>
alphanumeric representation of the sender address
<length>
Length of <pdu>
<pdu>
The PDU begins with the service-center address (according to GSM04.11), followed by the TPDU according to GSM03.40 in hexadecimal format
-------------------------------------------
* Read Command : AT+CNMI?
- Response : +CNMI: <mode>,<mt>,<bm>,<ds>,<bfr>
-------------------------------------------
# Parameter Response Read Command
<mode> See Test command AT+CNMI
<mt> See Test command AT+CNMI
<bm> See Test Command AT+CNMI
<ds> See Test Command AT+CNMI
<bfr> See Test Command AT+CNMI
-------------------------------------------
* Test Command : AT+CNMI=[<mode>[,<mt>[,<bm>[,<ds>[,<bfr>]]]]]
-------------------------------------------
# Parameter Test Command
<mode> See Test command AT+CNMI
<mt> See Test command AT+CNMI
<bm> See Test Command AT+CNMI
<ds> See Test Command AT+CNMI
<bfr> See Test Command AT+CNMI
-------------------------------------------
- Response : OK/ERROR/+CMS ERROR
:: Unexpected message
"+CMTI: <mem>,<index>"
-> Indication that new message has arrived
"+CMT: <length><CR><LF><pdu>"
-> Direct output of the short
"+CDS: <length><CR><LF><pdu>"
-> Direct output of the status report
"+CBM: <length><CR><LF><pdu>"
-> Direct output of the cell broadcast message
***********************************************
4. AT+CMGR
Read in an SMS
* Test Command : AT+CMGR=?
- Response : OK
* Write Command : AT+CMGR=<index>
-------------------------------------------
# Parameter Write Command
<index> Index of message in the selected memory <mem 1>
-------------------------------------------
- Response If PDU Mode (+CMGF=0) and command are successful: +CMGR: <stat>,[<alpha>],<length><CR><LF><pdu>
-------------------------------------------
# Parameter Response Write Command
<pdu>:The PDU begins with the service-center address (according to GSM04.11), followed by the TPDU according to GSM03.40 in hexadecimal format
otherwise : +CMS ERROR: <err>
-------------------------------------------
***********************************************
5. AT+CMGS
Send an SMS
* Test Command : AT=CMGS=?
- Response : OK
* Write Command If PDU mode (+CMGF=0) : +CMGS=<length><CR> (PDU is given <ctrl-Z/ESC>)
-------------------------------------------
# Parameter Write Command
<length> :Length og PDU
<pdu>:The PDU begins with the service-center address (according to GSM04.11), followed by the TPDU according to GSM03.40 in hexadecimal format
<mr> : Message Reference
-------------------------------------------
- Response
If sending is successful : +CMGS: <mr>
If sending is not successful : +CMS ERROR: <err>
***********************************************
6. AT+CMGW
Write an SMS to the SMS memory
* Test Command : AT+CMGW=?
- Response : OK
* Write Command If PDU mode (+CMGF=0) : AT+CMGW=<length>[,<stat>]<CR> (PDU is given <ctrl-Z/ESC>)
-------------------------------------------
# Parameter Write Command
<length> Length of PDU
<stat>
0 "REC UNREAD" : received unread messages (default)
1 "REC READ" : received read messages
2 "STO UNSENT" : stored unsent messages
3 "STO SENT" : stored sent messages
4 "ALL" : all messages
<pdu>:The PDU begins with the service-center address (according to GSM04.11), followed by the TPDU according to GSM03.40 in hexadecimal format
<index> Index of message in the selected memory <mem 1>
-------------------------------------------
- Response
If writing is successful : +CMGW: <index>
If writing is not successful : +CMS ERROR: <err>
***********************************************
7. AT+CHUP
Terminate call
* Test Command : AT+CHUP=?
- Response : OK
* Write Command : AT+CHUP
- Response : OK/ERROR
:: Description :
All active calls and all calls on hold are terminated
***********************************************
8. AT+CMGF
SMS Format
* Test Command : AT+CMGF=?
- Response : +CMGF:(list of supported <mode>s)
-------------------------------------------
# Parameter Response Test Command
<mode> 0: PDU mode
-------------------------------------------
* Read Command : AT+CMGF?
- Response : OK/ERROR
-------------------------------------------
# Parameter Response Read Command
<mode> 0: PDU mode
-------------------------------------------
* Write Command : AT+CMGF=[<mode>]
-------------------------------------------
# Parameter Write Command
<mode> 0: PDU mode
-------------------------------------------
- Response : OK/ERROR
***********************************************
9. AT+CSCA
Address of the SMS service center
* Test Command : AT+CSCA=?
- Response : OK
* Read Command : AT+CSCA?
- Response : +CSCA:<sca>,<tosca>
-------------------------------------------
# Parameter Response Read Command
<sca> : Service-center address in string format
<tosca> : Service-center address format
-------------------------------------------
* Write Command : AT+SCCA=<sca>[,<tosca>]
-------------------------------------------
# Parameter Write Command
<sca> : Service-center address in string format
<tosca> : Service-center address format
-------------------------------------------
- Response : OK/ERROR
***********************************************
10. AT+CSCS
Select TE character set
* Test Command : AT+CSCS=?
- Response : +CSCS: (list of supported <chset>s) OK
* Read Command : AT+CSCS?
- Response : +CSCS:<chset> OK/ERROR/+CME ERROR
-------------------------------------------
# Parameter Response Read Command
<chset> String; determines which TE characters set is used
-------------------------------------------
* Write Command : AT+CSCS=[<chset>]
- Response : OK/ERROR/+CME ERROR
***********************************************
11. AT+CMEE
Expanded error messages according to GSM 07.07
* Test Command : AT+CMEE=?
- Response : +CMEE: (list of supported <>s)
-------------------------------------------
# Parameter Response Test Command
<n>
0 : Suppressed the expanded error format
1 : Expanded error messages as number
2 : Expanded error messages as text
-------------------------------------------
* Read Command : AT+CMEE?
- Response : +CMEE: <n>
-------------------------------------------
# Parameter Response Read Command
<n>
0 : Suppressed the expanded error format
1 : Expanded error messages as number
2 : Expanded error messages as text
-------------------------------------------
* Write Command : AT+CMEE=<n>
-------------------------------------------
# Parameter Write Command
<n>
0 : Suppressed the expanded error format
1 : Expanded error messages as number
2 : Expanded error messages as text
-------------------------------------------
- Response : OK/ERROR/+CME ERROR
***********************************************
12. AT+CSQ
Output Signal Quality
* Test Command : AT+CSQ=?
- Response : +CSQ:(list of supported <rssi>s), list of supported <ber>)OK/ERROR/+CME ERROR
-------------------------------------------
# Parameter Response Test Command
<rssi> Reception level:
0 - 113 dBm or less
1 - 111 dBm
2-30 -109 to -53 dBm
31 - 51 dBm or more
99 Unknown
<ber> Bit error rate:
0-7 Like RXQUAL values from Table GSM 05.08 in Section 8.2.4
99 Unknown
-------------------------------------------
* Execute Command : AT+CSQ
- Response : +CSQ: <rssi>, <ber> OK/ERROR/+CME ERROR
-------------------------------------------
# Parameter Response Execute Command
<rssi> Reception level:
0 - 113 dBm or less
1 - 111 dBm
2-30 -109 to -53 dBm
31 - 51 dBm or more
99 Unknown
<ber> Bit error rate:
0-7 Like RXQUAL values from Table GSM 05.08 in Section 8.2.4
99 Unknown
-------------------------------------------
***********************************************
13. AT+CSMS
Selection of message service
* Test Command : AT+CSMS=?
- Response : +CSMS:(list of supported <service>s)
-------------------------------------------
# Parameter Response Test Command
<service>
0 : GSM 3.40 and 3.41
1 : GSM 3.40 and 3.41 and compatibility of the AT command syntax for phase 2+
NOTE : Deactivating the phase 2+ compatibility is only possible if the direct output of short messages +CNMI=1,2 or +CNMI=1,3 is not activated. If necessary, the latter should bedeactivated first.
-------------------------------------------
* Read Command : AT+CSMS?
- Response : OK/ERROR
:: Description :
All active calls and all calls on hold are terminated
* Write Command : AT+CSMS=<service>
-------------------------------------------
# Parameter Write Command
<service>
0 : GSM 3.40 and 3.41
-------------------------------------------
- Response : +CSMS:<mt>,<mo>,<bm> OK/ERROR/+CMS ERROR
***********************************************
14. AT^SCID
Output card ID
* Test Command : AT^SCID
- Response : OK/ERROR/+CME ERROR
* Write Command : AT^SCID
- Response : ^SCID: <cid> OK/ERROR/+CME ERROR
-------------------------------------------
# Parameter Response Write Command
<cid> number of SIM Card
-------------------------------------------
***********************************************