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
canghaiwuhen
OpenXG-RAN
Commits
07b133cd
Commit
07b133cd
authored
Sep 25, 2019
by
Nick Ho
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Still working on ASN.1
parent
56b8b3ce
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
166 deletions
+15
-166
openair2/LAYER2/MAC/config_NB_IoT.c
openair2/LAYER2/MAC/config_NB_IoT.c
+2
-2
openair2/RRC/NBIOT/MESSAGES/asn1_msg_NB_IoT.c
openair2/RRC/NBIOT/MESSAGES/asn1_msg_NB_IoT.c
+6
-1
openair2/RRC/NBIOT/rrc_eNB_NB_IoT.c
openair2/RRC/NBIOT/rrc_eNB_NB_IoT.c
+7
-163
No files found.
openair2/LAYER2/MAC/config_NB_IoT.c
View file @
07b133cd
...
...
@@ -292,7 +292,7 @@ void rrc_mac_config_req_NB_IoT(
int
CC_idP
,
int
rntiP
,
rrc_eNB_carrier_data_NB_IoT_t
*
carrier
,
LTE_
LTE_
SystemInformationBlockType1_NB_t
*
sib1_NB_IoT
,
LTE_SystemInformationBlockType1_NB_t
*
sib1_NB_IoT
,
LTE_RadioResourceConfigCommonSIB_NB_r13_t
*
radioResourceConfigCommon
,
LTE_PhysicalConfigDedicated_NB_r13_t
*
physicalConfigDedicated
,
LTE_LogicalChannelConfig_NB_r13_t
*
logicalChannelConfig
,
...
...
@@ -390,7 +390,7 @@ void rrc_mac_config_req_NB_IoT(
if
(
radioResourceConfigCommon
!=
NULL
)
{
//LOG_I(MAC,"[CONFIG]SIB2/3-NB radioResourceConfigCommon Contents (partial)\n");
NPRACH_Parameters_NB_r13_t
*
nprach_parameter
;
LTE_
NPRACH_Parameters_NB_r13_t
*
nprach_parameter
;
//CE level 0
if
(
radioResourceConfigCommon
->
nprach_Config_r13
.
nprach_ParametersList_r13
.
list
.
array
[
0
]
!=
NULL
)
...
...
openair2/RRC/NBIOT/MESSAGES/asn1_msg_NB_IoT.c
View file @
07b133cd
...
...
@@ -151,6 +151,7 @@ uint8_t do_MIB_NB_IoT(
// (uint32_t)hsfn_LSB);
enc_rval
=
uper_encode_to_buffer
(
&
asn_DEF_LTE_BCCH_BCH_Message_NB
,
NULL
,
(
void
*
)
mib_NB_IoT
,
carrier
->
MIB_NB_IoT
,
100
);
...
...
@@ -389,6 +390,7 @@ uint8_t do_SIB1_NB_IoT(uint8_t Mod_id, int CC_id,
//bcch_message->message.choice.c1.choice.systemInformationBlockType1_r13 = **sib1_NB_IoT;
enc_rval
=
uper_encode_to_buffer
(
&
asn_DEF_LTE_BCCH_DL_SCH_Message_NB
,
NULL
,
(
void
*
)
bcch_message
,
carrier
->
SIB1_NB_IoT
,
100
);
...
...
@@ -629,6 +631,7 @@ uint8_t do_SIB1_NB_IoT_x(uint8_t Mod_id, int CC_id,
//bcch_message->message.choice.c1.choice.systemInformationBlockType1_r13 = **sib1_NB_IoT;
enc_rval
=
uper_encode_to_buffer
(
&
asn_DEF_LTE_BCCH_DL_SCH_Message_NB
,
NULL
,
(
void
*
)
bcch_message
,
carrier
->
SIB1_NB_IoT
,
100
);
...
...
@@ -905,6 +908,7 @@ uint8_t do_SIB23_NB_IoT(uint8_t Mod_id,
xer_fprint
(
stdout
,
&
asn_DEF_LTE_BCCH_DL_SCH_Message_NB
,
(
void
*
)
bcch_message
);
#endif
enc_rval
=
uper_encode_to_buffer
(
&
asn_DEF_LTE_BCCH_DL_SCH_Message_NB
,
NULL
,
(
void
*
)
bcch_message
,
carrier
->
SIB23_NB_IoT
,
900
);
...
...
@@ -942,7 +946,7 @@ uint8_t do_RRCConnectionSetup_NB_IoT(
uint8_t
*
const
buffer
,
//Srb0.Tx_buffer.Payload
const
uint8_t
Transaction_id
,
LTE_SRB_ToAddModList_NB_r13_t
**
SRB_configList_NB_IoT
,
//for both SRB1bis and SRB1
struct
PhysicalConfigDedicated_NB_r13
**
physicalConfigDedicated_NB_IoT
)
struct
LTE_
PhysicalConfigDedicated_NB_r13
**
physicalConfigDedicated_NB_IoT
)
{
asn_enc_rval_t
enc_rval
;
uint8_t
ecause
=
0
;
...
...
@@ -1111,6 +1115,7 @@ uint8_t do_RRCConnectionSetup_NB_IoT(
xer_fprint
(
stdout
,
&
asn_DEF_LTE_DL_CCCH_Message
,
(
void
*
)
&
dl_ccch_msg
);
#endif
enc_rval
=
uper_encode_to_buffer
(
&
asn_DEF_LTE_DL_CCCH_Message_NB
,
NULL
,
(
void
*
)
&
dl_ccch_msg_NB_IoT
,
buffer
,
100
);
...
...
openair2/RRC/NBIOT/rrc_eNB_NB_IoT.c
View file @
07b133cd
...
...
@@ -402,8 +402,8 @@ void init_testing_NB_IoT(uint8_t Mod_id, int CC_id, rrc_eNB_carrier_data_NB_IoT_
}
}
//********************************************************************************************************************//
#if 0
...
...
@@ -440,13 +440,7 @@ void rrc_eNB_free_UE_NB_IoT(const module_id_t enb_mod_idP,const struct rrc_eNB_u
* procedure, see TS 23.401 [17].
*/
#else
#if defined(OAI_EMU)
AssertFatal
(
ue_context_pP
->
local_uid
<
NUMBER_OF_UE_MAX_NB_IoT
,
"local_uid invalid (%d<%d) for UE %x!"
,
ue_context_pP
->
local_uid
,
NUMBER_OF_UE_MAX_NB_IoT
,
rnti
);
ue_module_id
=
oai_emulation
.
info
.
eNB_ue_local_uid_to_ue_module_id
[
enb_mod_idP
][
ue_context_pP
->
local_uid
];
AssertFatal
(
ue_module_id
<
NUMBER_OF_UE_MAX_NB_IoT
,
"ue_module_id invalid (%d<%d) for UE %x!"
,
ue_module_id
,
NUMBER_OF_UE_MAX_NB_IoT
,
rnti
);
oai_emulation
.
info
.
eNB_ue_local_uid_to_ue_module_id
[
enb_mod_idP
][
ue_context_pP
->
local_uid
]
=
-
1
;
oai_emulation
.
info
.
eNB_ue_module_id_to_rnti
[
enb_mod_idP
][
ue_module_id
]
=
NOT_A_RNTI
;
#endif
#endif
//rrc_mac_remove_ue_NB_IoT(enb_mod_idP,rnti);
...
...
@@ -715,15 +709,12 @@ void rrc_eNB_emulation_notify_ue_module_id_NB_IoT(
rntiP
);
if
(
NULL
!=
ue_context_p
)
{
oai_emulation
.
info
.
eNB_ue_local_uid_to_ue_module_id
[
enb_module_id
][
ue_context_p
->
local_uid
]
=
ue_module_idP
;
}
//return;
}
}
}
oai_emulation
.
info
.
eNB_ue_module_id_to_rnti
[
enb_module_id
][
ue_module_idP
]
=
rntiP
;
}
AssertFatal
(
enb_module_id
==
NUMBER_OF_eNB_MAX
,
...
...
@@ -822,141 +813,6 @@ void rrc_eNB_generate_RRCConnectionReject_NB_IoT(
eNB_rrc_inst_NB_IoT
[
ctxt_pP
->
module_id
].
carrier
[
CC_id
].
Srb0
.
Tx_buffer
.
payload_size
);
}
//-----------------------------------------------------------------------------
void
rrc_eNB_generate_RRCConnectionSetup_NB_IoT
(
const
protocol_ctxt_t
*
const
ctxt_pP
,
rrc_eNB_ue_context_NB_IoT_t
*
const
ue_context_pP
,
const
int
CC_id
)
//-----------------------------------------------------------------------------
{
//connection setup involve the establishment of SRB1 and SRB1bis (but srb1bis is established implicitly)
//XXX: this message should go through SRB0 to see this--> uper_encode
//XXX: they are assuming that 2 RLC-AM entities are used for SRB1 and SRB1bis
// SRB_ToAddMod_NB_r13_t *SRB1_config; //may not needed now
// LogicalChannelConfig_NB_r13_t *SRB1_logicalChannelConfig;
LTE_SRB_ToAddModList_NB_r13_t
**
SRB_configList
;
//for both SRB1 and SRB1bis
LTE_SRB_ToAddMod_NB_r13_t
*
SRB1bis_config
;
LTE_LogicalChannelConfig_NB_r13_t
*
SRB1bis_logicalChannelConfig
;
int
cnt
;
//XXX MP:warning due to function still not completed at PHY (get_lte_frame_parms)
//XXX this approach is gone most probably
NB_IoT_DL_FRAME_PARMS
*
fp
=
get_NB_IoT_frame_parms
(
ctxt_pP
->
module_id
,
CC_id
);
T
(
T_ENB_RRC_CONNECTION_SETUP
,
T_INT
(
ctxt_pP
->
module_id
),
T_INT
(
ctxt_pP
->
frame
),
T_INT
(
ctxt_pP
->
subframe
),
T_INT
(
ctxt_pP
->
rnti
));
SRB_configList
=
&
ue_context_pP
->
ue_context
.
SRB_configList
;
eNB_rrc_inst_NB_IoT
[
ctxt_pP
->
module_id
].
carrier
[
CC_id
].
Srb0
.
Tx_buffer
.
payload_size
=
do_RRCConnectionSetup_NB_IoT
(
ctxt_pP
,
ue_context_pP
,
CC_id
,
(
uint8_t
*
)
eNB_rrc_inst_NB_IoT
[
ctxt_pP
->
module_id
].
carrier
[
CC_id
].
Srb0
.
Tx_buffer
.
Payload
,
rrc_eNB_get_next_transaction_identifier_NB_IoT
(
ctxt_pP
->
module_id
),
fp
,
SRB_configList
,
//MP:should contain only SRb1bis for the moment
&
ue_context_pP
->
ue_context
.
physicalConfigDedicated_NB_IoT
);
#ifdef RRC_MSG_PRINT
LOG_F
(
RRC
,
"[MSG] RRC Connection Setup
\n
"
);
for
(
cnt
=
0
;
cnt
<
eNB_rrc_inst_NB_IoT
[
ctxt_pP
->
module_id
].
carrier
[
CC_id
].
Srb0
.
Tx_buffer
.
payload_size
;
cnt
++
)
{
LOG_F
(
RRC
,
"%02x "
,
((
uint8_t
*
)
eNB_rrc_inst_NB_IoT
[
ctxt_pP
->
module_id
].
Srb0
.
Tx_buffer
.
Payload
)[
cnt
]);
}
LOG_F
(
RRC
,
"
\n
"
);
//////////////////////////////////
#endif
// configure SRB1bis, PhysicalConfigDedicated, MAC_MainConfig for UE
if
(
*
SRB_configList
!=
NULL
)
{
// MP: the list should contain just one element
for
(
cnt
=
0
;
cnt
<
(
*
SRB_configList
)
->
list
.
count
;
cnt
++
){
SRB1bis_config
=
(
*
SRB_configList
)
->
list
.
array
[
cnt
];
if
(
SRB1bis_config
->
logicalChannelConfig_r13
)
{
if
(
SRB1bis_config
->
logicalChannelConfig_r13
->
present
==
LTE_SRB_ToAddMod_NB_r13__logicalChannelConfig_r13_PR_explicitValue
)
{
SRB1bis_logicalChannelConfig
=
&
SRB1bis_config
->
logicalChannelConfig_r13
->
choice
.
explicitValue
;
}
else
{
SRB1bis_logicalChannelConfig
=
&
SRB1bis_logicalChannelConfig_defaultValue_NB_IoT
;
}
}
else
{
SRB1bis_logicalChannelConfig
=
&
SRB1bis_logicalChannelConfig_defaultValue_NB_IoT
;
}
LOG_D
(
RRC
,
PROTOCOL_RRC_CTXT_UE_FMT
" RRC_eNB --- MAC_CONFIG_REQ (SRB1bis/SRB1) ---> MAC_eNB
\n
"
,
PROTOCOL_RRC_CTXT_UE_ARGS
(
ctxt_pP
));
//XXX: Maybe some problem if Connection Setup could be called also after security activation
//configure the MAC for SRB1bis/SRb1 (but in principle this configuration should be not LCID dependent)
/*rrc_mac_config_req_eNB_NB_IoT(
ctxt_pP->module_id,
ue_context_pP->ue_context.primaryCC_id,
ue_context_pP->ue_context.rnti,
0, //physCellID
0, //p_eNB
0, //p_rx_eNB
0, //Ncp
0, //Ncp_UL
0, //eutraband
(NS_PmaxList_NB_r13_t*) NULL,
(MultiBandInfoList_NB_r13_t*) NULL,
(DL_Bitmap_NB_r13_t*) NULL,
(long*) NULL,//eutraControlRegionSize
(long*)NULL,
// (uint8_t*) NULL, //SIWindowSize
// (uint16_t*)NULL, //SIperiod
0, //dl_carrierFrequency
0, //ul_carrierFrequency
(BCCH_BCH_Message_NB_t*) NULL,
(RadioResourceConfigCommonSIB_NB_r13_t *) NULL,
(PhysicalConfigDedicated_NB_r13_t*) ue_context_pP->ue_context.physicalConfigDedicated_NB_IoT,
ue_context_pP->ue_context.mac_MainConfig_NB_IoT, //XXX most probably is not needed since is only at UE side
DCCH0_NB_IoT, //LCID = 3 of SRB1bis
SRB1bis_logicalChannelConfig
);*/
break
;
}
}
MSC_LOG_TX_MESSAGE
(
MSC_RRC_ENB
,
MSC_RRC_UE
,
eNB_rrc_inst_NB_IoT
[
ctxt_pP
->
module_id
].
carrier
[
CC_id
].
Srb0
.
Tx_buffer
.
Header
,
// LG WARNING
eNB_rrc_inst_NB_IoT
[
ctxt_pP
->
module_id
].
carrier
[
CC_id
].
Srb0
.
Tx_buffer
.
payload_size
,
MSC_AS_TIME_FMT
" RRCConnectionSetup-NB UE %x size %u"
,
MSC_AS_TIME_ARGS
(
ctxt_pP
),
ue_context_pP
->
ue_context
.
rnti
,
eNB_rrc_inst_NB_IoT
[
ctxt_pP
->
module_id
].
carrier
[
CC_id
].
Srb0
.
Tx_buffer
.
payload_size
);
LOG_I
(
RRC
,
PROTOCOL_RRC_CTXT_UE_FMT
" [RAPROC] Logical Channel DL-CCCH, Generating RRCConnectionSetup-NB (bytes %d)
\n
"
,
PROTOCOL_RRC_CTXT_UE_ARGS
(
ctxt_pP
),
eNB_rrc_inst_NB_IoT
[
ctxt_pP
->
module_id
].
carrier
[
CC_id
].
Srb0
.
Tx_buffer
.
payload_size
);
// activate release timer, if RRCSetupComplete-NB not received after 10 frames, remove UE
ue_context_pP
->
ue_context
.
ue_release_timer
=
1
;
// remove UE after 10 frames after RRCConnectionRelease-NB is triggered
ue_context_pP
->
ue_context
.
ue_release_timer_thres
=
100
;
}
//-----------------------------------------------------------------------------
void
rrc_eNB_process_RRCConnectionReconfigurationComplete_NB_IoT
(
const
protocol_ctxt_t
*
const
ctxt_pP
,
...
...
@@ -1069,14 +925,7 @@ void rrc_eNB_process_RRCConnectionReconfigurationComplete_NB_IoT(
ctxt_pP
->
rnti
,
(
int
)
DRB_configList2
->
list
.
array
[
i
]
->
drb_Identity_r13
,
//x
(
int
)
*
DRB_configList2
->
list
.
array
[
i
]
->
logicalChannelIdentity_r13
);
//x+3
// for pre-ci tests
LOG_I
(
RRC
,
"[eNB %d] Frame %d : Logical Channel UL-DCCH, Received RRCConnectionReconfigurationComplete-NB from UE %u, reconfiguring DRB %d/LCID %d
\n
"
,
ctxt_pP
->
module_id
,
ctxt_pP
->
frame
,
oai_emulation
.
info
.
eNB_ue_local_uid_to_ue_module_id
[
ctxt_pP
->
module_id
][
ue_context_pP
->
local_uid
],
(
int
)
DRB_configList2
->
list
.
array
[
i
]
->
drb_Identity_r13
,
(
int
)
*
DRB_configList2
->
list
.
array
[
i
]
->
logicalChannelIdentity_r13
);
if
(
ue_context_pP
->
ue_context
.
DRB_active
[
drb_id
]
==
0
)
{
//is a new DRB
...
...
@@ -1095,16 +944,12 @@ void rrc_eNB_process_RRCConnectionReconfigurationComplete_NB_IoT(
ctxt_pP
->
module_id
+
1
);
// fourth octet
if
(
oip_ifup
==
0
)
{
// interface is up --> send a config the DRB
# ifdef OAI_EMU
oai_emulation
.
info
.
oai_ifup
[
ctxt_pP
->
module_id
]
=
1
;
# else
dest_ip_offset
=
8
;
# endif
LOG_I
(
OIP
,
"[eNB %d] Config the oai%d to send/receive pkt on DRB %ld to/from the protocol stack
\n
"
,
ctxt_pP
->
module_id
,
ctxt_pP
->
module_id
,
(
ue_context_pP
->
local_uid
*
maxDRB_NB_r13
)
+
DRB_configList2
->
list
.
array
[
i
]
->
drb_Identity_r13
);
ue_module_id
=
oai_emulation
.
info
.
eNB_ue_local_uid_to_ue_module_id
[
ctxt_pP
->
module_id
][
ue_context_pP
->
local_uid
];
rb_conf_ipv4
(
0
,
//add
ue_module_id
,
//cx
ctxt_pP
->
module_id
,
//inst
...
...
@@ -1117,9 +962,7 @@ void rrc_eNB_process_RRCConnectionReconfigurationComplete_NB_IoT(
}
# else
# ifdef OAI_EMU
oai_emulation
.
info
.
oai_ifup
[
ctxt_pP
->
module_id
]
=
1
;
# endif
# endif
#endif
...
...
@@ -2731,3 +2574,4 @@ void* rrc_enb_task_NB_IoT(
#ifndef USER_MODE
EXPORT_SYMBOL
(
Rlc_info_am_config
);
#endif
#endif
\ No newline at end of file
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