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
wangjie
OpenXG-RAN
Commits
874246b3
Commit
874246b3
authored
Jan 26, 2021
by
Xue Song
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix the problem of f1ap setup response message encoding error
parent
d9934436
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
82 additions
and
20 deletions
+82
-20
openair2/F1AP/f1ap_cu_interface_management.c
openair2/F1AP/f1ap_cu_interface_management.c
+14
-15
openair2/RRC/NR/MESSAGES/asn1_msg.c
openair2/RRC/NR/MESSAGES/asn1_msg.c
+50
-0
openair2/RRC/NR/MESSAGES/asn1_msg.h
openair2/RRC/NR/MESSAGES/asn1_msg.h
+3
-0
openair2/RRC/NR/nr_rrc_defs.h
openair2/RRC/NR/nr_rrc_defs.h
+3
-0
openair2/RRC/NR/rrc_gNB.c
openair2/RRC/NR/rrc_gNB.c
+12
-5
No files found.
openair2/F1AP/f1ap_cu_interface_management.c
View file @
874246b3
...
...
@@ -353,7 +353,7 @@ int CU_send_F1_SETUP_RESPONSE(instance_t instance,
/* optional */
/* - gNB-CU System Information */
if
(
0
)
{
if
(
1
)
{
/* 3.1.2 gNB-CUSystem Information */
F1AP_Cells_to_be_Activated_List_ItemExtIEs_t
*
cells_to_be_activated_list_itemExtIEs
;
cells_to_be_activated_list_itemExtIEs
=
(
F1AP_Cells_to_be_Activated_List_ItemExtIEs_t
*
)
calloc
(
1
,
sizeof
(
F1AP_Cells_to_be_Activated_List_ItemExtIEs_t
));
...
...
@@ -367,8 +367,8 @@ int CU_send_F1_SETUP_RESPONSE(instance_t instance,
// printf("%02x ", f1ap_setup_resp->SI_container[i][0][n]);
//printf("\n");
if
(
0
)
{
for
(
int
sIBtype
=
2
;
sIBtype
<
33
;
sIBtype
++
)
{
// for (int sIBtype=2;sIBtype<33;sIBtype++) { //21 ? 33 ?
for
(
int
sIBtype
=
2
;
sIBtype
<
21
;
sIBtype
++
)
{
if
(
f1ap_setup_resp
->
SI_container
[
i
][
sIBtype
]
!=
NULL
)
{
AssertFatal
(
sIBtype
<
6
||
sIBtype
==
9
,
"Illegal SI type %d
\n
"
,
sIBtype
);
F1AP_SibtypetobeupdatedListItem_t
*
sib_item
=
calloc
(
1
,
sizeof
(
*
sib_item
));
...
...
@@ -382,7 +382,6 @@ int CU_send_F1_SETUP_RESPONSE(instance_t instance,
ASN_SEQUENCE_ADD
(
&
gNB_CUSystemInformation
->
sibtypetobeupdatedlist
.
list
,
sib_item
);
}
}
}
cells_to_be_activated_list_itemExtIEs
->
extensionValue
.
choice
.
GNB_CUSystemInformation
=
*
gNB_CUSystemInformation
;
...
...
openair2/RRC/NR/MESSAGES/asn1_msg.c
View file @
874246b3
...
...
@@ -379,6 +379,56 @@ uint8_t do_SIB1_NR(rrc_gNB_carrier_data_t *carrier,
return
((
enc_rval
.
encoded
+
7
)
/
8
);
}
uint8_t
do_SIB23_NR
(
rrc_gNB_carrier_data_t
*
carrier
,
gNB_RrcConfigurationReq
*
configuration
)
{
asn_enc_rval_t
enc_rval
;
SystemInformation_IEs__sib_TypeAndInfo__Member
*
sib2
=
NULL
;
SystemInformation_IEs__sib_TypeAndInfo__Member
*
sib3
=
NULL
;
NR_BCCH_DL_SCH_Message_t
*
sib_message
=
CALLOC
(
1
,
sizeof
(
NR_BCCH_DL_SCH_Message_t
));
sib_message
->
message
.
present
=
NR_BCCH_DL_SCH_MessageType_PR_c1
;
sib_message
->
message
.
choice
.
c1
=
CALLOC
(
1
,
sizeof
(
struct
NR_BCCH_DL_SCH_MessageType__c1
));
sib_message
->
message
.
choice
.
c1
->
present
=
NR_BCCH_DL_SCH_MessageType__c1_PR_systemInformation
;
sib_message
->
message
.
choice
.
c1
->
choice
.
systemInformation
=
CALLOC
(
1
,
sizeof
(
struct
NR_SystemInformation
));
struct
NR_SystemInformation
*
sib
=
sib_message
->
message
.
choice
.
c1
->
choice
.
systemInformation
;
sib
->
criticalExtensions
.
present
=
NR_SystemInformation__criticalExtensions_PR_systemInformation
;
sib
->
criticalExtensions
.
choice
.
systemInformation
=
CALLOC
(
1
,
sizeof
(
struct
NR_SystemInformation_IEs
));
struct
NR_SystemInformation_IEs
*
ies
=
sib
->
criticalExtensions
.
choice
.
systemInformation
;
sib2
=
CALLOC
(
1
,
sizeof
(
SystemInformation_IEs__sib_TypeAndInfo__Member
));
sib2
->
present
=
NR_SystemInformation_IEs__sib_TypeAndInfo__Member_PR_sib2
;
sib2
->
choice
.
sib2
=
CALLOC
(
1
,
sizeof
(
struct
NR_SIB2
));
sib2
->
choice
.
sib2
->
cellReselectionInfoCommon
.
q_Hyst
=
NR_SIB2__cellReselectionInfoCommon__q_Hyst_dB1
;
sib2
->
choice
.
sib2
->
cellReselectionServingFreqInfo
.
threshServingLowP
=
2
;
// INTEGER (0..31)
sib2
->
choice
.
sib2
->
cellReselectionServingFreqInfo
.
cellReselectionPriority
=
2
;
// INTEGER (0..7)
sib2
->
choice
.
sib2
->
intraFreqCellReselectionInfo
.
q_RxLevMin
=
-
50
;
// INTEGER (-70..-22)
sib2
->
choice
.
sib2
->
intraFreqCellReselectionInfo
.
s_IntraSearchP
=
2
;
// INTEGER (0..31)
sib2
->
choice
.
sib2
->
intraFreqCellReselectionInfo
.
t_ReselectionNR
=
2
;
// INTEGER (0..7)
sib2
->
choice
.
sib2
->
intraFreqCellReselectionInfo
.
deriveSSB_IndexFromCell
=
true
;
ASN_SEQUENCE_ADD
(
&
ies
->
sib_TypeAndInfo
.
list
,
sib2
);
sib3
=
CALLOC
(
1
,
sizeof
(
SystemInformation_IEs__sib_TypeAndInfo__Member
));
sib3
->
present
=
NR_SystemInformation_IEs__sib_TypeAndInfo__Member_PR_sib3
;
sib3
->
choice
.
sib3
=
CALLOC
(
1
,
sizeof
(
struct
NR_SIB3
));
ASN_SEQUENCE_ADD
(
&
ies
->
sib_TypeAndInfo
.
list
,
sib3
);
//encode SIB to data
// carrier->SIB23 = (uint8_t *) malloc16(128);
enc_rval
=
uper_encode_to_buffer
(
&
asn_DEF_NR_BCCH_DL_SCH_Message
,
NULL
,
(
void
*
)
sib_message
,
carrier
->
SIB23
,
100
);
AssertFatal
(
enc_rval
.
encoded
>
0
,
"ASN1 message encoding failed (%s, %lu)!
\n
"
,
enc_rval
.
failed_type
->
name
,
enc_rval
.
encoded
);
if
(
enc_rval
.
encoded
==-
1
)
{
return
(
-
1
);
}
return
((
enc_rval
.
encoded
+
7
)
/
8
);
}
void
do_RLC_BEARER
(
uint8_t
Mod_id
,
int
CC_id
,
...
...
openair2/RRC/NR/MESSAGES/asn1_msg.h
View file @
874246b3
...
...
@@ -65,6 +65,9 @@ uint8_t do_SIB1_NR(rrc_gNB_carrier_data_t *carrier,
gNB_RrcConfigurationReq
*
configuration
);
uint8_t
do_SIB23_NR
(
rrc_gNB_carrier_data_t
*
carrier
,
gNB_RrcConfigurationReq
*
configuration
);
void
do_RLC_BEARER
(
uint8_t
Mod_id
,
int
CC_id
,
struct
NR_CellGroupConfig__rlc_BearerToAddModList
*
rlc_BearerToAddModList
,
...
...
openair2/RRC/NR/nr_rrc_defs.h
View file @
874246b3
...
...
@@ -426,6 +426,9 @@ typedef struct {
uint8_t
*
SIB1
;
uint8_t
sizeof_SIB1
;
uint8_t
*
SIB23
;
uint8_t
sizeof_SIB23
;
uint8_t
*
ServingCellConfigCommon
;
uint8_t
sizeof_servingcellconfigcommon
;
...
...
openair2/RRC/NR/rrc_gNB.c
View file @
874246b3
...
...
@@ -216,6 +216,13 @@ static void init_NR_SI(gNB_RRC_INST *rrc, gNB_RrcConfigurationReq *configuration
rrc
->
carrier
.
MIB
=
(
uint8_t
*
)
malloc16
(
4
);
rrc
->
carrier
.
sizeof_MIB
=
do_MIB_NR
(
rrc
,
0
);
rrc
->
carrier
.
sizeof_SIB1
=
do_SIB1_NR
(
&
rrc
->
carrier
,
configuration
);
if
(
!
NODE_IS_DU
(
rrc
->
node_type
))
{
rrc
->
carrier
.
SIB23
=
(
uint8_t
*
)
malloc16
(
100
);
AssertFatal
(
rrc
->
carrier
.
SIB23
!=
NULL
,
"cannot allocate memory for SIB"
);
rrc
->
carrier
.
sizeof_SIB23
=
do_SIB23_NR
(
&
rrc
->
carrier
,
configuration
);
LOG_I
(
NR_RRC
,
"do_SIB23_NR, size %d
\n
"
,
rrc
->
carrier
.
sizeof_SIB23
);
AssertFatal
(
rrc
->
carrier
.
sizeof_SIB23
!=
255
,
"FATAL, RC.nrrrc[mod].carrier[CC_id].sizeof_SIB23 == 255"
);
}
LOG_I
(
NR_RRC
,
"Done init_NR_SI
\n
"
);
if
(
!
NODE_IS_CU
(
RC
.
nrrrc
[
0
]
->
node_type
)){
rrc_mac_config_req_gNB
(
rrc
->
module_id
,
...
...
@@ -2425,11 +2432,11 @@ void rrc_gNB_process_f1_setup_req(f1ap_setup_req_t *f1_setup_req) {
F1AP_SETUP_RESP
(
msg_p
).
nrpci
[
cu_cell_ind
]
=
f1_setup_req
->
nr_pci
[
i
];
int
num_SI
=
0
;
//
if (rrc->carrier.SIB23) {
// F1AP_SETUP_RESP (msg_p).SI_container[cu_cell_ind][num_SI
] = rrc->carrier.SIB23;
// F1AP_SETUP_RESP (msg_p).SI_container_length[cu_cell_ind][num_SI
] = rrc->carrier.sizeof_SIB23;
//
num_SI++;
//
}
if
(
rrc
->
carrier
.
SIB23
)
{
F1AP_SETUP_RESP
(
msg_p
).
SI_container
[
cu_cell_ind
][
2
]
=
rrc
->
carrier
.
SIB23
;
F1AP_SETUP_RESP
(
msg_p
).
SI_container_length
[
cu_cell_ind
][
2
]
=
rrc
->
carrier
.
sizeof_SIB23
;
num_SI
++
;
}
F1AP_SETUP_RESP
(
msg_p
).
num_SI
[
cu_cell_ind
]
=
num_SI
;
cu_cell_ind
++
;
...
...
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