summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--notFinishedCode/Report/test.aux80
-rw-r--r--notFinishedCode/Report/test.log113
-rw-r--r--notFinishedCode/Report/test.pdfbin1463908 -> 1469828 bytes
-rw-r--r--notFinishedCode/Report/test.tex47
-rw-r--r--notFinishedCode/Report/test.tex.backup63
-rw-r--r--notFinishedCode/Report/test.tex~46
-rw-r--r--notFinishedCode/Report/test.toc50
7 files changed, 230 insertions, 169 deletions
diff --git a/notFinishedCode/Report/test.aux b/notFinishedCode/Report/test.aux
index 5e9b2af..1548034 100644
--- a/notFinishedCode/Report/test.aux
+++ b/notFinishedCode/Report/test.aux
@@ -18,59 +18,59 @@
\@writefile{lof}{\contentsline {figure}{\numberline {4}{\ignorespaces }}{8}}
\citation{mysqlManual}
\citation{wiki}
-\@writefile{toc}{\contentsline {section}{\numberline {4}Software design}{9}}
-\@writefile{lof}{\contentsline {figure}{\numberline {5}{\ignorespaces }}{9}}
-\@writefile{lof}{\contentsline {figure}{\numberline {6}{\ignorespaces }}{9}}
+\@writefile{toc}{\contentsline {section}{\numberline {4}Software design}{10}}
+\@writefile{lof}{\contentsline {figure}{\numberline {5}{\ignorespaces }}{10}}
+\@writefile{lof}{\contentsline {figure}{\numberline {6}{\ignorespaces }}{10}}
\citation{wiki}
-\@writefile{toc}{\contentsline {subsection}{\numberline {4.1}Database access}{10}}
-\@writefile{lof}{\contentsline {figure}{\numberline {7}{\ignorespaces }}{10}}
-\@writefile{toc}{\contentsline {subsection}{\numberline {4.2}Controlling the cell phones}{10}}
+\@writefile{toc}{\contentsline {subsection}{\numberline {4.1}Database access}{11}}
+\@writefile{lof}{\contentsline {figure}{\numberline {7}{\ignorespaces }}{11}}
+\@writefile{toc}{\contentsline {subsection}{\numberline {4.2}Controlling the cell phones}{11}}
\citation{socket}
\citation{wiki}
-\@writefile{lof}{\contentsline {figure}{\numberline {8}{\ignorespaces }}{11}}
-\@writefile{toc}{\contentsline {subsection}{\numberline {4.3}Client and Server class}{11}}
+\@writefile{lof}{\contentsline {figure}{\numberline {8}{\ignorespaces }}{12}}
+\@writefile{toc}{\contentsline {subsection}{\numberline {4.3}Client and Server class}{12}}
\citation{wiki}
\citation{wiki}
-\@writefile{lof}{\contentsline {figure}{\numberline {9}{\ignorespaces }}{12}}
-\@writefile{lof}{\contentsline {figure}{\numberline {10}{\ignorespaces }}{12}}
-\@writefile{toc}{\contentsline {subsection}{\numberline {4.4}Ping class}{12}}
-\@writefile{lof}{\contentsline {figure}{\numberline {11}{\ignorespaces }}{13}}
-\@writefile{toc}{\contentsline {subsection}{\numberline {4.5}Data logging}{13}}
-\@writefile{lof}{\contentsline {figure}{\numberline {12}{\ignorespaces }}{13}}
-\@writefile{toc}{\contentsline {subsection}{\numberline {4.6}SSH Class}{13}}
+\@writefile{lof}{\contentsline {figure}{\numberline {9}{\ignorespaces }}{13}}
+\@writefile{lof}{\contentsline {figure}{\numberline {10}{\ignorespaces }}{13}}
+\@writefile{toc}{\contentsline {subsection}{\numberline {4.4}Ping class}{13}}
+\@writefile{lof}{\contentsline {figure}{\numberline {11}{\ignorespaces }}{14}}
+\@writefile{toc}{\contentsline {subsection}{\numberline {4.5}Data logging}{14}}
+\@writefile{lof}{\contentsline {figure}{\numberline {12}{\ignorespaces }}{14}}
+\@writefile{toc}{\contentsline {subsection}{\numberline {4.6}SSH Class}{14}}
\citation{beagleDataSheet}
-\@writefile{toc}{\contentsline {section}{\numberline {5}Hardware design}{14}}
-\@writefile{toc}{\contentsline {subsection}{\numberline {5.1}BeagleBoard}{14}}
-\@writefile{lof}{\contentsline {figure}{\numberline {13}{\ignorespaces }}{14}}
-\@writefile{toc}{\contentsline {subsection}{\numberline {5.2}Cell phones}{15}}
-\@writefile{toc}{\contentsline {subsection}{\numberline {5.3}Cables for the cell phones}{15}}
-\@writefile{toc}{\contentsline {subsection}{\numberline {5.4}Server}{15}}
+\@writefile{toc}{\contentsline {section}{\numberline {5}Hardware design}{15}}
+\@writefile{toc}{\contentsline {subsection}{\numberline {5.1}BeagleBoard}{15}}
+\@writefile{lof}{\contentsline {figure}{\numberline {13}{\ignorespaces }}{15}}
+\@writefile{toc}{\contentsline {subsection}{\numberline {5.2}Cell phones}{16}}
+\@writefile{toc}{\contentsline {subsection}{\numberline {5.3}Cables for the cell phones}{16}}
+\@writefile{toc}{\contentsline {subsection}{\numberline {5.4}Server}{16}}
\citation{spin}
\citation{spin}
\citation{wiki}
-\@writefile{toc}{\contentsline {section}{\numberline {6}Communication protocol}{16}}
-\@writefile{toc}{\contentsline {subsection}{\numberline {6.1}Handler side}{16}}
-\@writefile{lof}{\contentsline {figure}{\numberline {14}{\ignorespaces }}{16}}
-\@writefile{lof}{\contentsline {figure}{\numberline {15}{\ignorespaces }}{16}}
-\@writefile{lof}{\contentsline {figure}{\numberline {16}{\ignorespaces }}{16}}
-\@writefile{toc}{\contentsline {subsection}{\numberline {6.2}Verification of the protocol}{17}}
+\@writefile{toc}{\contentsline {section}{\numberline {6}Communication protocol}{17}}
+\@writefile{toc}{\contentsline {subsection}{\numberline {6.1}Handler side}{17}}
+\@writefile{lof}{\contentsline {figure}{\numberline {14}{\ignorespaces }}{17}}
+\@writefile{lof}{\contentsline {figure}{\numberline {15}{\ignorespaces }}{17}}
+\@writefile{lof}{\contentsline {figure}{\numberline {16}{\ignorespaces }}{17}}
+\@writefile{toc}{\contentsline {subsection}{\numberline {6.2}Verification of the protocol}{18}}
\citation{sshTunnel}
-\@writefile{toc}{\contentsline {section}{\numberline {7}Security and safety of the system}{18}}
-\@writefile{toc}{\contentsline {subsection}{\numberline {7.1}Encryption of the communication channels}{18}}
-\@writefile{lof}{\contentsline {figure}{\numberline {17}{\ignorespaces }}{18}}
+\@writefile{toc}{\contentsline {section}{\numberline {7}Security and safety of the system}{19}}
+\@writefile{toc}{\contentsline {subsection}{\numberline {7.1}Encryption of the communication channels}{19}}
+\@writefile{lof}{\contentsline {figure}{\numberline {17}{\ignorespaces }}{19}}
\citation{https}
-\@writefile{toc}{\contentsline {subsection}{\numberline {7.2}Security on the web site}{19}}
+\@writefile{toc}{\contentsline {subsection}{\numberline {7.2}Security on the web site}{20}}
\citation{https}
\citation{https}
-\@writefile{toc}{\contentsline {section}{\numberline {8}Web page}{23}}
-\@writefile{toc}{\contentsline {subsection}{\numberline {8.1}Communication between the web page and the test software}{23}}
-\@writefile{toc}{\contentsline {subsection}{\numberline {8.2}Results on the web page}{23}}
+\@writefile{toc}{\contentsline {section}{\numberline {8}Web page}{24}}
+\@writefile{toc}{\contentsline {subsection}{\numberline {8.1}Communication between the web page and the test software}{24}}
+\@writefile{toc}{\contentsline {subsection}{\numberline {8.2}Results on the web page}{24}}
\citation{pChart}
-\@writefile{lof}{\contentsline {figure}{\numberline {18}{\ignorespaces }}{24}}
-\@writefile{toc}{\contentsline {section}{\numberline {9}How to use and start the system}{25}}
-\@writefile{toc}{\contentsline {subsection}{\numberline {9.1}Required libraries}{25}}
-\@writefile{toc}{\contentsline {subsection}{\numberline {9.2}Configuring hardware}{25}}
-\@writefile{toc}{\contentsline {section}{\numberline {10}Conclusion}{26}}
+\@writefile{lof}{\contentsline {figure}{\numberline {18}{\ignorespaces }}{25}}
+\@writefile{toc}{\contentsline {section}{\numberline {9}How to use and start the system}{26}}
+\@writefile{toc}{\contentsline {subsection}{\numberline {9.1}Required libraries}{26}}
+\@writefile{toc}{\contentsline {subsection}{\numberline {9.2}Configuring hardware}{26}}
+\@writefile{toc}{\contentsline {section}{\numberline {10}Conclusion}{27}}
\bibcite{network}{1}
\bibcite{python}{2}
\bibcite{mysqlManual}{3}
@@ -81,4 +81,4 @@
\bibcite{https}{8}
\bibcite{pChart}{9}
\bibcite{beagleDataSheet}{10}
-\newlabel{LastPage}{{}{27}}
+\newlabel{LastPage}{{}{28}}
diff --git a/notFinishedCode/Report/test.log b/notFinishedCode/Report/test.log
index 6931d01..7ea6bc1 100644
--- a/notFinishedCode/Report/test.log
+++ b/notFinishedCode/Report/test.log
@@ -1,4 +1,4 @@
-This is pdfTeX, Version 3.1415926-1.40.10 (TeX Live 2009/Debian) (format=pdflatex 2011.9.27) 21 OCT 2011 14:36
+This is pdfTeX, Version 3.1415926-1.40.10 (TeX Live 2009/Debian) (format=pdflatex 2011.9.27) 21 OCT 2011 17:02
entering extended mode
%&-line parsing enabled.
**test.tex
@@ -321,89 +321,88 @@ File: test_Use_case.png Graphic file (type png)
<DBRelationship.png, id=40, 1302.8675pt x 540.0175pt>
File: DBRelationship.png Graphic file (type png)
<use DBRelationship.png>
-[8 <./DBRelationship.png (PNG copy)>]
-<activityControllerEdited.png, id=44, 720.44156pt x 453.19313pt>
+LaTeX Font Info: Try loading font information for T1+cmtt on input line 164.
+
+
+(/usr/share/texmf-texlive/tex/latex/base/t1cmtt.fd
+File: t1cmtt.fd 1999/05/25 v2.5h Standard LaTeX font definitions
+) [8 <./DBRelationship.png (PNG copy)>] [9]
+<activityControllerEdited.png, id=48, 720.44156pt x 453.19313pt>
File: activityControllerEdited.png Graphic file (type png)
<use activityControllerEdited.png>
-<classDiagram.png, id=45, 1027.84pt x 558.085pt>
+<classDiagram.png, id=49, 1027.84pt x 558.085pt>
File: classDiagram.png Graphic file (type png)
<use classDiagram.png>
-<dbClass.png, id=46, 660.34941pt x 620.67177pt>
+<dbClass.png, id=50, 660.34941pt x 620.67177pt>
File: dbClass.png Graphic file (type png)
- <use dbClass.png> [9 <./activityControllerEdited.png> <./classDiagram.png (PNG
- copy)>]
-<serialPort.png, id=51, 518.64352pt x 371.26941pt>
+ <use dbClass.png> [10 <./activityControllerEdited.png> <./classDiagram.png (PN
+G copy)>]
+<serialPort.png, id=55, 518.64352pt x 371.26941pt>
File: serialPort.png Graphic file (type png)
<use serialPort.png>
-[10 <./dbClass.png (PNG copy)>]
+[11 <./dbClass.png (PNG copy)>]
LaTeX Font Info: External font `cmex10' loaded for size
-(Font) <9> on input line 202.
+(Font) <9> on input line 219.
LaTeX Font Info: External font `cmex10' loaded for size
-(Font) <5> on input line 202.
+(Font) <5> on input line 219.
-<serverClass.png, id=55, 302.12875pt x 181.67876pt>
+<serverClass.png, id=59, 302.12875pt x 181.67876pt>
File: serverClass.png Graphic file (type png)
<use serverClass.png>
-<ClientClass.png, id=56, 507.30705pt x 256.48764pt>
+<ClientClass.png, id=60, 507.30705pt x 256.48764pt>
File: ClientClass.png Graphic file (type png)
<use ClientClass.png>
-[11 <./serialPort.png (PNG copy)>] <ping.png, id=63, 419.44942pt x 97.77705pt>
+[12 <./serialPort.png (PNG copy)>] <ping.png, id=67, 419.44942pt x 97.77705pt>
File: ping.png Graphic file (type png)
-<use ping.png> <logging.png, id=64, 333.00882pt x 167.21294pt>
+<use ping.png> <logging.png, id=68, 333.00882pt x 167.21294pt>
File: logging.png Graphic file (type png)
-<use logging.png> [12 <./serverClass.png (PNG copy)> <./ClientClass.png (PNG co
-py)>] [13 <./ping.png (PNG copy)> <./logging.png (PNG copy)>]
-<bb.jpg, id=72, 521.95pt x 516.93124pt>
+<use logging.png> [13 <./serverClass.png (PNG copy)> <./ClientClass.png (PNG co
+py)>] [14 <./ping.png (PNG copy)> <./logging.png (PNG copy)>]
+<bb.jpg, id=76, 521.95pt x 516.93124pt>
File: bb.jpg Graphic file (type jpg)
- <use bb.jpg> [14
+ <use bb.jpg> [15
- <./bb.jpg>] [15]
-<protocolCommunicationHandler.png, id=80, 2486.93823pt x 792.13588pt>
+ <./bb.jpg>] [16]
+<protocolCommunicationHandler.png, id=84, 2486.93823pt x 792.13588pt>
File: protocolCommunicationHandler.png Graphic file (type png)
<use protocolCommunicationHandler.png>
-<protocolCommunicationcControllerReceiver.png, id=81, 1808.16705pt x 766.62883p
+<protocolCommunicationcControllerReceiver.png, id=85, 1808.16705pt x 766.62883p
t>
File: protocolCommunicationcControllerReceiver.png Graphic file (type png)
<use protocolCommunicationcControllerReceiver.png>
-<protocolCommunicationcControllerCaller.png, id=82, 1808.16705pt x 766.62883pt>
+<protocolCommunicationcControllerCaller.png, id=86, 1808.16705pt x 766.62883pt>
File: protocolCommunicationcControllerCaller.png Graphic file (type png)
-<use protocolCommunicationcControllerCaller.png> [16
+<use protocolCommunicationcControllerCaller.png> [17
<./protocolCommunicationHandler.png (PNG copy)> <./protocolCommunicationcContr
ollerReceiver.png (PNG copy)> <./protocolCommunicationcControllerCaller.png (PN
-G copy)>] [17]
-<sshTunnel.png, id=90, 696.6025pt x 152.57pt>
+G copy)>] [18]
+<sshTunnel.png, id=94, 696.6025pt x 152.57pt>
File: sshTunnel.png Graphic file (type png)
- <use sshTunnel.png> [18
+ <use sshTunnel.png> [19
- <./sshTunnel.png (PNG copy)>] [19] [20]
-LaTeX Font Info: Try loading font information for OMS+cmr on input line 484.
+ <./sshTunnel.png (PNG copy)>] [20] [21]
+LaTeX Font Info: Try loading font information for OMS+cmr on input line 501.
(/usr/share/texmf-texlive/tex/latex/base/omscmr.fd
File: omscmr.fd 1999/05/25 v2.5h Standard LaTeX font definitions
)
LaTeX Font Info: Font shape `OMS/cmr/m/n' in size <9> not available
-(Font) Font shape `OMS/cmsy/m/n' tried instead on input line 484.
- [21] [22] [23]
+(Font) Font shape `OMS/cmsy/m/n' tried instead on input line 501.
+ [22] [23] [24]
LaTeX Font Info: Font shape `OMS/cmr/m/n' in size <10.95> not available
-(Font) Font shape `OMS/cmsy/m/n' tried instead on input line 556.
+(Font) Font shape `OMS/cmsy/m/n' tried instead on input line 573.
-<resultsImage.png, id=110, 702.625pt x 431.6125pt>
+<resultsImage.png, id=114, 702.625pt x 431.6125pt>
File: resultsImage.png Graphic file (type png)
<use resultsImage.png>
-[24 <./resultsImage.png (PNG copy)>] [25] [26]
-LaTeX Font Info: Try loading font information for T1+cmtt on input line 586.
-
-
-(/usr/share/texmf-texlive/tex/latex/base/t1cmtt.fd
-File: t1cmtt.fd 1999/05/25 v2.5h Standard LaTeX font definitions
-)
-AED: lastpage setting LastPage [27] (./test.aux) )
+[25 <./resultsImage.png (PNG copy)>] [26] [27] AED: lastpage setting LastPage
+[28] (./test.aux) )
Here is how much of TeX's memory you used:
4948 strings out of 495061
68792 string characters out of 1182621
@@ -412,23 +411,23 @@ Here is how much of TeX's memory you used:
17720 words of font info for 42 fonts, out of 3000000 for 9000
28 hyphenation exceptions out of 8191
36i,11n,45p,760b,1679s stack positions out of 5000i,500n,10000p,200000b,50000s
- </home/refik/.texmf-var/font
-s/pk/ljfour/jknappen/ec/ectt1095.600pk> </home/refik/.texmf-var/fonts/pk/ljfour
-/jknappen/ec/ecrm0900.600pk> </home/refik/.texmf-var/fonts/pk/ljfour/jknappen/e
-c/ecrm0600.600pk> </home/refik/.texmf-var/fonts/pk/ljfour/jknappen/ec/ecrm0800.
-600pk> </home/refik/.texmf-var/fonts/pk/ljfour/jknappen/ec/ecti1095.600pk> </ho
-me/refik/.texmf-var/fonts/pk/ljfour/jknappen/ec/ecsx1200.600pk> </home/refik/.t
-exmf-var/fonts/pk/ljfour/jknappen/ec/ecrm1095.600pk> </home/refik/.texmf-var/fo
-nts/pk/ljfour/jknappen/ec/ecsx1095.600pk> </home/refik/.texmf-var/fonts/pk/ljfo
-ur/jknappen/ec/ecsx1440.600pk> </home/refik/.texmf-var/fonts/pk/ljfour/jknappen
-/ec/ecsl1095.600pk> </home/refik/.texmf-var/fonts/pk/ljfour/jknappen/ec/ecrm120
-0.600pk> </home/refik/.texmf-var/fonts/pk/ljfour/jknappen/ec/ecrm1728.600pk></u
-sr/share/texmf-texlive/fonts/type1/public/amsfonts/cm/cmmi10.pfb></usr/share/te
-xmf-texlive/fonts/type1/public/amsfonts/cm/cmsy10.pfb></usr/share/texmf-texlive
-/fonts/type1/public/amsfonts/cm/cmsy9.pfb>
-Output written on test.pdf (27 pages, 1463908 bytes).
+ </home/refik/.texmf-var/fonts/pk/ljfour/jknappen/ec/ecrm090
+0.600pk> </home/refik/.texmf-var/fonts/pk/ljfour/jknappen/ec/ecrm0600.600pk> </
+home/refik/.texmf-var/fonts/pk/ljfour/jknappen/ec/ecrm0800.600pk> </home/refik/
+.texmf-var/fonts/pk/ljfour/jknappen/ec/ectt1095.600pk> </home/refik/.texmf-var/
+fonts/pk/ljfour/jknappen/ec/ecti1095.600pk> </home/refik/.texmf-var/fonts/pk/lj
+four/jknappen/ec/ecsx1200.600pk> </home/refik/.texmf-var/fonts/pk/ljfour/jknapp
+en/ec/ecrm1095.600pk> </home/refik/.texmf-var/fonts/pk/ljfour/jknappen/ec/ecsx1
+095.600pk> </home/refik/.texmf-var/fonts/pk/ljfour/jknappen/ec/ecsx1440.600pk>
+</home/refik/.texmf-var/fonts/pk/ljfour/jknappen/ec/ecsl1095.600pk> </home/refi
+k/.texmf-var/fonts/pk/ljfour/jknappen/ec/ecrm1200.600pk> </home/refik/.texmf-va
+r/fonts/pk/ljfour/jknappen/ec/ecrm1728.600pk></usr/share/texmf-texlive/fonts/ty
+pe1/public/amsfonts/cm/cmmi10.pfb></usr/share/texmf-texlive/fonts/type1/public/
+amsfonts/cm/cmsy10.pfb></usr/share/texmf-texlive/fonts/type1/public/amsfonts/cm
+/cmsy9.pfb>
+Output written on test.pdf (28 pages, 1469828 bytes).
PDF statistics:
- 676 PDF objects out of 1000 (max. 8388607)
+ 683 PDF objects out of 1000 (max. 8388607)
0 named destinations out of 1000 (max. 500000)
96 words of extra memory for PDF output out of 10000 (max. 10000000)
diff --git a/notFinishedCode/Report/test.pdf b/notFinishedCode/Report/test.pdf
index 39b42dd..16111b1 100644
--- a/notFinishedCode/Report/test.pdf
+++ b/notFinishedCode/Report/test.pdf
Binary files differ
diff --git a/notFinishedCode/Report/test.tex b/notFinishedCode/Report/test.tex
index bec85c1..4a06d69 100644
--- a/notFinishedCode/Report/test.tex
+++ b/notFinishedCode/Report/test.tex
@@ -152,14 +152,31 @@ During the development time we refined our requirements. In the next chapters we
\newpage
\section{Database design}
As we mentined in the software requirements section, we decided to use MySQL as our database system for storing the test information and results.
-It was not difficult to decide what database to use, since MySQL is one of the most supported database and one can find a library to use it with major programming languages.
-
+It was not difficult to decide what database to use, since MySQL is one of the most supported database and one can find a library to use it with major programming languages.
+The key point in the design of our database was the simplicity and speed of accessing the data. We had decided to use seven tables. In the following paragraphs we will explain each table separately and its usage.
\begin{figure}[ht!]
\centering
\includegraphics[width=140mm]{DBRelationship.png}
\caption[]{Database relationship diagram}
\end{figure}
-
+\par The \emph{PingResultTable} table has six attributes (\emph{taskNo, sipServer, sipGate, unisip, gsmBox1, gsmBox2}), all of integer type.
+The \emph{taskNo} attribute identifies the test number but not a single test (e.g. an operator user has selected three different tests to be executed, all of the three tests will have the same \emph{taskNo} to identify them together as belonging to one test group and \emph{taskId} identifies each single test and will be explained later).
+\emph{sipServer} represents the Asterisk server ping result. \emph{sipGate} is used to represent the SIP Gate server for the landline calls (\url{http://www.sipgate.de}). \emph{uniSip} represents the ping results for our local University telephone network SIP server.
+\emph{gsmBox1} and \emph{gsmBox2} are the two single-chip Linux computers (BeagleBoard), that controll two cell phones each one (i.e. they are also known under the name of \emph{nanoBTSx}).
+\emph{taskNo} is the primary and unique key in the table \emph{PingResultTable}. Rest of the attributes (i.e. \emph{sipServer, sipGate, uniSip, gsmBox1, gsmBox2}) are used to insert the ping results, if the assigned servers are reachable or not.
+Before any test attempt is made, our test software first tries to ping the servers. These results are then stored in the \emph{PingResultTable}.
+\par The \emph{ErrorCodeTable} table defines all the possible test results in the system, in other words it represents a list with error codes with their appropriate descriptions and meanings. It consists of two attributes (\emph{errorcode} and \emph{description}), the first is of integer type and the second of varchar type (the description message is allowed to be only 100 characters long).
+The \emph{ErrorCodeTable} table is used by the main test software (i.e. controller) to report the operator user what kind of error had appeared in the system.
+\par The \emph{DeviceAddressTable} is the table containing the location and identification data for each server and device. The table consists of seven attributes, \emph{deviceName, portName, number, lastChange, username, password, server}.
+\emph{deviceName} is the attribute with the name of the device or server (e.g. GSMRZ1 or landline), it is of varchar type. \emph{portName} is the attribute field with the location address for a cell phone (e.g. \emph{/dev/ttyUSB1}) or 'localhost' instead of NULL value for a server, it is of the varchar type.
+\emph{number} represents the number of the used service (i.e. number of the cell phone, SIP, etc.) and is of varchar type.
+\emph{lastChange} is a time value and represents the date and time the given entry was modified (we had plans in future versions of our test software that if an device gets a new IP address assigned it automatically changes it in the database).
+\emph{username} is the field with the username stored in for a server/service, like SIP and landline. \emph{password} attribute stores the password information for the given service. The \emph{server} attribute stores information about the location of the server, IP or DNS address of the server. All three fields, \emph{username}, \emph{password} and \emph{server} are of varchar type.
+The information stored in the given table is used by the test software to obtain usernames, passwords and addresses of the used services for the tests.
+\par The \emph{ResultTable} table is used by the test system to store final results for the performed tests. Our given table consists of two fields, \emph{taskID} and \emph{result} and both are of integer type. For each test entry with unique \emph{taskID} an error code is assigned in the \emph{result} field,
+depending on the test results. Error codes found in the \emph{ErrorCodeTable} table can be only assigned to this field.
+\par The \emph{TempTaskTable} table represents the table with the tasks the system has to execute next time the test software is started. The given table gets filled up every time an operator user submits one or more test cases to be performed.
+\par The \emph{TaskTable} table contains all the tests ever performed from the web site.
\newpage
\section{Software design} % section 2.1
\begin{figure}[ht!]
@@ -194,17 +211,17 @@ our first approach was inferior and slower. The state controlled method connecte
\caption[]{GSM class diagram for controlling the cell phones}
\end{figure}
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
+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}
Our socket communication code is based on the example given in the Python socket manual \cite{socket}.
We extended it into two classes, a client and a server class. We had used the TCP protocol to base our two classes on\footnote{TCP is reliable compared to UDP (i.e. transmitted packets get also delivered),
-packets are ordered when received and data are received in a stream (i.e. multiple packets can be read at once.)}.
+packets are ordered when received and data are received in a stream (i.e. multiple packets can be read at once).}.
The Server class can be seen in the following figure. The server class is implemented to accept only local connections\footnote{More details are given in the section 7.1}.
-First we determine our IP address and then create the socket to listen only for the same IP address (with a different IP address than the selected one a connection cannot be even established.)
+First we determine our IP address and then create the socket to listen only for the same IP address (with a different IP address than the selected one a connection cannot be even established).
One has to define the port on which the server object should listen.
When receiving data one can easily define the timeout to be raised if data are not received in the timeout range or set it to \emph{0} to infinitely wait for the buffer to be filled with received data. While testing the server class we had the problem to listen on the same port if the application was forcibly\footnote{Manually closed using CTRL+C and run again.} restarted in less than 60 seconds. We got the error message: \emph{"Address already in use"}.
-This is not known as error behavior but rather an option to help the server to catch lost live packets (i.e. packets that are still in the network looking for it is goal destination.)
+This is not known as error behavior but rather an option to help the server to catch lost live packets (i.e. packets that are still in the network looking for it is goal destination).
We solved the problem by changing the socket options with the \emph{SO\_REUSEADDR} parameter. This enabled us to get around the error when we tried to restart our server application.
Before solving the problem without using the socket parameter, we had another solution to get around this problem by killing the application running the port, this old method is obsolete now.
\begin{figure}[ht!]
@@ -212,7 +229,7 @@ Before solving the problem without using the socket parameter, we had another so
\includegraphics[scale=0.8]{serverClass.png}
\caption[]{Server class, used by the server application}
\end{figure}
-In the process of testing the client class we did not have any major problems. The only major flow we had to debug was when one of the sides disconnects that we get out of the waiting loop if the timeout variable was set to \emph{0} (i.e. infinite waiting loop.)
+In the process of testing the client class we did not have any major problems. The only major flow we had to debug was when one of the sides disconnects that we get out of the waiting loop if the timeout variable was set to \emph{0} (i.e. infinite waiting loop).
The client class can be seen in the following figure. To initialize the client object one needs to define the IP address and the port of the server application listening on it.
\begin{figure}[hb!]
\centering
@@ -349,12 +366,12 @@ of receiving corresponding message. Otherwise it enters the exit state and then
\section{Security and safety of the system}
Safety and security of the software plays a major role in our project.
It is of vital importance that only as few as possible people have access to our test system since the resulting data could be exploited to plan an attack
-(e.g. assume the University alarm system uses the SIP gateway to connect to the outside world and to alarm the police, if one knows that the SIP gateway is not working properly, a burglar could plan to rob the University building just at that moment.) Therefore the choice to go Open Source is justified due to the fact that one should know how every single detail of the system works.
+(e.g. assume the University alarm system uses the SIP gateway to connect to the outside world and to alarm the police, if one knows that the SIP gateway is not working properly, a burglar could plan to rob the University building just at that moment). Therefore the choice to go Open Source is justified due to the fact that one should know how every single detail of the system works.
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.
+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 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.)
+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).
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.
@@ -364,7 +381,7 @@ 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 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.)
+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):
@@ -426,7 +443,7 @@ like country, state, organization name and etc which we had to enter to resume.
openssl req -new -key server.key -out server.csr
\end{lstlisting}
\par In the next step we had to sign the certificate signing request and enter the amount of days for how long it should be valid.
-In our case we entered the duration of one year, one can make it for longer periods as well (i.e. the amount of 365 has to be changed.)
+In our case we entered the duration of one year, one can make it for longer periods as well (i.e. the amount of 365 has to be changed).
\begin{lstlisting}
openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt
\end{lstlisting}
@@ -465,7 +482,7 @@ refik@ubuntu:/etc/apache2/sites-available$ sudo cp default-ssl default-ssl_origi
refik@ubuntu:/etc/apache2/sites-available$ sudo vim default-ssl
\end{lstlisting}
\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.)
+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>
<VirtualHost _default_:443>
@@ -529,7 +546,7 @@ Since we used the Open Source platform to base our project on, it was certain we
The dynamic parts of the web site were programmed using PHP and JavaScript. The GUI was done using CSS.
The web site opens TCP/IP sessions between itself and the Python test software. Due reasons explained in the section above,
a test user needs first to enter his username and password to acccess the web site. Then a test user can manually select what type of tests he wants to perform or he can select already defined test,
-like the simple, smart or full test. (Describe here these three type of tests.)
+like the simple, smart or full test. (Describe here these three type of tests).
Data about the performing tests are inserted into the database only in the case if the mutex lock for the web site can be obtained\footnote{The mutex lock will be explained in the next subsection.}.
This way we can avoid inserting data about the test in case there is already a test user on the website performing some tests on the system.
\subsection{Communication between the web page and the test software}
diff --git a/notFinishedCode/Report/test.tex.backup b/notFinishedCode/Report/test.tex.backup
index e34c6d9..4e3b28d 100644
--- a/notFinishedCode/Report/test.tex.backup
+++ b/notFinishedCode/Report/test.tex.backup
@@ -137,22 +137,43 @@ The next requirement was to make an appealing GUI so that even an user without a
\par In addition it was required to log all the past tests. 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 keep in mind the test results are only stored in the database in case the test was started from the web site.
-
+\begin{figure}[ht!]
+ \centering
+ \includegraphics[width=140mm]{test_Use_case.png}
+ \caption[]{Test case diagram}
+\end{figure}
\subsection{Hardware requirements}
Likewise the software requirements, we had hardware requirements as well. We were required to identify the hardware we will need to perform the tests.
It was important to find old and cheap cell phones that could support \emph{AT Modem} commands because our budget was limited.
\par A problem we had to face at the start was that the base stations are located at different geographical points which were not near to each other.
-No one should go everyday to the rooms where our cell phones are located to change or charge the batteries. In the cable subsection we describe our approach to the charging battery problem.
+No one should go everyday to the rooms where our cell phones are located only to change or charge the batteries.
+In the cable subsection we describe our approach to the charging battery problem. As we defined our requirements we continued with the process of developing the test software.
+During the development time we refined our requirements. In the next chapters we will explain our database, software and hardware design ideas.
\newpage
\section{Database design}
-At the start our database of choice was MySQL.
-When the
+As we mentined in the software requirements section, we decided to use MySQL as our database system for storing the test information and results.
+It was not difficult to decide what database to use, since MySQL is one of the most supported database and one can find a library to use it with major programming languages.
+The key point in the design of our database was the simplicity and speed of accessing the data. We had decided to use seven tables. In the following paragraphs we will explain each table separately and its usage.
\begin{figure}[ht!]
\centering
- \includegraphics[width=130mm]{DBRelationship.png}
+ \includegraphics[width=140mm]{DBRelationship.png}
\caption[]{Database relationship diagram}
\end{figure}
-
+\par The \emph{PingResultTable} table has six attributes (\emph{taskNo, sipServer, sipGate, unisip, gsmBox1, gsmBox2}), all of integer type.
+The \emph{taskNo} attribute identifies the test number but not a single test (e.g. an operator user has selected three different tests to be executed, all of the three tests will have the same \emph{taskNo} to identify them together as belonging to one test group and \emph{taskId} identifies each single test and will be explained later).
+\emph{sipServer} represents the Asterisk server ping result. \emph{sipGate} is used to represent the SIP Gate server for the landline calls (\url{http://www.sipgate.de}). \emph{uniSip} represents the ping results for our local University telephone network SIP server.
+\emph{gsmBox1} and \emph{gsmBox2} are the two single-chip Linux computers (BeagleBoard), that controll two cell phones each one (i.e. they are also known under the name of \emph{nanoBTSx}).
+\emph{taskNo} is the primary and unique key in the table \emph{PingResultTable}. Rest of the attributes (i.e. \emph{sipServer, sipGate, uniSip, gsmBox1, gsmBox2}) are used to insert the ping results, if the assigned servers are reachable or not.
+Before any test attempt is made, our test software first tries to ping the servers. These results are then stored in the \emph{PingResultTable}.
+\par The \emph{ErrorCodeTable} table defines all the error codes in the project, in other words it represents a list with error codes with their meanings. It consists of two attributes (\emph{errorcode} and \emph{description}), the first is of integer type and the second of varchar type (the description message is allowed to be only 100 characters long).
+The \emph{ErrorCodeTable} table is used by the main test software (i.e. controller) to report the operator user what kind of error had appeared in the system.
+\par The \emph{DeviceAddressTable} is the table containing the location and identification data for each server and device. The table consists of seven attributes, \emph{deviceName, portName, number, lastChange, username, password, server}.
+\emph{deviceName} is the attribute with the name of the device or server (e.g. GSMRZ1 or landline), it is of varchar type. \emph{portName} is the attribute field with the location address for a cell phone (e.g. \emph{/dev/ttyUSB1}) or 'localhost' instead of NULL value for a server, it is of the varchar type.
+\emph{number} represents the number of the used service (i.e. number of the cell phone, SIP, etc.) and is of varchar type.
+\emph{lastChange} is a time value and represents the date and time the given entry was modified (we had plans in future versions of our test software that if an device gets a new IP address assigned it automatically changes it in the database).
+\emph{username} is the field with the username stored in for a server/service, like SIP and landline. \emph{password} attribute stores the password information for the given service. The \emph{server} attribute stores information about the location of the server, IP or DNS address of the server. All three fields, \emph{username}, \emph{password} and \emph{server} are of varchar type.
+The information stored in the given table is used by the test software to obtain usernames, passwords and addresses of the used services for the tests.
+\par The \emph{ResultTable} table is used by the test system to store final results for the test cases.
\newpage
\section{Software design} % section 2.1
\begin{figure}[ht!]
@@ -161,6 +182,12 @@ When the
\caption[]{Class diagram for the dbClass}
\end{figure}
+\begin{figure}[ht!]
+ \centering
+ \includegraphics[width=140mm]{classDiagram.png}
+ \caption[]{Class diagram (some classes were excluded)}
+\end{figure}
+
\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 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.
@@ -181,17 +208,17 @@ our first approach was inferior and slower. The state controlled method connecte
\caption[]{GSM class diagram for controlling the cell phones}
\end{figure}
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
+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}
Our socket communication code is based on the example given in the Python socket manual \cite{socket}.
We extended it into two classes, a client and a server class. We had used the TCP protocol to base our two classes on\footnote{TCP is reliable compared to UDP (i.e. transmitted packets get also delivered),
-packets are ordered when received and data are received in a stream (i.e. multiple packets can be read at once.)}.
+packets are ordered when received and data are received in a stream (i.e. multiple packets can be read at once).}.
The Server class can be seen in the following figure. The server class is implemented to accept only local connections\footnote{More details are given in the section 7.1}.
-First we determine our IP address and then create the socket to listen only for the same IP address (with a different IP address than the selected one a connection cannot be even established.)
+First we determine our IP address and then create the socket to listen only for the same IP address (with a different IP address than the selected one a connection cannot be even established).
One has to define the port on which the server object should listen.
When receiving data one can easily define the timeout to be raised if data are not received in the timeout range or set it to \emph{0} to infinitely wait for the buffer to be filled with received data. While testing the server class we had the problem to listen on the same port if the application was forcibly\footnote{Manually closed using CTRL+C and run again.} restarted in less than 60 seconds. We got the error message: \emph{"Address already in use"}.
-This is not known as error behavior but rather an option to help the server to catch lost live packets (i.e. packets that are still in the network looking for it is goal destination.)
+This is not known as error behavior but rather an option to help the server to catch lost live packets (i.e. packets that are still in the network looking for it is goal destination).
We solved the problem by changing the socket options with the \emph{SO\_REUSEADDR} parameter. This enabled us to get around the error when we tried to restart our server application.
Before solving the problem without using the socket parameter, we had another solution to get around this problem by killing the application running the port, this old method is obsolete now.
\begin{figure}[ht!]
@@ -199,7 +226,7 @@ Before solving the problem without using the socket parameter, we had another so
\includegraphics[scale=0.8]{serverClass.png}
\caption[]{Server class, used by the server application}
\end{figure}
-In the process of testing the client class we did not have any major problems. The only major flow we had to debug was when one of the sides disconnects that we get out of the waiting loop if the timeout variable was set to \emph{0} (i.e. infinite waiting loop.)
+In the process of testing the client class we did not have any major problems. The only major flow we had to debug was when one of the sides disconnects that we get out of the waiting loop if the timeout variable was set to \emph{0} (i.e. infinite waiting loop).
The client class can be seen in the following figure. To initialize the client object one needs to define the IP address and the port of the server application listening on it.
\begin{figure}[hb!]
\centering
@@ -336,12 +363,12 @@ of receiving corresponding message. Otherwise it enters the exit state and then
\section{Security and safety of the system}
Safety and security of the software plays a major role in our project.
It is of vital importance that only as few as possible people have access to our test system since the resulting data could be exploited to plan an attack
-(e.g. assume the University alarm system uses the SIP gateway to connect to the outside world and to alarm the police, if one knows that the SIP gateway is not working properly, a burglar could plan to rob the University building just at that moment.) Therefore the choice to go Open Source is justified due to the fact that one should know how every single detail of the system works.
+(e.g. assume the University alarm system uses the SIP gateway to connect to the outside world and to alarm the police, if one knows that the SIP gateway is not working properly, a burglar could plan to rob the University building just at that moment). Therefore the choice to go Open Source is justified due to the fact that one should know how every single detail of the system works.
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.
+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 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.)
+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).
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.
@@ -351,7 +378,7 @@ 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 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.)
+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):
@@ -413,7 +440,7 @@ like country, state, organization name and etc which we had to enter to resume.
openssl req -new -key server.key -out server.csr
\end{lstlisting}
\par In the next step we had to sign the certificate signing request and enter the amount of days for how long it should be valid.
-In our case we entered the duration of one year, one can make it for longer periods as well (i.e. the amount of 365 has to be changed.)
+In our case we entered the duration of one year, one can make it for longer periods as well (i.e. the amount of 365 has to be changed).
\begin{lstlisting}
openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt
\end{lstlisting}
@@ -452,7 +479,7 @@ refik@ubuntu:/etc/apache2/sites-available$ sudo cp default-ssl default-ssl_origi
refik@ubuntu:/etc/apache2/sites-available$ sudo vim default-ssl
\end{lstlisting}
\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.)
+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>
<VirtualHost _default_:443>
@@ -516,7 +543,7 @@ Since we used the Open Source platform to base our project on, it was certain we
The dynamic parts of the web site were programmed using PHP and JavaScript. The GUI was done using CSS.
The web site opens TCP/IP sessions between itself and the Python test software. Due reasons explained in the section above,
a test user needs first to enter his username and password to acccess the web site. Then a test user can manually select what type of tests he wants to perform or he can select already defined test,
-like the simple, smart or full test. (Describe here these three type of tests.)
+like the simple, smart or full test. (Describe here these three type of tests).
Data about the performing tests are inserted into the database only in the case if the mutex lock for the web site can be obtained\footnote{The mutex lock will be explained in the next subsection.}.
This way we can avoid inserting data about the test in case there is already a test user on the website performing some tests on the system.
\subsection{Communication between the web page and the test software}
diff --git a/notFinishedCode/Report/test.tex~ b/notFinishedCode/Report/test.tex~
index eeefb21..8a1b146 100644
--- a/notFinishedCode/Report/test.tex~
+++ b/notFinishedCode/Report/test.tex~
@@ -151,13 +151,31 @@ In the cable subsection we describe our approach to the charging battery problem
During the development time we refined our requirements. In the next chapters we will explain our database, software and hardware design ideas.
\newpage
\section{Database design}
-As we mentined in the software requirements section, we decided to use MySQL
+As we mentined in the software requirements section, we decided to use MySQL as our database system for storing the test information and results.
+It was not difficult to decide what database to use, since MySQL is one of the most supported database and one can find a library to use it with major programming languages.
+The key point in the design of our database was the simplicity and speed of accessing the data. We had decided to use seven tables. In the following paragraphs we will explain each table separately and its usage.
\begin{figure}[ht!]
\centering
\includegraphics[width=140mm]{DBRelationship.png}
\caption[]{Database relationship diagram}
\end{figure}
-
+\par The \emph{PingResultTable} table has six attributes (\emph{taskNo, sipServer, sipGate, unisip, gsmBox1, gsmBox2}), all of integer type.
+The \emph{taskNo} attribute identifies the test number but not a single test (e.g. an operator user has selected three different tests to be executed, all of the three tests will have the same \emph{taskNo} to identify them together as belonging to one test group and \emph{taskId} identifies each single test and will be explained later).
+\emph{sipServer} represents the Asterisk server ping result. \emph{sipGate} is used to represent the SIP Gate server for the landline calls (\url{http://www.sipgate.de}). \emph{uniSip} represents the ping results for our local University telephone network SIP server.
+\emph{gsmBox1} and \emph{gsmBox2} are the two single-chip Linux computers (BeagleBoard), that controll two cell phones each one (i.e. they are also known under the name of \emph{nanoBTSx}).
+\emph{taskNo} is the primary and unique key in the table \emph{PingResultTable}. Rest of the attributes (i.e. \emph{sipServer, sipGate, uniSip, gsmBox1, gsmBox2}) are used to insert the ping results, if the assigned servers are reachable or not.
+Before any test attempt is made, our test software first tries to ping the servers. These results are then stored in the \emph{PingResultTable}.
+\par The \emph{ErrorCodeTable} table defines all the possible test results in the system, in other words it represents a list with error codes with their appropriate descriptions and meanings. It consists of two attributes (\emph{errorcode} and \emph{description}), the first is of integer type and the second of varchar type (the description message is allowed to be only 100 characters long).
+The \emph{ErrorCodeTable} table is used by the main test software (i.e. controller) to report the operator user what kind of error had appeared in the system.
+\par The \emph{DeviceAddressTable} is the table containing the location and identification data for each server and device. The table consists of seven attributes, \emph{deviceName, portName, number, lastChange, username, password, server}.
+\emph{deviceName} is the attribute with the name of the device or server (e.g. GSMRZ1 or landline), it is of varchar type. \emph{portName} is the attribute field with the location address for a cell phone (e.g. \emph{/dev/ttyUSB1}) or 'localhost' instead of NULL value for a server, it is of the varchar type.
+\emph{number} represents the number of the used service (i.e. number of the cell phone, SIP, etc.) and is of varchar type.
+\emph{lastChange} is a time value and represents the date and time the given entry was modified (we had plans in future versions of our test software that if an device gets a new IP address assigned it automatically changes it in the database).
+\emph{username} is the field with the username stored in for a server/service, like SIP and landline. \emph{password} attribute stores the password information for the given service. The \emph{server} attribute stores information about the location of the server, IP or DNS address of the server. All three fields, \emph{username}, \emph{password} and \emph{server} are of varchar type.
+The information stored in the given table is used by the test software to obtain usernames, passwords and addresses of the used services for the tests.
+\par The \emph{ResultTable} table is used by the test system to store final results for the performed tests. Our given table consists of two fields, \emph{taskID} and \emph{result} and both are of integer type. For each test entry with unique \emph{taskID} an error code is assigned in the \emph{result} field,
+depending on the test results. Error codes found in the \emph{ErrorCodeTable} table can be only assigned to this field.
+\par The \emph{TempTaskTable} table represents the table with the tasks the system has to execute next time the test software is started. The given table gets filled up every time an operator user submits one or more test cases to be performed.
\newpage
\section{Software design} % section 2.1
\begin{figure}[ht!]
@@ -192,17 +210,17 @@ our first approach was inferior and slower. The state controlled method connecte
\caption[]{GSM class diagram for controlling the cell phones}
\end{figure}
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
+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}
Our socket communication code is based on the example given in the Python socket manual \cite{socket}.
We extended it into two classes, a client and a server class. We had used the TCP protocol to base our two classes on\footnote{TCP is reliable compared to UDP (i.e. transmitted packets get also delivered),
-packets are ordered when received and data are received in a stream (i.e. multiple packets can be read at once.)}.
+packets are ordered when received and data are received in a stream (i.e. multiple packets can be read at once).}.
The Server class can be seen in the following figure. The server class is implemented to accept only local connections\footnote{More details are given in the section 7.1}.
-First we determine our IP address and then create the socket to listen only for the same IP address (with a different IP address than the selected one a connection cannot be even established.)
+First we determine our IP address and then create the socket to listen only for the same IP address (with a different IP address than the selected one a connection cannot be even established).
One has to define the port on which the server object should listen.
When receiving data one can easily define the timeout to be raised if data are not received in the timeout range or set it to \emph{0} to infinitely wait for the buffer to be filled with received data. While testing the server class we had the problem to listen on the same port if the application was forcibly\footnote{Manually closed using CTRL+C and run again.} restarted in less than 60 seconds. We got the error message: \emph{"Address already in use"}.
-This is not known as error behavior but rather an option to help the server to catch lost live packets (i.e. packets that are still in the network looking for it is goal destination.)
+This is not known as error behavior but rather an option to help the server to catch lost live packets (i.e. packets that are still in the network looking for it is goal destination).
We solved the problem by changing the socket options with the \emph{SO\_REUSEADDR} parameter. This enabled us to get around the error when we tried to restart our server application.
Before solving the problem without using the socket parameter, we had another solution to get around this problem by killing the application running the port, this old method is obsolete now.
\begin{figure}[ht!]
@@ -210,7 +228,7 @@ Before solving the problem without using the socket parameter, we had another so
\includegraphics[scale=0.8]{serverClass.png}
\caption[]{Server class, used by the server application}
\end{figure}
-In the process of testing the client class we did not have any major problems. The only major flow we had to debug was when one of the sides disconnects that we get out of the waiting loop if the timeout variable was set to \emph{0} (i.e. infinite waiting loop.)
+In the process of testing the client class we did not have any major problems. The only major flow we had to debug was when one of the sides disconnects that we get out of the waiting loop if the timeout variable was set to \emph{0} (i.e. infinite waiting loop).
The client class can be seen in the following figure. To initialize the client object one needs to define the IP address and the port of the server application listening on it.
\begin{figure}[hb!]
\centering
@@ -347,12 +365,12 @@ of receiving corresponding message. Otherwise it enters the exit state and then
\section{Security and safety of the system}
Safety and security of the software plays a major role in our project.
It is of vital importance that only as few as possible people have access to our test system since the resulting data could be exploited to plan an attack
-(e.g. assume the University alarm system uses the SIP gateway to connect to the outside world and to alarm the police, if one knows that the SIP gateway is not working properly, a burglar could plan to rob the University building just at that moment.) Therefore the choice to go Open Source is justified due to the fact that one should know how every single detail of the system works.
+(e.g. assume the University alarm system uses the SIP gateway to connect to the outside world and to alarm the police, if one knows that the SIP gateway is not working properly, a burglar could plan to rob the University building just at that moment). Therefore the choice to go Open Source is justified due to the fact that one should know how every single detail of the system works.
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.
+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 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.)
+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).
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.
@@ -362,7 +380,7 @@ 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 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.)
+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):
@@ -424,7 +442,7 @@ like country, state, organization name and etc which we had to enter to resume.
openssl req -new -key server.key -out server.csr
\end{lstlisting}
\par In the next step we had to sign the certificate signing request and enter the amount of days for how long it should be valid.
-In our case we entered the duration of one year, one can make it for longer periods as well (i.e. the amount of 365 has to be changed.)
+In our case we entered the duration of one year, one can make it for longer periods as well (i.e. the amount of 365 has to be changed).
\begin{lstlisting}
openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt
\end{lstlisting}
@@ -463,7 +481,7 @@ refik@ubuntu:/etc/apache2/sites-available$ sudo cp default-ssl default-ssl_origi
refik@ubuntu:/etc/apache2/sites-available$ sudo vim default-ssl
\end{lstlisting}
\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.)
+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>
<VirtualHost _default_:443>
@@ -527,7 +545,7 @@ Since we used the Open Source platform to base our project on, it was certain we
The dynamic parts of the web site were programmed using PHP and JavaScript. The GUI was done using CSS.
The web site opens TCP/IP sessions between itself and the Python test software. Due reasons explained in the section above,
a test user needs first to enter his username and password to acccess the web site. Then a test user can manually select what type of tests he wants to perform or he can select already defined test,
-like the simple, smart or full test. (Describe here these three type of tests.)
+like the simple, smart or full test. (Describe here these three type of tests).
Data about the performing tests are inserted into the database only in the case if the mutex lock for the web site can be obtained\footnote{The mutex lock will be explained in the next subsection.}.
This way we can avoid inserting data about the test in case there is already a test user on the website performing some tests on the system.
\subsection{Communication between the web page and the test software}
diff --git a/notFinishedCode/Report/test.toc b/notFinishedCode/Report/test.toc
index 38b1ed2..e0a9985 100644
--- a/notFinishedCode/Report/test.toc
+++ b/notFinishedCode/Report/test.toc
@@ -5,28 +5,28 @@
\contentsline {subsection}{\numberline {2.2}Software requirements}{5}
\contentsline {subsection}{\numberline {2.3}Hardware requirements}{7}
\contentsline {section}{\numberline {3}Database design}{8}
-\contentsline {section}{\numberline {4}Software design}{9}
-\contentsline {subsection}{\numberline {4.1}Database access}{10}
-\contentsline {subsection}{\numberline {4.2}Controlling the cell phones}{10}
-\contentsline {subsection}{\numberline {4.3}Client and Server class}{11}
-\contentsline {subsection}{\numberline {4.4}Ping class}{12}
-\contentsline {subsection}{\numberline {4.5}Data logging}{13}
-\contentsline {subsection}{\numberline {4.6}SSH Class}{13}
-\contentsline {section}{\numberline {5}Hardware design}{14}
-\contentsline {subsection}{\numberline {5.1}BeagleBoard}{14}
-\contentsline {subsection}{\numberline {5.2}Cell phones}{15}
-\contentsline {subsection}{\numberline {5.3}Cables for the cell phones}{15}
-\contentsline {subsection}{\numberline {5.4}Server}{15}
-\contentsline {section}{\numberline {6}Communication protocol}{16}
-\contentsline {subsection}{\numberline {6.1}Handler side}{16}
-\contentsline {subsection}{\numberline {6.2}Verification of the protocol}{17}
-\contentsline {section}{\numberline {7}Security and safety of the system}{18}
-\contentsline {subsection}{\numberline {7.1}Encryption of the communication channels}{18}
-\contentsline {subsection}{\numberline {7.2}Security on the web site}{19}
-\contentsline {section}{\numberline {8}Web page}{23}
-\contentsline {subsection}{\numberline {8.1}Communication between the web page and the test software}{23}
-\contentsline {subsection}{\numberline {8.2}Results on the web page}{23}
-\contentsline {section}{\numberline {9}How to use and start the system}{25}
-\contentsline {subsection}{\numberline {9.1}Required libraries}{25}
-\contentsline {subsection}{\numberline {9.2}Configuring hardware}{25}
-\contentsline {section}{\numberline {10}Conclusion}{26}
+\contentsline {section}{\numberline {4}Software design}{10}
+\contentsline {subsection}{\numberline {4.1}Database access}{11}
+\contentsline {subsection}{\numberline {4.2}Controlling the cell phones}{11}
+\contentsline {subsection}{\numberline {4.3}Client and Server class}{12}
+\contentsline {subsection}{\numberline {4.4}Ping class}{13}
+\contentsline {subsection}{\numberline {4.5}Data logging}{14}
+\contentsline {subsection}{\numberline {4.6}SSH Class}{14}
+\contentsline {section}{\numberline {5}Hardware design}{15}
+\contentsline {subsection}{\numberline {5.1}BeagleBoard}{15}
+\contentsline {subsection}{\numberline {5.2}Cell phones}{16}
+\contentsline {subsection}{\numberline {5.3}Cables for the cell phones}{16}
+\contentsline {subsection}{\numberline {5.4}Server}{16}
+\contentsline {section}{\numberline {6}Communication protocol}{17}
+\contentsline {subsection}{\numberline {6.1}Handler side}{17}
+\contentsline {subsection}{\numberline {6.2}Verification of the protocol}{18}
+\contentsline {section}{\numberline {7}Security and safety of the system}{19}
+\contentsline {subsection}{\numberline {7.1}Encryption of the communication channels}{19}
+\contentsline {subsection}{\numberline {7.2}Security on the web site}{20}
+\contentsline {section}{\numberline {8}Web page}{24}
+\contentsline {subsection}{\numberline {8.1}Communication between the web page and the test software}{24}
+\contentsline {subsection}{\numberline {8.2}Results on the web page}{24}
+\contentsline {section}{\numberline {9}How to use and start the system}{26}
+\contentsline {subsection}{\numberline {9.1}Required libraries}{26}
+\contentsline {subsection}{\numberline {9.2}Configuring hardware}{26}
+\contentsline {section}{\numberline {10}Conclusion}{27}