From 222f19b11fdda551ce256c81378f5c17e040026d Mon Sep 17 00:00:00 2001
From: Refik Hadzialic
Date: Thu, 20 Oct 2011 17:21:28 +0200
Subject: Writing and spellchecked the document for mistakes!

---
 notFinishedCode/Report/test.tex | 36 ++++++++++++++++++++----------------
 1 file changed, 20 insertions(+), 16 deletions(-)

(limited to 'notFinishedCode/Report/test.tex')

diff --git a/notFinishedCode/Report/test.tex b/notFinishedCode/Report/test.tex
index 3037ee4..600ed0a 100644
--- a/notFinishedCode/Report/test.tex
+++ b/notFinishedCode/Report/test.tex
@@ -98,14 +98,14 @@ Prof. Dr. Gerhard Schneider\\ \vspace{1\baselineskip} Supervisors: \\ Konrad Mai
 
 % first chapter
 \section{Introduction and Motivation}             % chapter 1
-\large In the following report, the authors will try to give you a brief insight into our team project. The goal of our project was to develop a mechanism for automatic testing of our University Telecommunication network. The Telecommunication network of University of Freiburg consists of: our own internal GSM and telephone network systems; GSM redirecting device (if one initiates a call to one of the four external GSM networks, it redirects the calls to: T-mobile, 02, Vodaphone or E-Plus); a SIP gateway for landline calls inside of Germany (sipgate.de) and international calls. Since we did not have access to internal servers, our strategy was to exploit the existing systems and infer the results out of our findings.
+\large In the following report, the authors will try to give you a brief insight into our team project. The goal of our project was to develop a mechanism for automatic testing of our University Telecommunication network. The Telecommunication network of University of Freiburg consists of: our own internal GSM and telephone network systems; GSM redirecting device (if one initiates a call to one of the four external GSM networks, it redirects the calls to: T-mobile, 02, Vodaphone or E-Plus); a SIP gateway for land-line calls inside of Germany (sipgate.de) and international calls. Since we did not have access to internal servers, our strategy was to exploit the existing systems and infer the results out of our findings.
 Before we had started working on our project, we had to analyze the overall network to come up with test cases that contain the highest information content. The next step in our procedure was to implement our ideas into a working piece of software. 
 Gradually we implemented a bit-by-bit of the final software. Every single step was accompanied by testing and validation procedures. At the end we connected all the ``black-boxes'' into one big piece of software. We have fulfilled our requests and goals and made a fully working and operable test software. Despite developing a working software, all the way along we thought about the simplicity of the usage of the software. In the following chapters we will describe in more detail our approach and how each subsystem works.
 \clearpage
 \section{Requirements}           % chapter 2
 At the start of the project the requirements were not completely known but as the time passed we redefined our goals. 
 The first and the most important part at the start was to define the key goals of our team project. It was to build a 
-test software system which could tell the operator user what is not preoperly working in our local University telecommunication network.
+test software system which could tell the operator user what is not properly working in our local University telecommunication network.
 Konrad and Dennis suggested us to look at figure 1 and depending on it to build our test software. 
 \begin{figure}[ht!]
   \centering
@@ -118,8 +118,12 @@ were only the ones we could not develop ourself because of the time-span of our
 \par Afterward we had to choose the programming language. Since we had the freedom of choice, between the three suggested programming languages
 Java, C++ and Python, we made a joint decision to use Python as the main programming language in our team project. One of the requirements was to finish the team project in time,
 therefore our decision to use Python is justified. Using Python we could work faster and integrate our subsystems more effectively \cite{python}. 
-Our programming language of choice is multiplatform, therefore our test software would be easy portable to other operating systems. 
-\par Likewise we had to decide how our test software will work. One of the requirements by Dennis and Konrad was to make the software caable of being run from the terminal. 
+Our programming language of choice is multi-platform, therefore our test software would be easy portable to other operating systems. 
+\par Likewise we had to decide how our test software will work. One of the requirements by Dennis and Konrad was to make the software capable of being run from the terminal. 
+The next requirement was to make a good looking GUI so that even an operator user without Linux experience could handle the tests.
+\par In addition it was required to log all the past test. Later on a machine learning algorithm or some other intelligence could be applied to deduce some error behavior of the system 
+(e.g. an intelligent algorithm could find that part of the system fail in a combined manner). To accomplish the logging of all the tests we had to use a database system. 
+We decided to use MySQL since it is open source and well supported. However, one should know that the test results are only stored into the database in case the test was started from the web site.
 \newpage
 \section{Database design}
 At the start our database of choice was MySQL.
@@ -134,7 +138,7 @@ When the
 \section{Software design}     % section 2.1
 \subsection{Database access}         % subsection 2.1.1
 Accessing the database is of critical value to our project, therefore we had developed our own class that limits the access to the database. In the process of developing our own class we used the MySQLdb library in Python \cite{mysqlManual}.
-The database class has two working modes, a normal working mode and a debugging mode. The difference between these two modes is in the output information. In case the error handling function raises an error and it is unknown, if the debug mode is set a complete backtrace of the error will be printed out. A developer can change the mode by setting the variable \emph{debugMode=1}. The class diagram can be seen in the following figure. 
+The database class has two working modes, a normal working mode and a debugging mode. The difference between these two modes is in the output information. In case the error handling function raises an error and it is unknown, if the debug mode is set a complete back-trace of the error will be printed out. A developer can change the mode by setting the variable \emph{debugMode=1}. The class diagram can be seen in the following figure. 
 \begin{figure}[ht!]
   \centering
   \includegraphics[width=100mm]{dbClass.png}
@@ -143,7 +147,7 @@ The database class has two working modes, a normal working mode and a debugging
 The method names are self-explanatory and do not require extra explanations. All the outputs produced by the class can be found on the project wiki page \cite{wiki}.
 \subsection{Controlling the cell phones}
 Our first version of the developed program code for controlling the cell phones used predefined timed values
-to send commands instead of using a state controlled approach to confirm that every command was successfuly received and executed by the cell phone. 
+to send commands instead of using a state controlled approach to confirm that every command was successfully received and executed by the cell phone. 
 It meant we had to make an enormous number of assumptions. In comparison to our second approach, to build a state controlled cell phone control class,
 our first approach was inferior and slower. The state controlled method connected two cell phones, on the same base station, up to 15 times faster than the timed approach. 
 \begin{figure}[ht!]
@@ -151,7 +155,7 @@ our first approach was inferior and slower. The state controlled method connecte
   \includegraphics[width=80mm]{serialPort.png}
   \caption[]{GSM class diagram for controlling the cell phones}
 \end{figure}
-One can easyly apply the class just by correctly defining the parameters: port address, baud rate and timeout. The former two are self-explanatory and the timeout parameter is used to define when the alarm function should raise a timeout exception. 
+One can easily apply the class just by correctly defining the parameters: port address, baud rate and timeout. The former two are self-explanatory and the timeout parameter is used to define when the alarm function should raise a timeout exception. 
 A timeout exception gets raised when the cell phone does not respond (i.e. when the cell phone enters a deadlock or delayed state.) We had used the serial port library inside of Python although we use USB cables to connect to our cell phones. One should 
 be aware that our USB cables create a virtual serial port. More details on class design and an example can be found on our project wiki \cite{wiki}.
 \subsection{Client and Server class}
@@ -208,7 +212,7 @@ Source Community.
 \begin{figure}[ht!]
   \centering
   \includegraphics[width=130mm]{bb.jpg}
-  \caption[]{BeagleBoard, a linux-on-chip board where our controller software runs the GSM device }
+  \caption[]{BeagleBoard, a Linux-on-chip board where our controller software runs the GSM device }
 \end{figure}
 It has been equipped with a minimum set of features to allow the 
 user to experience the power of the OMAP3530 and is not intended as a full development 
@@ -232,14 +236,14 @@ Due to the fact that we had used 5 cell phones on a single computer, the best so
 Konrad bought 5 cables for 5 Siemens S55 cell phones. All of the cables have an USB2Serial chip converter inside of them. 
 Once they were plugged into the USB port, Ubuntu automatically recognized the cables and installed the drivers.
 The virtual serial ports were created and could be found on \emph{/dev/ttyUSBx}, where $x$ is the automatically assigned number for the port. 
-Some of the cables had the cability to charge the Siemens S55 phones. 
+Some of the cables had the capability to charge the Siemens S55 phones. 
 Konrad had opened several cables to solder the power supplies to some contacts and the problem was solved for all of the cables. 
 \subsection{Server}
-We were given an old Pentium 3 computer where we installed Ubuntu Linux. Configured the Appache web server and MySQL. 
+We were given an old Pentium 3 computer where we installed Ubuntu Linux. Configured the Apache web server and MySQL. 
 \clearpage
 
 \section{Communication protocol}
-\subsection{Hanlder side}
+\subsection{Handler side}
 \begin{figure}[ht!]
   \centering
   \includegraphics[width=130mm]{protocolCommunicationHandler.png}
@@ -311,7 +315,7 @@ It is of vital importance that only as few as possible people have access to our
 All the time, while we were working on the project, we were made aware of this issue by Denis and Konrad.  
 We decided to use asymmetric key cryptography, where each side has two keys (private and public.) In the next sections we will explain in more details how we applied the methods.
 \subsection{Encryption of the communication channels}
-At first we thoought to encrypt the data before sending them but since none of us was an expert on encryption standards the idea was rejected. Alongside the fact that none of us had been an expert in the field of cryptography, we were neither experts in the field of internet programming. One could find maybe a way to disable our server software with various hacking methods (e.g. 
+At first we thought to encrypt the data before sending them but since none of us was an expert on encryption standards the idea was rejected. Alongside the fact that none of us had been an expert in the field of cryptography, we were neither experts in the field of Internet programming. One could find maybe a way to disable our server software with various hacking methods (e.g. 
 trying to open the port until the system runs out of memory and in our case the system which we used on the handler side was a BeagleBoard with ARM architecture running on a single chip TI OMAP processor, refer to the picture in figure 1.) 
 We had to eliminate even the slightest possible threat in return for spending more time for debugging the test software system. Despite we were aware of all these facts, we had to choose one of the plenty implemented encryption standards on Linux.
 Denis and Konrad suggested using the SSH Tunneling method. 
@@ -322,8 +326,8 @@ Denis and Konrad suggested using the SSH Tunneling method.
   \caption[]{SSH Tunnel, all the communication inside the tunnel is encrypted }
 \end{figure}
 
-Using the SSH Tunnel port forwading method we could hide the real port we had used for our socket connection. On the other hand we could force the socket to accept only local connections (i.e. from the machine where the handler software was running.) 
-The SSH Tunnel port forwarind method creates an encrypted tunnel between the two computers and then it creates two ports, one on the local and remote computer. All the data sent through the port on the local machine appear on the port at the remote machine. \newline The first problem we faced was that SSH required the username and password everytime we tried to make an SSH connection. We could avoid this problem by copying the public key from our server (where our test software runs) to the BeagleBoard \cite{sshTunnel}. 
+Using the SSH Tunnel port forwarding method we could hide the real port we had used for our socket connection. On the other hand we could force the socket to accept only local connections (i.e. from the machine where the handler software was running.) 
+The SSH Tunnel port forwarding method creates an encrypted tunnel between the two computers and then it creates two ports, one on the local and remote computer. All the data sent through the port on the local machine appear on the port at the remote machine. \newline The first problem we faced was that SSH required the username and password every time we tried to make an SSH connection. We could avoid this problem by copying the public key from our server (where our test software runs) to the BeagleBoard \cite{sshTunnel}. 
 This can be performed by executing the following commands in the terminal shell.
 One has to create first the private and public keys on the local machine(i.e. server computer, where the test software runs):
 
@@ -334,7 +338,7 @@ jsmith@local-host$ ssh-keygen
 Generating public/private rsa key pair.
 Enter file in which to save the key (/home/jsmith/.ssh/id_rsa):[Enter key]
 Enter passphrase (empty for no passphrase): [Press enter key]
-Enter same passphrase again: [Pess enter key]
+Enter same passphrase again: [Press enter key]
 Your identification has been saved in /home/jsmith/.ssh/id_rsa.
 Your public key has been saved in /home/jsmith/.ssh/id_rsa.pub.
 The key fingerprint is:
@@ -422,7 +426,7 @@ refik@ubuntu:/etc/apache2/sites-available$ sudo cp default default_original
 refik@ubuntu:/etc/apache2/sites-available$ sudo cp default-ssl default-ssl_original
 refik@ubuntu:/etc/apache2/sites-available$ sudo vim default-ssl
 \end{lstlisting}
-\par Only the begining of the file is listed here and we have modified the line starting with \emph{DocumentRoot}
+\par Only the beginning of the file is listed here and we have modified the line starting with \emph{DocumentRoot}
 from \emph{DocumentRoot /var/www} to \emph{DocumentRoot /var/www-ssl} (i.e. we had to redefine the location of our SSL directory.)
 \begin{lstlisting}
 <IfModule mod_ssl.c>
-- 
cgit v1.2.3-55-g7522

