Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
openairinterface-6g
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
OpenXG
openairinterface-6g
Commits
55c3cd2b
Commit
55c3cd2b
authored
Aug 13, 2025
by
Guido Casati
Committed by
Robert Schmidt
Nov 15, 2025
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Telnet: add ciUE command to trigger establishment of a new PDU Session
parent
653c0fd6
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
47 additions
and
2 deletions
+47
-2
common/utils/telnetsrv/CMakeLists.txt
common/utils/telnetsrv/CMakeLists.txt
+1
-1
common/utils/telnetsrv/telnetsrv_ciUE.c
common/utils/telnetsrv/telnetsrv_ciUE.c
+44
-0
openair3/NAS/NR_UE/nr_nas_msg.c
openair3/NAS/NR_UE/nr_nas_msg.c
+1
-1
openair3/NAS/NR_UE/nr_nas_msg.h
openair3/NAS/NR_UE/nr_nas_msg.h
+1
-0
No files found.
common/utils/telnetsrv/CMakeLists.txt
View file @
55c3cd2b
...
...
@@ -62,7 +62,7 @@ add_dependencies(telnetsrv telnetsrv_ci)
message
(
STATUS
"Add CI specific telnet functions for nrUE in telnetsrv_ciUE.so"
)
add_library
(
telnetsrv_ciUE MODULE telnetsrv_ciUE.c
)
target_link_libraries
(
telnetsrv_ciUE PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs UTIL
)
target_link_libraries
(
telnetsrv_ciUE PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs UTIL
NR_L2_UE nr_nas
)
add_dependencies
(
telnetsrv telnetsrv_ciUE
)
message
(
STATUS
"Add bearer specific telnet functions in libtelnetsrv_bearer.so"
)
...
...
common/utils/telnetsrv/telnetsrv_ciUE.c
View file @
55c3cd2b
...
...
@@ -39,6 +39,7 @@
#include "openair2/RRC/NR_UE/rrc_proto.h"
#include "openair1/PHY/phy_extern_nr_ue.h"
#include "openair1/PHY/defs_nr_common.h"
#include "openair3/NAS/NR_UE/nr_nas_msg.h"
#define TELNETSERVERCODE
#include "telnetsrv.h"
...
...
@@ -52,6 +53,14 @@ const char* NR_UE_L2_STATE_STR[] = {
#undef UE_STATE
};
static
int
get_default_ue_id
(
void
)
{
NR_UE_RRC_INST_t
*
rrc
=
get_NR_UE_rrc_inst
(
0
);
if
(
!
rrc
)
return
-
1
;
return
rrc
->
ue_id
;
}
/**
* Get the synchronization state of a UE.
*
...
...
@@ -132,6 +141,40 @@ static int get_dl_toa(char *buf, int debug, telnet_printfunc_t prnt)
return
0
;
}
static
int
add_pdu_session
(
char
*
buf
,
int
debug
,
telnet_printfunc_t
prnt
)
{
int
ue_id
=
-
1
;
int
pdusession_id
=
-
1
;
if
(
!
buf
)
{
ERROR_MSG_RET
(
"Missing argument: expected PDUSessionID[,UE_ID]
\n
"
);
}
// Try parsing values in the form: "PDUSessionID[,UE_ID]"
int
n
=
sscanf
(
buf
,
"%d,%d"
,
&
pdusession_id
,
&
ue_id
);
if
(
n
==
1
)
{
// Only PDUSessionID provided: use default UE ID
ue_id
=
get_default_ue_id
();
if
(
ue_id
<
0
)
ERROR_MSG_RET
(
"No default UE context found
\n
"
);
}
else
if
(
n
!=
2
)
{
ERROR_MSG_RET
(
"Invalid format: expected PDUSessionID[,UE_ID]
\n
"
);
}
if
(
pdusession_id
<
0
||
pdusession_id
>
255
)
ERROR_MSG_RET
(
"PDUSessionID must be in range [0,255]
\n
"
);
if
(
ue_id
<
0
)
ERROR_MSG_RET
(
"UE_ID must be >= 0
\n
"
);
nr_ue_nas_t
*
nas
=
get_ue_nas_info
(
ue_id
);
if
(
!
nas
)
ERROR_MSG_RET
(
"No NAS context found for UE_ID %d
\n
"
,
ue_id
);
request_pdusession
(
nas
,
pdusession_id
);
prnt
(
"Triggered PDU session request for UE %d with ID %d
\n
"
,
ue_id
,
pdusession_id
);
return
0
;
}
/* Telnet shell command definitions */
static
telnetshell_cmddef_t
cicmds
[]
=
{
{
"sync_state"
,
"[UE_ID(int,opt)]"
,
get_sync_state
},
...
...
@@ -140,6 +183,7 @@ static telnetshell_cmddef_t cicmds[] = {
{
"force_crnti_ra"
,
""
,
force_crnti_ra
},
{
"deregistration"
,
""
,
force_deregistration
},
{
"get_max_dl_toa"
,
"[ant]"
,
get_dl_toa
},
{
"add_pdu_session"
,
"[PDUSessionID(int)],[UE_ID(int,opt)]"
,
add_pdu_session
},
{
""
,
""
,
NULL
},
};
...
...
openair3/NAS/NR_UE/nr_nas_msg.c
View file @
55c3cd2b
...
...
@@ -1772,7 +1772,7 @@ static void send_nas_5gmm_ind(instance_t instance, const Guti5GSMobileIdentity_t
itti_send_msg_to_task
(
TASK_RRC_NRUE
,
instance
,
msg
);
}
static
void
request_pdusession
(
nr_ue_nas_t
*
nas
,
int
pdusession_id
)
void
request_pdusession
(
nr_ue_nas_t
*
nas
,
int
pdusession_id
)
{
MessageDef
*
message_p
=
itti_alloc_new_message
(
TASK_NAS_NRUE
,
nas
->
UE_id
,
NAS_PDU_SESSION_REQ
);
NAS_PDU_SESSION_REQ
(
message_p
).
pdusession_id
=
pdusession_id
;
...
...
openair3/NAS/NR_UE/nr_nas_msg.h
View file @
55c3cd2b
...
...
@@ -113,5 +113,6 @@ void *nas_nrue_task(void *args_p);
void
*
nas_nrue
(
void
*
args_p
);
void
nas_init_nrue
(
int
num_ues
);
void
nr_ue_create_ip_if
(
const
char
*
ifnameprefix
,
const
char
*
ipv4
,
const
char
*
ipv6
,
int
ue_id
,
int
pdu_session_id
);
void
request_pdusession
(
nr_ue_nas_t
*
nas
,
int
pdusession_id
);
#endif
/* __NR_NAS_MSG_SIM_H__*/
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