summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortt412011-09-05 00:46:18 +0200
committertt412011-09-05 00:46:18 +0200
commit09b6bc5a641e4706c15494c7683dbb99bc1a0952 (patch)
tree58b73c565fdee0af8437db7eacbb4f7f46ae1c99
parentReading the posted variables from web site! (diff)
downloadgsm-selftest-09b6bc5a641e4706c15494c7683dbb99bc1a0952.tar.gz
gsm-selftest-09b6bc5a641e4706c15494c7683dbb99bc1a0952.tar.xz
gsm-selftest-09b6bc5a641e4706c15494c7683dbb99bc1a0952.zip
new row name for device address table.remove deviceIP and add portName
-rw-r--r--Database/gsmselftesting.sql2
-rw-r--r--For Weekly Test/12-09-2011/devicePortList.log5
-rw-r--r--For Weekly Test/12-09-2011/dmesg.log52
-rw-r--r--For Weekly Test/12-09-2011/usbDetect.py26
4 files changed, 73 insertions, 12 deletions
diff --git a/Database/gsmselftesting.sql b/Database/gsmselftesting.sql
index 15126ee..d7e6ad3 100644
--- a/Database/gsmselftesting.sql
+++ b/Database/gsmselftesting.sql
@@ -30,7 +30,7 @@ USE `gsmselftesting`;
CREATE TABLE IF NOT EXISTS `DeviceAddressTable` (
`deviceName` varchar(15) NOT NULL,
- `deviceIP` varchar(60) NOT NULL,
+ `portName` varchar(15) NOT NULL,
`number` varchar(20) NOT NULL,
`lastChange` datetime NOT NULL,
`username` varchar(20) NOT NULL,
diff --git a/For Weekly Test/12-09-2011/devicePortList.log b/For Weekly Test/12-09-2011/devicePortList.log
index 16ad7c7..984e53e 100644
--- a/For Weekly Test/12-09-2011/devicePortList.log
+++ b/For Weekly Test/12-09-2011/devicePortList.log
@@ -1 +1,4 @@
-[O2] [/dev/ttyUSB1]
+
+[O2] [/dev/ttyUSB0][015782677224]
+
+[Voda] [/dev/ttyUSB1][015128040906]
diff --git a/For Weekly Test/12-09-2011/dmesg.log b/For Weekly Test/12-09-2011/dmesg.log
index 653c5f5..e2055e9 100644
--- a/For Weekly Test/12-09-2011/dmesg.log
+++ b/For Weekly Test/12-09-2011/dmesg.log
@@ -6,3 +6,55 @@
[ 8875.087711] usb 2-1.2: pl2303 converter now attached to ttyUSB0
[ 9604.128581] usb 2-1.2: pl2303 converter now attached to ttyUSB0
[19245.501608] usb 2-1.4: pl2303 converter now attached to ttyUSB1
+[28935.537926] usb 2-1.2: pl2303 converter now attached to ttyUSB0
+[29468.049557] usb 2-1.2: pl2303 converter now attached to ttyUSB1
+[53001.536734] usb 2-1.2: pl2303 converter now attached to ttyUSB0
+[53492.965185] usb 2-1.2: pl2303 converter now attached to ttyUSB0
+[54654.354061] usb 2-1.4: pl2303 converter now attached to ttyUSB1
+[54700.573748] usb 2-1.4: pl2303 converter now attached to ttyUSB1
+[54793.269884] usb 2-1.4: pl2303 converter now attached to ttyUSB1
+[54879.326084] usb 2-1.4: pl2303 converter now attached to ttyUSB1
+[54946.740773] usb 2-1.4: pl2303 converter now attached to ttyUSB1
+[54991.776299] usb 2-1.2: pl2303 converter now attached to ttyUSB0
+[55003.275043] usb 2-1.4: pl2303 converter now attached to ttyUSB1
+[55023.959080] usb 2-1.4: pl2303 converter now attached to ttyUSB1
+[55083.715582] usb 2-1.4: pl2303 converter now attached to ttyUSB1
+[55236.634679] usb 2-1.2: pl2303 converter now attached to ttyUSB0
+[55261.778953] usb 2-1.4: pl2303 converter now attached to ttyUSB1
+[55387.169610] usb 2-1.2: pl2303 converter now attached to ttyUSB0
+[55394.566623] usb 2-1.4: pl2303 converter now attached to ttyUSB1
+[55532.205311] usb 2-1.2: pl2303 converter now attached to ttyUSB0
+[55541.653714] usb 2-1.4: pl2303 converter now attached to ttyUSB1
+[55625.337125] usb 2-1.2: pl2303 converter now attached to ttyUSB0
+[55629.754681] usb 2-1.4: pl2303 converter now attached to ttyUSB1
+[55729.322986] usb 2-1.2: pl2303 converter now attached to ttyUSB0
+[55738.791674] usb 2-1.4: pl2303 converter now attached to ttyUSB1
+[55786.543594] usb 2-1.2: pl2303 converter now attached to ttyUSB0
+[55797.525001] usb 2-1.4: pl2303 converter now attached to ttyUSB1
+[55800.077695] usb 2-1.4: pl2303 converter now attached to ttyUSB1
+[55884.223141] usb 2-1.2: pl2303 converter now attached to ttyUSB0
+[55946.398959] usb 2-1.4: pl2303 converter now attached to ttyUSB1
+[56053.650388] usb 2-1.2: pl2303 converter now attached to ttyUSB0
+[56059.014012] usb 2-1.4: pl2303 converter now attached to ttyUSB1
+[56128.765774] usb 2-1.2: pl2303 converter now attached to ttyUSB0
+[56209.894827] usb 2-1.4: pl2303 converter now attached to ttyUSB1
+[56221.896790] usb 2-1.2: pl2303 converter now attached to ttyUSB0
+[56253.560921] usb 2-1.4: pl2303 converter now attached to ttyUSB1
+[56304.888132] usb 2-1.2: pl2303 converter now attached to ttyUSB0
+[56358.518151] usb 2-1.2: pl2303 converter now attached to ttyUSB0
+[56367.452069] usb 2-1.4: pl2303 converter now attached to ttyUSB1
+[56585.720263] usb 2-1.2: pl2303 converter now attached to ttyUSB0
+[56621.554815] usb 2-1.2: pl2303 converter now attached to ttyUSB0
+[56634.019998] usb 2-1.4: pl2303 converter now attached to ttyUSB1
+[56727.181276] usb 2-1.2: pl2303 converter now attached to ttyUSB0
+[56747.247817] usb 2-1.4: pl2303 converter now attached to ttyUSB1
+[58487.933271] usb 2-1.2: pl2303 converter now attached to ttyUSB0
+[58542.572335] usb 2-1.2: pl2303 converter now attached to ttyUSB0
+[58552.088611] usb 2-1.4: pl2303 converter now attached to ttyUSB1
+[58586.138617] usb 2-1.2: pl2303 converter now attached to ttyUSB0
+[58592.578748] usb 2-1.4: pl2303 converter now attached to ttyUSB1
+[58613.454682] usb 2-1.2: pl2303 converter now attached to ttyUSB0
+[58621.430555] usb 2-1.4: pl2303 converter now attached to ttyUSB1
+[58655.469278] usb 2-1.4: pl2303 converter now attached to ttyUSB0
+[58853.604655] usb 2-1.2: pl2303 converter now attached to ttyUSB0
+[58861.712086] usb 2-1.4: pl2303 converter now attached to ttyUSB1
diff --git a/For Weekly Test/12-09-2011/usbDetect.py b/For Weekly Test/12-09-2011/usbDetect.py
index 311ebb2..695b59c 100644
--- a/For Weekly Test/12-09-2011/usbDetect.py
+++ b/For Weekly Test/12-09-2011/usbDetect.py
@@ -1,9 +1,12 @@
from serial import * #serial port library
+from time import sleep
import sys
+import checkingNumberClass
def initLog():
+ sleep(0.5)
portLog = os.popen('dmesg | grep \'pl2303 converter now attached to ttyUSB\'').read()
-
+ sleep(0.5)
dmesgfile = open('dmesg.log', 'w')
dmesgfile.write(portLog)
dmesgfile.close()
@@ -12,10 +15,8 @@ def initLine():
global i
logfile = open('dmesg.log')
i = 0
-
while 1:
line = logfile.readline()
-
if not line:
break
i = i+1
@@ -33,12 +34,17 @@ def initPort():
if x == i:
lines = line
logfile.close()
+ print lines
def newConf(device):
+ x = checkingNumberClass.serialPort(port)
+ x.findNumber()
+ number = x.number
- portDev = '[/dev/'+port+']\n'
- file.write('['+device+'] ')
+ portDev = '[/dev/'+port+']'
+ file.write('\n['+device+'] ')
file.writelines(portDev)
+ file.writelines('['+number+']\n')
def searchList():
global found
@@ -63,24 +69,23 @@ def initVoda():
searchList()
if found == 1:
initRepeat()
- if found == 0:
+ elif found == 0:
portList.append(['Voda', port])
newConf('Voda')
- if repeat == True:
+ elif repeat == True:
initVoda()
def initEplus():
print "pluged in, Eplus Mobile Device [then Enter]"
input = sys.stdin.readline().rstrip("\r\n")
scanPort()
-
searchList()
if found == 1:
initRepeat()
- if found == 0:
+ elif found == 0:
portList.append(['Eplus', port])
newConf('Eplus')
- if repeat == True:
+ elif repeat == True:
initEplus()
def initTmobile():
@@ -143,6 +148,7 @@ while True:
if input == "q":
break
+sys.exit()