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
602424f6
Commit
602424f6
authored
4 years ago
by
yaojie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
handle bcch message in rrc_nrue_task
parent
e344a7bd
dev
1
256_QAM_demod
512-dataplane-bug-in-l2nfapi_nos1
FR2_NSA
Fix_SA_SIB1
NR-PHY-MAC-IF-multi-UE
NRPRACH_highSpeed_saankhya
NRUE_usedlschparallel
NR_10MHz
NR_2port_CSIRS
NR_CSIRS_tomerge
NR_DLUL_PF
NR_DLUL_PF_4UL
NR_DLUL_PF_rebased
NR_DL_MIMO
NR_F1C_F1U_extensions
NR_FAPI_beamindex_SSB_RO
NR_FAPI_beamindex_SSB_RO_SEMPROJ
NR_FDD_FIX
NR_FR2_RA
NR_FR2_RRC_SSB
NR_FR2_initsync_fixes
NR_MAC_Multi_Rach_GlobalEdge
NR_MAC_Multi_Rach_GlobalEdge-old
NR_MAC_SSB
NR_MAC_TCI_UCI_GlobalEdge
NR_MCS_BLER
NR_PUCCH_MultiUE
NR_RA_cleanup
NR_RRCReconfiguration_BWP
NR_SA_F1AP_5GRECORDS
NR_SA_F1AP_5GRECORDS-USIM
NR_SA_F1AP_5GRECORDS-wf-0623
NR_SA_F1AP_5GRECORDS_lts
NR_SA_F1AP_RFSIMULATOR
NR_SA_F1AP_RFSIMULATOR2
NR_SA_F1AP_RFSIMULATOR2_SRB
NR_SA_F1AP_RFSIMULATOR3
NR_SA_F1AP_RFSIMULATOR3_tmp
NR_SA_F1AP_RFSIMULATOR3_wf
NR_SA_F1AP_RFSIMULATOR_w5GCN
NR_SA_F1AP_dev
NR_SA_NGAP_RRC_wk42
NR_SA_itti_sim_wk48
NR_SA_itti_sim_wk48_hs
NR_SA_itti_sim_wk48_hs1
NR_SA_w5GCN_new_gtpu
NR_SCHED_HARQ
NR_SCHED_PDCCH_PUCCH_HARQ
NR_SCHED_PDCCH_PUCCH_HARQ_rebased
NR_SCHED_fixes
NR_SRB_Config
NR_UE_CONFIG_REQ_FIXES
NR_UE_PUCCH_bugfixes
NR_UE_SA
NR_UE_SSB_meas
NR_UE_dlsch_bugfix
NR_UE_rework_test
NR_UE_reworking_UCI_procedures
NR_UL_SCFDMA_100MHz
NR_UL_scheduler
NR_UL_scheduler_rebased
NR_Wireshark
NR_beam_simulation
NR_cleanup_PUCCH_resources
NR_gNB_initial_MIB_fix
NR_multiplexing_HARQ_CSI_PUCCH
NR_new_ul_antennaports
NR_phytest_bugfixes
NR_reworking_UL_antennaports
NR_scheduling_CSIRS
NR_scheduling_request
NR_scheduling_request2
NR_scheduling_request3
PBCHNRTCFIX
RFquality
Saankhya_NRPRACH_HighSpeed
Test_SA_5GREC
add-dmrs-test
add-ru-docker-image
avxllr
bandwidth-testing
benetel_config_file_fix
benetel_dpdk20
benetel_driver_uldl_pf_merge
benetel_driver_update
benetel_fixes
bsr-fix
bugfix-free-ra-process
bugfix-nr-pdcp-sn-size
bugfix-nr-t-reordering
bugfix-x2-SgNBAdditionRequest
bugfix_gnb_rt_stats_html
bupt-sa-merge
ci-add-sabox-support
ci-deploy-asterix
ci-deploy-docker-compose
ci-fix-module-ul-iperf
ci-new-docker-pipeline
ci-reduce-nb-vms
ci-test
ci_benetel_longrun_limits
ci_benetel_test
ci_fix_iperf_for_module
ci_hotfix_module_ue_ip_address
ci_improve_module_ctl
ci_nsa_2x2_implem
ci_nsa_benetel
ci_nsa_fixes
ci_nsa_pipes_improve
ci_nsa_test_integration_2021_wk19
ci_nsa_traces
ci_nsa_uplink
ci_phytest
ci_quectel_support
ci_sa_rfsim_test
ci_solve_ul_for_module
ci_test_5GREC
ci_test_nsa_2x2
ci_test_nsa_fix_quectel_nic
ci_test_nsa_on_develop
ci_test_ra_fr2
ci_testinfra_as_code
ci_update_build_nasmesh
ci_vm_resource_fix
cleanup_softmodem_main
code-cleanup-20210716
constant_power
debug-UL-5GRECORDS
debug_UL_signal
detached-w16-test
develop
develop-CBRA-v3
develop-CCE
develop-NR_SA_F1AP_5GRECORDS
develop-NR_SA_F1AP_5GRECORDS-abs
develop-NR_SA_F1AP_5GRECORDS-hs
develop-NR_SA_F1AP_5GRECORDS-hs1
develop-NR_SA_F1AP_5GRECORDS-lts
develop-NR_SA_F1AP_5GRECORDS-lts-wf
develop-NR_SA_F1AP_5GRECORDS-v3
develop-NR_SA_F1AP_5GRECORDS_100M
develop-NR_SA_F1AP_5GRECORDS_LDPC_FPGA
develop-NR_SA_F1AP_5GRECORDS_lfq_0607
develop-NSA_SA_fixes
develop-SA-CBRA
develop-SA-CBRA-CUDU
develop-SA-CBRA-Msg5
develop-SA-CBRA-lts
develop-SA-CBRA-ulsch-lts
develop-SA-RA
develop-SnT
develop-aw2sori
develop-oriecpriupdates
develop-sib1
develop-sib1-local
develop-sib1-lts
develop-sib1-update
develop-sib1-update-test1
develop-sib1-update-ue
develop-wf-du
develop_fpga_ldpc
develop_stable
disable_CSI_measrep
dlsch_parallel
docker-improvements-2021-april
docker-no-cache-option
dongzhanyi-zte-develop1
enhance-rfsim
episys-merge
episys/nsa_baseline
episys/nsa_development
fedora-gen-kernel-fix
fft_bench_hotfix
fix-check
fix-compile
fix-lte-ue-modem-in-docker-container
fix-nr-pdcp-timer
fix-nr-rlc-range-nack
fix-physim-deploy
fix-physim-run-script-on-cluster
fix-quectel
fix-realtime
fix-retransmission-rbg
fix-x2-without-gnb
fix_NR_DLUL_PF
fix_NR_DLUL_PF_benchmark
fix_coreset_dmrs_idx
fix_do_ra_data
fix_nr_ulsim
fix_rb_corruption
fix_reestablishment
fixes-CE-RLC-PDU-size
fixgtpu
flexran-repair-mme-mgmt
flexran-rtc-repo-is-public
git-dashboard
gnb-freerun-txru
gnb-n300-fixes
gnb-only-test
gnb-realtime-hotfix
gnb-realtime-quickfix
gnb-threadpool
hack-bch-no-sched-sf-0
hack-exit-gnb-when-no-enb-nsa
integ-w13-test-rt-issue
integration_2020_wk15
integration_2020_wk48
integration_2020_wk48_2
integration_2020_wk49
integration_2020_wk50
integration_2020_wk50_1
integration_2020_wk51
integration_2020_wk51_2
integration_2021_wk02
integration_2021_wk02_wMR988
integration_2021_wk04
integration_2021_wk05
integration_2021_wk06
integration_2021_wk06_MR978
integration_2021_wk06_b
integration_2021_wk06_c
integration_2021_wk08
integration_2021_wk08_2
integration_2021_wk08_MR963
integration_2021_wk09
integration_2021_wk09_b
integration_2021_wk10
integration_2021_wk10_b
integration_2021_wk11
integration_2021_wk12
integration_2021_wk12_b
integration_2021_wk13_a
integration_2021_wk13_b
integration_2021_wk13_b_fix_tdas
integration_2021_wk13_b_fixed
integration_2021_wk13_c
integration_2021_wk14_a
integration_2021_wk15_a
integration_2021_wk16
integration_2021_wk17_a
integration_2021_wk17_b
integration_2021_wk18_a
integration_2021_wk18_b
integration_2021_wk19
integration_2021_wk20_a
integration_2021_wk22
integration_2021_wk23
integration_2021_wk27
integration_2021_wk28
integration_2021_wk30
integration_2021_wk30_b
integration_w5GC_CBRA_test
inter-RRU-final
itti-enhancement
ldpc_offload_t1
ldpc_short_codeword_fixes
lte-ulsch-bugfix
lte_uplink_improvement
migrate-cpp-check-container
migrate-vm-pipeline-to-bionic
minor-fix-doc-basic-sim
mosaic5g-oai-ran
msg4_phy_0303_lfq
multiple_ssb_sib1_bugfix
nasmesh_kernel_5.8
new-gtpu
nfapi_nr_arch_mod
nfapi_nr_develop
nfapi_nr_develop_new
ngap-dlul
ngap-w48-merge2
ngap-wf
ngap-wf-1120
ngap-wf-1120-srb
ngap-wf-1120-srb-gtp
ngap-wf-1120-srb-gtp-hs
ngap-wf-1120-srb-gtp-hs1
ngap-wf-1120-srb-gtp-hs2
ngap-wf-1120-srb-gtp-yhz
ngap-wf-1203-yunsdr
ngap-wf-liuyu
ngap_lfq_1120
ngap_merge
nr-bsr-fix
nr-dl-mimo-2layer
nr-dmrs-fixes
nr-pdcp-benchmarking
nr-pdcp-improvements
nr-pdcp-nea2-security
nr-pdcp-nia2-integrity
nr-pdcp-small-bugfixes
nr-pdcp-srb-integrity
nr-ra-fix
nr-stats-print
nrPBCHTCFix
nrPbchTcFix
nrUE
nrUE-hs
nrUE-upper-layer
nr_bsr
nr_dl_pf
nr_dl_ul_ptrs
nr_improve_chanest
nr_power_measurement_fixes
nr_ue_pdcp_fix
nr_ue_remove_high_speed_flag
nr_ul_pf
nr_ul_scfdma
oairu
oairu-dockerfile-support
openxg/develop
phy-asan-fixes
physim-build-deploy
physim-deploy-handle-error-cases
prb_based_dl_channel_estimation
ptrs_rrc_config
pusch-retrans-fix-ue
recursive-cmake
remove_nos1_hack_pdcp
rh-ci-add-ue-parallelization
rh_ci_add_runtime_stats
rh_ci_add_uldlharq_stats
rh_ci_gsheet_rt_monitoring
rh_ci_nsa2jenkins
rh_ci_nsa_test_n310
rh_ci_phy_test_improve
rh_ci_ra_fr2
rh_ci_test_benetel
rh_ci_test_nsa
rh_ci_test_nsa_wk16
rh_ci_test_nsa_wk17_b
rh_ci_test_nsa_wk17b
rh_ci_test_rfsim_sa
rh_ci_ue_parallel
rh_fr1_newjenkins
rh_gnb_compile_fix
rh_wk50_debug
rlc-v2-bugfix-status-reporting
rlc-v2-tick
rohan_ulsim2RxFix
s1-subnormal_rewrite
s1_subnormal
s1_subnormal-robert
sa-demo
sa-demo-hs
sa-merge-rrc-srb
sa-msg4
sa-msg4-rrc
sa-msg4-rrc-yihz
sa-msg4-rrc-yihz-hs
sa_rrc_yihz
sanitize-address
sanitize-v1
sanitize-v1-tmp
sarma_pvnp_oai
scs_60_iisc
sim-channels
small-config-change
small_nr_bugfixes
t-gnb-tracer
test-5GREC
test-nsa-benetel
test-panos
test_nsa_gtpu_fix
test_rt-fix_phy-test
ue-dci-false-detection
ue-fixes
ue-pdsch-pusch-parallel
ue-race-fix
ue_beam_selection
usrp_stop_cleanly
usrp_x400
wf-sa-rrc
wf_testc
wireshark-T-hack-ueid
wireshark-log-scheduling-requests
wk11-with-phytest
x2_handle_sctp_shutdown
xiangwab
xiangwan
xw2
yihongzheng_srb
2021.wk14_a
2021.wk13_d
2021.wk13_c
2021.w30
2021.w29
2021.w28
2021.w27
2021.w26
2021.w25
2021.w24
2021.w23
2021.w22
2021.w20
2021.w19
2021.w18_b
2021.w18_a
2021.w17_b
2021.w16
2021.w15
2021.w14
2021.w13_a
2021.w12
2021.w11
2021.w10
2021.w09
2021.w08
2021.w06
2021.w05
2021.w04
2021.w02
2020.w51_2
2020.w51
2020.w50
2020.w49
2020.w48_2
2020.w48
benetel_gnb_rel_2.0
benetel_gnb_rel_1.0
benetel_enb_rel_2.0
benetel_enb_rel_1.0
No related merge requests found
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
250 additions
and
63 deletions
+250
-63
cmake_targets/CMakeLists.txt
cmake_targets/CMakeLists.txt
+1
-1
openair2/COMMON/mac_messages_def.h
openair2/COMMON/mac_messages_def.h
+6
-3
openair2/COMMON/mac_messages_types.h
openair2/COMMON/mac_messages_types.h
+10
-0
openair2/RRC/NR_UE/rrc_UE.c
openair2/RRC/NR_UE/rrc_UE.c
+226
-58
openair2/RRC/NR_UE/rrc_defs.h
openair2/RRC/NR_UE/rrc_defs.h
+7
-1
No files found.
cmake_targets/CMakeLists.txt
View file @
602424f6
...
...
@@ -2911,7 +2911,7 @@ add_executable(nr-uesoftmodem
target_link_libraries
(
nr-uesoftmodem
-Wl,--start-group
RRC_LIB NR_RRC_LIB SECU_CN SECU_OSA UTIL HASHTABLE SCTP_CLIENT UDP SCHED_RU_LIB SCHED_UE_LIB SCHED_NR_UE_LIB
RRC_LIB NR_RRC_LIB
NGAP_LIB NGAP_GNB
SECU_CN SECU_OSA UTIL HASHTABLE SCTP_CLIENT UDP SCHED_RU_LIB SCHED_UE_LIB SCHED_NR_UE_LIB
PHY_COMMON PHY_NR_COMMON PHY_UE PHY_NR_UE PHY_RU LFDS NR_L2_UE L2_UE_LTE_NR MAC_NR_COMMON NFAPI_COMMON_LIB NFAPI_LIB NFAPI_PNF_LIB
NFAPI_USER_LIB S1AP_LIB S1AP_ENB
${
MSC_LIB
}
${
RAL_LIB
}
${
NAS_UE_LIB
}
${
ITTI_LIB
}
${
FLPT_MSG_LIB
}
${
ASYNC_IF_LIB
}
LFDS7
${
ATLAS_LIBRARIES
}
...
...
This diff is collapsed.
Click to expand it.
openair2/COMMON/mac_messages_def.h
View file @
602424f6
...
...
@@ -41,8 +41,6 @@ MESSAGE_DEF(RRC_MAC_CCCH_DATA_REQ, MESSAGE_PRIORITY_MED_PLUS, RrcMacCcchDat
MESSAGE_DEF
(
RRC_MAC_CCCH_DATA_CNF
,
MESSAGE_PRIORITY_MED_PLUS
,
RrcMacCcchDataCnf
,
rrc_mac_ccch_data_cnf
)
MESSAGE_DEF
(
RRC_MAC_CCCH_DATA_IND
,
MESSAGE_PRIORITY_MED_PLUS
,
RrcMacCcchDataInd
,
rrc_mac_ccch_data_ind
)
// gNB
MESSAGE_DEF
(
NR_RRC_MAC_CCCH_DATA_IND
,
MESSAGE_PRIORITY_MED_PLUS
,
NRRrcMacCcchDataInd
,
nr_rrc_mac_ccch_data_ind
)
MESSAGE_DEF
(
RRC_MAC_MCCH_DATA_REQ
,
MESSAGE_PRIORITY_MED_PLUS
,
RrcMacMcchDataReq
,
rrc_mac_mcch_data_req
)
MESSAGE_DEF
(
RRC_MAC_MCCH_DATA_IND
,
MESSAGE_PRIORITY_MED_PLUS
,
RrcMacMcchDataInd
,
rrc_mac_mcch_data_ind
)
...
...
@@ -51,3 +49,8 @@ MESSAGE_DEF(RRC_MAC_PCCH_DATA_REQ, MESSAGE_PRIORITY_MED_PLUS, RrcMacPcchDat
/* RRC configures DRX context (MAC timers) of a UE */
MESSAGE_DEF
(
RRC_MAC_DRX_CONFIG_REQ
,
MESSAGE_PRIORITY_MED
,
rrc_mac_drx_config_req_t
,
rrc_mac_drx_config_req
)
// gNB
MESSAGE_DEF
(
NR_RRC_MAC_CCCH_DATA_IND
,
MESSAGE_PRIORITY_MED_PLUS
,
NRRrcMacCcchDataInd
,
nr_rrc_mac_ccch_data_ind
)
MESSAGE_DEF
(
NR_RRC_MAC_BCCH_DATA_IND
,
MESSAGE_PRIORITY_MED_PLUS
,
NRRrcMacBcchDataInd
,
nr_rrc_mac_bcch_data_ind
)
This diff is collapsed.
Click to expand it.
openair2/COMMON/mac_messages_types.h
View file @
602424f6
...
...
@@ -38,6 +38,7 @@
#define RRC_MAC_BCCH_DATA_REQ(mSGpTR) (mSGpTR)->ittiMsg.rrc_mac_bcch_data_req
#define RRC_MAC_BCCH_DATA_IND(mSGpTR) (mSGpTR)->ittiMsg.rrc_mac_bcch_data_ind
#define NR_RRC_MAC_BCCH_DATA_IND(mSGpTR) (mSGpTR)->ittiMsg.nr_rrc_mac_bcch_data_ind
#define RRC_MAC_BCCH_MBMS_DATA_REQ(mSGpTR) (mSGpTR)->ittiMsg.rrc_mac_bcch_mbms_data_req
#define RRC_MAC_BCCH_MBMS_DATA_IND(mSGpTR) (mSGpTR)->ittiMsg.rrc_mac_bcch_mbms_data_ind
...
...
@@ -87,6 +88,15 @@ typedef struct RrcMacBcchDataInd_s {
uint8_t
rsrp
;
}
RrcMacBcchDataInd
;
typedef
struct
NRRrcMacBcchDataInd_s
{
uint32_t
frame
;
uint8_t
sub_frame
;
uint32_t
sdu_size
;
uint8_t
sdu
[
BCCH_SDU_SIZE
];
uint8_t
gnb_index
;
uint8_t
rsrq
;
uint8_t
rsrp
;
}
NRRrcMacBcchDataInd
;
typedef
struct
RrcMacBcchMbmsDataReq_s
{
uint32_t
frame
;
...
...
This diff is collapsed.
Click to expand it.
openair2/RRC/NR_UE/rrc_UE.c
View file @
602424f6
...
...
@@ -36,6 +36,7 @@
#include "NR_DL-DCCH-Message.h" //asn_DEF_NR_DL_DCCH_Message
#include "NR_DL-CCCH-Message.h" //asn_DEF_NR_DL_CCCH_Message
#include "NR_BCCH-BCH-Message.h" //asn_DEF_NR_BCCH_BCH_Message
#include "NR_BCCH-DL-SCH-Message.h" //asn_DEF_NR_BCCH_DL_SCH_Message
#include "NR_CellGroupConfig.h" //asn_DEF_NR_CellGroupConfig
#include "NR_BWP-Downlink.h" //asn_DEF_NR_BWP_Downlink
#include "NR_RRCReconfiguration.h"
...
...
@@ -48,6 +49,8 @@
#include "rrc_vars.h"
#include "LAYER2/NR_MAC_UE/mac_proto.h"
#include "intertask_interface.h"
#include "executables/softmodem-common.h"
#include "pdcp.h"
#include "UTIL/OSA/osa_defs.h"
...
...
@@ -56,6 +59,55 @@
mui_t
nr_rrc_mui
=
0
;
static
Rrc_State_t
nr_rrc_get_state
(
module_id_t
ue_mod_idP
)
{
return
NR_UE_rrc_inst
[
ue_mod_idP
].
nrRrcState
;
}
static
Rrc_Sub_State_t
nr_rrc_get_sub_state
(
module_id_t
ue_mod_idP
)
{
return
NR_UE_rrc_inst
[
ue_mod_idP
].
nrRrcSubState
;
}
static
int
nr_rrc_set_state
(
module_id_t
ue_mod_idP
,
Rrc_State_t
state
)
{
AssertFatal
((
RRC_STATE_FIRST
<=
state
)
&&
(
state
<=
RRC_STATE_LAST
),
"Invalid state %d!
\n
"
,
state
);
if
(
NR_UE_rrc_inst
[
ue_mod_idP
].
nrRrcState
!=
state
)
{
NR_UE_rrc_inst
[
ue_mod_idP
].
nrRrcState
=
state
;
return
(
1
);
}
return
(
0
);
}
static
int
nr_rrc_set_sub_state
(
module_id_t
ue_mod_idP
,
Rrc_Sub_State_NR_t
subState
)
{
if
(
AMF_MODE_ENABLED
)
{
switch
(
NR_UE_rrc_inst
[
ue_mod_idP
].
nrRrcState
)
{
case
RRC_STATE_INACTIVE_NR
:
AssertFatal
((
RRC_SUB_STATE_INACTIVE_FIRST_NR
<=
subState
)
&&
(
subState
<=
RRC_SUB_STATE_INACTIVE_LAST_NR
),
"Invalid nr sub state %d for state %d!
\n
"
,
subState
,
NR_UE_rrc_inst
[
ue_mod_idP
].
nrRrcState
);
break
;
case
RRC_STATE_IDLE_NR
:
AssertFatal
((
RRC_SUB_STATE_IDLE_FIRST_NR
<=
subState
)
&&
(
subState
<=
RRC_SUB_STATE_IDLE_LAST_NR
),
"Invalid nr sub state %d for state %d!
\n
"
,
subState
,
NR_UE_rrc_inst
[
ue_mod_idP
].
nrRrcState
);
break
;
case
RRC_STATE_CONNECTED_NR
:
AssertFatal
((
RRC_SUB_STATE_CONNECTED_FIRST_NR
<=
subState
)
&&
(
subState
<=
RRC_SUB_STATE_CONNECTED_LAST_NR
),
"Invalid nr sub state %d for state %d!
\n
"
,
subState
,
NR_UE_rrc_inst
[
ue_mod_idP
].
nrRrcState
);
break
;
}
}
if
(
NR_UE_rrc_inst
[
ue_mod_idP
].
nrRrcSubState
!=
subState
)
{
NR_UE_rrc_inst
[
ue_mod_idP
].
nrRrcSubState
=
subState
;
return
(
1
);
}
return
(
0
);
}
extern
boolean_t
nr_rrc_pdcp_config_asn1_req
(
const
protocol_ctxt_t
*
const
ctxt_pP
,
NR_SRB_ToAddModList_t
*
const
srb2add_list
,
...
...
@@ -462,6 +514,104 @@ int8_t nr_rrc_ue_decode_NR_BCCH_BCH_Message(
return
0
;
}
int
nr_decode_SI
(
const
protocol_ctxt_t
*
const
ctxt_pP
,
const
uint8_t
eNB_index
)
{
return
0
;
}
int
nr_decode_SIB1
(
const
protocol_ctxt_t
*
const
ctxt_pP
,
const
uint8_t
eNB_index
,
const
uint8_t
rsrq
,
const
uint8_t
rsrp
)
{
return
0
;
}
int
nr_decode_BCCH_DLSCH_Message
(
const
protocol_ctxt_t
*
const
ctxt_pP
,
const
uint8_t
gNB_index
,
uint8_t
*
const
Sdu
,
const
uint8_t
Sdu_len
,
const
uint8_t
rsrq
,
const
uint8_t
rsrp
)
{
NR_BCCH_DL_SCH_Message_t
*
bcch_message
=
NULL
;
NR_SIB1_t
*
sib1
=
NR_UE_rrc_inst
[
ctxt_pP
->
module_id
].
sib1
[
gNB_index
];
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_UE_DECODE_BCCH
,
VCD_FUNCTION_IN
);
if
(((
NR_UE_rrc_inst
[
ctxt_pP
->
module_id
].
Info
[
gNB_index
].
SIStatus
&
1
)
==
1
)
&&
// SIB1 received
(
NR_UE_rrc_inst
[
ctxt_pP
->
module_id
].
Info
[
gNB_index
].
SIcnt
==
sib1
->
si_SchedulingInfo
->
schedulingInfoList
.
list
.
count
))
{
// to prevent memory bloating
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_UE_DECODE_BCCH
,
VCD_FUNCTION_OUT
);
return
0
;
}
nr_rrc_set_sub_state
(
ctxt_pP
->
module_id
,
RRC_SUB_STATE_IDLE_RECEIVING_SIB_NR
);
if
(
LOG_DEBUGFLAG
(
DEBUG_ASN1
)
)
{
xer_fprint
(
stdout
,
&
asn_DEF_NR_BCCH_DL_SCH_Message
,(
void
*
)
bcch_message
);
}
asn_dec_rval_t
dec_rval
=
uper_decode_complete
(
NULL
,
&
asn_DEF_NR_BCCH_DL_SCH_Message
,
(
void
**
)
&
bcch_message
,
(
const
void
*
)
Sdu
,
Sdu_len
);
if
((
dec_rval
.
code
!=
RC_OK
)
&&
(
dec_rval
.
consumed
==
0
))
{
LOG_E
(
RRC
,
"[UE %"
PRIu8
"] Failed to decode BCCH_DLSCH_MESSAGE (%zu bits)
\n
"
,
ctxt_pP
->
module_id
,
dec_rval
.
consumed
);
log_dump
(
RRC
,
Sdu
,
Sdu_len
,
LOG_DUMP_CHAR
,
" Received bytes:
\n
"
);
// free the memory
SEQUENCE_free
(
&
asn_DEF_LTE_BCCH_DL_SCH_Message
,
(
void
*
)
bcch_message
,
1
);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_UE_DECODE_BCCH
,
VCD_FUNCTION_OUT
);
return
-
1
;
}
if
(
bcch_message
->
message
.
present
==
NR_BCCH_DL_SCH_MessageType_PR_c1
)
{
switch
(
bcch_message
->
message
.
choice
.
c1
->
present
)
{
case
NR_BCCH_DL_SCH_MessageType__c1_PR_systemInformationBlockType1
:
if
((
ctxt_pP
->
frame
%
2
)
==
0
)
{
// even frame
if
((
NR_UE_rrc_inst
[
ctxt_pP
->
module_id
].
Info
[
gNB_index
].
SIStatus
&
1
)
==
0
)
{
NR_SIB1_t
*
sib1
=
NR_UE_rrc_inst
[
ctxt_pP
->
module_id
].
sib1
[
gNB_index
];
memcpy
(
(
void
*
)
sib1
,
(
void
*
)
bcch_message
->
message
.
choice
.
c1
->
choice
.
systemInformationBlockType1
,
sizeof
(
NR_SIB1_t
)
);
LOG_D
(
RRC
,
"[UE %"
PRIu8
"] Decoding First SIB1
\n
"
,
ctxt_pP
->
module_id
);
nr_decode_SIB1
(
ctxt_pP
,
gNB_index
,
rsrq
,
rsrp
);
}
}
break
;
case
NR_BCCH_DL_SCH_MessageType__c1_PR_systemInformation
:
if
((
NR_UE_rrc_inst
[
ctxt_pP
->
module_id
].
Info
[
gNB_index
].
SIStatus
&
1
)
==
1
)
{
// SIB1 with schedulingInfoList is available
NR_SystemInformation_t
*
si
=
NR_UE_rrc_inst
[
ctxt_pP
->
module_id
].
si
[
gNB_index
];
memcpy
(
si
,
bcch_message
->
message
.
choice
.
c1
->
choice
.
systemInformation
,
sizeof
(
NR_SystemInformation_t
)
);
LOG_I
(
RRC
,
"[UE %"
PRIu8
"] Decoding SI for frameP %"
PRIu32
"
\n
"
,
ctxt_pP
->
module_id
,
ctxt_pP
->
frame
);
nr_decode_SI
(
ctxt_pP
,
gNB_index
);
//if (nfapi_mode == 3)
//UE_mac_inst[ctxt_pP->module_id].SI_Decoded = 1;
}
break
;
case
NR_BCCH_DL_SCH_MessageType__c1_PR_NOTHING
:
default:
break
;
}
}
if
(
nr_rrc_get_sub_state
(
ctxt_pP
->
module_id
)
==
RRC_SUB_STATE_IDLE_SIB_COMPLETE_NR
)
{
//if ( (NR_UE_rrc_inst[ctxt_pP->module_id].initialNasMsg.data != NULL) || (!AMF_MODE_ENABLED)) {
rrc_ue_generate_RRCSetupRequest
(
ctxt_pP
,
0
);
nr_rrc_set_sub_state
(
ctxt_pP
->
module_id
,
RRC_SUB_STATE_IDLE_CONNECTING
);
//}
}
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_UE_DECODE_BCCH
,
VCD_FUNCTION_OUT
);
return
0
;
}
//-----------------------------------------------------------------------------
void
...
...
@@ -495,6 +645,12 @@ nr_rrc_ue_process_masterCellGroup(
}
if
(
cellGroupConfig
->
spCellConfig
!=
NULL
){
if
(
NR_UE_rrc_inst
[
ctxt_pP
->
module_id
].
cell_group_config
->
spCellConfig
)
{
memcpy
(
NR_UE_rrc_inst
[
ctxt_pP
->
module_id
].
cell_group_config
->
spCellConfig
,
cellGroupConfig
->
spCellConfig
,
sizeof
(
struct
NR_SpCellConfig
));
}
else
{
NR_UE_rrc_inst
[
ctxt_pP
->
module_id
].
cell_group_config
->
spCellConfig
=
cellGroupConfig
->
spCellConfig
;
}
//TODO (configure the SpCell as specified in 5.3.5.5.7)
}
...
...
@@ -512,6 +668,42 @@ nr_rrc_ue_process_masterCellGroup(
}
/*--------------------------------------------------*/
static
void
rrc_ue_generate_RRCSetupComplete
(
const
protocol_ctxt_t
*
const
ctxt_pP
,
const
uint8_t
gNB_index
,
const
uint8_t
Transaction_id
,
uint8_t
sel_plmn_id
){
uint8_t
buffer
[
100
];
uint8_t
size
;
const
char
*
nas_msg
;
int
nas_msg_length
;
/*
if (EPC_MODE_ENABLED) {
nas_msg = (char *) UE_rrc_inst[ctxt_pP->module_id].initialNasMsg.data;
nas_msg_length = UE_rrc_inst[ctxt_pP->module_id].initialNasMsg.length;
} else {
nas_msg = nas_attach_req_imsi;
nas_msg_length = sizeof(nas_attach_req_imsi);
}
*/
size
=
do_RRCSetupComplete
(
ctxt_pP
->
module_id
,
buffer
,
Transaction_id
,
sel_plmn_id
,
nas_msg_length
,
nas_msg
);
LOG_I
(
RRC
,
"[UE %d][RAPROC] Frame %d : Logical Channel UL-DCCH (SRB1), Generating RRCConnectionSetupComplete (bytes%d, gNB %d)
\n
"
,
ctxt_pP
->
module_id
,
ctxt_pP
->
frame
,
size
,
gNB_index
);
LOG_D
(
RLC
,
"[FRAME %05d][RRC_UE][MOD %02d][][--- PDCP_DATA_REQ/%d Bytes (RRCConnectionSetupComplete to gNB %d MUI %d) --->][PDCP][MOD %02d][RB %02d]
\n
"
,
ctxt_pP
->
frame
,
ctxt_pP
->
module_id
+
NB_RN_INST
,
size
,
gNB_index
,
nr_rrc_mui
,
ctxt_pP
->
module_id
+
NB_eNB_INST
,
DCCH
);
// ctxt_pP_local.rnti = ctxt_pP->rnti;
rrc_data_req_ue
(
ctxt_pP
,
DCCH
,
nr_rrc_mui
++
,
SDU_CONFIRM_NO
,
size
,
buffer
,
PDCP_TRANSMISSION_MODE_CONTROL
);
}
int8_t
nr_rrc_ue_decode_ccch
(
const
protocol_ctxt_t
*
const
ctxt_pP
,
const
SRB_INFO
*
const
Srb_info
,
const
uint8_t
gNB_index
){
NR_DL_CCCH_Message_t
*
dl_ccch_msg
=
NULL
;
asn_dec_rval_t
dec_rval
;
...
...
@@ -571,14 +763,14 @@ int8_t nr_rrc_ue_decode_ccch( const protocol_ctxt_t *const ctxt_pP, const SRB_IN
ctxt_pP
,
gNB_index
,
&
dl_ccch_msg
->
message
.
choice
.
c1
->
choice
.
rrcSetup
->
criticalExtensions
.
choice
.
rrcSetup
->
radioBearerConfig
);
//
nr_rrc_set_state (ctxt_pP->module_id, RRC_STATE_CONNECTED);
//
nr_rrc_set_sub_state (ctxt_pP->module_id, RRC_SUB_STATE_CONNECTED);
nr_rrc_set_state
(
ctxt_pP
->
module_id
,
RRC_STATE_CONNECTED
);
nr_rrc_set_sub_state
(
ctxt_pP
->
module_id
,
RRC_SUB_STATE_CONNECTED
);
NR_UE_rrc_inst
[
ctxt_pP
->
module_id
].
Info
[
gNB_index
].
rnti
=
ctxt_pP
->
rnti
;
/*
rrc_ue_generate_RRCSetupComplete(
rrc_ue_generate_RRCSetupComplete
(
ctxt_pP
,
gNB_index
,
dl_ccch_msg->message.choice.c1
.choice.rrcSetup.
rrc_TransactionIdentifier,
NR_UE_rrc_inst[ctxt_pP->module_id].selected_plmn_identity);
*/
dl_ccch_msg
->
message
.
choice
.
c1
->
choice
.
rrcSetup
->
rrc_TransactionIdentifier
,
NR_UE_rrc_inst
[
ctxt_pP
->
module_id
].
selected_plmn_identity
);
rval
=
0
;
break
;
...
...
@@ -936,7 +1128,7 @@ nr_rrc_ue_establish_drb(
LOG_I
(
NR_RRC
,
"[UE %d] Frame %d: processing RRCReconfiguration: reconfiguring DRB %ld
\n
"
,
ue_mod_idP
,
frameP
,
DRB_config
->
drb_Identity
);
//
if(!AMF_MODE_ENABLED) {
if
(
!
AMF_MODE_ENABLED
)
{
ip_addr_offset3
=
0
;
ip_addr_offset4
=
1
;
LOG_I
(
OIP
,
"[UE %d] trying to bring up the OAI interface %d, IP X.Y.%d.%d
\n
"
,
ue_mod_idP
,
ip_addr_offset3
+
ue_mod_idP
,
...
...
@@ -960,7 +1152,7 @@ nr_rrc_ue_establish_drb(
ipv4_address
(
ip_addr_offset3
+
ue_mod_idP
+
1
,
gNB_index
+
1
));
//daddr
LOG_D
(
NR_RRC
,
"[UE %d] State = Attached (gNB %d)
\n
"
,
ue_mod_idP
,
gNB_index
);
}
//
}
}
return
(
0
);
}
...
...
@@ -1400,42 +1592,6 @@ nr_rrc_ue_decode_dcch(
return
0
;
}
/*--------------------------------------------------*/
static
void
rrc_ue_generate_RRCSetupComplete
(
const
protocol_ctxt_t
*
const
ctxt_pP
,
const
uint8_t
gNB_index
,
const
uint8_t
Transaction_id
,
uint8_t
sel_plmn_id
){
uint8_t
buffer
[
100
];
uint8_t
size
;
const
char
*
nas_msg
;
int
nas_msg_length
;
/*
if (EPC_MODE_ENABLED) {
nas_msg = (char *) UE_rrc_inst[ctxt_pP->module_id].initialNasMsg.data;
nas_msg_length = UE_rrc_inst[ctxt_pP->module_id].initialNasMsg.length;
} else {
nas_msg = nas_attach_req_imsi;
nas_msg_length = sizeof(nas_attach_req_imsi);
}
*/
size
=
do_RRCSetupComplete
(
ctxt_pP
->
module_id
,
buffer
,
Transaction_id
,
sel_plmn_id
,
nas_msg_length
,
nas_msg
);
LOG_I
(
RRC
,
"[UE %d][RAPROC] Frame %d : Logical Channel UL-DCCH (SRB1), Generating RRCConnectionSetupComplete (bytes%d, gNB %d)
\n
"
,
ctxt_pP
->
module_id
,
ctxt_pP
->
frame
,
size
,
gNB_index
);
LOG_D
(
RLC
,
"[FRAME %05d][RRC_UE][MOD %02d][][--- PDCP_DATA_REQ/%d Bytes (RRCConnectionSetupComplete to gNB %d MUI %d) --->][PDCP][MOD %02d][RB %02d]
\n
"
,
ctxt_pP
->
frame
,
ctxt_pP
->
module_id
+
NB_RN_INST
,
size
,
gNB_index
,
nr_rrc_mui
,
ctxt_pP
->
module_id
+
NB_eNB_INST
,
DCCH
);
// ctxt_pP_local.rnti = ctxt_pP->rnti;
rrc_data_req_ue
(
ctxt_pP
,
DCCH
,
nr_rrc_mui
++
,
SDU_CONFIRM_NO
,
size
,
buffer
,
PDCP_TRANSMISSION_MODE_CONTROL
);
}
//-----------------------------------------------------------------------------
void
*
rrc_nrue_task
(
void
*
args_p
)
{
MessageDef
*
msg_p
;
...
...
@@ -1462,22 +1618,34 @@ void *rrc_nrue_task( void *args_p ) {
LOG_D
(
RRC
,
"[UE %d] Received %s
\n
"
,
ue_mod_id
,
ITTI_MSG_NAME
(
msg_p
));
break
;
case
RRC_MAC_CCCH_DATA_IND
:
case
NR_RRC_MAC_BCCH_DATA_IND
:
LOG_D
(
RRC
,
"[UE %d] Received %s: frameP %d, gNB %d
\n
"
,
ue_mod_id
,
ITTI_MSG_NAME
(
msg_p
),
NR_RRC_MAC_BCCH_DATA_IND
(
msg_p
).
frame
,
NR_RRC_MAC_BCCH_DATA_IND
(
msg_p
).
gnb_index
);
// PROTOCOL_CTXT_SET_BY_INSTANCE(&ctxt, instance, ENB_FLAG_NO, NOT_A_RNTI, RRC_MAC_BCCH_DATA_IND (msg_p).frame, 0);
PROTOCOL_CTXT_SET_BY_MODULE_ID
(
&
ctxt
,
ue_mod_id
,
GNB_FLAG_NO
,
NOT_A_RNTI
,
NR_RRC_MAC_BCCH_DATA_IND
(
msg_p
).
frame
,
0
,
NR_RRC_MAC_BCCH_DATA_IND
(
msg_p
).
gnb_index
);
nr_decode_BCCH_DLSCH_Message
(
&
ctxt
,
NR_RRC_MAC_BCCH_DATA_IND
(
msg_p
).
gnb_index
,
NR_RRC_MAC_BCCH_DATA_IND
(
msg_p
).
sdu
,
NR_RRC_MAC_BCCH_DATA_IND
(
msg_p
).
sdu_size
,
NR_RRC_MAC_BCCH_DATA_IND
(
msg_p
).
rsrq
,
NR_RRC_MAC_BCCH_DATA_IND
(
msg_p
).
rsrp
);
case
NR_RRC_MAC_CCCH_DATA_IND
:
LOG_D
(
RRC
,
"[UE %d] RNTI %x Received %s: frameP %d, gNB %d
\n
"
,
ue_mod_id
,
RRC_MAC_CCCH_DATA_IND
(
msg_p
).
rnti
,
NR_
RRC_MAC_CCCH_DATA_IND
(
msg_p
).
rnti
,
ITTI_MSG_NAME
(
msg_p
),
RRC_MAC_CCCH_DATA_IND
(
msg_p
).
frame
,
RRC_MAC_CCCH_DATA_IND
(
msg_p
).
e
nb_index
);
srb_info_p
=
&
NR_UE_rrc_inst
[
ue_mod_id
].
Srb0
[
RRC_MAC_CCCH_DATA_IND
(
msg_p
).
e
nb_index
];
memcpy
(
srb_info_p
->
Rx_buffer
.
Payload
,
RRC_MAC_CCCH_DATA_IND
(
msg_p
).
sdu
,
RRC_MAC_CCCH_DATA_IND
(
msg_p
).
sdu_size
);
srb_info_p
->
Rx_buffer
.
payload_size
=
RRC_MAC_CCCH_DATA_IND
(
msg_p
).
sdu_size
;
NR_
RRC_MAC_CCCH_DATA_IND
(
msg_p
).
frame
,
NR_RRC_MAC_CCCH_DATA_IND
(
msg_p
).
g
nb_index
);
srb_info_p
=
&
NR_UE_rrc_inst
[
ue_mod_id
].
Srb0
[
NR_RRC_MAC_CCCH_DATA_IND
(
msg_p
).
g
nb_index
];
memcpy
(
srb_info_p
->
Rx_buffer
.
Payload
,
NR_
RRC_MAC_CCCH_DATA_IND
(
msg_p
).
sdu
,
NR_
RRC_MAC_CCCH_DATA_IND
(
msg_p
).
sdu_size
);
srb_info_p
->
Rx_buffer
.
payload_size
=
NR_
RRC_MAC_CCCH_DATA_IND
(
msg_p
).
sdu_size
;
// PROTOCOL_CTXT_SET_BY_INSTANCE(&ctxt, instance, ENB_FLAG_NO, RRC_MAC_CCCH_DATA_IND (msg_p).rnti, RRC_MAC_CCCH_DATA_IND (msg_p).frame, 0);
PROTOCOL_CTXT_SET_BY_MODULE_ID
(
&
ctxt
,
ue_mod_id
,
ENB_FLAG_NO
,
RRC_MAC_CCCH_DATA_IND
(
msg_p
).
rnti
,
RRC_MAC_CCCH_DATA_IND
(
msg_p
).
frame
,
0
,
RRC_MAC_CCCH_DATA_IND
(
msg_p
).
e
nb_index
);
PROTOCOL_CTXT_SET_BY_MODULE_ID
(
&
ctxt
,
ue_mod_id
,
GNB_FLAG_NO
,
NR_RRC_MAC_CCCH_DATA_IND
(
msg_p
).
rnti
,
NR_RRC_MAC_CCCH_DATA_IND
(
msg_p
).
frame
,
0
,
NR_RRC_MAC_CCCH_DATA_IND
(
msg_p
).
g
nb_index
);
nr_rrc_ue_decode_ccch
(
&
ctxt
,
srb_info_p
,
RRC_MAC_CCCH_DATA_IND
(
msg_p
).
e
nb_index
);
NR_RRC_MAC_CCCH_DATA_IND
(
msg_p
).
g
nb_index
);
break
;
/* PDCP messages */
...
...
This diff is collapsed.
Click to expand it.
openair2/RRC/NR_UE/rrc_defs.h
View file @
602424f6
...
...
@@ -91,6 +91,9 @@ typedef struct NR_UE_RRC_INST_s {
NR_SRB_INFO_TABLE_ENTRY
Srb1
[
NB_CNX_UE
];
NR_SRB_INFO_TABLE_ENTRY
Srb2
[
NB_CNX_UE
];
NR_SIB1_t
*
sib1
[
NB_CNX_UE
];
NR_SystemInformation_t
*
si
[
NB_CNX_UE
];
NR_UE_RRC_INFO
Info
[
NB_SIG_CNX_UE
];
NR_MIB_t
*
mib
;
...
...
@@ -151,6 +154,9 @@ typedef struct NR_UE_RRC_INST_s {
// CellGroupConfig.spCellConfig.spCellConfigDedicated
RRC_LIST_TYPE
(
NR_CSI_ReportConfig_t
,
NR_maxNrofCSI_ReportConfigurations
)
CSI_ReportConfig_list
;
long
selected_plmn_identity
;
Rrc_State_NR_t
nrRrcState
;
Rrc_Sub_State_NR_t
nrRrcSubState
;
}
NR_UE_RRC_INST_t
;
#endif
...
...
This diff is collapsed.
Click to expand it.
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