diff --git a/openair1/SCHED/phy_procedures_lte_eNb.c b/openair1/SCHED/phy_procedures_lte_eNb.c index 619a5d63295c3822b34577527eb2f7b5d66cc2ea..4601781e680f8f0b84323523ee5513d762f23f81 100755 --- a/openair1/SCHED/phy_procedures_lte_eNb.c +++ b/openair1/SCHED/phy_procedures_lte_eNb.c @@ -159,12 +159,11 @@ int32_t add_ue(int16_t rnti, PHY_VARS_eNB *eNB) { uint8_t i; -#ifdef DEBUG_PHY_PROC - LOG_I(PHY,"[eNB %d/%d] Adding UE with rnti %x\n", + + LOG_D(PHY,"[eNB %d/%d] Adding UE with rnti %x\n", eNB->Mod_id, eNB->CC_id, (uint16_t)rnti); -#endif for (i=0; i<NUMBER_OF_UE_MAX; i++) { if ((eNB->dlsch[i]==NULL) || (eNB->ulsch[i]==NULL)) { @@ -209,9 +208,9 @@ int mac_phy_remove_ue(module_id_t Mod_idP,rnti_t rntiP) { } else { if (eNB->UE_stats[i].crnti==rntiP) { MSC_LOG_EVENT(MSC_PHY_ENB, "0 Removed ue %"PRIx16" ", rntiP); -#ifdef DEBUG_PHY_PROC - LOG_I(PHY,"eNB %d removing UE %d with rnti %x\n",eNB->Mod_id,i,rnti); -#endif + + LOG_D(PHY,"eNB %d removing UE %d with rnti %x\n",eNB->Mod_id,i,rntiP); + //LOG_D(PHY,("[PHY] UE_id %d\n",i); clean_eNb_dlsch(eNB->dlsch[i][0]); clean_eNb_ulsch(eNB->ulsch[i]); @@ -841,7 +840,7 @@ void generate_eNB_ulsch_params(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,DCI_ALLOC int frame = proc->frame_tx; int subframe = proc->subframe_tx; - LOG_I(PHY, + LOG_D(PHY, "[eNB %"PRIu8"][PUSCH %"PRIu8"] Frame %d subframe %d UL Frame %"PRIu32", UL Subframe %"PRIu8", Generated ULSCH (format0) DCI (rnti %"PRIx16", dci %"PRIx8"), aggregation %d\n", eNB->Mod_id, subframe2harq_pid(fp, @@ -1137,7 +1136,11 @@ void phy_procedures_eNB_TX(PHY_VARS_eNB *eNB, for (i=0; i<NUMBER_OF_UE_MAX; i++) { // If we've dropped the UE, go back to PRACH mode for this UE - + if ((frame==0)&&(subframe==0)) { + if (eNB->UE_stats[i].crnti > 0) { + LOG_I(PHY,"UE %d : rnti %x\n",i,eNB->UE_stats[i].crnti); + } + } if (eNB->UE_stats[i].ulsch_consecutive_errors == ULSCH_max_consecutive_errors) { LOG_W(PHY,"[eNB %d, CC %d] frame %d, subframe %d, UE %d: ULSCH consecutive error count reached %u, triggering UL Failure\n", eNB->Mod_id,eNB->CC_id,frame,subframe, i, eNB->UE_stats[i].ulsch_consecutive_errors); @@ -1947,7 +1950,7 @@ void prach_procedures(PHY_VARS_eNB *eNB,uint8_t abstraction_flag) eNB->UE_stats[(uint32_t)UE_id].UE_timing_offset = preamble_delay_list[preamble_max]&0x1FFF; //limit to 13 (=11+2) bits eNB->UE_stats[(uint32_t)UE_id].sector = 0; - LOG_I(PHY,"[eNB %d/%d][RAPROC] Frame %d, subframe %d Initiating RA procedure (UE_id %d) with preamble %d, energy %d.%d dB, delay %d\n", + LOG_D(PHY,"[eNB %d/%d][RAPROC] Frame %d, subframe %d Initiating RA procedure (UE_id %d) with preamble %d, energy %d.%d dB, delay %d\n", eNB->Mod_id, eNB->CC_id, frame, @@ -2616,7 +2619,7 @@ void phy_procedures_eNB_uespec_RX(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,const { //RX processing for ue-specific resources (i UNUSED(r_type); - uint32_t l, ret=0,i,j,k; + uint32_t ret=0,i,j,k; uint32_t harq_pid, harq_idx, round; uint8_t nPRS; int sync_pos; diff --git a/openair2/LAYER2/MAC/eNB_scheduler.c b/openair2/LAYER2/MAC/eNB_scheduler.c index 65098e975f2aeac893b713b8fc5ce0b45582d311..4167db00fde758384a6191a30b7898179874337a 100644 --- a/openair2/LAYER2/MAC/eNB_scheduler.c +++ b/openair2/LAYER2/MAC/eNB_scheduler.c @@ -119,8 +119,10 @@ void eNB_dlsch_ulsch_scheduler(module_id_t module_idP,uint8_t cooperation_flag, while (i>=0) { rnti = UE_RNTI(module_idP, i); CC_id = UE_PCCID(module_idP, i); - LOG_D(MAC,"UE %d: rnti %x (%p)\n", i, rnti, - mac_xface->get_eNB_UE_stats(module_idP, CC_id, rnti)); + if ((frameP==0)&&(subframeP==0)) + LOG_I(MAC,"UE rnti %x : %s\n", rnti, + UE_list->UE_sched_ctrl[i].ul_out_of_sync==0 ? "in synch" : "out of sync"); + next_i= UE_list->next[i]; PHY_vars_eNB_g[module_idP][CC_id]->pusch_stats_bsr[i][(frameP*10)+subframeP]=-63; @@ -317,7 +319,7 @@ void eNB_dlsch_ulsch_scheduler(module_id_t module_idP,uint8_t cooperation_flag, //if (subframeP%5 == 0) //#ifdef EXMIMO - PROTOCOL_CTXT_SET_BY_MODULE_ID(&ctxt, module_idP, ENB_FLAG_YES, NOT_A_RNTI, frameP, 0,module_idP); + PROTOCOL_CTXT_SET_BY_MODULE_ID(&ctxt, module_idP, ENB_FLAG_YES, NOT_A_RNTI, frameP, subframeP,module_idP); pdcp_run(&ctxt); //#endif diff --git a/openair2/RRC/LITE/rrc_common.c b/openair2/RRC/LITE/rrc_common.c index 209231764779aca7338b48d56507aa3eefb58061..e05e957e36c9445a61fcd02a03c0ac82fd7c2591 100644 --- a/openair2/RRC/LITE/rrc_common.c +++ b/openair2/RRC/LITE/rrc_common.c @@ -525,6 +525,19 @@ rrc_rx_tx( // check for UL failure RB_FOREACH(ue_context_p, rrc_ue_tree_s, &(eNB_rrc_inst[ctxt_pP->module_id].rrc_ue_head)) { + if ((ctxt_pP->frame == 0) && (ctxt_pP->subframe==0)) { + if (ue_context_p->ue_context.Initialue_identity_s_TMSI.presence == TRUE) { + LOG_I(RRC,"UE rnti %x:S-TMSI %x failure timer %d/20000\n", + ue_context_p->ue_context.rnti, + ue_context_p->ue_context.Initialue_identity_s_TMSI.m_tmsi, + ue_context_p->ue_context.ul_failure_timer); + } + else { + LOG_I(RRC,"UE rnti %x failure timer %d/20000\n", + ue_context_p->ue_context.rnti, + ue_context_p->ue_context.ul_failure_timer); + } + } if (ue_context_p->ue_context.ul_failure_timer>0) { ue_context_p->ue_context.ul_failure_timer++; if (ue_context_p->ue_context.ul_failure_timer >= 20000) { diff --git a/openair2/RRC/LITE/rrc_eNB.c b/openair2/RRC/LITE/rrc_eNB.c index dcc3264828404ef2889d1262271eb5f4cb2b9ed8..b0ee647fc837b40e6e1f37d18236961ccabf45cc 100644 --- a/openair2/RRC/LITE/rrc_eNB.c +++ b/openair2/RRC/LITE/rrc_eNB.c @@ -3742,12 +3742,13 @@ rrc_eNB_decode_ccch( if ((ue_context_p = rrc_eNB_ue_context_stmsi_exist(ctxt_pP, mme_code, m_tmsi))) { //#warning "TODO: stmsi_exist: remove UE from MAC/PHY (how?)" - LOG_I(RRC," S-TMSI exists, ue_context_p %p, old rnti %x => %x\n",ue_context_p,ue_context_p->ue_context.rnti); + LOG_I(RRC," S-TMSI exists, ue_context_p %p, old rnti %x => %x\n",ue_context_p,ue_context_p->ue_context.rnti,ctxt_pP->rnti); stmsi_received=1; ue_context_p->ue_context.rnti = ctxt_pP->rnti; // AssertFatal(0 == 1, "TODO: remove UE from MAC/PHY (how?)"); // ue_context_p = NULL; } else { + LOG_I(RRC," S-TMSI doesn't exist, setting Initialue_identity_s_TMSI.m_tmsi to %x => %x\n",ue_context_p,m_tmsi); ue_context_p = rrc_eNB_get_next_free_ue_context(ctxt_pP, NOT_A_RANDOM_UE_IDENTITY); ue_context_p->ue_context.Initialue_identity_s_TMSI.presence = TRUE; ue_context_p->ue_context.Initialue_identity_s_TMSI.mme_code = mme_code; diff --git a/targets/RT/USER/lte-enb.c b/targets/RT/USER/lte-enb.c index daeca00f42b3b045dd6583af403e4ad07ee51b2d..373a13e1503e98d46cebcdf3c46c1f33325790fa 100644 --- a/targets/RT/USER/lte-enb.c +++ b/targets/RT/USER/lte-enb.c @@ -741,7 +741,8 @@ static void* eNB_thread_rx_common( void* param ) #if defined(ENABLE_ITTI) wait_system_ready ("Waiting for eNB application to be ready %s\r", &start_eNB); #endif - + if (openair0.trx_start_func(&openair0) != 0 ) + LOG_E(HW,"Could not start the device\n"); // This is a forever while loop, it loops over subframes which are scheduled by incoming samples from HW devices while (!oai_exit) { diff --git a/targets/RT/USER/lte-softmodem.c b/targets/RT/USER/lte-softmodem.c index 26c4a9ae88891180e28e59c0a7bb4f1ea7e844f7..70769c6957af9236c74f70b68225cc5f5c32349c 100644 --- a/targets/RT/USER/lte-softmodem.c +++ b/targets/RT/USER/lte-softmodem.c @@ -1762,7 +1762,7 @@ int main( int argc, char **argv ) #ifndef USRP_DEBUG - if (mode!=loop_through_memory) + if ((UE_flag==1) && (mode!=loop_through_memory)) if (openair0.trx_start_func(&openair0) != 0 ) LOG_E(HW,"Could not start the device\n");