chapter 3 gsm technology - information and library...
TRANSCRIPT
19
Chapter 3
GSM Technology
This chapter presents technical details related to use of GSM-SMS
technology for remote data access and also describes two applications
designed using this technology. The first application is an auto-
responder which is an inquiry response mechanism designed for
educational institutes. The application maintains the database related
to student’s daily attendance, exam results, etc., and allows parents or
other stack holders to remotely access this information 24x7 on their
mobile phones through SMS request. The second application is related
to customize bulk messaging. This application facilitates sending SMS
to number of students at one go with each SMS having distinct
information relevant to each student.
3.1 Review of GSM-SMS technology for remote access
GSM is the most popular standard for mobile phones in the world. Deployed
first in year 1991, GSM system is a second generation (2G) cellular phone
technology. In over twenty years of development, GSM has been continually
evolved to provide platform to deliver broad range of mobile services as per
market demands. Examples of newer version of this standard are GPRS,
Enhanced data rates for GSM evolution (EDGE), 3G, etc. that in addition to
voice telephony supports applications with higher data rates like mobile
internet, video calls and mobile TV. Long-term evolution (LTE), marketed as
4G LTE, is now at the door step and claims to increase capacity and speed of
mobile communication network drastically.
GSM technology provides one possible solution for remote access for
embedded system. It being an off-the-shelf technology is ready to use and
20
with time as the number of mobile phone users are increasing, its
infrastructure is evolving and its prices are sinking. GSM technology can be
used for data transfer in two different ways – circuit switching data transfer, a
method comparable to voice calls, or packet switching data transfer, one
comparable to internet technology. GPRS service available over GSM
networks is based on packer switching and its use for data transfer is
discussed in the following chapter.
SMS is a text messaging service available on GSM networks. It
provides a mechanism for transmitting short message to and from a wireless
device registered in a GSM network. SMS has its first commercial deployment
in 1993. Voice conversations in GSM network is primarily using circuit
switched approach reserving a physical channel. On the contrary, SMS
makes use of control channel of GSM network that is independent of the voice
channel and allows user to transmit and receive SMS in parallel to voice
conversation. When user is engaged in voice conversation GSM renders
slow associated control channel (SACCH) for the SMS and when voice
conversation is not there GSM renders a standalone dedicated control
channel (SDCCH) for the SMS. In both the scenarios, SMS always uses a
lower power transmission channels. Figure 3.1 depicts basic network
structure for SMS service [5]. Short messaging entity (SME) represents an
entity that may receive or send a SMS. SME may be located in either fixed
network, a mobile station (MS) or another service center. Typical example of
SME can be a mobile handset or a GSM modem. When SME sends out an
SMS, short message service center (SMSC) relay this data to SMS-gateway
mobile switching center (SMS-GMSC). SMS-GMSC accesses the home
location register (HLR) to search the current location of destination number
and send the route information to mobile switching center (MSC). On basis of
this data MSC identifies SMSC to be contacted and relays the message. In
case if SMS source or the end destination is in roaming mode, SMS-
interworking mobile switching center (SMS-IWMSC) will come into picture.
Also visitor location register (VLR) is used to provide information about the
visiting subscribers that may be needed by MSC. SMS makes use of mobile
application part (MAP), that defines methods and mechanism of
21
communication in wireless network and uses SS7 protocol [53]. As per this
protocol the length of the message is limited to 140 octets (140 x 8 bits = 1120
bits). Thus depending on the encoding technique used in GSM device like
GSM 7-bit alphabet (default), 8-bit data alphabet or 16-bit UCS-2 the size of
the text message is limited to 160, 140 or 60 characters respectively.
Contents larger then this are generally sent as multiple concatenated SMS
using the feature of user data header (UDH). In such a case it becomes the
responsibility of the receiving device to reassemble the message.
Figure 3.1: Short message service network architecture.
Designing an embedded system with remote access capabilities using
GSM-SMS technology primarily requires connecting a GSM modem to the
existing system and adding necessary software modules for data
communication to the existing firmware. Here, GSM modem is used as a
generic term that refers to any modem that supports one or more of the
protocols of GSM or related evolutionary technologies like GPRS or 3G. It is a
subscriber identity module (SIM) based device that acts as an interface
between the application and GSM network to send and receive messages like
a mobile phone. They are available from number of manufacturers like
Wavecom, Multitech, Falcom, Simcom, etc. and also with number of
interfacing options like serial, USB or Bluetooth. Various functionalities that
GSM modem is capable of performing can be handled using set of AT
commands as defined in the European telecommunications standards
institute (ETSI) GSM 07.05 and 3GPP TS 27.005 specifications [54]. In
Appendix B some of commonly used AT commands for text messaging using
SIM300 GSM modem from SIMCOM are discussed [55].
GSM-SMS technology provides simple and cost effective solution for
remote data access in embedded system particularly where the intended
22
communication is not continuous and does not require high data rate. Further,
GSM encryption inherently provides data security in SMS transmission and
features like delivery report; automatic retransmission in case of transmission
failure etc. makes it more effective. Further limitation of SMS in terms of
number of characters that can be transmitted is quite admissible in many
remote monitoring and controlling operations. Because of all these benefits
GSM-SMS technology is found to be successfully used for remote data
access in number of embedded applications as discussed in Chapter 2. In the
following sections of this chapter two applications based on GSM-SMS
technology, designed for educational institutes are discussed along with the
experimental results.
3.2 Design of Auto-responder – An inquiry response mechanism
Parents are important stack holders for any educational institute and acts as
an important catalyst in academic growth of a student as well as institute’s
brand building. Most of the educational institutes have parent-institute
interaction cell, which work towards providing regular update to parents about
their wards academic development, regularity and behavioral patterns.
However, it is found that parents, in general, in spite of their willingness, are
not able to be in regular interaction with institute due to number of reasons
like geographical distance, busy schedule, etc. Many institutes maintain their
website and try to keep parents informed about their ward’s performance by
making related data available online or posting the same through e-mail.
Doing this is easy, but in context of Indian society, this does not serve the
purpose much as most of the parents are not comfortable with use of internet
or sometimes even a computer. Many institutes also follow a practice of
regularly sending student’s information to parents by post. However, this
involves lot of physical work, stationary and recurring cost. Further, timely
execution of this practice and its accountability always remains in the
question. On the other hand parents also many a time try to inquire about
their ward’s progress by calling the concerned person at institute. However,
23
effectiveness of this interaction totally depends on the sincerity of the
concerned person in terms of the amount of handy information he/she holds.
Inspired by these considerations, as a part of the present work, a GSM-
SMS based auto-responder has been designed that primarily acts as an
inquiry response mechanism for effective parent-institute interaction. The
designed system maintains the database of student’s details like attendance,
exam results, etc. and allows parents to remotely access this information 24x7
on their mobile phones through a simple SMS request. Parents have to send
a SMS containing enrollment number and branch of the student along with
information request code (e.g. A for attendance, R for result) and the system
will extract the requested information from the database and automatically
convey it back in form of an SMS. Architecture and system software of the
auto-responder are discussed in the following part of this section.
3.2.1 System architecture
The system architecture of the auto-responder as shown in Figure 3.2
consists of mainly the central data server, GSM modem, remote GSM
enabled mobile phone and GSM network. The central data server represents
an ordinary computer server or a workstation that runs an application to
maintain the database of student related details and respond to the local and
remote queries. It is responsible for following functions.
1. To receive, classify and save the data related to attendance,
examination results etc. that is feed to it on daily basis.
2. To extract required information and generate desired reports on basis
of local queries.
3. To automatically respond to the valid request received over GSM link
from the remote user.
4. To log details of all communication done over the GSM network.
GSM modem is used as an interface between the central server and
GSM network. It acts as data terminal equipment that combines traditional
modem and GSM wireless mobile communication system. The modem used
in the design is SIMCOM SIM300 based device that is a tri-band GSM/GPRS
24
engine [56]. It provides a serial TTL (Rx/Tx) interface option and auto-baud
rate support from 1200 bps to 115200 bps. It supports set of AT commands
for configuration and operation. It also supports various short message
services viz. mobile terminated (MT), mobile originated (MO) and cell
broadcast (CB) and also support message formats viz. text and packet data
unit (PDU). The modem also supports SMS transmission alternatively over
circuit switched data (CSD) or packet switch data i.e. GPRS that can be
selected using AT commands. Modem does not support any on-board
memory except the SIM card memory to store SMS. In the design modem via
Max-232 driver is connected to the central server over standard RS-232 serial
interface.
Figure 3.2: System architecture of auto-responder.
3.2.2 System software
System software of auto-responder consists of four major modules as shown
in Figure 3.3. These modules are as follows.
1. Database creation and amendment module
2. Data collection and classification module
3. Data analysis and report generation module
4. GSM communication module.
25
All these four modules are encapsulated in an easy-to-use GUI. Complete
system software including front end GUI has been designed using MATLAB.
Though MATLAB is not tailor made platform for database management and
design of front end interface, it provides effective ways to define data structure
in terms of multi-dimensional matrices. Further it supports ways to handle
serial communication and to design attractive GUI [57]. The system software
modules are discussed in detail as follows and list of MATLAB function
designed is given in Appendix A along with its brief description.
Figure 3.3: System software modules of auto-responder.
Database creation and amendment module
This module allows defining a fresh database structure generally required at
the beginning of an academic term. It also allows editing and amending the
created database as required later on. Creation of the database consists of
two processes. First is defining an empty database structure with required
fields and second is feeding data to the database. On selection of create new
database option from GUI a fresh database structure is created. For example,
for an institute with six branches having two divisions in each branch the
26
database structure defined for attendance module will be as shown in Figure
3.4.
Figure 3.4: Database structure for attendance module: (a) data tables (b)
indexes.
Any database primarily consist of two main structures tables
(commonly referred as arrays in MATLAB) and indexes. Tables are structures
that store data in database and indexes store information related to features
of database that helps to access the data from database easily. As shown in
Figure 3.4, in this database module an individual table with required fields is
created for each branch. The structure of each table (empty) created is
illustrated in Figure 3.5 (a) and (b) for Computer engineering branch. Each
27
table is defined as an array of structures with dimension defined by number of
semesters and number of division. In this case these are eight and two
respectively. Each item in the table is a structure containing fields like Name,
Roll number, Enrollment number and Attendance. In addition to these data
tables two indexes are also created viz. Branch details and Active entity
reference table as shown in Figure 3.4. The index Branch details helps to
relate branch name with data structure table. The index Active entity
reference table is a simple 6 x 8 x 2 (branch x semester x division) dimension
matrix of data type logical that keeps the summary of currently active
semesters and divisions in the data structure. For example, in odd semesters
fields in the table related to odd semesters are only used and hence these are
marked as active. Date table is another index that is used to keep the record
of dates when attendance data are feed to the data base. All these indexes
help to validate of any database query and quickly point to the requested data
in database.
Figure 3.5: (a) Table of CE in database; (b) Empty table fields corresponding
to CE semester 2, division 2; (c) Populated table fields corresponding to CE
semester 2, division 2; First four entries in the fields (d) name and (e)
attendance of CE semester 2, division 2.
28
For populating the database with relevant data update/edit database
option has to be selected from GUI. On selection of this option GUI presents
an interface as shown in Figure 3.6. This interface allows user to load a
Microsoft Excel file containing details of Name, Roll number and Enrollment
number of students with details of semester, branch and division. On
submission of details the software module extracts data from .xls file and
stores it in appropriate fields of the related table. MATLAB supports inbuilt
function xlsread() that allows reading data from a Microsoft Excel file; however
when the Excel sheet consist of data that is mix of numeric and text, use of
this command is not convenient. In this module a unique function csv2struct()
[58] is used that efficiently extracts the data from .csv or .xls file and stores it
as a structure. The database on MATLAB platform after populating data is
shown in Figure 3.5 (c). It represents second division in semester two of CE
having total of 67 students. Figure 3.5(d) exemplifies how required data can
be addressed. In MATLAB, MAT is the default data file format used to save
the data on the system disk. All data tables and indexes are thus stored in this
format.
Figure 3.6: GUI interface for feeding data into database.
29
Data collection and classification module
This module handles day-to-day data entry in the database. For example,
daily cumulative attendance of lectures and laboratories of each division can
be given to the database in form of a Microsoft Excel file. The file is expected
to have a standard format with sequential column head defined as: Name,
Roll number, Enrollment number, Total attended, Total conducted. The
system generates warning or error if the file is not in standard format or if the
details are incomplete. The file can be uploaded to the database using Data
entry option in GUI. This option presents the interface as shown in Figure 3.7.
Attendance of a student is stored in the attendance matrix in terms of two
entries viz. total sessions attended and total sessions conducted till date.
Information of date is stored in the index Date table. Thus every time an Excel
file is submitted two columns are added in attendance matrix and relevant
date is added in Date table. Entries in the attendance table are exemplified in
Figure 3.5(e). Data in attendance matrix is not purposely overwritten but
maintained date wise so that track record of student’s attendance over the
entire semester duration remains available.
Figure 3.7: GUI interface for feeding daily attendance into database.
30
Data Analysis and Report Generation Module
This module helps to respond to database queries generated either from local
interface or from remote user. Local database quires can be submitted using
Report generation option available in GUI. This option presents the interface
as shown in Figure 3.8. Module supports generation of variety of reports like
1. attendance report of whole division till date or for duration between
specific dates
2. attendance of individual student till date or for duration between
specific dates.
Report generated on basis of the query is in form of a Microsoft Excel file that
can be save and/or printed as per the need.
When GSM communication is enable this module also responds to
database quires received through SMS from the remote user. Message
requesting the information should be in a specific format. The prescribed
format is <student’s branch> <student’s enrollment number> <requested
information code>. The requested information code can be A for attendance,
R for result, E for examination schedule etc. for different database that exist.
For example, a valid query for attendance can be a message like - CE
90010056 A. On receiving a valid database query from the GSM
communication module the data is extracted from the database and
information is returned to GMS communication module which in turn
generates an answering SMS.
GSM Communication Module
This module is responsible for receiving and responding to SMS request
received from the remote user over GSM network. The module becomes
active only when the Auto-responder is enabled through Enable Auto-
responder option available in GUI. As discussed above, the request SMS
needs to be in a valid standard format. If the received message is not in
standard format or the details given in it is wrong then an error message is
returned. In case of a valid message database query is forwarded to Data
analysis and report generation module and the information received in return
31
is appropriately framed in a text message and replied to the mobile number
from which the request was received. Various functions performed by this
module are discussed as follows.
Figure 3.8: GUI interface for local database queries.
Initialization of serial port: This is a code for getting access to the serial port of
central data server where GSM modem is connected. In MATLAB serial port
is treated as an object similar to a file [59]. Once the serial port object is
created for selected serial port various object properties are required to be
configured. These includes baud rate, data packet format, size of input and
output buffers, mode of reading serial port (asynchronous or synchronous),
timeout while attempting to read, message termination character etc
Initialization of GSM modem: This code is responsible for configuring GSM
modem using AT commands that are communicated over the serial port.
Detailed list of AT commands is given in Appendix B and some of them used
for initial configuration of GMS mode are given in Table 3.1.
For sending and receiving message modem can be configured in two
possible modes viz. text mode and PDU mode. In PDU mode the message is
framed using a special encoding scheme where as in text mode it is framed
as a plain text. .PDU is generally the default mode in most of the mobile
32
phones and modems as it provides flexibility in terms of encryption, encoding
and data compression [60]. However using PDU mode in embedded
applications requires implementing its compression and decompression
algorithms in application program thus increasing the code footprint on the
controller. Further, in text mode header fields like senders address, message
length, etc. are available in plain text along with the sent message and hence
are relatively easy to handle. In this application GSM modem has been
configured in text mode. Other thing to be configured in modem includes
method for buffering the message and notifying arrival of new message [55].
In this application, the modem is configured such that when a new message is
arrived location of the memory where the message is stored is forwarded by
modem. This information can then be used to read the message from the
memory.
Table 3.1 Principal AT commands for GSM modem initialization.
AT commands Operation
AT check successful connection between PC and GSM modem
AT+CPIN detect valid SIM card
AT+CREG check network registration of GSM modem
AT+CMGF set preferred message format, text or PDU
AT+CNMI select procedure for message reception from the network
In the initialization code, the response received for each AT command
sent to modem is verified and in case of failure user is intimated on GUI
through an error message. After modem is initialized serial port object in
MATLAB is configured in an asynchronous mode so that the software is not
required to poll the input buffer but receives an interrupt for any request
received from modem.
Reading serial port and receiving SMS: This is an interrupt call-back function
executed when modem sends an intimation of some new activity. The
execution flow of this code is shown in the flow chart of Figure 3.9. The
function is called primarily due to either arrival of a message or a voice call.
The function continues further if the intimation is due to new message
otherwise leaves the call-back function. As discussed earlier, the modem is
33
configured to send the intimation of arrival of new message by sending the
memory location where the message is stored. The function reads message
from the SIM memory and extracts information like sender’s phone number,
date, time and text message from it. If the details in the message are found to
be valid then the requested information is extracted from the database
through Data analysis and report generation module. For example, in inquiry
related to attendance, on basis of the enrollment number and branch
mentioned in receive message, information like students name, semester,
current attendance and the date when attendance was last updated in the
database are extracted. This information is passed to the next stage that will
send a return message. In case message is not valid or the details in the
message are not correct, it reports received message to be invalid to the next
stage.
Writing serial port and sending SMS: This code segment is responsible for
replying SMS request on basis of the information received from the previous
stage. The information extracted from the database is framed into appropriate
text message and it is sent using AT+CMGS command. Example of a typical
message replied against a query related to attendance will be like “Vamja
Vishal B., Branch:CE, Sem:2, Attd:73.9%, upto:2/06/2010.” In case if the
message received is in the correct format but the content is incorrect then a
reply message is sent informing the user to verify the content.
Deleting the served message from SIM memory and updating log file: As
modem does not support additional memory, received messages are stored in
SIM memory. If the SIM memory becomes full then new messages cannot be
received. Thus, received SMS once replied is deleted from SIM memory using
AT+CMGD command. Further, each communication between the central data
server and GSM modem is recorded into a log file. Microsoft Excel file is used
as a log file in which information like requester’s phone number, request date
and time, branch and enrollment of student, requested information code are
noted. If the request has been replied then replied message and date & time
of reply is also registered.
34
Figure 3.9: Execution flow for reading serial port and receiving SMS.
3.2.3 Experimental results and discussion
In this section various operations performed to verify functioning of
attendance module of auto-responder is discussed. For experimentation,
required data was taken from Atmiya Institute of Technology & Science,
Rajkot. As per the needs of the institute auto-responder was initialized with
data of six branches viz. IT, CE, EC, IC, EE and ME with two divisions in each
branch. The database was selectively populated with student’s data being
feed using Microsoft Excel file. Example of such a file is shown in Figure 3.10.
Number of data entries related to student’s attendance was made in database
again in form of Microsoft Excel file. Example of such a file is shown in Figure
3.11. While feeding data, for the purpose of verification, various error
situations were created like feeding incomplete information, feeding
35
information not in proper format, duplicating information, etc. In all such cases
the errors were successfully trapped and required warnings/error messages
were generated.
Figure 3.10: Microsoft Excel file of populating student’s data in database.
Figure 3.11: Microsoft Excel file of updating student’s attendance in database.
Report generation and analysis module of auto-responder was
functionally verified through local database queries. Various types of reports
as discussed in section above were generated. System generates reports in
form of Microsoft Excel file. Two such reports are illustrated in Figure 3.12.
36
(a)
(b)
Figure 3.12: Report of attendance of (a) whole division till date (b) individual
student between dates.
Operation of GSM communication module of auto-responder that
serves remote request was tested in two stages. First using specially
designed test bench for offline testing and second through hours of online
operation. Test bench was primarily a MATLAB code that generates various
text messages acting as a GSM module. For all such test vectors response of
auto-responder was verified. This was very much useful in debugging the
code. In the second stage the system was tested online for total of around 20
Hrs. With an aim to test system under different GSM network traffic conditions
the system was kept online in time slots of 1Hr to 4 Hrs durations on different
days of the week and at different time. Statistics of system response to SMS
37
request either intentionally sent or received naturally are discussed below in
Table 3.2.
Table 3.2
Statistics related to auto-responder’s response during online testing.
1 GSM service providers whose SIM were used in testing
a) Vodafone
b) BSNL
55%
45%
2 Percentage distribution of SMS request received
a) Correct SMS
quires related to initialized data fields
quires related to uninitialized data fields
b) SMS with incorrect information
incorrect enrollment number
incorrect branch code
c) Irrelevant messages
incorrect format
incomplete message text
marketing SMS
72%
12%
16%
3 System response to SMS request
a) Correct SMS
b) SMS with incorrect information
c) Irrelevant messages
100%
100%
0%
4 Approximate average time in responding to SMS < 15 sec.
5 Failure in deleting SMS after responding 0%
6 Failure in recording data in log file 0%
7 Effect of voice calls received during operation
(voice calls were not responded)
No effect
8 Effect on operation at different time or days Not
significant
9 Effect of using different GSM services Not
significant
Important observations made during the experimental stage are as
follows
1. Working with GSM modem configured in text mode is more convenient
compared to that in PDU mode as decoding and encoding of
messages can be easy handled using string operations. Further, as the
data to be communicated in the application is relatively of limited size
38
and not confidential additional compression and decompression is not
needed.
2. When a message is read from the SIM, the details forwarded depends
on whether the message is from number stored in SIM contact list or
from unknown number. If a message is received from the number
whose details are stored in SIM then the message will typically have
following format (that includes the details of contact).
+CMGR: "REC UNREAD","+919925209452","A A Vyas", "10/09/19,
11:48:46+22”
CE 90001112 A
However, if a message is received from an unknown number then
messages will not have details of contact other than its number and
would typically look like
+CMGR: "REC READ","+919879522686","10/09/01,11:26:21+22"
IT 90000020 A.
This requires careful decoding while extracting details like phone
number, date and time and message text. Response of SIM when the
message is read may also change with SIM from different GSM service
providers.
3. In the current design provision is not made to respond SMS received
when auto-responder is not online, e.g. instances when the data is
being updated in the database or reports are generated for local use.
However, this can be easily handled by modifying a code such that
every time GSM modem is enabled, list of unread SMS is first read
from the SIM (using AT+CMGL command) and request of all valid SMS
is catered.
4. As modem does not support any memory for storing SMS, all received
SMS are stored in SIM memory which is limited. In case SIM memory
is full the messages are not received. Thus, it is also necessary that
when GSM modem is enabled for the first time there should be room in
SIM memory for receiving messages. As the designed system follows
39
the practice of deleting messages once responded problem of memory
in run time would not occur.
3.3 Design of customized bulk SMS system
Bulk SMS, also known as bulk messaging, is a mobile messaging service that
allows sending high volume of SMS to mobile phone terminals. It is mainly
used by media companies, small and big enterprises, banks, etc. for variety of
purposes like entertainment, marketing, alerts, reminders, information, etc. It
is a very convenient way of sending large number of SMS quickly and
efficiently. Bulk SMS can be both standardized as well as customized.
Standardized messages will have same message text sent to all recipient
numbers where as customized messages will have recipient specific details in
each message sent. Generally the service of bulk SMS is provided by
registered telemarketers and they are in good numbers in the market today.
Bulk SMS services provided by these service providers follows regulations
laid by Telecom Regulatory Authority of India (TRAI). In order to curb
unsolicited commercial communication through bulk SMS service TRAI has
enforced National Do Not Call register (now renamed as National Customer
Preference Register) popularly known as DND service [61]. As per this bulk
SMS service has been divided into two categories namely transactional
messages and promotional messages. Transactional messaging covers
messages related to services delivered to valid customer in areas of banking,
insurance, airlines, railways, educational institutes, and government
authorities. Messages other then this purpose are considered as promotional
messages. Promotional messages are not be delivered to DND activated
numbers whereas this is not the case for transactional messages. Further,
transactional messages can be delivered 24 x 7, whereas promotional
messages have to be delivered only in specific time slot of the day. For any
organization who wants to use bulk SMS service under transactional message
category has to register itself and has to enter into an agreement with access
provider. It is also required for the organization to deposit security deposit as
a part of the agreement and there are strict penalties for the defaulters [62].
40
For an educational institute bulk SMS service can prove to be very
efficient approach to reach to students and particularly parents in number of
instances. For example, communicating internal examination results to
parents, communicating overall attendance of students periodically, notifying
student’s absence to parents on daily basis, important announcements to
students etc. However, as discussed above, for using bulk SMS service
institute will have to register itself, sign an agreement and pay security
deposit. Further, in an educational institute the quantum of SMS to be done
on daily basis is generally limited. This is relatively larger only at the time of
examination results or monthly updates to parents. Generally, bulk SMS
services that are available in the market starts with a minimum package of
10,000 SMS and offers limited period validity and thus many a times does not
fit into the needs of an institute. This is especially true for institutes or
academic organizations that have limited students mass. In contrast to this,
most of the GSM service providers offer cheap schemes for SMS allowing
reasonably good number of free SMS per day. This motivates the need of
one’s own bulk SMS system that can be tailored as per one’s need.
Inspired by these considerations a customized bulk SMS system has
been designed as a part of the present work. It is an easy to use GUI based
application designed in MATLAB that allows sending customized bulk SMS.
Application runs on a personal computer connected to a GSM modem via
serial port. Details of GSM modem has been discussed in Section 3.2. Design
of system software is discussed as follows. List of MATLAB function designed
for the application is given in Appendix C along with brief description.
3.3.1 System software
GUI designed for bulk SMS system is shown in Figure 3.13. Various fields
provided in the GUI are discussed as follows.
File: This field allows the user to upload Microsoft Excel file that contain
student’s details to be sent. Screenshot of one such file is shown in Figure
3.14. It is a file of internal examination result containing student’s details like
name, number of subjects in which passed, failed or absent, percentage
marks scored and phone number.
41
Message: This field is to enter the text message to be sent. Example of typical
message to be sent can be: “Mid-Sem Exam Result of #C1#: Pass in #C2#
subjects, Fail in #C3# subjects, Absent in #C4#. Percentage Scored #C5#”.
#Ci#s in above message are markers that define where the student related
data has to be inserted. Every time the message is framed these are
substituted by student’s detail present in the ith column of Excel file uploaded.
For example, first text message framed after extracting the details form Excel
file given in Figure 3.10 will be “Mid-Sem Exam Result of PADALIYA GOLDI
DAMJIBHAI: Pass in 2 subjects, Fail in 3 subjects, Absent in 1. Percentage
Scored 30.”
Column of phone number: This field allows user to specify the column in Excel
file that contains phone number on which the SMS is to be sent. For the Excel
file given in Figure 3.10 detail to be filled in this filed will be C6.
System Comments: After filling details in each field of GUI when the process
of sending SMS is started (pressing send SMS button) current status/progress
of execution is indicate to user in this field through system generated
comments.
Figure 3.13: GUI interface for bulk SMS system.
42
Figure 3.14: Screenshot of Microsoft Excel file for bulk SMS.
Figure 3.15 describes the flow of execution when send SMS button is
pressed by the user initiating the process of sending SMS. In the code first the
details entered in various fields of GUI is extracted and verified. In case of
irrelevant or incomplete information (e.g. blank fields) an error message is
displayed in system comments field of GUI and execution is terminated. If all
fields are found with valid details then the code first initializes serial port of
computer followed by initialization of GSM modem. Procedure of initializing
serial port and GSM mode is same as that discussed in Section 3.2.2 under
GSM communication. If code fails to initialize either serial port or GSM
modem an error message is displayed in system comments field and
execution is terminated. Once GSM modem is initialized the processes of
sending SMS is initiated. Each row in an Excel file represents student specific
data that is extracted and a text message is framed. This message is sent on
mobile number mentioned in the Excel file. Time required in completing send
process depends on number of factors like network signal strength, network
traffic, correctness of recipient number, etc. Application waits for send
acknowledgement for fixed time before proceeding to next message. The
process is repeated for each row in the Excel file. Details of each message
are logged in log file. Log file is primarily an Excel file that records recipient’s
mobile number, message text, date, time and special remarks if message
could not be sent.
43
Figure 3.15: Execution flow for transmitting bulk SMS.
3.3.2 Experimental results and discussion
Functioning of customized bulk SMS system has been verified through
number of operations. All the attempts to send SMS with correct data feed as
per the format were 100% successful. Number of operations with intentional
44
errors was performed to identify if the error is properly trapped and required
warning is generated. The system was capable of trapping following errors.
1. Empty fields in GUI.
2. File type other then Microsoft Excel (.xls) file specified in GUI.
3. Microsoft Excel file not in proper format or with bank entries.
4. Number of columns specified in message and/or column number
specified in phone number filed of GUI do not match with the data
present in linked Microsoft Excel file.
5. Unable to initialize serial port.
6. Modem if not responding e.g. power not turned on.
7. SIM not responding e.g. PIN not enabled or SIM not properly inserted.
8. Problem in network registration due to weak network signal.
9. After successful initialization of modem, if modem stops responding
later on.
10. Modem taking more time in sending the SMS.
Designed system has been practically used number of times at Darshan
Institute of Engineering & Technology, Rajkot for sending SMS of student’s
mid-semester examination results to their parents. Before this was used the
result were sent by post. This used to involved lots of man hours as well as
expenses towards stationary and postages. Around 10% of post used to
return undelivered due to wrong or change in address may be because of un-
updated records or human errors. Further, the mechanism took its own time
and hence the timely response of parents was not achievable. Use of
45
customized bulk SMS system was able to overcome all the mentioned
drawbacks and was also well appreciated by the parents.
Study of log file indicates that average time taken by the system to send a
SMS is less than 10 sec. This also includes time to record details into log file.
Information about messages that could not be sent present in log file helps to
verify the details so that the same can be sent after correction if any. Details
in typical log file have been illustrated in Figure 3.16.
Figure 3.16: Log file in customized bulk SMS system.