Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-RAN
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
promise
OpenXG-RAN
Commits
8cfe28f6
Commit
8cfe28f6
authored
Apr 04, 2016
by
Rohit Gupta
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
minor fix to reset the modem if serial ports not found
parent
b48c64d4
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
21 deletions
+31
-21
cmake_targets/autotests/tools/configure_cots_bandrich_ue.py
cmake_targets/autotests/tools/configure_cots_bandrich_ue.py
+15
-11
cmake_targets/autotests/tools/configure_cots_huaweiE398_ue.py
...e_targets/autotests/tools/configure_cots_huaweiE398_ue.py
+16
-10
No files found.
cmake_targets/autotests/tools/configure_cots_bandrich_ue.py
View file @
8cfe28f6
...
@@ -28,19 +28,23 @@ from lib_autotest import *
...
@@ -28,19 +28,23 @@ from lib_autotest import *
def
find_open_port
():
def
find_open_port
():
global
serial_port
,
ser
global
serial_port
,
ser
max_ports
=
100
max_ports
=
100
while
True
:
if
os
.
path
.
exists
(
serial_port
)
==
True
:
if
os
.
path
.
exists
(
serial_port
)
==
True
:
return
serial_port
return
serial_port
for
port
in
range
(
2
,
100
):
for
port
in
range
(
2
,
100
):
serial_port
=
'/dev/ttyUSB'
+
str
(
port
)
serial_port_tmp
=
'/dev/ttyUSB'
+
str
(
port
)
if
os
.
path
.
exists
(
serial_port
)
==
True
:
if
os
.
path
.
exists
(
serial_port_tmp
)
==
True
:
print
'New Serial Port : '
+
serial_port
print
'New Serial Port : '
+
serial_port_tmp
serial_port
=
serial_port_tmp
break
break
if
serial_port
==
''
:
print
" Not able to detect valid serial ports. Resetting the modem now..."
reset_ue
()
else
:
ser
=
serial
.
Serial
(
port
=
serial_port
)
ser
=
serial
.
Serial
(
port
=
serial_port
)
return
return
#serial_port = '/dev/ttyUSB2'
#serial_port = '/dev/ttyUSB2'
bandrich_ppd_config
=
os
.
environ
.
get
(
'OPENAIR_DIR'
)
+
'/cmake_targets/autotests/tools/wdial.bandrich.conf'
bandrich_ppd_config
=
os
.
environ
.
get
(
'OPENAIR_DIR'
)
+
'/cmake_targets/autotests/tools/wdial.bandrich.conf'
...
...
cmake_targets/autotests/tools/configure_cots_huaweiE398_ue.py
View file @
8cfe28f6
...
@@ -28,19 +28,25 @@ from lib_autotest import *
...
@@ -28,19 +28,25 @@ from lib_autotest import *
def
find_open_port
():
def
find_open_port
():
global
serial_port
,
ser
global
serial_port
,
ser
max_ports
=
100
max_ports
=
100
while
True
:
if
os
.
path
.
exists
(
serial_port
)
==
True
:
if
os
.
path
.
exists
(
serial_port
)
==
True
:
return
serial_port
return
serial_port
for
port
in
range
(
0
,
100
):
for
port
in
range
(
2
,
100
):
serial_port
=
'/dev/ttyUSB'
+
str
(
port
)
serial_port_tmp
=
'/dev/ttyUSB'
+
str
(
port
)
if
os
.
path
.
exists
(
serial_port
)
==
True
:
if
os
.
path
.
exists
(
serial_port_tmp
)
==
True
:
print
'New Serial Port : '
+
serial_port
print
'New Serial Port : '
+
serial_port_tmp
serial_port
=
serial_port_tmp
break
break
if
serial_port
==
''
:
print
" Not able to detect valid serial ports. Resetting the modem now..."
reset_ue
()
else
:
ser
=
serial
.
Serial
(
port
=
serial_port
)
ser
=
serial
.
Serial
(
port
=
serial_port
)
return
return
#serial_port = '/dev/ttyUSB2'
#serial_port = '/dev/ttyUSB2'
bandrich_ppd_config
=
os
.
environ
.
get
(
'OPENAIR_DIR'
)
+
'/cmake_targets/autotests/tools/wdial.bandrich.conf'
bandrich_ppd_config
=
os
.
environ
.
get
(
'OPENAIR_DIR'
)
+
'/cmake_targets/autotests/tools/wdial.bandrich.conf'
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment