Академический Документы
Профессиональный Документы
Культура Документы
: 4
TITLE: Study of AT Commands.
OBJECTIVES OF THE EXPT.:
THEORY:
INTRODUCTION:
The At Commands are used to control the operation of your
modem. Computers use AT Commands to communicate with Modems.
Most communication applications have a user- friendly interface that
hides AT commands from the user.
They are also called attention codes given to modem. They are
called AT commands because the characters AT must precede each
command to get the AT tension of the modem. AT commands can be
issued only when the modem is in command mode or in online
command mode.
The modem is in command mode whenever it is not connected to
another modem. The modem is in the data mode whenever it is
connected to another modem and ready to exchange data. Online
command is a temporary state in which you can issue commands to the
modem while connected to another modem.
DEFINITIONS
The word Mobile Station (MS) or Mobile Equipment
(ME) are used for mobile terminals supporting GSM services. A call
from a GSM mobile station to the
PSTN is called a mobile oriented call (MOC) or outgoing
call, and a call from a fixed network to a GSM mobile station is called
amobile terminated call (MTC) or incoming call. In this
document, the word product refers to any FALCOM product
supporting the AT commands interface.
AT Command Syntax
QUESTIONS:
1.
What is the HyperTerminal? Where can one find it?
2.
How to use Microsoft HyperTerminal to send AT commands to a mobile
phones.
3.
Enlist various AT commands related to send, receive, list, delete, and
store SMS.
4.
Enlist various phonebook commands along with functions and their
syntax.
5.
Enlist various supplementary services commands, explain each in brief.
AT COMMANDS
1) General commands
Manufacturer identification +CGMI Description:
This command gives manufacturer identification.
Syntax:
Command Syntax: AT+CGMI
COMMAND
POSSIBLE RESPONSES
AT+CGMI
<MANUFACTURER INFORMATION>
OK
Note: Get manufacturer identification
Note: command invalid
Request model identification +CGMM
Description:
This command is used to get the supported frequency bands. With
multi-band products the response may be a combination of different
bands.
Syntax:
Command Syntax: AT+CGMM
COMMAND
AT+CGMM
OK
POSSIBLE RESPONSES
<MODEL INFORMATION>
POSSIBLE RESPONSES
135790248939
Note: IMEI read from EEPROM
POSSIBLE RESPONSES
<REVISION INFORMATION>
POSSIBLE RESPONSES
Define values:
<Character Set>
GSM......................... GSM default alphabet.
PCCP437..
PC
Character
set
code
page
437.
Ringer
CRSL
Sound
Level
Description:
This Command is used to set/get the sound level of the ringer on
incoming calls. The set command changes the default<volume> value
of the +CRMP command.
Syntax:
Command Syntax: AT + CRSL = <sound level>
Command
POSSIBLE
RESPONSES
AT+CRSL = 0
OK
AT+CRSL = 15
OK
AT+CRSL ?
+CRSL : 15
OK
AT+CRSL = 0
+CRSL : (0-15)
OK
2) Call Control commands
Dial Command D
Description:
The ATD command is used to set a voice, data or fax call. As per
GSM 02.30, the dial command also controls supplementary services.For
a data or a fax call, the application sends the following ASCII string to
the product(the bearer must be previously selected with the +CBST
command)
ATD<nb>where <nb> is the destination phone number. For a voice
call, the application sends the following ASCII string to the product (The
bearer may be selected previously, if not a default bearer is used).
ATD<nb>where<nb> is the destination phone number.Please note
that for an international number, the local international prefix does not
need to be set(usually 00) but does not need to be replaced by the +
character.Note that some countries may have specific numbering rules
for their GSM handset numbering. The response to the ATD command is
one of the following:
Verbose
result
code
Numeric Code
Description
with ATV0 set
if the call succeeds, for voice calls
OK
0
only.
NO ANSWER
NO CARRIER
POSSIBLE RESPONSES
OK
Note: Every
released.
for
outgoing
OK
callNote: Every
released
call,
if
any,
are
call,
if
any,
are
Answer a call A
Description:
When the product receives a call, it sets the RingInd signal and sends
the ASCII RING or +CRING:<type> string to the application (+
CRING if the cellular result code +crc is enabled ). Then it wait for the
application to accept the call with the ATA command.
Syntax:
Command syntax: ATA
COMMAND
ATA
Note: Answer to this incoming call
POSSIBLE RESPONSES
RING
Note: Incoming call
OK
Note: call accepted
ATH
Note: disconnect call
OK
OK Note: call disconnected
POSSIBLE
0146290800;
OK
Note: Redialed last number
voice
call. Command valid
Note:
Description:
This S0 parameter determines and controls the product automatic
answering mode.
Syntax:
Command syntax: ATS0=<value>
COMMAND
ATS0=2
POSSIBLE RESPONSES
OK
P.C.C.O.E.PUNE- 44
Note: Automatic answer after
2 rings ATS0
Note: current value
ATS0=0
Note: No automatic answer
002 OK
Note: always 3 character
padded with zeros
OK Note: Command valid
Description:
This specific command is used to select the speaker and microphone
set.
Syntax:
Command syntax: ATH
COMMAND
RESPONSES
AT+SPEAKER=0
Note: Speaker ONE and micro ONE
AT+SPEAKER ?
OK
Note: Speaker ONE and micro
ONE are active
POSSIBLE
OK
Note: Command valid
+SPEAKER :0
Description :
This command returns phonebook entries for a range of locations from
the current phonebook memory storage selected with + CPBS.
Note: for all phonebook commands (+CPBR, +CPBF, +CPBN, +CPBP,
+CNUM), the TON/NP1 MSB of each number is set to 1 (ex: a TON/NP1
stored as 17 is displayed as 145).
Syntax:
Command syntax: AT+CPBR
COMMAND
AT+CPBR?
POSSIBLE RESPONSES
CPBR: (1-50),20,10
OK
Note: Test command
to 50),
max length for phone number is
20 digits, 10 characters max for
the text
AT+CPBR=12,14
+CPBR:12,112,129,Emergency
+CPBR:13,+331290909,145,Fred
+CPBR:14,0146290808 129,Zazi
OK
Note: Read entries from 12 to 14
12,13,14 with
location number,type(TON/NPI),Text
Note:
Display
location
Dept. of E & TC
(SEM-II, 2012-13)
P.C.C.O.E.PUNE- 44
AT+CPBR=10
OK
Note: Display location 10
3) MESSAGE COMMANDS
Send message +CMGS
Description:
The <address> field is the address of the terminal to which the
message sent. To sent the message, simply type, <ctrl-Z> CHARACTER
(ASCII 26). The text can contain all existing characters except <ctrl-Z>
and <ESC>(ASCII 27). This command can be aborted using the <ESC>
Character when entering text. In PDU mode, only hexadecimal
character are used (0..9,AF).
Syntax:
Command syntax in the text mode:
AT+CMGS=<da> [ ,<toda>]<CR> Text is entered <ctrl-Z/ESC>
Command syntax in the PDU mode:
AT+CMGS=<length> <CR> Text is entered <ctrl-Z/ESC>
COMMAND
POSSIBLE RESPONSE
AT+CMGS=+33146290800<CR>
+CMGS: <mr>
Please call me soon, Fred .<ctrl-Z>
OK
Note: Send a message in text mode
Note:Successful transmission
AT+CMGS=<length><CR><pdu><ctrlZ>
+CMGS: <mr>
Note: Send a message in PDU mode
Note: Successful transmission
Read message +CMGR
Description:
This command allows the application to read stored message. This
message are read from the memory selected by +CPMS command.
Syntax:
Command Syntax: AT+CMGR=<index> Response syntax for text mode:
+CMGR:<stat>,<oa>,
[<alpha>]<scts>[,<tooa>,<fo>,<pid>,<dcs>,<sca>,<tosca>,<lengt
h >] <CR><LF><data>(for SMS-DELIVER only).
+CMGR:<stat>,<da>,[<alpha>][,<tooa>,<fo>,<pid>,<dcs>,
[<vp>],<sca>,<tosca>,<lengt
h>]
<CR><LF><data>(for
SUBMIT only)
Dept. of E & TC
(SEM-II, 2012-13)
SMS-
P.C.C.O.E.PUNE- 44
+CMGR:<stat>,<fo>,<mr>,[<ra>],
[<tora>],<scts>,<dt>,<st>(forSMS-STATUS REPORT only)
Response syntax for PDU mode: +CMGR:<stat>,[<alpha>],<length>
<CR><LF><pdu>
A message read with status REC UNREAD will be updated in memory
with status REC READ
NOTE: The <stat>parameter for SMS status report is always READ
Example :
COMMAND
AT+CMTI:SM,1
Note :New message received
AT+CMGR=1
UNREAD ,0146290800,
POSSIBLE RESPONSES
+CMGR
REC
98/10/01,18:22:11+00,<CR><LF>
ABCdefGHI
OK
Note :Read the message
AT+CMGR=1
+CMGR
:
REC
UNREAD ,0146290800,
98/10/01,18:22:11+00,<CR><LF>
ABCdefGHI
OK
Note :Read the message again Note : Message is read now
AT+CMGR=2
+CMS ERROR : 321
Note : Read at a wrong index
Note: Error: invalid index
AT+CMGF=0;+CMGR=1
+CMGR:2,
<length><CR><LF><pdu>
OK
Note :In PDU mode
Note: Message is stored but unsent ,no
<alpha>
Field
List message +CMGL
Description :
Dept. of E & TC
(SEM-II, 2012-13)
P.C.C.O.E.PUNE- 44
Response syntax for PDU mode:
+CMGL
:<index>,<stat>,[<alpha>],<length><CR><LF><pdu>(for
SMS-DELIVER, SMS SUBMIT and SMS-STATUS-REPORT, may be followed
by other<CR><LF>
+CMGL:<index>.)
COMMAND
AT+CMGL=REC UNREAD
UNREAD,0416290800,
POSSIBLE RESPONSES
+CMGL:
1,
REC
READ
OK
AT+CMGL=STO SENT
OK
Note: List stored and sent message Note: No message found
in text mode
AT+CMGL=1
+CMGL: 1,1,26
<CR><LF>
0791336600300000F3040B91336
6920547F40013001190444412530
400741AA8E5A9C5201
Note: List read messages in PDU mode
OK
Defined values
<stat> possible values (status of message in memory):
Text mode
Possible values
PDU mode
possible values
REC UNREAD
REC READ
STO UNSENT
STO SENT
ALL
0
1
2
3
4
Dept. of E & TC
(SEM-II, 2012-13)
Status of messages
in memory
received
unread
messages
received read messages
stored unsent messages
stored sent messages
all messages
P.C.C.O.E.PUNE- 44
Send messages +CMGS
Description:
The < address > field is the address of the terminal to which the message is
sent .To send the message,simple type,<ctrl-z> character(ASCII 26).The text
can contain all existing characters except <ctrl> and <ESC> (ASCII 27) . This
command can be aborted using the <ESC> character when entering text. In
PDU mode, only hexadecimal characters are used (09,A,..F).
Syntax:
Command syntax in text mode: AT+CMGS=<da> [,<toda>]<CR> Text is
entered<ctrl-Z/ESC>
Command syntax in PDU mode: AT+CMGS=<lenght> < CR> PDU is
entered<ctrl-Z/ESC>
COMMAND
AT+CMGS=33146290800<CR>
Please call me soon,Fred.<ctrl-Z>
Note:Send message in text mode
POSSIBLE RESPONSE
+CMGS:<mr>
OK
Note: Successful transmission
AT+CMGS=<ienght><CR><pdu><ctrl-Z> +CMGS:<mr>
Note: Send message in PDU mode
Note: Successful transmission
Write Message to Memory+CMGW Description :
This command stores a message in memory (either SMS-SUBMIT or SMSDELIVER). The memory location <index> is returned (no choice possible as
with phonebooks +CPBW).Text or PDU is entered as describe for the message
sent +CMGS command.
Syntax:
Command syntax in text mode : (<index>is returen in both cases)
AT+CMGW=<oa/da>[,<tooa/toda> [,stat]]<CR> Enter text <ctrl-Z/ESC>
Command syntax in PDU mode :
AT+CMGW=<lenght > [,stat]]<CR> Enter PDU <ctrl-Z/ESC>
Response syntax: +CMGW:<index> or +CMS ERROR :<err> if writing fails
COMMAND
AT+CMGW=33146290800<CR>
hello how are you?<ctrl-Z>
Note:write a message in text mode
POSSIBLE RESPONSE
+CMGW:4
OK
Note: message stored
index 4
AT+CMGW=<lenght><CR><pdu><ctrl-Z> +CMGW:4
OK
Note: message
Note: write message in PDU mode
<index>
Dept. of E & TC
(SEM-II, 2012-13)
stored
in
in
P.C.C.O.E.PUNE- 44
Write Message to Storage+CMGW
Description :
This command is send a message stored at location value <index>
Syntax :
Command syntax :AT+CMSS=<index>[,<da>[,<toda>]]
Response syntax:+CMSS:<mr>or +CMS error :<err>if sending fails
If a new recipicent address <da>is given, it will be used instead of the
one stored with message
COMMAND
RESPONSE
AT+CMGW=0660123456<CR>
POSSIBLE
+CMGW:5
Today is my birthday
NOTE:
stored
with index 5
OK
Note
AT+cmss=5,0680654321
OK
Note:send the message 5 to different
:Successful
transmission
Destination number
AT+CMSS:<mr>
:Message
Note
POSSIBLE
AT+CMGR=3
+CMGR:REC
UNREAD,0146290800,
98/10/1,:19:20+00<CTRL><LF>
Message Received!
Note :Read it
message
received from
0146290800
01/10/1998 at 18H19m
20s
Note:
on
AT+CMGD=3
Note :Delete it
deleted
OK
Note
AT+CMGD=1,0
Note:This message from
the preferred
OK
Dept. of E & TC
(SEM-II, 2012-13)
unread
the
:Message
P.C.C.O.E.PUNE- 44
message storage at the
location 1 is
deleted AT+CMGD=1,1 OK
Note:All
messages from the preferred
message
are
deleted
AT+CMGD=1,2
READ
storage
OK
Note:All
READ
originate messeg
d
es
OK
Mobile
originate messeg
d
es
are deleted
UNSENT
deleted .
AT+CMGD=1,4
are
All messegesare
deleted.
4) Supplementary Services commands
Call waiting+CCWA
Description:
This command allows control of the call waiting supplementary
service.The product
Will send a+CCWA unsolicited result code when the call waiting service
is enabled.
Syntax :
Command syntax : AT+CCWA=< n >,[< mode > [,< class > ]]
Response syntax : (for < mode >=2 and command successful )+CCWA:
< status >[,< class > [< CR > < LF>+CCWA: < status >,<class2>[..]]
Unsolicited result : +CCWA : < nunber>,< type>,< class >[,< alpha >]
( when waiting service is enabled )
COMMAND
POSSIBLE RESPONSES
AT+CCWA=1,1,1
OK
Note:Enable call waiting for voice calls Note: command valid
AT+CCWA=1,2
+CCWA:1,1
OK
Note : Interrogate call waiting
Note: Call waiting active for voice
calls
Dept. of E & TC
(SEM-II, 2012-13)
P.C.C.O.E.PUNE- 44
List current calls + CLCC
Description:
This command is used to return a list of current calls.
Syntax :
Command syntax : AT+CLCC
Response syntax : OK if no calls are available
+CLCC : <id1>,<dir>,<start>,<mode>,<mpty>
[<alpha>]][<CR><LF>
+
number>,< type>
[<alpha>]][..]]]
CLCC
[,<
number>,<
type>
<id1>,<dir>,<start>,<mode>,<mpty>
[,<
PROCEDURE:
command.
Dept. of E & TC
(SEM-II, 2012-13)