Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
openairinterface5G
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Mingxuan Li
openairinterface5G
Commits
503a6b1a
Commit
503a6b1a
authored
2 years ago
by
Robert Schmidt
Browse files
Options
Downloads
Patches
Plain Diff
Rework UE activation scripts
new adb script
parent
5d786098
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
ci-scripts/ci_ctl_adb.sh
+55
-0
55 additions, 0 deletions
ci-scripts/ci_ctl_adb.sh
ci-scripts/ci_ctl_qtel.py
+9
-6
9 additions, 6 deletions
ci-scripts/ci_ctl_qtel.py
with
64 additions
and
6 deletions
ci-scripts/ci_ctl_adb.sh
0 → 100755
+
55
−
0
View file @
503a6b1a
#!/bin/bash
usage
()
{
echo
"usage:
$0
<command> <id>"
echo
"available commands: initialize, attach, detach, terminate, check"
}
if
[
$#
-ne
2
]
;
then
usage
exit
1
fi
cmd
=
$1
id
=
$2
flightmode_off
()
{
set
+x
adb
-s
$id
shell
"/data/local/tmp/on"
}
flightmode_on
()
{
set
+x
adb
-s
$id
shell
"/data/local/tmp/off"
}
initialize
()
{
set
+x
adb
-s
$id
shell
"svc data enable"
# make sure data services are enabled
flightmode_on
}
terminate
()
{
echo
"terminate: does nothing"
}
check
()
{
declare
-A
service
=(
[
"0"
]=
"IN_SERVICE"
[
"1"
]=
"OUT_OF_SERVICE"
[
"2"
]=
"EMERGENCY_ONLY"
[
"3"
]=
"RADIO_POWERED_OFF"
)
declare
-A
data
=(
[
"0"
]=
"DISCONNECTED"
[
"1"
]=
"CONNECTING"
[
"2"
]=
"CONNECTED"
[
"3"
]=
"SUSPENDED"
)
serv_idx
=
$(
adb
-s
$id
shell
"dumpsys telephony.registry"
|
sed
-n
's/.*mServiceState=\([0-3]\).*/\1/p'
)
data_idx
=
$(
adb
-s
$id
shell
"dumpsys telephony.registry"
|
sed
-n
's/.*mDataConnectionState=\([0-3]\).*/\1/p'
)
data_reason
=
$(
adb
-s
$id
shell
"dumpsys telephony.registry"
|
sed
-n
's/.*mDataConnectionReason=\([0-9a-zA-Z_]\+\).*/\1/p'
)
#echo "Status Check UE $id"
echo
"Service State:
${
service
[
$serv_idx
]
}
"
echo
"Data State:
${
data
[
$data_idx
]
}
"
echo
"Data Reason:
${
data_reason
}
"
}
case
"
${
cmd
}
"
in
initialize
)
initialize
;;
attach
)
flightmode_off
;;
detach
)
flightmode_on
;;
terminate
)
terminate
;;
check
)
check
;;
*
)
echo
"Invalid command
$cmd
"
;
usage
;
exit
1
;;
esac
This diff is collapsed.
Click to expand it.
ci-scripts/ci_ctl_qtel.py
+
9
−
6
View file @
503a6b1a
...
...
@@ -32,7 +32,7 @@
import
sys
import
time
import
serial
import
subprocess
as
sp
class
qtel_ctl
:
#---------------
...
...
@@ -75,12 +75,15 @@ class qtel_ctl:
self
.
__set_modem_state
(
self
.
modem
,
'
0
'
)
if
__name__
==
"
__main__
"
:
#argv[1] : usb port
#argv[2] : qtel command (see function pointers dict "wup", "detach" etc ...)
command
=
sys
.
argv
[
2
]
Module
=
qtel_ctl
(
sys
.
argv
[
1
])
if
len
(
sys
.
argv
)
>=
3
:
command
=
sys
.
argv
[
2
]
print
(
command
)
Module
=
qtel_ctl
(
sys
.
argv
[
1
])
#calling the function to be applied
Module
.
cmd_dict
[
command
]()
Module
.
cmd_dict
[
command
]()
print
(
Module
.
cmd_dict
[
command
])
else
:
print
(
"
To many arguments
"
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment