Applications of Short Message Service and WAP in Operating Remotely Triggered Laboratories

Mobile devices are becoming more powerful, reliable and common every year. Hence we can use mobile devices for conducting laboratory sessions in distance education. This paper discusses issues of integrating Short Message Service (SMS) to operate instruments of hardwarebased remotely triggered laboratories. Components of the system include searching an experiment, performing experiment, result handling, error handling and method of exchanging information. It is designed using the National Instruments (NI) Laboratory Virtual Instrument Engineering Workbench (LabVIEW) development system and web services. The scheme will enable students to conduct hardware experiments with mobile devices using SMS from anywhere and anytime.


I. INTRODUCTION
Distance education is now common in various forms. However conducting real time remote-controlled laboratory experiments (laboratory sessions) in distance learning is still not available. The development of web-based online hardware laboratories for distance learners is vital for higher educational institutions offering courses in engineering and technology especially electrical, electronics, computers and physics. In a conventional laboratory class each student have only a few minutes of actual time operating equipment while remote access to the laboratory equipment provides more time to students to run the experiment and collect data which can significantly improve student learning. Increasing demands for strengthening the learning experience, it is important to have interactive learning sessions. The meaningful use of mobile technology for laboratory sessions not just can motivate learners to be more engaging and active in learning activities, but also can facilitate learners to achieve better performance. With the availability of Internet, innovative ways to expand educational opportunities are now becoming a reality [1][2][3]. As an online laboratory can be accessed and run from any location and at any time, it is expected to be utilized more than a conventional laboratory in the future.
Remote-controlled laboratories have been reported since the internet started to provide reliable data communications. However, most reports in the literature describe the technical implementation of the laboratory rather than detailed evaluation of student learning advantages [4][5][6]. Several implementations, such as Telelabs at the University of Western Australia (UWA) [7,8], MIT i-Lab [9][10][11][12] and NETLab [13][14][15][16][17][18] are in regular operation for large classes of students. However, the technology does not seem to have been widely adopted. Remote laboratories need to be merged into global and in homogeneous elearning platforms for wider applications. Now-a-days, mobile devices have become the most conveniently used portable learning platform for various educational purposes [19][20][21][22]. However, their use in conducting laboratory experiments (online laboratory) is rare.
The learning applications and technologies via mobile devices have a great potential. Some of the advantages of conducting laboratory sessions through mobile learning are: (a) the mobile device (with internet access) cost is lower than the computers (PC) cost; (b) the access to the remote laboratory can be done from anywhere at any time (student need not be at home or in laboratory); (c) learning how to use a mobile phone is easier compared to a computer; and (d) almost every student owns a mobile phone. However, the disadvantages of mobile devices are the small size of the screen, limited keyboard functions, and lower processing capacities which make the development of online laboratories more challenging. Development of a remote laboratory management system (LMS) for internet-based engineering education is necessary. One main goal of an LMS is to manage learning resources in a platform-independent environment while providing remote access to experiment sessions. A generic framework is desirable to allow instructors to integrate remote laboratories into their courses and enable creation, distribution, and exchange of learning materials.
Short Message Service (SMS) is one of the most popular modes of communication service component of the mobile communication systems, using standardized communications protocols that allow the exchange of short text messages between fixed line and mobile devices. Currently, SMS text messaging is the most widely used data application in the world, with an estimated 2.4 billion active users or 74% of all mobile phone subscribers. In this paper, we present a novel scheme for the integration of Short Message Service (SMS) to monitor and remotely control laboratory instruments of a hardware-based online laboratory [13] that has been developed using the National Instruments (NI) Laboratory Virtual Instrument Engineering Workbench (LabVIEW) development system and report the merits and demerits of such a system.

A. The Laboratory
The remotely-controlled online laboratory developed by the IIT Kharagpur NetLAB developer team has the following features. Briefly, the IIT Kharagpur NetLAB is an online Microelectronics and VLSI Engineering Laboratory in which several experimental modules are included. The combination of LabVIEW software and Agilent hardware (4156C) for developing web-based remote semiconductor PAPER APPLICATIONS OF SHORT MESSAGE SERVICE AND WAP IN OPERATION OF REMOTELY TRIGGERED LABORATORIES device characterization laboratory is demonstrated [3]. The NetLAB uses the following components: i. Java server pages and Java servlets as the means to design web pages. ii. The back end consists of Oracle 10g. The Oracle Database (commonly referred to as Oracle RDBMS or simply Oracle) is a relational database management system (RDBMS) produced and marketed by Oracle Corporation. iii. This system uses JDBC connection to build a connection between the java interface and the database. iv. The Sun GlassFish Enterprise Server v2.1 is used as the application server that generates the web pages according to the user inputs. The Sun GlassFish Enterprise Server is a comprehensive support offering for GlassFish, the leading open-source and open community platform for building and deploying nextgeneration applications and services. v. The front end is a computer with a JavaScriptenabled browser such as Internet explorer or Mozilla Firefox. JavaScript is an easy to use client side scripting language which loosely follows the Java syntax but its design principles are derived from the Self programming language.
Currently all the major web browsers (Internet Explorer on Windows, Safari on Mac, Opera, all the Mozilla based browsers) support JavaScript. This assures that the application is OS and browser independent. The system has a special interface that connects to the hardware. These interfaces are built using the web development tool of NI LabVIEW 2009. The devices are connected and controlled by using the interface and their corresponding drivers.
Each user needs to register to get a username and a password as well as a profile stored in the database. The user has to login and select a particular experiment and proceed. Each experiment has the following features: a laboratory manual, description of the experiment, experimental procedure etc. As the system works in a batch mode, it distributes the time in slots and each user has to select and choose a particular time slot for performing the experiment. However, the experiment manuals etc are available all the time. The student logs on to the system to gain access to the laboratory and gains full control of the laboratory hardware. The user can adjust experimental parameters or submit new commands in real time. When the duration of experiment time is over the link is broken with a warning. The user has limited number of chances to book and use the experiment. This is done to optimize the use of the resources. After performing the experiment the user need to upload a laboratory report and has to take part in a viva session for evaluation purposes. Each user can perform the experiment again if not completed in one session

B. The SMS based System Architecture
The SMS based service has a complex architecture containing several components (see Figure 1) which exchange messages between themselves: 1) The SMS Gateway An SMS gateway is a piece of software that is used for sending a text message with or without using a mobile (cell) phone. Specifically, it is a device or service offering SMS transit, transforming messages to mobile network traffic from other media and allowing transmission or receipt of SMS messages with or without the use of a mobile phone. The SMS Gateway is used in two parts of the SMS server application on the SMS server: i. When an SMS is received it is first collected from the SIM Card along with the sender's number and sent to the server application written in JAVA through an web service. ii. When a result arrives then an SMS is sent out.

1) Getting the format of input for experiments
In order to operate the laboratory equipment from remote, the users need first to send a SMS in a particular format. We have not used any language as such but a template which is being sent by the user. This SMS is received in the laboratory server via a gateway connected to a GSM modem. The SMS Server then parses the string according to a predefined pattern. For example, simple syntax that has been used in this study is: where, MVL or TCAD indicates the laboratory code, GETF command asks the server to return a formatted instruction to the user and s1001 or BJTOUTPUT is the experiment number or name, the user wants to perform. Once the SMS server receives this SMS, it checks out the pattern of input for a particular experiment from the database and sends the information back to the user (Figure 2 and 3).
2) Requesting and performing the experiment The user then sends another SMS in this particular format to the SMS server. For example, a SMS may look like: MVL <code>;<password>;<expno>;<start volt-age>;<stop voltage>;<step voltage>;<frequency> When the SMS Server receives this SMS, it parses the string to extract each field into an array of String. Then the request is forwarded to the NetLAB server (see Figure 1). This is done by calling a web service that is running in NetLAB. The parameters are passed to this web service.
The NetLAB web service then performs a series of functions: It checks if all the input parameters for the experiment have been mentioned All the inputs are within the permissible limits (depending on the experiment, setup and permitted measuring conditions necessary for the safety of the equipment).
It checks if the user could be allowed to perform the experiment at that time or not. SMS based users are not required to book time previously. It depends on the status of the instrument, whether it is in use at the current time or not. If the instrument is available then it is given to the request.
After confirmation, the NetLAB server issues a new request to the Instrument server with the input parameters. The request is basically another web service on the Instrument server. The Instrument server/controller perform the measurements with the required setup using LabVIEW programming and GPIB interface.
After the experiment is complete it returns an XML file as the output, to the NetLAB server. The NetLAB server web service determines if the output data is in correct format i.e., whether the output data is readable or not. The XML data is parsed and saved in a text file with a particular system generated file name on the NetLAB server. The name consists of the date, time, user name and experiment name. This ensures the uniqueness of the name of the file. Each output of the experiment performed by SMS is thus saved on the server. After the completion of the writing of file in the NetLAB server, the NetLAB web service re-turns another XML output to the SMS server containing the report of the experiment along with the filename.
The user is sent a notification SMS about the success of the performed experiment and the corresponding file name where the output data has been saved. The user can then check the output file in a PC at any time. We have also developed the necessary tool to generate the graphs (device characteristics in this case) plotted using the data for visual inspection by the student and even for directly importing in the online laboratory report submission [13].
In case any error occurs in the above mentioned steps, an error notification message is sent to the user. Following errors can happen in the system: The user sends the inputs with some parameter missing.
The user sends inputs that are out of range of permissible values.
The instrument(s) in experiment may be engaged at the time.

II. INTEGRATION WITH THE LABORATORY SYSTEM
The SMS service can be easily implemented with the hybrid scheduling system. The SMS based user can book their time slot in the laboratory system or try and see if there is any free slot at the moment. Since more than one user can participate in one time slot, a minimum of one of the users' quota can be made for SMS based users for immediate use. This user quota can be used only if the user is not already booked in the time slot and there is at least one seat empty.
Once a request arrives, the system will: i. check if there is any previous booking ii. If yes, then proceed with the request.
iii. If no, then check whether there is any free user for the current time slot i.e. the number of users booked is less than the maximum allowed. iv. If no, the request is dropped and the user is notified about the failure. v. Otherwise, book the time slot for the user and proceed with the request.

A. Server side implementation
Every laboratory has a list of experiment. Each experiment is identified by a unique id and a name. The names of two experiments may have some common parts. For eg.

• Output Characteristics of a NPN Transistor
The problem is to compile a list of experiment from across a network of different labs that matches a keyword (see Figure 4). The keyword is sent by the user. It can be associated tag with the experiment or be a part of the experiment name itself.
The solution is to implement a web service for all labs in the network that returns a list of available experiments. The list returned must be in XML format so that it can be parsed on any platform. The XML structure can typically be as shown in Figure 5 Each lab server has its own unique address on the network. The SMS Service on the SMS server can search the entire list of experiments from different lab server and compile a list of experiment that matches the keyword. The list contains the experiment id along with experiment name and Lab code. The list is then returns to the user in an SMS and the user then chooses an experiment or performs a new search.
Furthermore, the user may want to be briefed about the experiment they want to perform. Hence another web service is implemented that returns a very brief description of the experiment from each lab server. The SMS server can for this to the user in an SMS. Again this web service returns data in XML format.

B. User end functions
To perform a search operation we introduce two new commands to the SMS Service architecture.
SEARCH: This command can be used to perform a simple search operation. It can be used as SEARCH <experiment_keyword> As earlier the user has to type the characters into an SMS and send them. The result returned is the list of experiment (experiment id, name and laboratory id) with matching names.
DESC: This command can be used to get a brief description of the experiment. It can be used as <lab_id> DESC <experiment_id> Again all the user has to do is to type the characters into an SMS and send them. The result returned is a text containing details of the experiment.
After this the user can perform the experiments as described in previous section.

C. Handling Errors
The errors that can occur during this phase are: No experiment may be available that matches the keyword. In this case a SMS is sent to the user that no experiment could be found.
An experiment may be listed, but may be temporarily unavailable. This must be avoided by continuously updating the status of each experiment in the server database.
A wrong or non-existent id is passed to the DESC command. In this case, an error message must be delivered to the user.

IV. RETURNING THE RESULT
How to return the result of an experiment to the user is one of the fundamental challenges of the system. The results can be of different nature: • Small data sets where the outputs are less i.e. has fewer characters and calculated from a large dataset.

PAPER APPLICATIONS OF SHORT MESSAGE SERVICE AND WAP IN OPERATION OF REMOTELY TRIGGERED LABORATORIES
• Large data sets where the output consists of raw measured data which can consist of hundreds of records.

A. Small data set
In this case, the data can be directly sent back to the user in one or more SMS. Example of this kind of laboratory can be a TCAD laboratory.

B. Large Data Set
A large data usually raw measured data is represented using a graph. The graph has a typical nature pertaining to an experiment. The SMS service uses the JAVA ImageIO package to create an image file (JPEG and PNG format) that depicts the graph. The image is given a unique name and all details (such as axis information) are drawn as string on the image. The image can be downloaded using WAP on the cell phone.
A Wireless Application Protocol (WAP) WAP browser is an open international standard commonly used web browser for small mobile devices such as cell phones.
With the introduction of WAP, mobile service providers have wider opportunities to offer interactive data services. WAP can support Internet and Web applications such as: • Email by mobile phone • Tracking of stock-market prices • Sports results The system uses the data service to provide a link to the image file that the user can download using the WAP services.

C. Case Study for Large Data Set
Let us consider the output characteristics of BJT as one example of how to transform the data to image and display it on the cell phone. Figure 6 shows the output characteristics of a BJT using WAP in Nokia 2630 while Figure 7 shows the interface for web Brower on the PC.
The experiment generates multiple columns of data. The first column always represents the X-axis and the rest different curves for each Y-axis values. The following algorithm is used to transform the data to the image.
Find and store the minimum of the x and y axes into minx and miny1, miny2 and so on.
Transpose all the values in x and y axes by their respective minimum values minx and miny1, miny2 and so on.
Find the smallest exponent from the scientific expression of the x-axis values and store in mulx and similarly find the smallest exponent from the scientific expression of the y-axes values and store in muly.
Divide all x-axis values by 10 raised to mulx and all yaxis values by 10 raised to muly. This step makes sure that all values in the axes are greater than or equal to 1.
Again find the minimum of all x-axis and store in mx and also the minimum of all y-axis and store in my.
Divide the x-axis by mx and then multiply it by the desired image width. Also Divide the y-axis by my and then multiply it by the desired image height.
After this, the remaining values in x and y axis columns are all ranged between the given image width and image height.  The entire algorithm is implemented using JAVA Im-ageIO library in a servlet. Once the image is saved, the users are notified about the name and link of the image. The user can then download the image to their cell phone. This algorithm makes maximum use of the available screen space, since space is small and variable from one cell phone to another. However to do this, the x-axis and y-axis may not have the same scale. But since the nature of the graph is most important factor and also the graph image can depict the actual data correctly, it compensates for the lack of axis symmetry. The size of the image can be made to vary by taking the size input from the user as well.

V. CHARACTERISTICS OF THE SMS BASED SERVICE
Finally a brief discussion about the features of the SMS system:

A. Advantages of SMS
There are several advantages: • SMS can be used from anywhere in world where cellular network coverage is available.

B. Disadvantages of SMS
There are a few disadvantages also: • It is very slow (around 10 SMS can be processed per minute). This can be solved by establishing parallel SMS server outlets for each laboratory. • It is difficult to display result to user directly.
Based on the discussions so far there can be three types of experiment in term of SMS operation: •

VI. CONCLUSION
SMS cannot give the users the actual feeling of using an instrument in the laboratory but it is instead a good and easy way to use the instrument from remote location. Feasibility of using mobile devices in conducting laboratory sessions in distance education is demonstrated. Integration issues of Short Message Service (SMS) to monitor and remotely control instruments of hardware-based online laboratories and methods of conversion of a PC-based remote-controlled online laboratory to mobile device control are discussed. Although SMS would add greater mobility and flexibility for the laboratory user, but it is still a slow process in terms of read and reply to each of the requesting SMS.
AUTHORS Ananda Maiti is with the School of Computing Science and Engineering, Vellore Institute of Technology, Vellore 632 014, India (e-mail: anandamaiti@live.com).
B. K. Tripathy is a senior professor at the School of Computing Science and Engineering, Vellore Institute of Technology, Vellore 632 014, India (e-mail: tripa-thybk@vit.ac.in).
This article is a modified version of a paper presented at the International Conference REV2011, held at Transylvania University of Brasov, 29 June -1 July 2011. Received, 4 September, 2011. Published as resubmitted by the authors 26 October 2011.