srsran / srsRAN_4G

Open source SDR 4G software suite from Software Radio Systems (SRS) https://docs.srsran.com/projects/4g
https://www.srsran.com
GNU Affero General Public License v3.0
3.48k stars 1.14k forks source link

Is it a proper A3 event measurement configuration? #284

Closed sunshaozong111 closed 5 years ago

sunshaozong111 commented 5 years ago

I am very confused of meas config in function send_connection_reconf. what I am doing now is try to handover to another eNodeB using a measurement report triggering by A3 event . I have already seen something about meas config in T.S 36.331, but what this protocol describes is not clear for me . Here is my configuration.

//meas_cnfg LIBLTE_RRC_MEAS_CONFIG_STRUCT *meas_cfg = &conn_reconf->meas_cnfg; bzero(meas_cfg,sizeof(LIBLTE_RRC_MEAS_CONFIG_STRUCT));

meas_cfg->N_meas_obj_to_remove = 0; meas_cfg->N_rep_cnfg_to_remove = 0; meas_cfg->N_meas_id_to_remove = 0;

meas_cfg->meas_obj_to_add_mod_list_present = true; meas_cfg->rep_cnfg_to_add_mod_list_present = true; meas_cfg->meas_id_to_add_mod_list_present = true; meas_cfg->quantity_cnfg_present = true; meas_cfg->meas_gap_cnfg_present = false; meas_cfg->s_meas_present = false; meas_cfg->pre_reg_info_hrpd_present = false; meas_cfg->speed_state_params_present = false;

//meas_objects LIBLTE_RRC_MEAS_OBJECT_TO_ADD_MOD_LIST_STRUCT meas_obj_to_add_mod_list = &meas_cfg->meas_obj_to_add_mod_list; meas_obj_to_add_mod_list->N_meas_obj = 1; for(size_t i=0; iN_meas_obj; i++) { LIBLTE_RRC_MEAS_OBJECT_TO_ADD_MOD_STRUCT meas_obj_to_add_mod = &meas_obj_to_add_mod_list->meas_obj_list[i]; //meas_obj_type meas_obj_to_add_mod->meas_obj_type = LIBLTE_RRC_MEAS_OBJECT_TYPE_EUTRA; //meas_obj_id meas_obj_to_add_mod->meas_obj_id = 1; // meas_obj_eutra LIBLTE_RRC_MEAS_OBJECT_EUTRA_STRUCT *meas_obj_eutra = &meas_obj_to_add_mod->meas_obj_eutra; meas_obj_eutra->offset_freq_not_default = false; meas_obj_eutra->presence_ant_port_1 = false; meas_obj_eutra->cells_to_remove_list_present = false; meas_obj_eutra->black_cells_to_remove_list_present = false; meas_obj_eutra->cell_for_which_to_rep_cgi_present = false; // N_cells_to_add_mod

meas_obj_eutra->offset_freq = LIBLTE_RRC_Q_OFFSET_RANGE_DB_0;
meas_obj_eutra->allowed_meas_bw = LIBLTE_RRC_ALLOWED_MEAS_BANDWIDTH_MBW25;
meas_obj_eutra->carrier_freq = 3400; 
meas_obj_eutra->N_cells_to_add_mod = 1;
meas_obj_eutra->N_black_cells_to_add_mod = 0;
meas_obj_eutra->neigh_cell_cnfg = 01;
         // cells_to_add_mod_list

 meas_obj_eutra->cells_to_add_mod_list[0].cell_offset = LIBLTE_RRC_Q_OFFSET_RANGE_DB_0;
 meas_obj_eutra->cells_to_add_mod_list[0].pci = 1;
 meas_obj_eutra->cells_to_add_mod_list[0].cell_idx = 0x01; 
 // meas_obj_eutra->cells_to_add_mod_list[1].cell_offset = LIBLTE_RRC_Q_OFFSET_RANGE_DB_0;
 // meas_obj_eutra->cells_to_add_mod_list[1].pci = 2;
 // meas_obj_eutra->cells_to_add_mod_list[1].cell_idx = 0x02; 

}

//rep_cnfg_to_add_mod_list LIBLTE_RRC_REPORT_CONFIG_TO_ADD_MOD_LIST_STRUCT rep_cnfg_to_add_mod_list = &meas_cfg->rep_cnfg_to_add_mod_list; rep_cnfg_to_add_mod_list->N_rep_cnfg = 1; for (size_t i = 0; i < rep_cnfg_to_add_mod_list->N_rep_cnfg ; ++i){ LIBLTE_RRC_REPORT_CONFIG_TO_ADD_MOD_STRUCT rep_cnfg = &rep_cnfg_to_add_mod_list->rep_cnfg_list[i]; rep_cnfg->rep_cnfg_type = LIBLTE_RRC_REPORT_CONFIG_TYPE_EUTRA; rep_cnfg->rep_cnfg_id = 1; LIBLTE_RRC_REPORT_CONFIG_EUTRA_STRUCT *rep_cnfg_eutra = &rep_cnfg->rep_cnfg_eutra; //trigger_type rep_cnfg_eutra->trigger_type = LIBLTE_RRC_TRIGGER_TYPE_EUTRA_EVENT;

LIBLTE_RRC_EVENT_EUTRA_STRUCT *event = &rep_cnfg_eutra->event;

event->event_id = LIBLTE_RRC_EVENT_ID_EUTRA_A3;
event->event_a3.offset = 0;
event->event_a3.report_on_leave = false;
event->time_to_trigger = LIBLTE_RRC_TIME_TO_TRIGGER_MS1024;
event->hysteresis = 0; 
rep_cnfg_eutra->trigger_quantity = LIBLTE_RRC_TRIGGER_QUANTITY_RSRQ;
rep_cnfg_eutra->report_quantity = LIBLTE_RRC_REPORT_QUANTITY_BOTH;
rep_cnfg_eutra->report_interval = LIBLTE_RRC_REPORT_INTERVAL_MS1024;
rep_cnfg_eutra->report_amount = LIBLTE_RRC_REPORT_AMOUNT_R1;
rep_cnfg_eutra->max_report_cells = 1;

}

//meas_id_to_add_mod_list LIBLTE_RRC_MEAS_ID_TO_ADD_MOD_LIST_STRUCT *meas_id_to_add_mod_list = &meas_cfg->meas_id_to_add_mod_list; meas_id_to_add_mod_list->N_meas_id = 1; size_t amount = meas_id_to_add_mod_list->N_meas_id ; for (int i = 0; i < amount; ++i) { meas_id_to_add_mod_list->meas_id_list[i].meas_id = i+1; meas_id_to_add_mod_list->meas_id_list[i].meas_obj_id = 1; meas_id_to_add_mod_list->meas_id_list[i].rep_cnfg_id = 1; } // meas_id_to_add_mod_list->meas_id_list[0].meas_id = 1; // meas_id_to_add_mod_list->meas_id_list[0].meas_obj_id = 1; // meas_id_to_add_mod_list->meas_id_list[0].rep_cnfg_id = 1; // meas_id_to_add_mod_list->meas_id_list[1].meas_id = 2; // meas_id_to_add_mod_list->meas_id_list[1].meas_obj_id = 1; // meas_id_to_add_mod_list->meas_id_list[1].rep_cnfg_id = 1;

// quantity_cnfg LIBLTE_RRC_QUANTITY_CONFIG_STRUCT *quantity_cnfg = &meas_cfg->quantity_cnfg; quantity_cnfg->qc_eutra_present = true; quantity_cnfg->qc_utra_present = false; quantity_cnfg->qc_geran_present = false; quantity_cnfg->qc_cdma2000_present = false;

LIBLTE_RRC_QUANTITY_CONFIG_EUTRA_STRUCT *qc_eutra = &quantity_cnfg->qc_eutra; qc_eutra->fc_rsrp_not_default = true; qc_eutra->fc_rsrq_not_default = true; qc_eutra->fc_rsrp = LIBLTE_RRC_FILTER_COEFFICIENT_FC0; qc_eutra->fc_rsrq = LIBLTE_RRC_FILTER_COEFFICIENT_FC0;

I just configures only one report to indicate UE to measure channel quality. But every time when I go on my experiment. UE will generate 2 reports , one is sent to source eNB, and anthor one is sent to target eNB. So I make a modification at the end of a function calculate_triggers as follows: The function is on the side of UE. its name is calculate_triggers.

if (gen_report) { log_h->info("Generate report MeasId=%d, from event\n", m->first); generate_report(m->first); // added by me remove_meas_id(m->first); } I just remove this measId. Welcome to correct me , and you can ask me any additional questions.

andrepuschmann commented 5 years ago

Thanks for that. Can you try with the new 18.12 release and reopen the issue if it still exists. Thanks