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
canghaiwuhen
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
Hide 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,17 +28,21 @@ from lib_autotest import *
def
find_open_port
():
global
serial_port
,
ser
max_ports
=
100
if
os
.
path
.
exists
(
serial_port
)
==
True
:
return
serial_port
for
port
in
range
(
2
,
100
):
serial_port
=
'/dev/ttyUSB'
+
str
(
port
)
if
os
.
path
.
exists
(
serial_port
)
==
True
:
print
'New Serial Port : '
+
serial_port
break
ser
=
serial
.
Serial
(
port
=
serial_port
)
return
while
True
:
if
os
.
path
.
exists
(
serial_port
)
==
True
:
return
serial_port
for
port
in
range
(
2
,
100
):
serial_port_tmp
=
'/dev/ttyUSB'
+
str
(
port
)
if
os
.
path
.
exists
(
serial_port_tmp
)
==
True
:
print
'New Serial Port : '
+
serial_port_tmp
serial_port
=
serial_port_tmp
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
)
return
#serial_port = '/dev/ttyUSB2'
...
...
cmake_targets/autotests/tools/configure_cots_huaweiE398_ue.py
View file @
8cfe28f6
...
...
@@ -28,16 +28,22 @@ from lib_autotest import *
def
find_open_port
():
global
serial_port
,
ser
max_ports
=
100
if
os
.
path
.
exists
(
serial_port
)
==
True
:
return
serial_port
for
port
in
range
(
0
,
100
):
serial_port
=
'/dev/ttyUSB'
+
str
(
port
)
if
os
.
path
.
exists
(
serial_port
)
==
True
:
print
'New Serial Port : '
+
serial_port
break
ser
=
serial
.
Serial
(
port
=
serial_port
)
return
while
True
:
if
os
.
path
.
exists
(
serial_port
)
==
True
:
return
serial_port
for
port
in
range
(
2
,
100
):
serial_port_tmp
=
'/dev/ttyUSB'
+
str
(
port
)
if
os
.
path
.
exists
(
serial_port_tmp
)
==
True
:
print
'New Serial Port : '
+
serial_port_tmp
serial_port
=
serial_port_tmp
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
)
return
...
...
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