Commit 55e50b20 authored by Wilson's avatar Wilson

enhanced wireshark logging. also logs BCH, PRACH and RAR. Tested with...

enhanced wireshark logging. also logs BCH, PRACH and RAR. Tested with wireshark 2.2.2 on linux and windows

see issue #45
parent 4041a661
......@@ -56,6 +56,7 @@ fifo_dump_emos_UE emos_dump_UE;
#include "UTIL/LOG/vcd_signal_dumper.h"
#include "UTIL/OPT/opt.h"
#if defined(ENABLE_ITTI)
# include "intertask_interface.h"
......@@ -2302,6 +2303,17 @@ void ue_pbch_procedures(uint8_t eNB_id,PHY_VARS_UE *ue,UE_rxtx_proc_t *proc, uin
if ((pbch_tx_ant>0) && (pbch_tx_ant<=4)) {
if (opt_enabled) {
static uint8_t dummy[3];
dummy[0] = ue->pbch_vars[eNB_id]->decoded_output[2];
dummy[1] = ue->pbch_vars[eNB_id]->decoded_output[1];
dummy[2] = ue->pbch_vars[eNB_id]->decoded_output[0];
trace_pdu(1, dummy, 3, ue->Mod_id, 0, 0,
frame_rx, subframe_rx, 0, 0);
LOG_D(OPT,"[UE %d][PBCH] Frame %d trace pdu for PBCH\n",
ue->Mod_id, subframe_rx);
if (pbch_tx_ant>2) {
LOG_W(PHY,"[openair][SCHED][SYNCH] PBCH decoding: pbch_tx_ant>2 not supported\n");
......@@ -2980,6 +2992,7 @@ void process_rar(PHY_VARS_UE *ue, UE_rxtx_proc_t *proc, int eNB_id, runmode_t mo
timing_advance = mac_xface->ue_process_rar(ue->Mod_id,
......@@ -426,6 +426,9 @@ PRACH_RESOURCES_t *ue_get_rach(module_id_t module_idP,int CC_id,frame_t frameP,u
/* \brief Function called by PHY to process the received RAR. It checks that the preamble matches what was sent by the eNB and provides the timing advance and t-CRNTI.
@param Mod_id Index of UE instance
@param CC_id Index to a component carrier
@param frame Frame index
@param ra_rnti RA_RNTI value
@param dlsch_buffer Pointer to dlsch_buffer containing RAR PDU
@param t_crnti Pointer to PHY variable containing the T_CRNTI
@param preamble_index Preamble Index used by PHY to transmit the PRACH. This should match the received RAR to trigger the rest of
......@@ -437,6 +440,7 @@ ue_process_rar(
const module_id_t module_idP,
const int CC_id,
const frame_t frameP,
const rnti_t ra_rnti,
uint8_t * const dlsch_buffer,
rnti_t * const t_crnti,
const uint8_t preamble_index
......@@ -271,7 +271,7 @@ void Msg1_tx(module_id_t module_idP,uint8_t CC_id,frame_t frameP, uint8_t eNB_id
if (opt_enabled) {
trace_pdu(0, NULL, 0, module_idP, 2, UE_mac_inst[module_idP].RA_prach_resources.ra_PreambleIndex,
trace_pdu(0, NULL, 0, module_idP, 0 , UE_mac_inst[module_idP].RA_prach_resources.ra_PreambleIndex,
UE_mac_inst[module_idP].txFrame, UE_mac_inst[module_idP].txSubframe, 0, UE_mac_inst[module_idP].RA_attempt_number);
LOG_D(OPT,"[UE %d][RAPROC] TX MSG1 Frame %d trace pdu for rnti %x with size %d\n",
module_idP, frameP, 1, UE_mac_inst[module_idP].RA_Msg3_size);
......@@ -133,6 +133,7 @@ ue_process_rar(
const module_id_t module_idP,
const int CC_id,
const frame_t frameP,
const rnti_t ra_rnti,
uint8_t* const dlsch_buffer,
rnti_t* const t_crnti,
const uint8_t preamble_index
......@@ -168,6 +169,12 @@ ue_process_rar(
LOG_D(MAC,"[UE %d][RAPROC] rar->t_crnti %x\n",module_idP,(uint16_t)rar[5]+(rar[4]<<8));
if (opt_enabled) {
LOG_D(OPT,"[UE %d][RAPROC] CC_id %d RAR Frame %d trace pdu for ra-RNTI %x\n",
module_idP, CC_id, frameP, ra_rnti);
trace_pdu(1, (uint8_t*)rarh, 7, module_idP, 2, ra_rnti,
UE_mac_inst[module_idP].rxFrame, UE_mac_inst[module_idP].rxSubframe, 0, 0);
if (preamble_index == rarh->RAPID) {
*t_crnti = (uint16_t)rar[5]+(rar[4]<<8);//rar->t_crnti;
......@@ -160,7 +160,7 @@ typedef struct {
PRACH_RESOURCES_t* (*ue_get_rach)(module_id_t Mod_id,int CC_id,frame_t frameP,uint8_t Msg3_flag,sub_frame_t subframe);
/// Process Random-Access Response
uint16_t (*ue_process_rar)(module_id_t Mod_id,int CC_id,frame_t frameP,uint8_t *dlsch_buffer,uint16_t *t_crnti,uint8_t preamble_index);
uint16_t (*ue_process_rar)(module_id_t Mod_id,int CC_id,frame_t frameP, uint16_t ra_rnti, uint8_t *dlsch_buffer, uint16_t *t_crnti,uint8_t preamble_index);
/// Get SR payload (0,1) from UE MAC
uint32_t (*ue_get_SR)(module_id_t Mod_id,int CC_id,frame_t frameP,uint8_t eNB_id,rnti_t rnti,sub_frame_t subframe);
......@@ -304,19 +304,25 @@ static void SendFrame(guint8 radioType, guint8 direction, guint8 rntiType,
frameBuffer[frameOffset++] = retx;
/* Relating to out-of-band events */
/* N.B. dissector will only look to these fields if length is 0... */
if (pdu_buffer_size==0) {
switch (oob_event) {
case ltemac_send_preamble :
LOG_D(OPT,"oob event %d %d\n",ltemac_send_preamble );
LOG_D(OPT,"oob ltemac_send_preamble event %02x."
frameBuffer[frameOffset++] = MAC_LTE_OOB_EVENT_TAG;
frameBuffer[frameOffset++]=rnti; // is the preamble
......@@ -329,12 +335,12 @@ static void SendFrame(guint8 radioType, guint8 direction, guint8 rntiType,
case ltemac_sr_failure:
LOG_D(OPT,"not implemeneted yet\n");
LOG_W(OPT,"not implemeneted yet\n");
/* Now write the MAC PDU */
frameBuffer[frameOffset++] = MAC_LTE_PAYLOAD_TAG;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment