You are on page 1of 19

GSM

GSM stands for Global System for Mobile Communications formerly


called as Groupe Spécial Mobile.
This is a standard set developed by the European Telecommunications
Standards Institute (ETSI) to describe technologies for second generation (or
"2G") digital cellular networks.
The GSM standard initially was used originally to describe switched circuit
network for full duplex voice telephony to replace first generation analog
cellular networks
The standard was expanded over time to include first circuit switched data
transport, then packet data transport via GPRS(General packet radio
service). Packet data transmission speeds were later increased via EDGE.
The GSM standard is succeeded by the third generation (or "3G") UMTS
standard developed by the 3GPP. GSM networks will evolve further as they
begin to incorporate fourth generation (or "4G") LTE Advanced standards.
"GSM" is a trademark owned by the GSM Association.

GSM networks operate in a number of different carrier frequency ranges


(separated into GSM frequency ranges for 2G and UMTS frequency bands
for 3G), with most 2G GSM networks operating in the 900 MHz or
1800 MHz bands. Where these bands were already allocated, the 850 MHz
and 1900 MHz bands were used instead (for example in Canada and the
United States). In rare cases the 400 and 450 MHz frequency bands are
assigned in some countries because they were previously used for first-
generation systems.
India GSM 900 5 carriers
GSM 900/1800 3 carriers

Regardless of the frequency selected by an operator, it is divided into


timeslots for individual phones to use. This allows eight full-rate or sixteen
half-rate speech channels per radio frequency. These eight radio timeslots
(or eight burst periods) are grouped into a TDMA frame. Half rate channels
use alternate frames in the same timeslot. The channel data rate for all 8
channels is 270.833 kbit/s, and the frame duration is 4.615 ms.
The transmission power in the handset is limited to a maximum of 2 watts in
GSM850/900 and 1 watt in GSM1800/1900
One of the key features of GSM is the Subscriber Identity Module,
commonly known as a SIM card. The SIM is a detachable smart card
containing the user's subscription information and phone book. This allows
the user to retain his or her information after switching handsets.
Alternatively, the user can also change operators while retaining the handset
simply by changing the SIM. Some operators will block this by allowing the
phone to use only a single SIM, or only a SIM issued by them; this practice
is known as SIM locking.
We are be using SIM300 GSM Module in our Project.
SIM300 is a Tri-band GSM/GPRS engine from SIMCOM Ltd., that
works on frequencies EGSM 900 MHz, DCS 1800 MHz and PCS 1900
MHz. SIM300 features GPRS multi-slot class 10/ class 8 (optional) and
supports the GPRS coding schemes CS-1, CS-2, CS-3 and CS-4.
With a tiny configuration of 40mm x 33mm x 2.85 mm , SIM300 can fit
almost all the space requirement in an application, such as Smart phone,
PDA phone and other mobile device.
The physical interface between SIM300 and the mobile application is
through a 60 pins board-to-board connector, which provides all hardware
interfaces from module to customer’s boards except the RF antenna
interface.

 The keypad and SPI LCD interface will give you the flexibility to
develop customized applications.

 Two serial ports can help you easily develop your applications.
 Two audio channels include two microphones inputs and two
speaker outputs. These audio interfaces can be easily configured
by AT command.

 One ADC input

 Two GPIO ports and SIM card detection port

Both 1.8V and 3.0V SIM Cards are supported. The SIM interface is
powered from an internal regulator in the module having nominal voltage
2.8V. All pins reset as outputs driving low.

Reference circuit of 6PIN SIM card


You can use AT Commands "AT" meaning attention , to communicate with
the SIM card. The SIM interface supports the functionality of the GSM
Phase 1 specification and also supports the functionality of the new GSM
Phase 2+ specification for FAST 64 kbps SIM (intended for use with a SIM
application Tool-kit).
The "AT" or "at" prefix must be set at the beginning of each command
line.
To terminate a command line enter <CR>.
Commands are usually followed by a response that includes
”<CR><LF><response><CR><LF>”.

Testing and General commands for GSM

1. Steps to test the GSM Module

We can use the PC Hyper Terminal to interact with the GSM Module.

 First insert the SIM card to the GSM Module,

 Connect the Serial cable –RS232 to the PC via DB9 pin connector on
the GSM Module.

 Give the power supply. The power supply indicating LED will be ON
continuously.

 Another LED on the Module starts blinking to indicate the availability


of network.

If the network is available then the delay between the blinking is less.

If the network is not available then the delay between the blinking is
more.
 Each GSM modem will have a unique id called IMEI.

 Open Hyper Terminal in the PC , apply the below settings

Connect using  COM1

Bits per second  9600

Data bits  8

Parity  None

Stop bits  1

Flow control  None

 Type AT on HyperTerminal and press ENTER  OK will be display


as a response from the GSM Module.

AT
OK
Below are few more commands and response from the Module

AT+CGMI - To check Manufacturer Identification


FLYFOT M260 MODEM
OK

AT+CGMM
MULTIBAND 900 1800 1900
OK

2. Commands in detail
A . Manufacturer identification +CGMI
Description:
This command gives the manufacturer identification.
Syntax:
Command syntax: AT+CGMI

B. New message indication +CNMI

Description:
This command selects the procedure for message reception from the
network.
Syntax :
Command syntax : AT+CNMI=<mode>,<mt>,<bm>,<ds>,<bfr>
C. Send message +CMGS

Description :
The <address> field is the address of the terminal to which the message is
sent. To send 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 characters are used
(‘0’…’9’,’A’…’F’).
Syntax :
Command syntax in PDU mode :
AT+CMGS= <length> <CR>
PDU is entered <ctrl-Z / ESC >
The message reference, <mr>, which is returned to the application is
allocated by the product. This number begins with 0 and is incremented by
one for each outgoing message (successful and failure cases); it is cyclic on
one byte (0 follows 255).

3. Few Worked Examples

Command to send SMS

AT+CMGS="9845843843"
> HI
+CMGS: 9
OK

at+cpin? // To check network connectivity


+CPIN: READY

AT+COPS?
+COPS: 0,0,"Hutch-Kamataka"
AT&F // To store Factory default
OK

// Use the next 2 commands if we face any problem to send and receive
SMS.
// If we type SMS send command, then error comes.
// If we enable in SMS receive command, then the SMS received will be in
numbers and alphabets format.
AT+CMGF=1
OK
AT+CMGR=1
+CMGR: "REC READ","+919880147756",,"10/03/08,17:48:53+22"
Ok

Command to set in receive mode

AT+CNMI=2,2,0,0,0
OK

+CMT: "+919845843843",,"10/05/12,08:18:40+22" // Total 45


characters
SYSTEM STARTS

AT+CNMI=2,2,0,0,0
OK

+CMT: "+919845843843",,"09/12/25,23:44:42+22"
Hello
List of other SIM 300 AT Commands in Detail

AT+CBC? - To check for Battery Starus <n> +CBC: n,m


0: battery not OK
AT+CBC=? +CBC: (0-3), (0-100)
in charge
OK
1: battery in
AT+CBC +CBC: n,m
charge OK
2: battery full +CME ERROR 3
AT+CBC=1 3: battery low
<m> Note: not support
0: battery
level 0
25: battery
level 1
50: battery
level 2
75: battery
level 3

100: battery
level 4
This
command
AT+CGMI
gives the
manufacturer
identification
.
AT+CGMI FLYFOT MODEM

Note: Get manufacture identification OK


AT+CGMI=? Note: Command valid, FLY
AT+CGMI? OK
+CME ERROR 3
AT+CGMI=1
Note: not support
AT+CPAS This
command
returns the
activity status
of the mobile
equipment.
AT+CPAS <pas> +CPAS: <pas>

Note :Current activity status 0: ready OK


AT+ CPAS? +CME ERROR 3
(allow
AT+ CPAS=?
commands Note: not support
AT+ CPAS=1 from TA/TE)
1:
unavailable
(does not
allow
commands)
2: unknown
3: ringing
(ringer is
active)
4: call in
progress

5: asleep
(low
functionality)
AT+CMGS= <address> <CR> The
<address>
field is the
address of the
terminal to
which the
message is
sent. To send
the message,
simply type,
<ctrl-Z>
AT+CMGS=.28.<CR> +CMGS: <mr>

0031000BA13105119226F40000AD0AA8C3F6 OK

30885E9ED301 <ctrl-Z> Note : Successful transmis


AT+CNMI=<mode>,<mt>,<bm>,<ds>,<bfr> This
command
selects the
procedure for
message
reception
from the
network.
AT+CNMI=2,1,0,0,0 <mode> : OK
controls the
Note : <mt>=1 Note: message received an
processing of
then route the SMS-DELIV
unsolicited
unsolicited result codes: +C
AT+CNMI=2,2,0,0,0 result codes
<index>
Note : <mt>=2
OK
Important
note: only Note: message received, th
SMS-DELIVERS with uns
<mode>=2 is
codes: +CMT: [<alpha>,] <
AT+CNMI=2,0,0,1,0 supported.
Note : <ds>=1 <mt> : sets <LF> <pdu>
OK
the result
Note: SMS-STATUS-REPO
AT+CNMI=2,0,0,0,0 code
using unsolicited code:
Note : <ds>=0
indication +CDS : <length> <CR> <L
OK
at+cnmi? routing for
Note: No SMS-STATUS-R
Note : Read
SMS-
routed.
at+cnmi=? DELIVER +CNMI: 2,2,0,1,0
Will return the previous sta
indications.
<bm> :
+CNMI: (0-3),(0-3),(0-3),(
defines the
rules for
storing the
received
CBMs (Cell
Broadcast
Message)
types.
<ds> for
SMS-
STATUS-
REPORTs.
Default is 0.

<bfr>
Default is 0.
AT+CMGR=<index> This
command
allows the
application to
read stored
messages
AT+CMGR=1 +CMGR: 1,,24

Note : Read the message 0891683108100005F0040D


F900005001429042802304

OK
AT+CMGL=<stat> This <stat> possible values
command
received unread messages(
allows the received read messages(1)
application to stored unsent messages(2)
stored sent messages(3)
read stored
messages, by all messages(4)
indicating the
type of the
message to
read.

Does not
work.
AT+CMGS= <address> <CR> The
<address>
field is the
address of the
terminal to
which the
message is
sent. To send
the message,
simply type,
<ctrl-Z>
AT+CMGS=.28.<CR> +CMGS: <mr>

0031000BA13105119226F40000AD0AA8C3F6 OK

30885E9ED301 <ctrl-Z> Note : Successful transmis

Interfacing the GSM Module with Microcontroller .

A SIM card is inserted to the GSM module. After checking as shown in the
steps above, RS232 cable is directly connected between DB9 of the module
and the DB9 on the controller port. This establishes the serial
communication between them. The GSM commands embedded in the
controller takes care to communicate with the GSM Module via RS232
cable-MAX232-Serial I/O pins of the Controller.

+5V
D B9 SO C KET M ALE uC D B9 SO C KET MALE G SM D B9 S O C K ET F E M A LE
1 1 U 16
6 6 1
2 2 6 1
7 7 2 Tx
3 3 7 2
R x
8
4
8
4
3
8 3
Vcc
GSM
9 9 4
5 5 9 4
5 G N D

C O N 3 C O N 4
C O N 5 G SM

DB9 MALE CONNECTOR GSM MODULE

+5V
C 6 0 .1 u F
1 2

C 7
1
0 .1 u F
16

U 4 M A X232
2

1 2
C 1+ V+
VC C

C 8 6
1

0 .1 u F V-
C 9
1
2

3 0 .1 u F
4 C 1-
C 2+
2

C 12
1

D B9 SO C KET 0 .1 u F
2

1 5
6 C 2-
2 7 10
7 8 T2O U T T 2 IN 9
3 14 R 2 IN R 2O U T 11
T1O U T T 1 IN TXD
8 13 12 R XD
R 1 IN R 1O U T
G N D

4
9
5
15

C O N 2

MAX232

GSM Send SMS Flow Chart


Test GSM Module after inserting SIM as shown
in steps above and connect it to the Controller

Initialize using AT Enter command – Use ASCII


value of ‘Enter’ = 0x0D
Command Format AT+CMGS=”mob num” Enter 
which will transmitted serially to GSM module through
UART0 of the Controller

Send AT+CMGS= String

Send 0x22(ASCII value of “)

Send Mobile number

Send 0x22(ASCII value of “)

Send 0x0D(ASCII value of carriage return)