summaryrefslogtreecommitdiffstats
path: root/Src/PyCatcher/src
diff options
context:
space:
mode:
Diffstat (limited to 'Src/PyCatcher/src')
-rw-r--r--Src/PyCatcher/src/driverConnector.py33
-rw-r--r--Src/PyCatcher/src/driverConnector.pycbin5536 -> 0 bytes
-rw-r--r--Src/PyCatcher/src/filterDialog.pycbin1793 -> 0 bytes
-rw-r--r--Src/PyCatcher/src/filters.pycbin2363 -> 0 bytes
-rw-r--r--Src/PyCatcher/src/main.py2
-rw-r--r--Src/PyCatcher/src/pyCatcherController.py7
-rw-r--r--Src/PyCatcher/src/pyCatcherController.pycbin4529 -> 0 bytes
-rw-r--r--Src/PyCatcher/src/pyCatcherModel.py27
-rw-r--r--Src/PyCatcher/src/pyCatcherModel.pycbin3544 -> 0 bytes
-rw-r--r--Src/PyCatcher/src/pyCatcherSettings.pycbin717 -> 0 bytes
-rw-r--r--Src/PyCatcher/src/pyCatcherView.py18
-rw-r--r--Src/PyCatcher/src/pyCatcherView.pycbin8559 -> 0 bytes
-rw-r--r--Src/PyCatcher/src/xdot.pycbin97140 -> 0 bytes
13 files changed, 71 insertions, 16 deletions
diff --git a/Src/PyCatcher/src/driverConnector.py b/Src/PyCatcher/src/driverConnector.py
index 2167219..20791dd 100644
--- a/Src/PyCatcher/src/driverConnector.py
+++ b/Src/PyCatcher/src/driverConnector.py
@@ -86,29 +86,54 @@ class ScanThread(threading.Thread):
base_station = BaseStationInformation()
#get country
line = line = scan_process.stdout.readline()
- match = re.search(r'country\s(\w+)',line)
+ match = re.search(r'Country:\s(\w+)',line)
if match:
base_station.country = match.group(1)
#get provider
line = line = scan_process.stdout.readline()
- match = re.search(r'provider\s(.+)',line)
+ match = re.search(r'Provider:\s(.+)',line)
if match:
base_station.provider = match.group(1)
#get arfcn
line = line = scan_process.stdout.readline()
- match = re.search(r'arfcn\s(\d+)',line)
+ match = re.search(r'ARFCN:\s(\d+)',line)
if match:
base_station.arfcn = int(match.group(1))
+ #get cell id
+ line = line = scan_process.stdout.readline()
+ match = re.search(r'Cell ID:\s(\d+)',line)
+ if match:
+ base_station.arfcn = int(match.group(1))
+ #get lac
+ line = line = scan_process.stdout.readline()
+ match = re.search(r'LAC:\s(\d+)',line)
+ if match:
+ base_station.lac = int(match.group(1))
+ #get bsic
+ line = line = scan_process.stdout.readline()
+ match = re.search(r'BSIC:\s(\.+)\s',line)
+ if match:
+ base_station.bsic = int(match.group(1))
#get rxlev
line = line = scan_process.stdout.readline()
match = re.search(r'rxlev\s(.\d+)',line)
if match:
base_station.rxlev = match.group(1)
- #get neighbours
+ #get si2
line = line = scan_process.stdout.readline()
match = re.search(r'si2\s(.+)',line)
if match:
base_station.system_info_t2 = match.group(1).split(' ')
+ #get si2bis
+ line = line = scan_process.stdout.readline()
+ match = re.search(r'si2bis\s(.+)',line)
+ if match:
+ base_station.system_info_t2bis = match.group(1).split(' ')
+ #get si2ter
+ line = line = scan_process.stdout.readline()
+ match = re.search(r'si2ter\s(.+)',line)
+ if match:
+ base_station.system_info_t2ter = match.group(1).split(' ')
#endinfo
line = line = scan_process.stdout.readline()
diff --git a/Src/PyCatcher/src/driverConnector.pyc b/Src/PyCatcher/src/driverConnector.pyc
deleted file mode 100644
index 7fc6e0c..0000000
--- a/Src/PyCatcher/src/driverConnector.pyc
+++ /dev/null
Binary files differ
diff --git a/Src/PyCatcher/src/filterDialog.pyc b/Src/PyCatcher/src/filterDialog.pyc
deleted file mode 100644
index bdd619c..0000000
--- a/Src/PyCatcher/src/filterDialog.pyc
+++ /dev/null
Binary files differ
diff --git a/Src/PyCatcher/src/filters.pyc b/Src/PyCatcher/src/filters.pyc
deleted file mode 100644
index 08d5e0e..0000000
--- a/Src/PyCatcher/src/filters.pyc
+++ /dev/null
Binary files differ
diff --git a/Src/PyCatcher/src/main.py b/Src/PyCatcher/src/main.py
index 0bbda10..4e3de07 100644
--- a/Src/PyCatcher/src/main.py
+++ b/Src/PyCatcher/src/main.py
@@ -2,6 +2,8 @@ from pyCatcherController import PyCatcherController
def main ():
controller = PyCatcherController()
+
+
if __name__ == '__main__':
main() \ No newline at end of file
diff --git a/Src/PyCatcher/src/pyCatcherController.py b/Src/PyCatcher/src/pyCatcherController.py
index 0810e97..ce8c938 100644
--- a/Src/PyCatcher/src/pyCatcherController.py
+++ b/Src/PyCatcher/src/pyCatcherController.py
@@ -10,8 +10,8 @@ from filters import ARFCNFilter,FoundFilter,ProviderFilter
class PyCatcherController:
def __init__(self):
self._base_station_list = BaseStationInformationList()
- store = gtk.ListStore(str,str,str,str)
- store.append(('-','-','-','-'))
+ store = gtk.ListStore(str,str,str,str, str)
+ store.append(('-','-','-','-', '-'))
self.bs_tree_list_data = store
self._gui = PyCatcherGUI(self)
self._driver_connector = DriverConnector()
@@ -57,7 +57,8 @@ class PyCatcherController:
def trigger_redraw(self):
dotcode = self._base_station_list.get_dot_code(self._filters,self.found_filter)
- self._gui.load_dot(dotcode)
+ if dotcode != 'digraph bsnetwork { }':
+ self._gui.load_dot(dotcode)
def _firmware_waiting_callback(self):
self._gui.log_line("firmware waiting for device")
diff --git a/Src/PyCatcher/src/pyCatcherController.pyc b/Src/PyCatcher/src/pyCatcherController.pyc
deleted file mode 100644
index 87994f1..0000000
--- a/Src/PyCatcher/src/pyCatcherController.pyc
+++ /dev/null
Binary files differ
diff --git a/Src/PyCatcher/src/pyCatcherModel.py b/Src/PyCatcher/src/pyCatcherModel.py
index a857760..5de6234 100644
--- a/Src/PyCatcher/src/pyCatcherModel.py
+++ b/Src/PyCatcher/src/pyCatcherModel.py
@@ -3,22 +3,27 @@ import gtk
import math
class BaseStationInformation:
- #TODO: examine plmn permitted byte
- #TODO: examine emergency call capability
+
def __init__ (self):
self.country = 'Nowhere'
self.provider = 'Carry'
self.arfcn = 0
self.rxlev = 0
self.system_info_t2 = []
+ self.system_info_t2bis = []
+ self.system_info_t2ter = []
self.discovery_time = datetime.datetime.now().strftime('%T')
self.found = False
-
+ self.bsic = ''
+ self.lac = 0
+ self.cell = 0
+ self.rules_report = {}
+ self.evaluation = 'NYE'
+
def get_list_model(self):
- return (self.provider, str(self.arfcn), str(self.rxlev), self.discovery_time)
+ return (self.provider, str(self.arfcn), str(self.rxlev), self.evaluation, self.discovery_time)
def get_neighbour_arfcn(self):
- #TODO: implement this for bis/tar sysinfo
neighbours = self.system_info_t2[3:19]
bin_representation = ''
neighbour_arfcn = []
@@ -30,8 +35,7 @@ class BaseStationInformation:
>>> for i, bit in enumerate(reversed(a)):
... if bit == '1':
... print i
- '''
-
+ '''
for x in xrange(1,125):
index = 0-x
bit = bin_representation[index]
@@ -39,6 +43,15 @@ class BaseStationInformation:
neighbour_arfcn.append(abs(index))
return neighbour_arfcn
+ def get_neighbour_arfcn_ter(self):
+ pass
+
+ def get_neighbour_arfcn_bis(self):
+ pass
+
+ def create_lof(self):
+ pass
+
class BaseStationInformationList:
def __init__(self):
self._base_station_list = []
diff --git a/Src/PyCatcher/src/pyCatcherModel.pyc b/Src/PyCatcher/src/pyCatcherModel.pyc
deleted file mode 100644
index c4e2eb2..0000000
--- a/Src/PyCatcher/src/pyCatcherModel.pyc
+++ /dev/null
Binary files differ
diff --git a/Src/PyCatcher/src/pyCatcherSettings.pyc b/Src/PyCatcher/src/pyCatcherSettings.pyc
deleted file mode 100644
index 3f86577..0000000
--- a/Src/PyCatcher/src/pyCatcherSettings.pyc
+++ /dev/null
Binary files differ
diff --git a/Src/PyCatcher/src/pyCatcherView.py b/Src/PyCatcher/src/pyCatcherView.py
index 4daa22e..399ef6e 100644
--- a/Src/PyCatcher/src/pyCatcherView.py
+++ b/Src/PyCatcher/src/pyCatcherView.py
@@ -17,6 +17,9 @@ class PyCatcherGUI:
self._main_window.show()
self._filter_window = self._builder.get_object('filter_window')
+ self._detail_window = self._builder.get_object('detail_view')
+ self._rules_window = self._builder.get_object('rules_window')
+ self._evaluators_window = self._builder.get_object('evaluators_window')
self._catcher_controller = catcher_controller
@@ -101,6 +104,18 @@ class PyCatcherGUI:
self._update_filters()
self._filter_window.hide()
+ def _on_rules_close_clicked(self, widget):
+ self._rules_window.hide()
+
+ def _on_evaluators_clicked(self, widget):
+ self._evaluators_window.show()
+
+ def _on_rules_clicked(self, widget):
+ self._rules_window.show()
+
+ def _on_evaluators_close_clicked(self, widget):
+ self._evaluators_window.hide()
+
def _on_open_file_clicked(self, widget):
chooser = gtk.FileChooserDialog(title="Open dot File",
action=gtk.FILE_CHOOSER_ACTION_OPEN,
@@ -155,8 +170,7 @@ class PyCatcherGUI:
dlg = gtk.MessageDialog(type=gtk.MESSAGE_INFO,
message_format=str(message)
- )
-
+ )
dlg.set_title(title)
dlg.show()
time.sleep(time_to_sleep)
diff --git a/Src/PyCatcher/src/pyCatcherView.pyc b/Src/PyCatcher/src/pyCatcherView.pyc
deleted file mode 100644
index fe0075b..0000000
--- a/Src/PyCatcher/src/pyCatcherView.pyc
+++ /dev/null
Binary files differ
diff --git a/Src/PyCatcher/src/xdot.pyc b/Src/PyCatcher/src/xdot.pyc
deleted file mode 100644
index 6b140a4..0000000
--- a/Src/PyCatcher/src/xdot.pyc
+++ /dev/null
Binary files differ