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
spbro
OpenXG-RAN
Commits
53e624e4
Commit
53e624e4
authored
Apr 05, 2021
by
hardy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
improving module control scripts, to be tested
parent
c1be8be1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
65 additions
and
1 deletion
+65
-1
ci-scripts/ci_ctl_qtel.py
ci-scripts/ci_ctl_qtel.py
+63
-0
ci-scripts/ci_ueinfra.yaml
ci-scripts/ci_ueinfra.yaml
+2
-1
No files found.
ci-scripts/ci_ctl_qtel.py
0 → 100644
View file @
53e624e4
# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
# * contributor license agreements. See the NOTICE file distributed with
# * this work for additional information regarding copyright ownership.
# * The OpenAirInterface Software Alliance licenses this file to You under
# * the OAI Public License, Version 1.1 (the "License"); you may not use this file
# * except in compliance with the License.
# * You may obtain a copy of the License at
# *
# * http://www.openairinterface.org/?page_id=698
# *
# * Unless required by applicable law or agreed to in writing, software
# * distributed under the License is distributed on an "AS IS" BASIS,
# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# * See the License for the specific language governing permissions and
# * limitations under the License.
# *-------------------------------------------------------------------------------
# * For more information about the OpenAirInterface (OAI) Software Alliance:
# * contact@openairinterface.org
# */
#---------------------------------------------------------------------
#
# Required Python Version
# Python 3.x
#
#---------------------------------------------------------------------
import
sys
import
time
import
serial
class
qtel_ctl
:
def
__init__
(
self
,
usb_port_at
):
self
.
QUECTEL_USB_PORT_AT
=
usb_port_at
#'/dev/ttyUSB2'
self
.
modem
=
serial
.
Serial
(
self
.
QUECTEL_USB_PORT_AT
,
timeout
=
1
)
self
.
cmd_dict
=
{
"wup"
:
self
.
wup
;
"detach"
:
self
.
detach
}
def
__set_modem_state
(
self
,
ser
,
state
):
self
.
__send_command
(
ser
,
"AT+CFUN={}
\r
"
.
format
(
state
))
def
__send_command
(
self
,
ser
,
com
):
if
ser
.
inWaiting
()
>
0
:
ser
.
flushInput
()
ser
.
write
(
com
.
encode
())
def
wup
(
self
):
self
.
__set_modem_state
(
modem
,
0
)
time
.
sleep
(
3
)
self
.
__set_modem_state
(
modem
,
1
)
def
detach
(
self
):
self
.
__set_modem_state
(
modem
,
0
)
if
__name__
==
"__main__"
:
command
=
sys
.
argv
[
2
]
Module
=
qtel_ctl
(
sys
.
argv
[
1
])
Module
.
cmd_dict
[
command
]()
ci-scripts/ci_ueinfra.yaml
View file @
53e624e4
...
...
@@ -3,7 +3,8 @@ idefix:
State
:
enabled
Kind
:
quectel
Process
:
quectel-CM
WakeupScript
:
ci_qtel.py
WakeupScript
:
ci_ctl_qtel.py /dev/ttyUSB2 wup
DetachScript
:
ci_ctl_qtel.py /dev/ttyUSB2 detach
UENetwork
:
wwan0
HostIPAddress
:
192.168.18.188
HostUsername
:
oaicicd
...
...
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