GSM/GPRS MODULE
GSM/GPRS Module is used to communicate between a computer & a GSM- GPRS SYSTEM. GSM stands for Global System for Mobile Communication. It is an architecture used for mobile communication in world. GPRS stands for Global Packet Radio Service that enables higher data transmission rate. GSM/GPRS Module consists of a GSM/GPRS modem assembled together with power supply circuit & communication interfaces (like RS-232, USB, etc) for computer. The MODEM is the main part of it
TYPES OF MODEMS
Wireless MODEMS
Wireless MODEMs are devices that generate, transmit or decode data from a cellular network, for establishing communication between the cellular network & the computer. These are manufactured for specific cellular network (GSM/UMTS/CDMA or specific cellular data standard (GSM/UMTS/GPRS/EDGE/HSDPA) or technology (GPS/SIM). Wireless MODEMs like other MODEM devices use serial communication to interface with & need compatible AT Commands for communication with the computer (any microprocessor or microcontroller system).
GSM/GPRS MODEM
GSM/GPRS MODEM is a class of wireless MODEM devices that are designed for communication of a computer with the GSM & GPRS network. It requires a SIM (Subscriber Identity Module) card just like we have in mobile phones to activate communication with the network. Also they have IMEI (International Mobile Equipment Identity) number similar to mobile phones for their identification. A GSM/GPRS MODEM can perform the following operations:
1. Receive, send or delete SMS messages in a SIM.
2. Read, add, search phonebook entries of the SIM.
3. Make, Receive, or reject a voice call.
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 & GPRS cellular network.
GSM/GPRS Module
A GSM/GPRS module assembles a GSM/GPRS modem with standard communication interfaces like RS-232 (Serial Port), USB etc., so that it can be easily interfaced with a computer or a microprocessor / microcontroller based system. The power supply circuit is also built in the module that can be activated by using a suitable adaptor.
Applications of GSM/GPRS module
The GSM/GPRS module demonstrates the use of AT commands. They can feature all the functionalities of a mobile phone through computer like making & receiving calls, SMS, MMS etc. These are mainly employed for computer based SMS & MMS services.
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 & 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 & services:
1. Information & configuration pertaining to mobile device or MODEM & SIM card.
2. SMS services.
3. MMS services.
4. Fax services.
5. Data & Voice link over mobile network.
The Hayes subset commands are called the basic commands & the commands specific to a GSM network are called extended AT commands.
Command, Information response and Result Codes:
The AT commands are sent by the computer to the MODEM/ mobile phone. The MODEM sends back an Information Response i.e. the information requested by or pertaining to the action initiated by the AT command. This is followed by a Result Code. The result code tells about the successful execution of that command.
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.
AT commands' syntax
Case Sensitivity -
The AT commands are generally used in uppercase letters. However some MODEMs and mobile phones allow both uppercase & small case letters.
Single Command -
The AT commands include a prefix AT which indicates the beginning of the command to MODEM; & a carriage return which indicates the end of the command.
However string ‘AT’ itself is not the part of the command. For example in ATD, D is the command name not ATD.
The extended AT commands have a ‘+’ in the command name.
For example: AT+CGMI<Carriage return>
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 (;).
For example: AT+CGMI; +CBS<Carriage return>
String in Command Line -
Strings in a command line are enclosed in double quotes.
For example: AT+CGML=”ALL”<Carriage return>
Information Response and Result Code –
The Information Response and Result Codes, returned by the MODEM, have a carriage return and line feed in the beginning as well as at the end.
For example:
<Carriage return><Line feed>OK<Carriage return><Line feed>
<Carriage return><Line feed>ERROR<Carriage return><Line feed>
<Carriage return><Line feed>+CBC: 0, 60<Carriage return><Line feed> etc.
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
Different Result Codes:
RESULT CODE |
Description |
OK |
Successful Execution of command |
ERROR |
Execution Failed |
+CMS ERROR |
Message Service failure ( returned with an error code) |
UNSOLICATED RESULT CODES |
Description |
+CDS |
Notify receipt of SMS status report of new msg to computer |
+CDSI |
Notify receipt of SMS status report of new msg & its location in memory to computer |
+CMT |
Notify forwarding of new sms to computer |
+CMTI |
Notify receipt of SMS Report of new msg & its location in memory to computer |
Interfacing MODEM/Mobile phone with Windows platform
The Windows (XP and lower versions) comes with an application called HyperTerminal for data communication through serial port of the computer. The interfacing of the GSM/GPRS module with the serial port of the computer involves following steps:
1) Connect RS-232 port of GSM module with the serial port of the computer. Insert a SIM card in the module.
2) Open HyperTerminal from Start -> All Programs -> Accessories -> Communications -> HyperTerminal.
3) Enter a name for the connection and press OK.
4) Now select the communication port (COM) at which GSM module is connected.
5) Create a new connection set on HyperTerminal. Set parameters, like baud rate as 9600, handshaking mode as none, parity bit as none, stop bit as 1 and data bit as 8.
AT COMMANDS LISTS
Type |
COMMANDS |
DESCRIPTION |
CALL CONTROL |
ATA |
Answer command |
ATD |
Dial command |
|
ATH |
Hang up call |
|
ATL |
Monitor speaker loudness |
|
ATM |
Monitor speaker mode |
|
ATO |
Go on-line |
|
ATP |
Set pulse dial as default |
|
ATT |
Set tone dial as default |
|
AT+CSTA |
Select type of address |
|
AT+CRC |
Cellular result codes |
|
|
||
Data Card ControL |
ATI |
Identification |
|
ATS |
Select an S-register |
|
ATZ |
Recall stored profile |
|
AT&F |
Restore factory settings |
|
AT&V |
View active configuration |
|
AT&W |
Store parameters in given profile |
|
AT&Y |
Select Set as power up option |
|
AT+CLICK |
Facility lock command |
|
AT+COLP |
Connected line identification presentation |
|
AT+GCAP |
Request complete capabilities list |
|
AT+GMI |
Request manufacturer identification |
|
AT+GMM |
Request model identification |
|
A+GMR |
Request revision identification |
|
AT+GSN |
Request product serial number identification (IMEI) |
|
|
|
Phone Control |
AT+CBC |
Battery charge |
AT+CGMI |
Request manufacturer identification |
|
AT+CGMM |
Request model identification |
|
AT+CGMR |
Request revision identification |
|
AT+CGSN |
Request product serial number identification |
|
AT+CMEE |
Report mobile equipment error |
|
AT+CPAS |
Phone activity status |
|
AT+CPBF |
Find phone book entries |
|
AT+CPBR |
Read phone book entry |
|
AT+CPBS |
Select phone book memory storage |
|
AT+CPBW |
Write phone book entry |
|
AT+CSCS |
Select TE character set |
|
AT+CSQ |
Signal quality |
|
|
|
|
Computer Data Interface |
ATE |
Command Echo |
ATQ |
Result code suppression |
|
ATV |
Define response format |
|
ATX |
Response range selection |
|
AT&C |
Define DCD usage |
|
AT&D |
Define DTR usage |
|
AT&K |
Select flow control |
|
AT&Q |
Define communications mode option |
|
AT&S |
Define DSR option |
|
AT+ICF |
DTE-DCE character framing |
|
AT+IFC |
DTE-DCE Local flow control |
|
AT+IPR |
Fixed DTE rate |
|
|
|
|
Service |
AT+CLIP |
Calling line identification presentation |
AT+CR |
Service reporting control |
|
AT+DR |
Data compression reporting |
|
AT+ILRR |
DTE-DCE local rate reporting |
|
|
|
|
Network Comm. Parameter Miscellaneous |
ATB |
Communications standard option |
AT+CBST |
Select bearer service type |
|
AT+CEER |
Extended error report |
|
AT+CRLP |
Radio link protocol |
|
AT+DS |
Data compression |
|
|
|
|
A/ |
Re-execute command line |
|
AT? |
Command help |
|
AT*C |
Start SMS interpreter |
|
AT*T |
Enter SMS block mode protocol |
|
AT*V |
Activate V.25bis mode |
|
AT*NOKIATEST |
Test command |
|
AT+CESP |
Enter SMS block mode protocol |
|
|
|
|
SMS Text Mode |
AT+CSMS |
Select message service |
AT+CPMS |
Preferred message storage |
|
AT+CMGF |
Message format |
|
AT+CSCA |
Service centre address |
|
AT+CSMP |
Set text mode parameters |
|
AT+CSDH |
Show text mode parameters |
|
AT+CSCB |
Select cell broadcast message types |
|
AT+CSAS |
Save settings |
|
AT+CRES |
Restore settings |
|
AT+CNMI |
New message indications to TE |
|
AT+CMGL |
List messages |
|
AT+CMGR |
Read message |
|
AT+CMGS |
Send message |
|
AT+CMSS |
Send message from storage |
|
AT+CMGW |
Write message to memory |
|
AT+CMGD |
Delete message |
|
|
|
|
SMS PDU Mode |
AT+CMGL |
List Messages |
AT+CMGR |
Read message |
|
AT+CMGS |
Send message |
|
AT+CMGW |
Write message to memory |
Category: