Using BIST to Increase Wireless Distributed Systems’ Security Liviu Miclea1, Ioan Stoian2, Enyedi Szilárd1, Gavril Toderean1 1
Technical University of Cluj-Napoca 26-28 Daicoviciu str., RO-3400 Cluj-Napoca, Romania Tel/fax: +40-264-194469 E-mails:
[email protected],
[email protected],
[email protected] Web pages: http://users.utcluj.ro/~miclea, http://users.utcluj.ro/~szilard, http://users.utcluj.ro/~toderean 2
IPA - R&D Institute for Automation 109 Republicii str., RO-3400 Cluj-Napoca, Romania Tel: +40-264-196155, Fax: +40-264-190558 E-mail:
[email protected] Web page: http://automation.ro
Abstract. This paper presents the idea and experimental results on increasing the functional security of a wireless distributed system with built-in self-test (DBIST), using a combination of Web technologies, PHP scripting and WAP mobile data access. The devices and tests are selected on an electronic WAP form, in a WAP microbrowser of a mobile device. The WAP browser then sends the selections to the DBIST web server, through the WAP gateway. The server uses PHP scripts to start the selected tests on the selected devices. The scripts use TCP/IP to communicate with the BIST modules of the devices. The BIST modules run the required tests and return the results to the scripts, which generate a WML page with the test results and send it back to the requesting mobile device’s microbrowser. In the version presented here, the PHP scripts generate a human-readable “test results” WML page, but in future implementations, they can use raw TCP/IP or other protocols to communicate with a central administrative authority, other DBIST networks or mobile networks, interact with SQL databases or do other high or low level test configuration/test results management.
104
1
Introduction
1.1
Generalities
This paper continues the work [1] of the authors for developing solutions for DBIST systems. This paper, however, presents a different approach. The test selection, running and displaying the results is accomplished through the aid of a Web server, PHP scripting, on-the-fly WML pages and a WAP-enabled microbrowser in a mobile device. In the following, we will present some basics of the concepts, and then a simple example to illustrate the idea. 1.2
Built-in Self-test
Any system needs to be tested, even the simplest ones. At least once, after production. However, testing takes a lot of time and hassle. The system has to be turned off, testers connected to it; one may even need to disconnect the tested device from the rest of the system. The external tester devices and the time lost with preparing and actually testing the components of the system can be expensive. A solution that fully or partially eliminates external testers involves building the testing capabilities right into the device or system, during design stage. This is Built-In test. A further enhancement to testing is to make the system test itself, i.e. there is no need for the user to know the system’s structure, the system is able to verify its functionality and output the result, and thus it can execute Self-Test. The two solutions combined make BIST, or Built-In Self-Test, which ensures a high level of functional security of the system. If the tests are run during the normal functioning of the system, it is on-line testing. Otherwise, it is off-line testing. The on-line test can be concurrent, where the test mode is normal mode, and not concurrent, where the idle time is test mode. The on-line test is mandatory when very high functional security and reliability is required, the target faults are transient faults or we need a low latency. In this case no ATE required, but we pay through high hardware overhead. 1.3
Distributed Built-in Self-test
As a method for enhancing the availability, stability and security in functioning, built-in self-test has been around for quite a while. One of the current trends in BIST technology is Distributed BIST, or DBIST. The distributed nature of DBIST means that each of the modules in the DUT has its own BIST routine, which runs the test more or less independently from the other modules. This way, the actual BIST of the whole device is
105
decomposed into smaller, dedicated BISTs, which should be simpler and easier to develop and maintain. Device 1 Device 2
Device 3
Device n
Fig. 1. Heterogeneous network of devices Large systems, such as large manufacturing plants, telecommunication or computer networks, require distributed monitoring, diagnosis and repairing, if feasible. Distributed BIST, or DBIST, usually implies that each module of the system has its own BIST, and the testing is not done centrally, but locally, in a distributed manner. The system may or may not have a central DBIST management module. Most DBIST approaches [1-4] use a central control authority to start/stop the remote BIST tests, to generally organize the DBIST process and gather together the results. Other techniques for enforcing functional security are distributed, decentralized management solutions, some involving agents [5, 6]. 1.4
Proposed Structure
The heterogeneous system in figure 2 has a device that has the role of a master, controlling the slaves. “Controlling” here means that the master device has the authority to start/stop the BIST of the slave devices, and also receive the test results. The central device may or may not have a BIST of its own. The controller takes care of the communication.
106
Controller
Master
Master testing module
BIST
Slave (device under test)
BIST
Slave (device under test)
Communication media Controller
Fig. 2. Proposed system structure
1.5
PHP
1.5.1. Generalities PHP (Personal Homepage Preprocessor) is a scripting language, used mostly on web servers. The idea is that the PHP commands are embedded in the HTML file itself. When a browser requests a page from the web server, the server first runs the PHP interpreter on the requested file, and then sends the results to the requesting browser. 1.5.2. Example When the above example is parsed by the server’s PHP engine, the tag is replaced by the result of the contained PHP commands, i.e. by the string “Test text.
”. Only then is the resulted page sent to the browser that requested it.
107
1.6
WAP
The mobile communications industry invented WAP (Wireless Access Protocol), a way through which mobile devices, for example mobile phones, can request and display information from the Internet. Through the WAP protocol, these devices can access and display WML (Wireless Markup Language) pages, which are very similar to HTML pages. Still, WML pages have less detail and are optimized for the monochrome and small display of the mobile devices. Such a WAP-enabled device contains a WAP microbrowser that can parse and display WML pages. 1.7
WML
WML files are called “decks”, and the decks are composed of “cards”. WML is an XML language, with markups, like HTML, but the markups are different from those in HTML. 1.7.1. Example The code below is WML code for a deck that contains a single card:
Name:
Age:
Sex:
And the corresponding page in the microbrowser:
108
----- Input ----------
Name: Age : Sex :
Fig. 3. A simple form as displayed in a WAP/WML microbrowser 1.7.2. PHP and WML Web
WAP provider
Microbrowser WAP
Mobile device
Web Server Web
PHP
Socket
BIST
Fig. 4. The structure of the DBIST system using WML/WAP and PHP
The steps of the DBIST process: • The microbrowser requests from the WAP provider the page containing the PHP script on the specified web server; • The WAP provider connects to the specified web server and transmits the request as it was from a normal desktop browser; • The web server (actually, the PHP script) creates on the fly the WML form and sends it to the WAP provider, which sends it further to the mobile device; • The user fills the data in the form and sends it back to the WAP provider, which sends it to the web server;
109
• The PHP script on the server opens a TCP/IP socket, connects to the specified BIST module of the specified device and sends it the user-requested test; • The contacted BIST module runs the requested test and returns the results to the script, through the same TCP/IP connection; • The script generates the results WML page and sends it to the WAP provider, which forwards it to user’s browser, where it is displayed.
2
Implementation and Experiments
2.1. The Experimental BIST Module The BIST module [1] we used for experimenting is a software module. It accepts commands that start the BIST tests – check the available space, share name etc. of the drives.
Fig. 5. The BIST module’s graphical interface
110
The commands are expected in ASCII format, on TCP/IP socket no. 2811. Only known commands are executed, the unknown ones are sent back. The BIST module executes the requested test and sends back the results on the same port on which the command arrived. 2.2
The PHP Script and the WML Pages
The PHP script creates the WML form, manages the DBIST testing system and also generates the results WML page. The code that generates the WML form:
echo ""; echo "Send"; echo ""; //POST variables to send back echo ""; echo ""; echo ""; //closing the "refresh" and "go" block
Note that we have to specify, for the microbrowser, the data which is to be sent back to the server, using the tag. An HTML browser knows how to do this automatically. We will focus on the BIST connectivity part below. We try to connect to the BIST module at the address specified in the returned form, port 2811: $fp = fsockopen ($addr, 2811);
If connection was successful, send the user-requested test name to the BIST module, all uppercase: fputs ($fp, strtoupper($test)."."); Receive the test result from the BIST module, maximum 128 characters; append to the result string as we receive, until the transmission end character (“.”) is met; the “.” (dot) operator is string concatenation in PHP (which is, coincidentally, the same as the end-of-transmission character we chose):
111
$recvd = fgets ($fp,128); while (!preg_match("/(\.)/",$recvd)) { $recvd = $recvd . fgets ($fp,128); } Put the received result into the generated web page:
echo "$recvd"; Close the connection to the BIST module: fclose ($fp);
3
Conclusions and Future Work
In this paper, we presented a possible solution and experimental results for increasing the functional security of wireless distributed systems with built-in self-test (DBIST). The described DBIST architecture uses PHP scripts to let the user select the tests remotely, from a WAP-enabled mobile device. The scripts generate the WML form, transport the user selection to the BIST modules through TCP/IP and give the test results back to the user’s mobile device. A simple example that shows the basic idea has been discussed. For the wireless substrate, new technologies like Bluetooth, Wi-Fi or GPRS are already used. The main difference between them relies in their access range and cost. There are dedicated Bluetooth and Wi-Fi chips and GPRS modules. Bluetooth is better suited for short range mobile communications, while Wi-Fi is also mobile, but covers larger areas. GPRS has the advantage of small initial investment, because the communication infrastructure is partially leased (with a GPRS subscription from the mobile service operator). This could be valid also for public Wi-Fi access points. PHP offers high flexibility, and rapid development, since all that is required from the BIST modules is TCP/IP and ASCII-based communication. Furthermore, PHP is very similar to C, so the learning curve for senior developers is fast, offering a convenient way for Web-enabled DBIST management. The possibilities are wide. WML/WAP is the standard markup language for Internet content on mobile devices, therefore it is device-independent. On the other hand, since PHP is an interpreted language, it is slower than native, compiled/linked binaries. But the speed overhead is not in the scripts, but in the BIST modules themselves; however, even these BIST routines are rarely called, compared to the normal functioning of the device. Another limitation may be the need for a web server,
112
although tiny embedded web servers are becoming an one- or two-chip commercial product. Another drawback is that if the mobile device does not have a convenient keyboard, it is compulsory to use selection-based form elements. A future development would be the use of embedded TCP/IP stacks that allow simple, microcontroller based systems to transfer data through the Internet. Embedded web servers are even more interesting, since they allow remote BIST management with a web browser on electronics the size of a matchbox. Although these can run BIST routines, a complete PHP interpreter would be too large for them, meaning they cannot run standard PHP code. On the other hand, they can run embedded routines to process system data. They could be used to handle and generate the WML tags. At a simpler level, the system could be used for data acquisition in distributed systems, like, for example, hydroelectric dams. Off-the shelf solutions for the communication layer – like Wi-Fi or GPRS – reduce the costs and ensure flexibility. The WAP-based system offers user authentication. It also inherits the security of GSM/WAP (WTLS – Wireless Transport Layer Security) that ensures good protection against eavesdropping and unauthorized access. For better security, there are dedicated scrambler/encryptor circuits to protect the data exchange. A new, Java 2 Micro Edition based version of the DBIST administration system is under development, using GPRS as an on-line connection between the system modules and the mobile device. J2ME is more flexible than WAP in terms of user interface, but, more importantly, offers an always-on, bidirectional data link. If GSM security is not enough, there are standard encryption/signature techniques that can be implemented in the J2ME module. The new WAP Push technology is also bidirectional, but it has not been designed with always-on, raw data communication in mind. A future project is to port the DBIST administration system to CDMA (Code Division Multiple Access) and BREW (Binary Runtime Environment for Wireless), using the Romanian CDMA operator, Zapp Mobile. CDMA is more secure than GSM, and the BREW platform is more flexible than Java 2 Micro Edition.
References 1
2
3
L.Miclea, Enyedi Sz., R. Orghidan, (2001), “On-line BIST Experiments for Distributed Systems”, IEEE European Test Workshop ETW'2001, Stockholm, Sweden, May 29th– June 1st, , pp. 37-39. Monica Lobetti Bodoni, A. Benso, S. Chiusano, G. di Natale, P. Prinetto, (2000), “An Effective Distributed BIST Architecture for RAMs”, Informal Digest of IEEE European Test Workshop ETW 2000, pp. 201-206 R. Pendurkar, A. Chatterjee, Y. Zorian, (1996), “A Distributed BIST Technique for Diagnosis of MCM Interconnections”, International Test Conference 1996 Proceedings, pp. 214-221
113
4 5
6 7 8
Y. Zorian, H. Bederr, (1996), “Designing Self-Testable Multi-Chip Modules”, European Design and Test Conference 1996 Proceedings, pp. 181-185 L. Miclea, Enyedi Sz., A. Benso, Intelligent Agents and BIST/BISR - Working Together in Distributed Systems, Proceedings of International Test Conference, Baltimore, USA, 8th– 10th October, 2002, pp. 940-946. L.Miclea, Enyedi Sz., Distributed Built-In Self-Test using Intelligent Agents, IEEE European Test Workshop ETW'2002, Corfu, Greece, May 26th–May 29th, 2002. “PHP Manual”, (2002), http://www.php.net/docs.php “WAP Tutorial”, (2001), http://www.w3schools.com
114