|
|
|
@ -133,6 +133,13 @@ bool ue::init(all_args_t *args_) {
|
|
|
|
|
|
|
|
|
|
// Init layers
|
|
|
|
|
|
|
|
|
|
// Init USIM first to allow early exit in case reader couldn't be found
|
|
|
|
|
usim = usim_base::get_instance(&args->usim, &usim_log);
|
|
|
|
|
if (usim->init(&args->usim, &usim_log)) {
|
|
|
|
|
usim_log.console("Failed to initialize USIM.\n");
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// PHY inits in background, start before radio
|
|
|
|
|
args->expert.phy.nof_rx_ant = args->rf.nof_rx_ant;
|
|
|
|
|
phy.init(&radio, &mac, &rrc, phy_log, &args->expert.phy);
|
|
|
|
@ -197,8 +204,7 @@ bool ue::init(all_args_t *args_) {
|
|
|
|
|
mac.init(&phy, &rlc, &rrc, &mac_log);
|
|
|
|
|
rlc.init(&pdcp, &rrc, this, &rlc_log, &mac, 0 /* RB_ID_SRB0 */);
|
|
|
|
|
pdcp.init(&rlc, &rrc, &gw, &pdcp_log, 0 /* RB_ID_SRB0 */, SECURITY_DIRECTION_UPLINK);
|
|
|
|
|
usim = usim_base::get_instance(&args->usim, &usim_log);
|
|
|
|
|
usim->init(&args->usim, &usim_log);
|
|
|
|
|
|
|
|
|
|
srslte_nas_config_t nas_cfg(1, args->apn); /* RB_ID_SRB1 */
|
|
|
|
|
nas.init(usim, &rrc, &gw, &nas_log, nas_cfg);
|
|
|
|
|
gw.init(&pdcp, &nas, &gw_log, 3 /* RB_ID_DRB1 */);
|
|
|
|
|