Before we get into what a GSM module is, let us get our fundamentals right and understand what GSM and GPRS are. A GSM module or a GPRS module is a chip or circuit that will be used to establish communication between a mobile device or a computing machine and a GSM or GPRS system.
- What is GSM/GPRS?
- What is GSM Module?
- Modems, Modules and Mobile
- Applications of GSM module
- Points to Consider
- Interface example
What is GSM?
GSM (Global System for Mobile Communications, originally Groupe Spécial Mobile), is a standard developed by the European Telecommunications Standards Institute (ETSI).
It was created to describe the protocols for second-generation (2G) digital cellular networks used by mobile phones and is now the default global standard for mobile communications – with over 90% market share, operating in over 219 countries and territories.
What is GPRS?
General Packet Radio Service (GPRS) is a packet oriented mobile data service on the 2G and 3G cellular communication system’s global system for mobile communications (GSM). GPRS was originally standardised by European Telecommunications Standards Institute (ETSI) in response to the earlier CDPD and i-mode packet-switched cellular technologies. It is now maintained by the 3rd Generation Partnership Project (3GPP).
What is this GSM Module you speak of?
A GSM module or a GPRS module is a chip or circuit that will be used to establish communication between a mobile device or a computing machine and a GSM or GPRS system. The modem (modulator-demodulator) is a critical part here.
These modules consist of a GSM module or GPRS modem powered by a power supply circuit and communication interfaces (like RS-232, USB 2.0, and others) for computer. A GSM modem can be a dedicated modem device with a serial, USB or Bluetooth connection, or it can be a mobile phone that provides GSM modem capabilities.
The difference between modems, modules and mobiles
A GSM module or GPRS modules are similar to modems, but there’s one difference: A GSM/GPRS Modem is an external equipment, whereas the GSM/GPRS module is a module that can be integrated within an equipment. It is an embedded piece of hardware.
A GSM mobile, on the other hand, is a complete system in itself with embedded processors that are dedicated to provide an interface between the user and the mobile network.
Wireless modems generate, transmit or decode data from a cellular network, in order to establish communication.
A GSM/GPRS modem is a class of wireless modem, designed for communication over the GSM and GPRS network. It requires a SIM (Subscriber Identity Module) card just like mobile phones to activate communication with the network. Also, they have IMEI (International Mobile Equipment Identity) number similar to mobile phones for their identification.
- 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.
It’s functions include:
- Read, write and delete SMS messages.
- Send SMS messages.
- Monitor the signal strength.
- Monitor the charging status and charge level of the battery.
- Read, write and search phone book entries.
What is a mobile station?
A mobile phone and Subscriber Identity Module (SIM) together form a mobile station. It is the user equipment that communicates with the mobile network. A mobile phone comprises of Mobile Termination, Terminal Equipment and Terminal Adapter.
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, signalling 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.
Applications of GSM module or 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 and receiving calls, SMS, MMS etc. These are mainly employed for computer-based SMS and MMS services.
GSM Example: Arduino Projects: Sending SMS using GSM
They are known as AT commands because every command line starts with “AT” or “at”. AT commands are instructions used to control a modem. AT is the abbreviation of ATtention.
GSM/GPRS modems and mobile phones support an AT command set that is specific to the GSM technology, which includes SMS-related commands like AT+CMGS (Send SMS message), AT+CMSS (Send SMS message from storage), AT+CMGL (List SMS messages) and AT+CMGR (Read SMS messages).
Note that the starting “AT” is the prefix that informs the modem about the start of a command line. It is not part of the AT command name. For example, D is the actual AT command name in ATD and +CMGS is the actual AT command name in AT+CMGS. However, some books and websites use them interchangeably as the name of an AT command.
Tasks that can be done by AT commands
Here are some of the tasks that can be done using AT commands with a GSM/GPRS modem or mobile phone:
- Get basic information about the mobile phone or GSM/GPRS modem. For example, name of manufacturer (AT+CGMI), model number (AT+CGMM), IMEI number (International Mobile Equipment Identity) (AT+CGSN) and software version (AT+CGMR).
- Get basic information about the subscriber. For example, MSISDN (AT+CNUM) and IMSI number (International Mobile Subscriber Identity) (AT+CIMI).
- Get the current status of the mobile phone or GSM/GPRS modem. For example, mobile phone activity status (AT+CPAS), mobile network registration status (AT+CREG), radio signal strength (AT+CSQ), battery charge level and battery charging status (AT+CBC).
- Establish a data connection or voice connection to a remote modem (ATD, ATA, etc).
- Send and receive fax (ATD, ATA, AT+F*).
- Send (AT+CMGS, AT+CMSS), read (AT+CMGR, AT+CMGL), write (AT+CMGW) or delete (AT+CMGD) SMS messages and obtain notifications of newly received SMS messages (AT+CNMI).
- Read (AT+CPBR), write (AT+CPBW) or search (AT+CPBF) phonebook entries.
- Perform security-related tasks, such as opening or closing facility locks (AT+CLCK), checking whether a facility is locked (AT+CLCK) and changing passwords (AT+CPWD).
(Facility lock examples: SIM lock [a password must be given to the SIM card every time the mobile phone is switched on] and PH-SIM lock [a certain SIM card is associated with the mobile phone. To use other SIM cards with the mobile phone, a password must be entered.])
- Control the presentation of result codes / error messages of AT commands. For example, you can control whether to enable certain error messages (AT+CMEE) and whether error messages should be displayed in numeric format or verbose format (AT+CMEE=1 or AT+CMEE=2).
- Get or change the configurations of the mobile phone or GSM/GPRS modem. For example, change the GSM network (AT+COPS), bearer service type (AT+CBST), radio link protocol parameters (AT+CRLP), SMS center address (AT+CSCA) and storage of SMS messages (AT+CPMS).
- Save and restore configurations of the mobile phone or GSM/GPRS modem. For example, save (AT+CSAS) and restore (AT+CRES) settings related to SMS messaging such as the SMS center address.
Mobile phone manufacturers usually do not implement all AT commands, command parameters and parameter values in their mobile phones. Also, the behaviour of the implemented AT commands may be different from that defined in the standard. In general, GSM/GPRS modems designed for wireless applications have better support of AT commands than ordinary mobile phones.
In addition, some AT commands require the support of mobile network operators. For example, SMS over GPRS can be enabled on some GPRS mobile phones and GPRS modems with the +CGSMS command (command name in text: Select Service for MO SMS Messages). But if the mobile network operator does not support the transmission of SMS over GPRS, you cannot use this feature.
How to interface a mobile phone with the Microsoft 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 GSMmodule or 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.
If you liked this article, you might also like our story on the journey from 1G to 4G.