Professional Documents
Culture Documents
7 GSM
GSM/GPRS module is used to establish communication between a computer and
a GSM-GPRS system. Global System for Mobile communication (GSM) is an architecture
used for mobile communication in most of the countries. Global Packet Radio Service
(GPRS) is an extension of GSM that enables higher data transmission rate. GSM/GPRS module
consists of a GSM/GPRS modem assembled together with power supply circuit and
communication interfaces (like RS-232, USB, etc) for computer. The MODEM is the soul of
such modules.
Fig 5.2
Wireless Modems
The MODEM needs AT commands, for interacting with processor or controller, which
are communicated through serial communication. These commands are sent by the
controller/processor. The MODEM sends back a result after it receives a command. Different AT
commands supported by the MODEM can be sent by the processor/controller/computer to
interact with the GSM and GPRS cellular network.
Mobile Termination is interfaced with the GSM mobile network and is controlled by a
baseband processor. It handles access to SIM, speech encoding and decoding, signaling and other
network related tasks. The Terminal Equipment is an application processor that deals with
handling operations related to keypad, screen, phone memory and other hardware and software
services embedded into the handset.
The Terminal Adapter establishes communication between the Terminal Equipment and
the Mobile Termination using AT commands. The communication with the network in a
GSM/GPRS mobile is carried out by the baseband processor.
.
3.13 AT Commands
AT commands are used to control MODEMs. AT is the abbreviation for Attention. These
commands come from Hayes commands that were used by the Hayes smart modems. The Hayes
commands started with AT to indicate the attention from the MODEM. The dial up and wireless
MODEMs (devices that involve machine to machine communication) need AT commands to
interact with a computer. These include the Hayes command set as a subset, along with other
extended AT commands.
AT commands with a GSM/GPRS MODEM or mobile phone can be used to access
following information and services:
1.
Information and configuration pertaining to mobile device or MODEM and SIM card.
2.
SMS services.
3.
MMS services.
4.
Fax services.
5.
Data and Voice link over mobile network.
The Hayes subset commands are called the basic commands and the commands specific to
a GSM network are called extended AT commands.
There are also unsolicited Result Codes that are returned automatically by the MODEM to
notify the occurrence of an event. For example the reception of a SMS will force MODEM to
return an unsolicited result code.
Case Sensitivity The AT commands are generally used in uppercase letters. However some MODEMs and
mobile phones allow both uppercase and small case letters.
ii.
Single Command The AT commands include a prefix AT which indicates the beginning of the command to
MODEM; and a carriage return which indicates the end of the command.
Command Line Multiple AT commands can be sent to MODEM in a single command line. The
commands in a line are separated by a semi-colon (;).
iv.
String in Command Line Strings in a command line are enclosed in double quotes.
For example: AT+CGML=ALL<Carriage return>
vi.
Sequence of Execution -
In the command line, the command appearing first is executed first. The execution then
follows for second appeared command and so on. The execution of commands in a command
line takes place in sequential manner.
If an error occurs in the execution of a command, an error result code is returned by the
MODEM and the execution of the command line is terminated irrespective of presence of other
commands next in the command line.
Types of commands:
There are four types of AT commands:
1) Test commands
2) Read commands
3) Set commands
4) Execution commands
For more details, see AT Commands.
DESCRIPTION
Successful Execution of a command
Execution of a command failed
Message service failure, is returned with an error code
2)
Read command - used to get mobile phone or MODEM settings for an operation.
SYNTAX:
For example:
AT<command name>?
AT+CBC?
3) Set commands - used to modify mobile phone or MODEM settings for an operation.
SYNTAX:
AT<command name>=value1, value2, ,value N
Some values in set commands can be optional.
For example:
AT+CSCA=+9876543210, 120
4)
SYNTAX:
AT<command name>=parameter1, parameter2, ,parameter N
The read commands are not available to get value of last parameter assigned in execution
commands because parameters of execution commands are not stored.
For example:
AT+CMSS=1,+ 9876543210, 120
2) +CMGF - This command is used to set the SMS mode. Either text or PDU mode can be
selected by assigning 1 or 0 in the command.
SYNTAX:
AT+CMGF=<mode>
0: for PDU mode
1: for text mode
The text mode of SMS is easier to operate but it allows limited features of SMS. The
PDU
(protocol data unit) allows more access to SMS services but the operator requires bit
level knowledge of TPDUs. The headers and body of SMS are accessed in hex format in PDU
mode so it allows availing more features.
For example,
AT+CMGF=1
OK
3) +CMGW - This command is used to store message in the SIM.
SYNTAX:
AT+CMGW= Phone number> Message to be stored Ctrl+z
As one types AT+CMGW and phone number, > sign appears on next line where one can type
the message. Multiple line messages can be typed in this case. This is why the message is
terminated by providing a Ctrl+z combination. As Ctrl+zis pressed, the following information
response is displayed on the screen.
+CMGW: Number on which message has been stored
ATA(Enter)
7) ATH - This command is used to disconnect remote user link with the GSM module.
SYNTAX:
ATH (Enter)
List of AT commands:
The AT commands for both, GSM module and the mobile phone, are listed below. Some of these
commands may not be supported by all the GSM modules available. Also there might be some
commands which wont be supported by some mobile handsets.
Testing :
Command
AT
Description
Checking communication between the
module and computer.
Table 5.2 Testing
Call control :
Command
ATA
ATD
ATH
ATL
ATM
ATO
ATP
ATT
AT+CSTA
AT+CRC
Description
Answer command
Dial command
Hang up call
Monitor speaker loudness
Monitor speaker mode
Go on-line
Set pulse dial as default
Set tone dial as default
Select type of address
Cellular result codes
Table 5.3 Call Control
Description
Identification
Select an S-register
Recall stored profile
Restore factory settings
View active configuration
AT&W
AT&Y
AT+CLCK
AT+COLP
AT+GCAP
AT+GMI
AT+GMM
AT+GMR
AT+GSN
Phone control :
Command
AT+CBC
AT+CGMI
AT+CGMM
AT+CGMR
AT+CGSN
Description
Battery charge
Request manufacturer identification
Request model identification
Request revision identification
Request
product
serial
number
identification
Report mobile equipment error
Phone activity status
Find phone book entries
Read phone book entry
Select phone book memory storage
Write phone book entry
Select TE character set
Signal quality
AT+CMEE
AT+CPAS
AT+CPBF
AT+CPBR
AT+CPBS
AT+CPBW
AT+CSCS
AT+CSQ
Description
Command Echo
Result code suppression
Define response format
ATX
AT&C
AT&D
AT&K
AT&Q
AT&S
AT+ICF
AT+IFC
AT+IPR
Service :
Command
AT+CLIP
AT+CR
AT+DR
AT+ILRR
Description
Calling line identification presentation
Service reporting control
Data compression reporting
DTE-DCE local rate reporting
Table 5.7 Service
Description
Communications standard option
Select bearer service type
Extended error report
Radio link protocol
Data compression
Miscellaneous:
Command
A/
AT?
AT*C
AT*T
AT*V
AT*NOKIATEST
AT+CESP
Description
Re-execute command line
Command help
Start SMS interpreter
Enter SMS block mode protocol
Activate V.25bis mode
Test command
Enter SMS block mode protocol