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
18695eb2
Commit
18695eb2
authored
Jul 30, 2019
by
Eric
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix enb_config.c enb_config_NB_IoT.c
parent
4be075b1
Changes
3
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
196 additions
and
200 deletions
+196
-200
openair2/ENB_APP/enb_config.c
openair2/ENB_APP/enb_config.c
+93
-98
openair2/ENB_APP/enb_config_NB_IoT.c
openair2/ENB_APP/enb_config_NB_IoT.c
+66
-65
openair2/ENB_APP/enb_paramdef_NB_IoT.h
openair2/ENB_APP/enb_paramdef_NB_IoT.h
+37
-37
No files found.
openair2/ENB_APP/enb_config.c
View file @
18695eb2
...
...
@@ -40,7 +40,6 @@
#include "sctp_eNB_task.h"
#include "common/ran_context.h"
#include "sctp_default_values.h"
#include "LTE_SystemInformationBlockType2.h"
#include "LAYER2/MAC/mac_extern.h"
#include "LAYER2/MAC/mac_proto.h"
...
...
@@ -83,7 +82,6 @@ void RCconfig_flexran() {
num_enbs
,
sizeof
(
flexran_agent_info_t
*
));
}
for
(
uint16_t
i
=
0
;
i
<
num_enbs
;
i
++
)
{
RC
.
flexran
[
i
]
=
calloc
(
1
,
sizeof
(
flexran_agent_info_t
));
AssertFatal
(
RC
.
flexran
[
i
],
...
...
@@ -202,13 +200,11 @@ void RCconfig_L1(void) {
LOG_I
(
PHY
,
"RC.eNB[%d][%d] = %p
\n
"
,
j
,
i
,
RC
.
eNB
[
j
][
i
]);
RC
.
eNB
[
j
][
i
]
->
Mod_id
=
j
;
RC
.
eNB
[
j
][
i
]
->
CC_id
=
i
;
}
}
}
}
void
RCconfig_macrlc
(
int
macrlc_has_f1
[
MAX_MAC_INST
])
{
int
j
;
paramdef_t
MacRLC_Params
[]
=
MACRLCPARAMS_DESC
;
...
...
@@ -246,7 +242,6 @@ void RCconfig_macrlc(int macrlc_has_f1[MAX_MAC_INST]) {
AssertFatal
(
1
==
0
,
"MACRLC %d: %s unknown northbound midhaul
\n
"
,
j
,
*
(
MacRLC_ParamList
.
paramarray
[
j
][
MACRLC_TRANSPORT_N_PREFERENCE_IDX
].
strptr
));
}
if
(
strcmp
(
*
(
MacRLC_ParamList
.
paramarray
[
j
][
MACRLC_TRANSPORT_S_PREFERENCE_IDX
].
strptr
),
"local_L1"
)
==
0
)
{
}
else
if
(
strcmp
(
*
(
MacRLC_ParamList
.
paramarray
[
j
][
MACRLC_TRANSPORT_S_PREFERENCE_IDX
].
strptr
),
"nfapi"
)
==
0
)
{
RC
.
mac
[
j
]
->
eth_params_s
.
local_if_name
=
strdup
(
*
(
MacRLC_ParamList
.
paramarray
[
j
][
MACRLC_LOCAL_S_IF_NAME_IDX
].
strptr
));
...
...
@@ -294,9 +289,14 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc, int macrlc_has_f1) {
ccparams_lte_t
ccparams_lte
;
ccparams_sidelink_t
SLconfig
;
ccparams_eMTC_t
eMTCconfig
;
// for NB-IoT
ccparams_NB_IoT_t
NBconfig
;
memset
((
void
*
)
&
NBconfig
,
0
,
sizeof
(
ccparams_NB_IoT_t
));
memset
((
void
*
)
&
ccparams_lte
,
0
,
sizeof
(
ccparams_lte_t
));
memset
((
void
*
)
&
SLconfig
,
0
,
sizeof
(
ccparams_sidelink_t
));
memset
((
void
*
)
&
eMTCconfig
,
0
,
sizeof
(
ccparams_eMTC_t
));
paramdef_t
ENBSParams
[]
=
ENBSPARAMS_DESC
;
paramdef_t
ENBParams
[]
=
ENBPARAMS_DESC
;
paramlist_def_t
ENBParamList
=
{
ENB_CONFIG_STRING_ENB_LIST
,
NULL
,
0
};
...
...
@@ -309,6 +309,8 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc, int macrlc_has_f1) {
memset
((
void
*
)
&
srb1_params
,
0
,
sizeof
(
srb1_params_t
));
paramdef_t
SRB1Params
[]
=
SRB1PARAMS_DESC
(
srb1_params
);
paramdef_t
SLParams
[]
=
CCPARAMS_SIDELINK_DESC
(
SLconfig
);
// for NB-IoT
paramdef_t
NBIOTParams
[]
=
CCPARAMS_NB_IOT_DESC
((
&
NBconfig
));
/* map parameter checking array instances to parameter definition array instances */
for
(
int
I
=
0
;
I
<
(
sizeof
(
CCsParams
)
/
sizeof
(
paramdef_t
)
)
;
I
++
)
{
...
...
@@ -329,11 +331,9 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc, int macrlc_has_f1) {
// Output a list of all eNBs.
config_getlist
(
&
ENBParamList
,
ENBParams
,
sizeof
(
ENBParams
)
/
sizeof
(
paramdef_t
),
NULL
);
if
(
ENBParamList
.
paramarray
[
i
][
ENB_ENB_ID_IDX
].
uptr
==
NULL
)
{
// Calculate a default eNB ID
if
(
EPC_MODE_ENABLED
)
{
uint32_t
hash
;
hash
=
s1ap_generate_eNB_id
();
enb_id
=
i
+
(
hash
&
0xFFFF8
);
...
...
@@ -344,7 +344,6 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc, int macrlc_has_f1) {
enb_id
=
*
(
ENBParamList
.
paramarray
[
i
][
ENB_ENB_ID_IDX
].
uptr
);
}
LOG_I
(
RRC
,
"Instance %d: Southbound Transport %s
\n
"
,
i
,
*
(
ENBParamList
.
paramarray
[
i
][
ENB_TRANSPORT_S_PREFERENCE_IDX
].
strptr
));
if
(
strcmp
(
*
(
ENBParamList
.
paramarray
[
i
][
ENB_TRANSPORT_S_PREFERENCE_IDX
].
strptr
),
"f1"
)
==
0
)
{
...
...
@@ -376,7 +375,6 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc, int macrlc_has_f1) {
}
else
{
rrc
->
node_type
=
ngran_eNB_DU
;
LOG_I
(
RRC
,
"Setting node_type to ngran_eNB_DU
\n
"
);
}
}
...
...
@@ -428,7 +426,6 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc, int macrlc_has_f1) {
RRC_CONFIGURATION_REQ
(
msg_p
).
mnc
[
l
]);
}
/* measurement reports enabled? */
if
(
ENBParamList
.
paramarray
[
i
][
ENB_ENABLE_MEASUREMENT_REPORTS
].
strptr
!=
NULL
&&
*
(
ENBParamList
.
paramarray
[
i
][
ENB_ENABLE_MEASUREMENT_REPORTS
].
strptr
)
!=
NULL
&&
...
...
@@ -459,7 +456,6 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc, int macrlc_has_f1) {
//printf("Component carrier %d\n",component_carrier);
nb_cc
++
;
if
(
1
||
!
NODE_IS_CU
(
rrc
->
node_type
))
{
// Cell params, MIB/SIB1 in DU
RRC_CONFIGURATION_REQ
(
msg_p
).
tdd_config
[
j
]
=
ccparams_lte
.
tdd_config
;
AssertFatal
(
ccparams_lte
.
tdd_config
<=
LTE_TDD_Config__subframeAssignment_sa6
,
...
...
@@ -470,7 +466,6 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc, int macrlc_has_f1) {
"Failed to parse eNB configuration file %s, enb %d illegal tdd_config_s %d (should be 0-%d)!"
,
RC
.
config_file_name
,
i
,
ccparams_lte
.
tdd_config_s
,
LTE_TDD_Config__specialSubframePatterns_ssp8
);
if
(
!
ccparams_lte
.
prefix_type
)
AssertFatal
(
0
,
"Failed to parse eNB configuration file %s, enb %d define %s: NORMAL,EXTENDED!
\n
"
,
...
...
@@ -550,7 +545,6 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc, int macrlc_has_f1) {
RC
.
config_file_name
,
i
,
ccparams_lte
.
nb_antenna_ports
);
RRC_CONFIGURATION_REQ
(
msg_p
).
nb_antenna_ports
[
j
]
=
ccparams_lte
.
nb_antenna_ports
;
}
if
(
!
NODE_IS_DU
(
rrc
->
node_type
))
{
//this is CU or eNB, SIB2-20 in CU
// Radio Resource Configuration (SIB2)
...
...
@@ -1661,6 +1655,15 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc, int macrlc_has_f1) {
if
(
eMTCconfig
.
eMTC_configured
>
0
)
fill_eMTC_configuration
(
msg_p
,
&
eMTCconfig
,
i
,
j
,
RC
.
config_file_name
,
brparamspath
);
else
printf
(
"No eMTC configuration, skipping it
\n
"
);
// NB-IoT configuration
char
NBparamspath
[
MAX_OPTNAME_SIZE
*
2
+
16
];
sprintf
(
NBparamspath
,
"%s.%s"
,
ccspath
,
ENB_CONFIG_STRING_NB_IoT_PARAMETERS
);
config_get
(
NBIOTParams
,
sizeof
(
NBIOTParams
)
/
sizeof
(
paramdef_t
),
NBparamspath
);
NBIOTRRC_CONFIGURATION_REQ
(
msg_p
).
NB_IoT_configured
=
NBconfig
.
NB_IoT_configured
&
1
;
if
(
NBconfig
.
NB_IoT_configured
>
0
)
fill_NB_IoT_configuration
(
msg_p
,
&
NBconfig
,
i
,
j
,
RC
.
config_file_name
,
NBparamspath
);
else
printf
(
"No NB-IoT configuration, skipping it
\n
"
);
// Sidelink configuration
char
SLparamspath
[
MAX_OPTNAME_SIZE
*
2
+
16
];
sprintf
(
SLparamspath
,
"%s.%s"
,
ccspath
,
ENB_CONFIG_STRING_SL_PARAMETERS
);
...
...
@@ -1747,7 +1750,6 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc, int macrlc_has_f1) {
break
;
default:
if
(
srb1_params
.
srb1_poll_pdu
>=
10000
)
rrc
->
srb1_poll_pdu
=
LTE_PollPDU_pInfinity
;
else
...
...
@@ -1881,7 +1883,6 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc, int macrlc_has_f1) {
rrc
->
srb1_timer_reordering
=
LTE_T_Reordering_ms40
;
break
;
case
45
:
rrc
->
srb1_timer_reordering
=
LTE_T_Reordering_ms45
;
break
;
...
...
@@ -2247,7 +2248,6 @@ int RCconfig_S1(
*
(
ENBParamList
.
paramarray
[
k
][
ENB_CELL_TYPE_IDX
].
strptr
));
}
S1AP_REGISTER_ENB_REQ
(
msg_p
).
eNB_name
=
strdup
(
*
(
ENBParamList
.
paramarray
[
k
][
ENB_ENB_NAME_IDX
].
strptr
));
S1AP_REGISTER_ENB_REQ
(
msg_p
).
tac
=
*
ENBParamList
.
paramarray
[
k
][
ENB_TRACKING_AREA_CODE_IDX
].
uptr
;
AssertFatal
(
!
ENBParamList
.
paramarray
[
k
][
ENB_MOBILE_COUNTRY_CODE_IDX_OLD
].
strptr
...
...
@@ -2276,7 +2276,6 @@ int RCconfig_S1(
||
S1AP_REGISTER_ENB_REQ
(
msg_p
).
mnc
[
l
]
<
100
,
"MNC %d cannot be encoded in two digits as requested (change mnc_digit_length to 3)
\n
"
,
S1AP_REGISTER_ENB_REQ
(
msg_p
).
mnc
[
l
]);
}
/* Default DRX param */
...
...
@@ -2305,13 +2304,11 @@ int RCconfig_S1(
break
;
}
case
256
:
{
S1AP_REGISTER_ENB_REQ
(
msg_p
).
default_drx
=
3
;
break
;
}
default:
{
LOG_E
(
S1AP
,
"Default I-DRX value in conf file is invalid (%i). Should be 32, 64, 128 or 256. \
Default DRX set to 32 in MME configuration
\n
"
,
...
...
@@ -2956,13 +2953,11 @@ void read_config_and_init(void) {
"Number of MACRLC instances %d != number of RRC instances %d
\n
"
,
RC
.
nb_macrlc_inst
,
RC
.
nb_inst
);
RCconfig_L1
();
LOG_I
(
PHY
,
"%s() RC.nb_L1_inst: %d
\n
"
,
__FUNCTION__
,
RC
.
nb_L1_inst
);
RCconfig_macrlc
(
macrlc_has_f1
);
LOG_I
(
MAC
,
"%s() RC.nb_macrlc_inst: %d
\n
"
,
__FUNCTION__
,
RC
.
nb_macrlc_inst
);
if
(
RC
.
nb_L1_inst
>
0
)
AssertFatal
(
l1_north_init_eNB
()
==
0
,
"could not initialize L1 north interface
\n
"
);
...
...
openair2/ENB_APP/enb_config_NB_IoT.c
View file @
18695eb2
This diff is collapsed.
Click to expand it.
openair2/ENB_APP/enb_paramdef_NB_IoT.h
View file @
18695eb2
...
...
@@ -32,7 +32,7 @@
#include "common/config/config_paramdesc.h"
#include "RRC_paramsvalues.h"
#include <libconfig.h>
#define ENB_CONFIG_STRING_NB_IoT_PARAMETERS "NBparameters"
//RRC parameters in the config file of merge branch
...
...
@@ -90,45 +90,45 @@
typedef
struct
ccparams_NB_IoT_s
{
int32_t
NB_IoT_configured
;
//RRC parameters in the config file of merge branch
libconfig_int
rach_raResponseWindowSize_NB
;
libconfig_int
rach_macContentionResolutionTimer_NB
;
libconfig_int
rach_powerRampingStep_NB
;
libconfig_int
rach_preambleInitialReceivedTargetPower_NB
;
libconfig_int
rach_preambleTransMax_CE_NB
;
libconfig_int
bcch_modificationPeriodCoeff_NB
;
libconfig_int
pcch_defaultPagingCycle_NB
;
libconfig_int
nprach_CP_Length
;
libconfig_int
nprach_rsrp_range
;
libconfig_int
npdsch_nrs_Power
;
libconfig_int
npusch_ack_nack_numRepetitions_NB
;
libconfig_int
npusch_srs_SubframeConfig_NB
;
libconfig_int
npusch_threeTone_CyclicShift_r13
;
libconfig_int
npusch_sixTone_CyclicShift_r13
;
int
rach_raResponseWindowSize_NB
;
int
rach_macContentionResolutionTimer_NB
;
int
rach_powerRampingStep_NB
;
int
rach_preambleInitialReceivedTargetPower_NB
;
int
rach_preambleTransMax_CE_NB
;
int
bcch_modificationPeriodCoeff_NB
;
int
pcch_defaultPagingCycle_NB
;
int
nprach_CP_Length
;
int
nprach_rsrp_range
;
int
npdsch_nrs_Power
;
int
npusch_ack_nack_numRepetitions_NB
;
int
npusch_srs_SubframeConfig_NB
;
int
npusch_threeTone_CyclicShift_r13
;
int
npusch_sixTone_CyclicShift_r13
;
const
char
*
npusch_groupHoppingEnabled
;
libconfig_int
npusch_groupAssignmentNPUSCH_r13
;
libconfig_int
dl_GapThreshold_NB
;
libconfig_int
dl_GapPeriodicity_NB
;
int
npusch_groupAssignmentNPUSCH_r13
;
int
dl_GapThreshold_NB
;
int
dl_GapPeriodicity_NB
;
const
char
*
dl_GapDurationCoeff_NB
;
libconfig_int
npusch_p0_NominalNPUSCH
;
int
npusch_p0_NominalNPUSCH
;
const
char
*
npusch_alpha
;
libconfig_int
deltaPreambleMsg3
;
int
deltaPreambleMsg3
;
libconfig_int
ue_TimersAndConstants_t300_NB
;
libconfig_int
ue_TimersAndConstants_t301_NB
;
libconfig_int
ue_TimersAndConstants_t310_NB
;
libconfig_int
ue_TimersAndConstants_t311_NB
;
libconfig_int
ue_TimersAndConstants_n310_NB
;
libconfig_int
ue_TimersAndConstants_n311_NB
;
int
ue_TimersAndConstants_t300_NB
;
int
ue_TimersAndConstants_t301_NB
;
int
ue_TimersAndConstants_t310_NB
;
int
ue_TimersAndConstants_t311_NB
;
int
ue_TimersAndConstants_n310_NB
;
int
ue_TimersAndConstants_n311_NB
;
libconfig_int
nprach_Periodicity
;
libconfig_int
nprach_StartTime
;
libconfig_int
nprach_SubcarrierOffset
;
libconfig_int
nprach_NumSubcarriers
;
int
nprach_Periodicity
;
int
nprach_StartTime
;
int
nprach_SubcarrierOffset
;
int
nprach_NumSubcarriers
;
const
char
*
nprach_SubcarrierMSG3_RangeStart
;
libconfig_int
maxNumPreambleAttemptCE_NB
;
libconfig_int
numRepetitionsPerPreambleAttempt
;
libconfig_int
npdcch_NumRepetitions_RA
;
libconfig_int
npdcch_StartSF_CSS_RA
;
int
maxNumPreambleAttemptCE_NB
;
int
numRepetitionsPerPreambleAttempt
;
int
npdcch_NumRepetitions_RA
;
int
npdcch_StartSF_CSS_RA
;
const
char
*
npdcch_Offset_RA
;
}
ccparams_NB_IoT_t
;
...
...
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