dl_config_pdu->mpdcch_pdu.mpdcch_pdu_rel13.mpdcch_tansmission_type=1;// imposed (9.1.5 in 213) for Type 2 Common search space
AssertFatal(cc[CC_idP].sib1_v13ext->bandwidthReducedAccessRelatedInfo_r13!=NULL,"cc[CC_idP].sib1_v13ext->bandwidthReducedAccessRelatedInfo_r13 is null\n");
"[eNB %d] CC_id %d Frame %d subframeP %d : Checking MBSFN Sync Area %d/%d with SF allocation %d/%d for MCCH and MTCH (mbsfn period %d, mcch period %d)\n",
"[eNB %d] CC_id %d Frame %d subframeP %d : Checking MBSFN Sync Area %d/%d with SF allocation %d/%d for MCCH and MTCH (mbsfn period %d, mcch period %d)\n",
cancel_ra_proc(enb_mod_idP,CC_idP,frameP,current_rnti);// TODO: Currently we don't support retransmission of Msg3 ( If in error Cancel RA procedure and reattach)
cancel_ra_proc(enb_mod_idP,CC_idP,frameP,current_rnti);// TODO: Currently we don't support retransmission of Msg3 ( If in error Cancel RA procedure and reattach)
LOG_D(MAC,"scheduled_ul_bytes, new %d\n",UE_template->scheduled_ul_bytes);
/* Cyclic shift for DMRS */
cshift=0;// values from 0 to 7 can be used for mapping the cyclic shift (36.211 , Table 5.5.2.1.1-1)
/* save it for a potential retransmission */
UE_template->cshift[harq_pid]=cshift;
AssertFatal(UE_template->physicalConfigDedicated!=NULL,"UE_template->physicalConfigDedicated is null\n");
AssertFatal(UE_template->physicalConfigDedicated->ext4!=NULL,"UE_template->physicalConfigDedicated->ext4 is null\n");
AssertFatal(UE_template->physicalConfigDedicated->ext4->epdcch_Config_r11!=NULL,"UE_template->physicalConfigDedicated->ext4->epdcch_Config_r11 is null\n");
LOG_D(MAC,"[eNB %d] CC_id %d Frame %d, subframeP %d: Generated ULSCH DCI for next UE_id %d, format 0\n",
module_idP,
CC_id,
frameP,
subframeP,
UE_id);
}else{// round_UL > 0 => retransmission
/* In LTE-M the UL HARQ process is asynchronous */
T(T_ENB_MAC_UE_UL_SCHEDULE_RETRANSMISSION,
T_INT(module_idP),
T_INT(CC_id),
T_INT(rnti),
T_INT(frameP),
T_INT(subframeP),
T_INT(harq_pid),
T_INT(UE_template->mcs_UL[harq_pid]),
T_INT(0),
T_INT(6),
T_INT(round_UL));
AssertFatal(UE_template->physicalConfigDedicated!=NULL,"UE_template->physicalConfigDedicated is null\n");
AssertFatal(UE_template->physicalConfigDedicated->ext4!=NULL,"UE_template->physicalConfigDedicated->ext4 is null\n");
AssertFatal(UE_template->physicalConfigDedicated->ext4->epdcch_Config_r11!=NULL,"UE_template->physicalConfigDedicated->ext4->epdcch_Config_r11 is null\n");
LOG_D(MAC,"scheduled_ul_bytes, new %d\n",UE_template->scheduled_ul_bytes);
/* Cyclic shift for DMRS */
cshift=0;// values from 0 to 7 can be used for mapping the cyclic shift (36.211 , Table 5.5.2.1.1-1)
/* save it for a potential retransmission */
UE_template->cshift[harq_pid]=cshift;
AssertFatal(UE_template->physicalConfigDedicated!=NULL,"UE_template->physicalConfigDedicated is null\n");
AssertFatal(UE_template->physicalConfigDedicated->ext4!=NULL,"UE_template->physicalConfigDedicated->ext4 is null\n");
AssertFatal(UE_template->physicalConfigDedicated->ext4->epdcch_Config_r11!=NULL,"UE_template->physicalConfigDedicated->ext4->epdcch_Config_r11 is null\n");
LOG_D(MAC,"[eNB %d] CC_id %d Frame %d, subframeP %d: Generated ULSCH DCI for next UE_id %d, format 0\n",
module_idP,
CC_id,
frameP,
subframeP,
UE_id);
}else{// round_UL > 0 => retransmission
/* In LTE-M the UL HARQ process is asynchronous */
T(T_ENB_MAC_UE_UL_SCHEDULE_RETRANSMISSION,
T_INT(module_idP),
T_INT(CC_id),
T_INT(rnti),
T_INT(frameP),
T_INT(subframeP),
T_INT(harq_pid),
T_INT(UE_template->mcs_UL[harq_pid]),
T_INT(0),
T_INT(6),
T_INT(round_UL));
AssertFatal(UE_template->physicalConfigDedicated!=NULL,"UE_template->physicalConfigDedicated is null\n");
AssertFatal(UE_template->physicalConfigDedicated->ext4!=NULL,"UE_template->physicalConfigDedicated->ext4 is null\n");
AssertFatal(UE_template->physicalConfigDedicated->ext4->epdcch_Config_r11!=NULL,"UE_template->physicalConfigDedicated->ext4->epdcch_Config_r11 is null\n");
uint16_tue_process_rar(constmodule_id_tmodule_idP,constintCC_id,constframe_tframeP,constrnti_tra_rnti,uint8_t*constdlsch_buffer,rnti_t*constt_crnti,constuint8_tpreamble_index,uint8_t*selected_rar_buffer// output argument for storing the selected RAR header and RAR payload
How to configure wireshark for dissecting LTE protocols:
- start the wireshark as a sudoers
- goto analyze->enabled prototols
- goto analyze->enabled prototols
=> enable mac_lte_udp and rlc_lte_udp
- goto edit/preferences and expand Protocols
- select UDP and check "try heuristic sub-dissectors first"
- select MAC-LTE, and check all the options (checkboxes), and set the "which layer info to show in info column" to "MAC info"
- select RLC-LTE, and check all the options except the "May see RLC headers only", and set the "call PDCP dissector for DRB PDUs" to "12-bit SN". Optionally you may select the sequence analysis for RLC AM/UM.
- goto edit/preferences and expand Protocols
- select UDP and check "try heuristic sub-dissectors first"
- select MAC-LTE, and check all the options (checkboxes), and set the "which layer info to show in info column" to "MAC info"
- select RLC-LTE, and check all the options except the "May see RLC headers only", and
set the "call PDCP dissector for DRB PDUs" to "12-bit SN". Optionally you may select the sequence analysis for RLC AM/UM.
How to use
- start eNB or UE with option --opt.type wireshark
--opt options are:
--opt.type none/wireshark/pcap
--opt.ip 127.0.0.1 to specify the output IP address (default: 127.0.0.1)
output port is always: 9999 (to change it, change constant: PACKET_MAC_LTE_DEFAULT_UDP_PORT in OAI code)
--opt.path file_name to specify the file name (pcap)
- capture on local interface "lo"
- filter out the ICMP/DNS/TCP messages (e.g. "!icmp && !dns && !tcp")
How to use
- start eNB or UE with option --opt.type wireshark
--opt options are:
--opt.type none/wireshark/pcap
--opt.ip 127.0.0.1 to specify the output IP address (default: 127.0.0.1)
output port is always: 9999 (to change it, change constant: PACKET_MAC_LTE_DEFAULT_UDP_PORT in OAI code)
--opt.path file_name to specify the file name (pcap)
- capture on local interface "lo"
- filter out the ICMP/DNS/TCP messages (e.g. "!icmp && !dns && !tcp")
LOG_E(PHY,"Received Timestamp (IF4p5) doesn't correspond to the time we think it is (proc->subframe_rx %d, subframe %d, symbol_mask %x)\n",proc->subframe_rx,*subframe,proc->symbol_mask[*subframe]);
LOG_E(PHY,"Received Timestamp (IF4p5) doesn't correspond to the time we think it is (proc->frame_rx %d frame %d,symbol_mask %x\n",proc->frame_rx,*frame,proc->symbol_mask[*subframe]);
LOG_D(PHY,"RU %d has frame %d and subframe %d, state %s\n",eNB->RU_list[i]->idx,eNB->RU_list[i]->proc.frame_rx,eNB->RU_list[i]->proc.subframe_rx,ru_states[eNB->RU_list[i]->state]);
//AssertFatal((proc->RU_mask&(1<<i)) == 0, "eNB %d frame %d, subframe %d : previous information from RU %d (num_RU %d,mask %x) has not been served yet!\n",eNB->Mod_id,ru->proc.frame_rx,ru->proc.subframe_rx,ru->idx,eNB->num_RU,proc->RU_mask);
//AssertFatal((proc->RU_mask&(1<<i)) == 0, "eNB %d frame %d, subframe %d : previous information from RU %d (num_RU %d,mask %x) has not been served yet!\n",eNB->Mod_id,ru->proc.frame_rx,ru->proc.subframe_rx,ru->idx,eNB->num_RU,proc->RU_mask);
if(ru->is_slave==0&&((proc->RU_mask[ru->proc.subframe_rx]&(1<<i))==1)&&eNB->RU_list[i]->state==RU_RUN){// This is master & the RRU has already been received
LOG_E(PHY,"RU %d is not SYNC, subframe %d, time %f this is master\n",eNB->RU_list[i]->idx,ru->proc.subframe_rx,fabs(eNB->RU_list[i]->proc.t[ru->proc.subframe_rx].tv_nsec-eNB->RU_list[0]->proc.t[ru->proc.subframe_rx].tv_nsec));
}elseif(ru->is_slave==1&&ru->state==RU_RUN&&((proc->RU_mask[ru->proc.subframe_rx]&(1<<0))==1)){// master already received. TODO: we assume that RU0 is master.
LOG_E(PHY,"RU %d is not SYNC, subframe %d, time %f this is master\n",eNB->RU_list[i]->idx,ru->proc.subframe_rx,
}elseif(ru->is_slave==1&&ru->state==RU_RUN&&((proc->RU_mask[ru->proc.subframe_rx]&(1<<0))==1)){// master already received. TODO: we assume that RU0 is master.
LOG_E(PHY,"RU %d is not SYNC time, subframe %d, time %f\n",ru->idx,ru->proc.subframe_rx,fabs(ru->proc.t[ru->proc.subframe_rx].tv_nsec-eNB->RU_list[0]->proc.t[ru->proc.subframe_rx].tv_nsec));
LOG_E(PHY,"RU %d is not SYNC time, subframe %d, time %f\n",ru->idx,ru->proc.subframe_rx,fabs(ru->proc.t[ru->proc.subframe_rx].tv_nsec-eNB->RU_list[0]->proc.t[ru->proc.subframe_rx].tv_nsec));
}
}
//clock_gettime(CLOCK_MONOTONIC,&t);
//LOG_I(PHY,"RU mask is now %x, time is %lu\n",proc->RU_mask[ru->proc.subframe_rx], t.tv_nsec - proc->t[ru->proc.subframe_rx].tv_nsec);
if(proc->RU_mask[ru->proc.subframe_rx]==(1<<eNB->num_RU)-1){// all RUs have provided their information so continue on and wakeup eNB top
LOG_D(PHY,"ru_mask is %d \n ",proc->RU_mask[ru->proc.subframe_rx]);
LOG_D(PHY,"the number of RU is %d, the current ru is RU %d \n ",(1<<eNB->num_RU)-1,ru->idx);
if(ru->is_slave==0)AssertFatal(ru->state==RU_RUN,"ru-%d state = %s != RU_RUN\n",ru->idx,ru_states[ru->state]);
elseif(ru->is_slave==1)AssertFatal(ru->state==RU_SYNC||ru->state==RU_RUN||ru->state==RU_CHECK_SYNC,"ru %d state = %s != RU_SYNC or RU_RUN or RU_CHECK_SYNC\n",ru->idx,ru_states[ru->state]);