Professional Documents
Culture Documents
CONFIRMATION
This is to confirm that the Project titled “SMART SMS SERVICES”
under going by the below mentioned students of B.Tech in Electronics & communication
Engineering from BHIMAVARAM INSTITUTE OF ENGINEERING & TECHNOLOGY,
They are doing this project under the guidance of “UNIQUE EMBEDDED
TECHNOLOGIES”, Hyderabad.
HOD, ECE
BVRM Page 1
ACKNOWLEDGEMENT
We express our sincere thanks to Sri A.V.V.Satyanarayana Secretary and
correspondent of the college for making neccesary arrangements for mini project work at
Bhimavaram Institute of Engineering and Technology.
We wish to express our gratitude to Mr.J.Girish,principal of Bhimavaram Institute of
Engineering and Technology,Pennada,Bhimavaram for having given us permission to carry
out the miniproject. We express our sincere thanks to Mr.B.S.Rao,HOD of
ECE,Bhimavaram Institute of Engineering and Technology,for his encoragement and
valuable suggestions through out the miniproject.
We express our sincere thanks and deep sense of gratitude for the inspiring guidence and
kind encouragement with unfailing support rendered by P.Anusha,Asst Prof.Dept of
ECE,Bhimavaram Institute of engineering and Technology.
We are also thankful to the staff of our ECE Department for their valuable
support,comments during the course of the miniproject and to all others who have directly or
indirectly contribute to the success of the miniproject .We owe our sincere thanks to our
parents with out whose encouragement our achievement is not possible.
We owe our gratitude to our Bhimavaram Institute of Engineering and Technology
for providing an opportunity to do our project.
T.SARAN KUMAR(07AP1A0455)
B.VENKATESH(07AP1A0406)
K.RAMACHANDRA RAO(07AP1A0436)
K.DEVI PRIYANKA(07AP1A0409)
BVRM Page 2
CONTENTS
1) ABSTRACT
2) INTRODUCTION
4) LCD INTERFACING
5) LIST OF PROGRAMS
6) CONCLUSION
7) BIBLOGRAPHY
BVRM Page 3
ABSTRACT
In doing our miniproject “SMART SMS SERVICES” used GSM technique. The
main parts of the miniproject are 8051 microcontroller,GSM module,Max-232,keyboard and
LCD display.The main objective of this miniproject is to perform operations like “Send
messages,Read messages and delete messages” in our message box.
The 8051 microcontroller is heart of the circuit. This miniproject works on the 8051
micro controller.The main function of the 8051 micro controller is it controls the over all
functions of the circuit.It is a 40 pin DIP package.It has 4 ports namely
port0,port1,port2,port3.
The other main module of the miniproject is GSM.GSM stands for Global System
for Mobile Communication.GSM module is a communication device.It requires 5V DC
power supply.Max-232 used for communicate our GSM module and 8051 controller.In this
project we are using EmbededC using Keil software.By using the Flash Magic software the
EmbededC programs are dumped into microcontroller 8051.
By using this miniproject we can perform operations like “Send messages,Read
messages and delete messages” in our message box.These are the features of our project.Our
future advancement is to attending calls and in security alerts.These are the future
advacements
BVRM Page 4
LIST OF FIGURES:
BVRM Page 5
INTRODUCTION
History of GSM
Kingdom, but also in France and Germany. Each country developed its own
system, which was incompatible with everyone else's in equipment and operation.
This was an undesirable situation, because not only was the mobile equipment
increasingly unimportant, but there was also a very limited market for each type of
realized.
The Europeans realized this early on, and in 1982 the Conference of
European Posts and Telegraphs (CEPT) formed a study group called the Groupe
Spécial Mobile (GSM) to study and develop a pan-European public land mobile
system.
BVRM Page 6
Support for international roaming
Spectral efficiency
ISDN compatibility
standardized in Europe, GSM is not only a European standard. Over 200 GSM
around the world. In the beginning of 1994, there were 1.3 million subscribers
worldwide, which had grown to more than 55 million by October 1997.With North
America making a delayed entry into the GSM field with a derivative of GSM
called PCS1900, GSM systems exist on every continent, and the acronym GSM
The developers of GSM chose an unproven (at the time) digital system, as
opposed to the then-standard analog cellular systems like AMPS in the United
States and TACS in the United Kingdom. They had faith that advancements in
compression algorithms and digital signal processors would allow the fulfillment
of the original criteria and the continual improvement of the system in terms of
quality and cost. The over 8000 pages of GSM recommendations try to allow
BVRM Page 7
system. This is done by providing functional and interface descriptions for each of
Global System for Mobile Communications (GSM) and Code Division Multiple
Version and T-Mobile use one or the other. Understanding the difference between
GSM and CDMA will allow you to choose a carrier that uses the preferable
United States, has been the dominant network standard for North America and
parts of Asia. However, GSM networks continue to make inroads in the United
States, as CDMA networks make progress in other parts of the world. There are
camps on both sides that firmly believe either GSM or CDMA architecture is
superior to the other. That said, to the non-invested consumer who simply wants
helpful.
BVRM Page 8
Data Transfer Speed: With the advent of cellular phones doing double and triple
duty as streaming video devices, broadcast receivers and email devices, speed is
important to those who use the phone for more than making calls. CDMA has been
leapfrog along this path. Both boast "3G" standards, or 3rd generation technologies
Subscriber Identity Module (SIM) cards: In the United States only GSM phones
use SIM cards. The removable SIM card allows phones to be instantly activated,
interchanged, swapped out and upgraded, all without carrier intervention. The SIM
itself is tied to the network, rather than the actual phone. Phones that are card-
enabled can be used with any GSM carrier. The CDMA equivalent, a R-UIM card,
is only available in parts of Asia but remains on the horizon for the U.S. market.
CDMA carriers in the U.S. require proprietary handsets that are linked to one
carrier only and are not card-enabled To upgrade a CDMA phone, the carrier must
deactivate the old phone then activate the new one. The old phone becomes useless
Roaming: For the most part, both networks have fairly concentrated coverage in
major cities and along major highways. GSM carriers, however, have roaming
contracts with other GSM carriers, allowing wider coverage of more rural areas,
networks may not cover rural areas as well as GSM carriers, and though they may
contract with GSM cells for roaming in more rural areas, the charge to the
carrier can offer international roaming, as GSM networks dominate the world
market. If you travel to other countries you can even use your GSM cell phone
BVRM Page 9
abroad, providing it is a quad-band phone (850/900/1800/1900 MHz). By
purchasing a SIM card with minutes and a local number in the country you are
visiting, you can make calls against the card to save yourself international roaming
charges from your carrier back home. CDMA phones that are not card-enabled do
not have this capability. According CDG.org, CDMA networks support over 270
billion. As CDMA phones become R-UIM enabled and roaming contracts between
The chief GSM carriers in the United States are Cingular Wireless, recently
merged with AT&T Wireless, and T-Mobile USA. Major CDMA carriers are
Sprint PCS, Version and Virgin Mobile. There are also several smaller cellular
messages can be sent to a cell phone via another cell phone, a computer connected
to the Internet, a regular land line, or a handheld device such as a Blackberry. The
SMS messages may be sent either from one point to another point, or may be sent
to all devices within a specific geographical region. The former, known as SMS-
PP, is used primarily between individuals communicating with one another, while
BVRM Page 10
the latter, known as SMS-CB, may be used to broadcast public announcements
less than 20 billion SMS messages were sent; by 2004 that number had grown to in
excess of 500 billion messages. The largest market for SMS is Southeast Asia,
with Europe just behind. The United States has seemed to be a slow adopter for the
early years of the 21st century, but the pace of texting appears to be increasing in
the United States as service providers make its use, particularly between networks,
easier.
With this surge in popularity and use, particularly among younger users, new
This shorthand mirrors in many way the writing style of online chat, dropping
vowels and superfluous letters, and replacing words and entire sounds with
“how r U?” to mean, “How are you?” or, “did u c wut he asd me 2 do? 4 shme!” to
mean, “Did you see what he asked me to do? For shame!” Given the limitations of a
smaller keypad, with multiple clicks required for many letters, such shorthand saves
shows have begun accepting text messages for various purposes. Shows which
have a voting system, such as American Idol, have begun integrating SMS voting,
allowing viewers to easily make their choices using only their cell phone. In
BVRM Page 11
Europe, the idea has been pushed even further, with shows that allow viewers to
Some online services, most notably Google, have integrated SMS capability to
allow for the easy retrieval of information through one’s cell phone. By texting a
special number, for example, a cell phone user may receive information ranging
from local weather, to sport scores, to where the nearest bus station is in their
town. In addition to such regional information, services like Google SMS can also
be used to quickly find the definition of a word, to convert one unit of measure to
another, or to answer trivia questions. Using SMS, one can in essence access the
Micro controller is the heart of total system. The micro controller controls
all the devices connected in the diagram. Micro controller sends pulses
to all the devices, which are connected to it.We can program it in any language i.e.,
in assembly or C or C++, depending upon the user. In this flash memory is more
compatible with others. In our design, this controller is compatible and also
reliable one.
BVRM Page 12
Block diagram:
GSM
EEPROM Antenn
a
L293D
Atmel/Phillip
driver Micro Controller LCD
8051 display
GPS
receiver
GSM Network
Provider
BSNL/AirTel/Hutc
BVRM Page 13
h
GSM ANTENNA:
The above figure shows the GSM SMART SMS MODULE block
1. Micro controller
2. GSM Modem
3. LCD Module
4. PC Keyboard
RAM (SFR registers included) can satisfy the basic needs, but is not really
astounding. 3.4 ports totaling 32 I/O lines are usually sufficient. Obviously, 8051
controlling devices and instruments. This is one part of its key to success, meant
BVRM Page 14
for the average user also. The other clue can be found in the organization of RAM,
Central Processor Unit (CPU), and ports - all of which maximally utilize the
available resources and allow further upgrades. Pins On The Case: 1-8: Port 1;
Each of these pins can be used as either input or output according to your needs.
Also, pins 1 and 2 (P1.0 and P1.1) have special functions associated with Timer.
9: Reset Signal; high logical state on this input halts the MCU and clears all the
registers. Bringing this pin back to logical state zero starts the program new as if
the power had just been turned on. In another words, positive voltage impulse on
this pin resets the MCU. Depending on the device's purpose and environs, this pin
reset circuit (covered in the previous chapter). The image shows one simple circuit
for safe reset upon starting the controller. It is utilized in situations when
smal voltage. 10-17: Port 3; as with Port 1, each of these pins can be used as
BVRM Page 15
an alternative function: Pin 10: RXD - serial input for asynchronous
synchronous communication Pin 12: INT0 - input for interrupt 0 Pin 13: INT1 -
input for interrupt 1 Pin 14: T0 - clock input of counter 0 Pin 15: T1 - clock input
of counter 1 Pin 16: WR - signal for writing to external (add-on) RAM memory
Pin 17: RD - signal for reading from external RAM memory. 18-19: X2 and
X1; Input and output of internal oscillator. Quartz crystal controlling the frequency
(see the image) are not critical and are normally about 30pF. Instead of a quartz
crystal, miniature ceramic resonators can be used for dictating the pace. In that
20: GND; Ground 21- 28: Port 2; if external memory is not present, pins of Port 2 act
higher address byte, i.e. addresses A8 - A15. It is important to note that in cases when
not all the 8 bits are used for addressing the memory (i.e. memory is smaller than
64kB), the rest of the unused bits are not available as input/output. 29: PSEN; MCU
activates this bit (brings to low state) upon each reading of byte (instruction) from
program memory. If external ROM is used for storing the program, PSEN is directly
connected to its control pins. of the external memory, MCU sends the lower byte of
the address register (addresses A0 - A7) to port P0 and activates the output ALE.
External register (74HCT373 or 74HCT375 circuits are common), memorizes the state
of port P0 upon receiving a signal from ALE pin, and uses it as part of the address for
memory chip. During the second part of the mechanical MCU cycle, signal on ALE is
BVRM Page 16
off, and port P0 is used as Data Bus. In this way, by adding only one cheap integrated
circuit, data from port can be multiplexed and the port simultaneously used for
transferring both addresses and data. 31: EA; Bringing this pin to the logical state zero
(mass) designates the ports P2 and P3 for transferring addresses regardless of the
presence of the internal memory. This means that even if there is a program loaded in
the MCU it will not be executed, but the one from the external ROM will be used
instead. Conversely, bringing the pin to the high logical state causes the controller to
use both memories, first the internal, and then the external (if present). 32-39: Port 0;
memory is not used. If external memory is used, P0 behaves as address output (A0 -
A7) when ALE pin is at high logical level, or as data output (Data Bus) when ALE pin
is at low logical level. 40: VCC; Power +5V Input - Output (I/O) Ports Every MCU
from 8051 families has 4 I/O ports of 8 bits each. This provides the user with 32 I/O
lines for connecting MCU to the environs. Unlike the case with other controllers, there
is no specific SFR register for designating pins as input or output. Instead, the port
itself is in charge: 0=output, 1=input. If particular pin on the case is needed as output,
the appropriate bit of I/O port should be cleared. This will generate 0V on the
specified controller pin. Similarly, if particular pin on the case is needed as input, the
appropriate bit of I/O port should be set. This will designate the pin as input,
generating +5V as a side effect (as with every TTL input). Port 0: Port 0 has two-fold
role: if external memory is used, it contains the lower address byte (addresses A0-A7);
otherwise all bits of the port are either input or output. Another feature of this port
comes to play when it has been designated as output. Unlike other ports, Port 0 lacks
the "pull up" resistor (resistor with +5V on one end). This seemingly insignificant
change has the following consequences: When designated as input, pin of Port 0 acts
as high impedance offering the infinite input resistance with no "inner" voltage. When
BVRM Page 17
designated as output, pin acts as "open drain". Clearing a port bit grounds the
appropriate pin on the case (0V). Setting a port bit makes the pin act as high
impedance. Therefore, to get positive logic (5V) at output, external "pull up" resistor
needs to be added for connecting the pin to the positive pole. Therefore, to get one
(5V) on the output, external "pull up" resistor needs to be added for connecting the pin
to the positive pole. Port 1: This is "true" I/O port, dual function characteristic is
observed for Port1. Having the "pull up" resistor, Port 1 is fully compatible with TTL
circuits. Port 2: When using external memory, this port contains the higher address
byte (addresses A8-A15), similar to Port 0. Otherwise, it can be used as universal I/O
port. Port 3: Beside its role as universal I/O port, each pin of Port 3 has an alternate
function. In order to use one of these functions, the pin in question has to be
designated as input, i.e. the appropriate bit of register P3 needs to be set. From a
hardware standpoint, Port 3 is similar to Port 0. As can be seen from the individual
descriptions of the ports, they all share highly similar structure. However, you need to
consider which task should be assigned to which port. For example: if utilizing port as
output with high level (5V), avoid using Port 0, as its pins cannot produce high logical
level without an additional resistor connected to +5V. If using other port to a same
end, bear in mind that built-in resistors have relatively high values, producing the
During the runtime, micro controller uses two different types of memory: one
for holding the program being executed (ROM memory), and the other for temporary
storage of data and auxiliary variables (RAM memory). Depending on the particular
model from 8051 family, this is usually few kilobytes of ROM and 128/256 bytes of
RAM. This amount is built-in and is sufficient for common tasks performed
BVRM Page 18
"independently" by the MCU. However, 8051 can address up to 64KB of external
memory. These can be separate memory blocks, (separate RAM chip and ROM chip)
memory: First models from 8051 family lacked the internal program memory, but it
could be added externally in a form of a separate chip. This Mucus can be recognized
by their mark, which begins with 803 (e.g. 8031 or 8032). New models have built-in
ROM, although there are substantial variations. With some models internal memory
cannot be programmed directly by the user. Instead, the user needs to precede the
for large series. Fortunately, there are MCU models ideal for experimentation and
programmed directly by the user. These come in a ceramic case with an opening
book deals with one of the latter models that can be programmed via simple
programmer, even if the chip has already been mounted to the designated device.
RAM memory: As previously stated, RAM is used for storing temporary data and
auxiliary results generated during the runtime. Apart from that, RAM comprises a
number of registers: hardware counters and timers, I/O ports, buffer for serial
connection, etc. With older versions, RAM spanned 256 locations, while new
models feature additional 128 registers. First 256 memory locations form the basis
of RAM (addresses 0 - Fifth) of every 8051 MCU. Locations that are available to
the user span addresses from 0 to 7Fh, i.e. first 128 registers, and this part of RAM
is split into several blocks as can be seen in the below image. First block comprises
4 "banks" of 8 registers each, marked as R0 - R7. To address these, the parent bank
BVRM Page 19
meaning that every belonging bit has its own address (0 to 7Fh). Since the block
comprises 16 of these registers, there is a total of 128 addressable bits. (Bit 0 of byte
20h has bit address 0, while bit 7 of byte 2Fh has bit address 7Fh). Third is the group
RAM, latest 8051 models were added an extra memory block of 128 locations. But it
is not all that simple... The problem lies in the fact that the electronics, which
addresses RAM, employs 1 byte (8 bits), reaching only the first 256 locations.
Therefore, a little trick had to be applied in order to keep the existing 8-bit architecture
for the sake of compatibility with older models. The idea is to make the additional
memory block share the addresses with the existent locations intended for SFR
registers (80h - Fifth). For distinguishing these two physically separate memory areas,
Different methods of addressing are used: if SFR registers are in question, direct
addressing is used; for extra RAM locations, indirect addressing is used. Memory
Expanding: In case the built-in amount of memory (either RAM or ROM) is not
sufficient for your needs, there is always an option of adding two external 64KB
memory chips. When added, they are addressed and accessed via I/O ports P2 and P3.
very simple, because if properly connected most of the job is carried out
automatically by MCU. 8051 MCU has two separate read signals, RD# (P3.7) and
PSEN#. The first one is active when reading byte from the external data memory
(RAM), and the second one is active when reading byte from the external program
memory (ROM). Both signals are active on low logical level. The following image
BVRM Page 20
shows a typical scheme for such expansion using separate chips for RAM and
Memory can be also mapped as a single block, functioning as both data memory and
architecture. To be able to read the same block using RD# or PSEN#, these two
signals were combined via logical AND. In this way, output of AND circuit is low if
any of the two inputs is low. Using the Harvard architecture effectively Doubles MCU
BVRM Page 21
memory, but that's not the only advantage offered by the method. Keeping the
program code separated from the data makes the controller more reliable since there is
SFR registers can be seen as a sort of control panel for managing and monitoring the
micro controller. Every register and each of the belonging bits has its name, specified
address in RAM and strictly defined role. Although there are 128 available memory
slots for allocating SFR registers, the basic core shared by 8051 Mucus has 22
registers. The rest has been left open intentionally to allow future upgrades while
retaining the compatibility with earlier models. This fact makes possible to use
that is interfaced with the 8051.The protocol for the display is as shown.
The display contains two internal byte-wide registers, one for commands (RS=0)
and the second for characters to be displayed (RS=1). It also contains a user-
programmed RAM area (the character RAM) that can be programmed to generate any
desired character that can be formed using a dot matrix. To distinguish between these
two data areas, the hex command byte 80 will be used to signify that the display RAM
address 00h will be chosen Port1 is used to furnish the command or data type, and
listed. LCD bit 7 is monitored for logic high (busy) to ensure the display is
currently being used in medical diagnostic systems to run a very similar program.
BVRM Page 22
1 2 3 15 16
Liquid Crystal Display
Gn +5 Vd
A K
d v d
4 5 6 7 8 9 10 11 12 13 14
D0
R/ 0D
RS En D1 D2
w 6 D3 D4 D5 D6 D7
0
RS R/W D7 D6 D5 D4 D3 D2 D1 D0 Function
BVRM Page 23
0 1 BF Current address BF=1/0:busy/Notbusy
1 0 Character type Write byte to last RAM chosen
1 1 Character type Read byte from last RAM chosen
Serial communication:
used. Serial, is a very common protocol for device communication that is standard on
almost every PC. Most computers include RS-232 based serial ports. Serial is also a
serial communication, the data is sent one bit at a time where as in parallel
communication; the data is sent a byte or more at time. Serial communication uses a
single data line where as the parallel communication uses 8 bit data line, this makes
serial communication not only inexpensive but also makes it possible for two
The synchronous method transfers a block of data at a time while the asynchronous
transfers a single byte at a time. The 8051 has a in built UART (Universal
and (3) Ground. Since serial is asynchronous, the port is able to transmit data on one
line while receiving data on another. Other lines are available for handshaking, but are
not required. The important characteristics are Data Transfer Rate, Start and Stop bits,
Data bits and Parity bits. For two ports to communicate, these parameters must match.
second). Another widely used terminology for bps is baud rate. However the baud rate
and bps are not necessarily equal. Baud rate is defined as the number of signal changes
per second. In modems, there are occasions when a single change of signal transfers
several bits of data As far as conductor wire is considered bps and baud rate is the
same.
Data Formating:
each character is placed in between start and stop bits. This is called framing .In data
framing for asynchronous communications, the data, such as ASCII characters, are
packed in between a start bit 1(high). Since the data is clocked across the lines and
each device has its own clock, it is possible for the two devices to come out slightly
out of synchronous. Therefore, the stop bits not only indicate the end of transmission
but also give the computers some room for error in clock speeds .The more the stop
bits the greater the lenience in synchronizing the different clocks, but slower the data
transmission rate.
Parity Bits:
In order to maintain data integrity, parity bit of the character byte is included in the
data frame .The parity bit is odd or even .In the case of an odd parity bit the
number of data bits, including the parity bits has an odd number of 1’s.Similarly,
in an even parity bit system the total number of bits, including the parity bits has
BVRM Page 25
an even number of 1’s.UART chips allow programming of the parity bit for odd-,
RS232 STANDARD:
Manufacturers, an interfacing standard called RS232 was set by the Electronics and
Industries Association in 1960.Today, RS232 is the most widely used serial I/O
line driver such as MAX232chip to convert RS232 voltage levels to TTL levels and
vice versa. One advantage of the MAX 232 chip is that it uses +5V power source,
Scan Codes :
The diagram below shows the Scan Code assigned to the individual keys. The Scan
code is shown on the bottom of the key. E.g. The Scan Code for ESC is 76. All the
BVRM Page 26
As you can see, the scan code assignments are quite random. In many cases the easiest
would be to use a look up table. Below is the scan code for the extended keyboard &
Numeric keypad.
Features;
Requires Only Two I/O Pins. One of them must be an External Interrupt Pin
BVRM Page 27
No Extra Hardware Required
Scan Codes;
The AT keyboard has a scan code associated with each key. When a key is pressed,
this code is transmitted. If a key is held down for a while, it starts repeating. The
repeat rate is typically 10 per second. When a key is released, a “break” code ($F0) is
transmitted followed by the key scan code. For most of the keys, the scan code is one
byte. Some keys like the Home, Insert and Delete keys have an extended scan code,
from two to five bytes. The first byte is always $E0. This is also true for the “break”
sequence, e.g. E0 F0 xx… AT keyboards are capable of handling three sets of scan
codes, where set 2 is default. This example will only use set 2.
The Software
The code supplied with this application note is a simple keyboard to RS-232 interface.
The scan codes received from the keyboard are translated into appropriate ASCII
characters and transmitted by the UART. The source code is written in C, and is easily
The algorithm
BVRM Page 28
Keyboard reception is handled by the interrupt function INT0_interrupt. The reception
will operate independent of the rest of the program. The algorithm is quite simple:
Store the value of the data line at the leading edge of the clock pulse. This is easily
handled if the clock line is connected to the INT0 or INT1 pin. The interrupt function
will be executed at every edge of the clock cycle, and data will be stored at the falling
edge. After all bits are received, the data can be decoded. This is done by calling the
decode function. For character keys, this function will store an ASCII character in a
buffer. It will take into account if the shift key is held down when a key is pressed.
Other keys like function keys, navigation keys (arrow keys, page up/down keys etc.)
and modifier keys like Ctrl and Alt are ignored. The mapping from scan codes to
ASCII characters are handled with table look-ups, one table for shifted characters and
Global system for mobile communication (GSM) is a globally accepted standard for
operating at 900 MHz. It is estimated that many countries outside of Europe will join
Description:
communications system, which has rapidly gained acceptance and market share
BVRM Page 29
including ISDN compatibility and worldwide roaming in other GSM networks. The
advanced services and architecture of GSM have made it a model for future third-
generation cellular systems, such as UMTS. This paper will give an overview of the
services offered by GSM, the system architecture, the radio transmission structure, and
GSM Modems
A GSM modem can be an external modem device, such as the Wavecom FASTRACK
Modem. Insert a GSM SIM card into this modem, and connect the modem to an
A GSM modem can be a PC Card installed in a notebook computer, such as the Nokia
Card Phone.
A GSM modem could also be a standard GSM mobile phone with the appropriate
cable and software driver to connect to a serial port on your computer. Phones such as
the Nokia 7110 with a DLR-3 cable, or various Ericsson phones, are often used for
this purpose.
mobile phone. This is because of some compatibility issues that can exist with mobile
phones. For example, if you wish to be able to receive inbound MMS messages with
your gateway, and you are using a mobile phone as your modem, you must utilize a
mobile phone that does not support WAP push or MMS. This is because the mobile
phone automatically processes these messages, without forwarding them via the
modem interface. Similarly some mobile phones will not allow you to correctly
receive SMS text messages longer than 160 bytes (known as “concatenated SMS” or
“long SMS”). This is because these long messages are actually sent as separate SMS
BVRM Page 30
messages, and the phone attempts to reassemble the message before forwarding via the
modem interface. (We’ve observed this latter problem utilizing the Ericsson R380,
while it does not appear to be a problem with many other Ericsson models.)
When you install your GSM modem, or connect your GSM mobile phone to the
computer, be sure to install the appropriate Windows modem driver from the device
communicate with the device via this driver. An additional benefit of utilizing this
driver is that you can use Windows diagnostics to ensure that the modem is
BVRM Page 31
The Now SMS/MMS gateway can simultaneously support multiple modems,
provided that your computer hardware has the available communications port
resources.
INTRODUCTION :
versatile modem that can be embedded or plugged into any application. The Smart
commands. The modem is fully type-approved and can directly be integrated into your
projects with any or all the features of Voice, Data, Fax, SMS, and Internet etc.
User Manual
Temperature Range:
BVRM Page 32
Installing the modem:
To install the modem, plug the device on to the supplied SMPS Adapter. For
Automotive applications fix the modem permanently using the mounting slots
To insert or Remove the SIM Card, it is necessary to press the SIM holder ejector
button with Sharp edged object like a pen or a needle. With this, the SIM holder comes
out a little, then pulls it out and insert or remove the SIM Card
Make sure that the ejector is pushed out completely before accessing the SIM Card
holder do not remove the SIM card holder by force or tamper it (it may permanently
damage). Place the SIM Card Properly as per the direction of the installation. It is very
important that the SIM is placed in the right direction for its proper working condition
AT commands features:
BVRM Page 33
Line settings:
Command line
Commands always start with AT (which means attention) and finish with a
<CR> character.
If command syntax is correct but with some incorrect parameters, the +CME
ERROR: <Err> or +CMS ERROR: <SmsErr> strings are returned with different error
codes.
returned.
BVRM Page 34
GSM was designed having interoperability with ISDN in mind, and the
services provided by GSM are a subset of the standard ISDN services. Speech is the
In addition, various data services are supported, with user bit rates up to 9600
bps. Specially equipped GSM terminals can connect with PSTN, ISDN, Packet
Switched and Circuit Switched Public Data Networks, through several possible
3 facsimile service, videotex, and teletex. Other GSM services include a cell broadcast
service, where messages such as traffic reports, are broadcast to users in particular
cells.
A service unique to GSM, the Short Message Service, allows users to send and
Many more supplementary services, including multiparty calls, advice of charge, call
waiting, and calling line identification presentation will be offered in the Phase 2
specifications.
Mobile Station:
BVRM Page 35
The mobile station (MS) consists of the mobile equipment (the terminal) and a
smart card called the Subscriber Identity Module (SIM). The SIM provides personal
mobility, so that the user can have access to subscribed services irrespective of a
specific terminal. By inserting the SIM card into another GSM terminal, the user is
able to receive calls at that terminal, make calls from that terminal, and receive other
subscribed services.
Equipment Identity (IMEI). The SIM card contains the International Mobile
Subscriber Identity (IMSI) used to identify the subscriber to the system, a secret key
for authentication, and other information. The IMEI and the IMSI are independent,
thereby allowing personal mobility. The SIM card may be protected against
The Base Station Subsystem is composed of two parts, the Base Transceiver
Station (BTS) and the Base Station Controller (BSC). These communicate across the
standardized Abis interface, allowing (as in the rest of the system) operation between
The Base Transceiver Station houses the radio tranceivers that define a cell
and handles the radio-link protocols with the Mobile Station. In a large urban area,
there will potentially be a large number of BTSs deployed, thus the requirements for a
The Base Station Controller manages the radio resources for one or more
BVRM Page 36
below. The BSC is the connection between the mobile station and the Mobile service
Network Subsystem
Switching Center (MSC). It acts like a normal switching node of the PSTN or ISDN,
and additionally provides all the functionality needed to handle a mobile subscriber,
roaming subscriber. These services are provided in conjunction with several functional
entities, which together form the Network Subsystem. The MSC provides the
connection to the fixed networks (such as the PSTN or ISDN). Signalling between
functional entities in the Network Subsystem uses Signalling System Number 7 (SS7),
used for trunk signalling in ISDN and widely used in current public networks.
The Home Location Register (HLR) and Visitor Location Register (VLR),
together with the MSC, provide the call-routing and roaming capabilities of GSM. The
HLR contains all the administrative information of each subscriber registered in the
corresponding GSM network, along with the current location of the mobile. The
location of the mobile is typically in the form of the signalling address of the VLR
associated with the mobile as a distributed database. station. The actual routing
procedure will be described later. There is logically one HLR per GSM network,
information from the HLR, necessary for call control and provision of the subscribed
services, for each mobile currently located in the geographical area controlled by the
VLR. Although each functional entity can be implemented as an independent unit, all
BVRM Page 37
manufacturers of switching equipment to date implement the VLR together with the
MSC, so that the geographical area controlled by the MSC corresponds to that
controlled by the VLR, thus simplifying the signalling required. Note that the MSC
contains no information about particular mobile stations --- this information is stored
The other two registers are used for authentication and security purposes. The
Equipment Identity Register (EIR) is a database that contains a list of all valid mobile
equipment on the network, where each mobile station is identified by its International
protected database that stores a copy of the secret key stored in each subscriber's SIM
Description :
This command allows the application to read stored messages. The messages are read
Syntax :
DELIVER only)
BVRM Page 38
+CMGR : <stat>,<da>,[<alpha>,] [,<toda>,<fo>,<pid>,<dcs>, [<vp>], <sca>,
STATUS-
REPORT only)
A message read with status “REC UNREAD” will be updated in memory with the
BVRM Page 39
Example :
BVRM Page 40
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
Syntax :
BVRM Page 41
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).
Note:
this number is not a storage number - outgoing messages are not stored.
Description :
SMSDELIVERS).
The memory location <index> is returned (no choice possible as with phonebooks
+CPBW).
Text or PDU is entered as described for the Send Message +CMGS command.
Syntax :
BVRM Page 42
Response syntax:
Description :
This command is used to delete one or several messages from preferred message
storage (“BM” SMS CB ‘RAM storage’, “SM” SMSPP storage ‘SIM storage’ or “SR”
Syntax :
BVRM Page 43
Defines values
<index>
(1 1-20) When the preferred message storage is “BM” Integer type values in the range
of location numbers of SIM Message memory when the preferred message storage is
“SM” or “SR”.
<DelFlag>
BVRM Page 44
3 Delete All READ, SENT and UNSENT messages
INTERFACING
#include<reg 51.h>
#include<intrins.h>
// Device Mapping
#define LCD_Port P0
#define LCD_RS P1_5
#define LCD_RW P1_6
#define LCD_EN P1_7
#define LCD_BP P0_7 // LCD Busy Pin
BVRM Page 45
// Functions Prototype Declaration
// To Clear LCD
void ClrLCD()
{
LCD_Cmd(0x01);
}
// Displaying String
void lprintf(char *str,unsigned char ln,unsigned char col)
{
static int li;
unsigned char line;
if(li==0)
{
li=1;
LCD_Init();
}
switch(ln)
{
case 1:
line = 0x80;
break;
case 2:
line = 0xc0;
break;
case 3:
line = 0x94;
break;
case 4:
line = 0xD4;
break;
}
LCD_Cmd(line+col);
BVRM Page 46
while(*str)
{
LCD_Data(*str);
str++;
}
}
//LCD Initilization
void LCD_Init()
{
LCD_Cmd(0x30);
LCD_Cmd(0x30);
LCD_Cmd(0x30);
LCD_Cmd(0x38);
LCD_Cmd(0x06);
LCD_Cmd(0x01);
LCD_Cmd(0x0c);
}
// LCD Command Run
void LCD_Cmd(unsigned char cmd)
{
LCD_Busy();
LCD_Port=cmd;
P1_2=0;
_nop_();
P1_2=1;
LCD_RS=0;
LCD_ RW=0;
LCD_EN=1;
_nop_();
_nop_();
LCD_EN=0;
}
//LCD Data Out Function
void LCD_Data(unsigned char dt)
{
LCD_Busy();
LCD_Port=dt;
P1_2=0;
_nop_();
P1_2=1;
LCD_RS=1;
LCD_RW=0;
LCD_EN=1;
_nop_();
_nop_();
LCD_EN=0;
}
BVRM Page 47
void LCD_Busy()
{
Delay(1);
}
// Delay Function
void Delay(int n)
{
while(n)
{
Delay_10ms();
n--;
}
}
void Delay_10ms()
{
int i;
for(i=0; i<1825; i++);
}
// Serial Configuration
void SConfig()
{
TMOD=0x20;
TH1=0xFD;
TL1=0xFD;
SCON=0x50;
TR1=1;
}
BVRM Page 48
}
INTERFACING WITH PC KEYBOARD
#include <c51.h>
// Device Mapping
#define KB_DATA P3_4
//Global Variable Declaration
xdata unsigned char dt _at_ 00;
unsigned char kbit;
unsigned char ByteC=0;
xdata unsigned char mbit _at_ 20;
unsigned char bcount=0;
unsigned char fkey=0;
unsigned char fCaps=0;
unsigned char dtbak;
BVRM Page 49
}
BVRM Page 50
//---------------------------------------------------------------------------------------------
// This function Display the Hex Scancode recived from the AT-Keyboard
//---------------------------------------------------------------------------------------------
//0 1 2 3 4 5 6 7 8 9 a b c d e f
' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ','~',' ',
' ',' ',' ',' ',' ','Q','1',' ',' ',' ','Z','S','A','W','2',' ',
' ',' ','"',' ','[','+',' ',' ',' ',' ',0x0d,']',' ','/',' ',' ',
' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',
' ',' ',' ',' ',' ',' ',0x1b,' ',' ',' ',' ',' ',' ',' ',' ',' ',
' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',
' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',
' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',
' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',
' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',
' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',
' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',
' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',
' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',
};
BVRM Page 51
xdata unsigned char scode2[]={
//0 1 2 3 4 5 6 7 8 9 a b c d e f
' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ','~',' ',
' ',' ',' ',' ',' ','q','1',' ',' ',' ','z','s','a','w','2',' ',
' ',' ','"',' ','[','+',' ',' ',' ',' ',0x0D,']',' ','/',' ',' ',
' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',
' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',
' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',
' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',
' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',
' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',
' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',
' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',
' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',
' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',
' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',
};
if(fCaps)
return scode1[dt];
else
return scode2[dt];
BVRM Page 52
Code to interface Micro Controller with GSM to
transmit text message
// Main Function
void main()
{
Welcome();
ClrLCD();
while(1)
{
Main_Menu();
}
}
void Welcome()
{
BVRM Page 53
ClrLCD();
lprintf("Bapatla Eng. College",1,0);
lprintf("Bapatla",2,6);
lprintf("GSM SMS Project",3,2);
Delay(200);
}
void Main_Menu()
{
unsigned char ch;
ClrLCD();
lprintf("MAIN MENU",1,0);
lprintf("1. Send Message",2,0);
lprintf("2. Read Message",3,0);
lprintf("3. Delte Message",4,0);
ch=Get_Key(0);
switch(ch)
{
case '1':
Tx_Msg();
break;
case '2':
Rx_Msg();
break;
case '3':
Del_Msg();
break;
}
}
void Tx_Msg()
{
unsigned char msg[50],mno[15];
SConfig();
ClrLCD();
lprintf("Enter Message: ",1,0);
LCD_Cmd(0xc0);
GetStr(msg);
ClrLCD();
lprintf("Enter Mobile No.: ",1,0);
LCD_Cmd(0xc0);
GetStr(mno);
TxMsg(msg,mno);
lprintf("Msg Send..",4,0);
Get_Key(0);
}
BVRM Page 54
ClrLCD();
lprintf("Enter Msg No. : ",1,0);
GetStr(msgno);
RxMsg(msgno);
Get_Key(0);
}
void Del_Msg()
{
unsigned char msgno[5];
SConfig();
ClrLCD();
lprintf("Enter Msg No. : ",1,0);
GetStr(msgno);
DelMsg(msgno);
Get_Key(0);
}
END ;End of the programe
Conclusion
GSM will allow communication anywhere, anytime, and with anyone. The
ideology, which provides The development of GSM is the first step towards a true
BVRM Page 55
but still allows manufacturers and operators freedom, has been widely adopted in the
Together with international roaming, and support for a variety of services such
as telephony, data transfer, fax, Short Message Service, and supplementary services,
GSM comes close to fulfilling the requirements for a personal communication system:
close enough that it is being used as a basis for the next generation of mobile
System (UMTS).
BVRM Page 56
BIBLOGRAPHY
Reference Books:
Websites:
www.atmel.com
www.analogicgroup.com
www.philips.com
www.google.com
www.gsmworld.com
BVRM Page 57
BVRM Page 58
BVRM Page 59
BVRM Page 60