Fixed roaming PLMN attach. Add out-of-sync debugging

master
Ismael Gomez 7 years ago
parent 4cdc29bfba
commit bdf379ee1c

@ -717,8 +717,10 @@ void phch_recv::in_sync() {
// Out of sync called by worker or phch_recv every 1 or 5 ms // Out of sync called by worker or phch_recv every 1 or 5 ms
void phch_recv::out_of_sync() { void phch_recv::out_of_sync() {
// Send RRC out-of-sync signal after 200 ms consecutive subframes // Send RRC out-of-sync signal after 200 ms consecutive subframes
Info("Out-of-sync %d/%d\n", out_of_sync_cnt, NOF_OUT_OF_SYNC_SF);
out_of_sync_cnt++; out_of_sync_cnt++;
if (out_of_sync_cnt >= NOF_OUT_OF_SYNC_SF) { if (out_of_sync_cnt >= NOF_OUT_OF_SYNC_SF) {
Info("Sending to RRC\n");
rrc->out_of_sync(); rrc->out_of_sync();
out_of_sync_cnt = 0; out_of_sync_cnt = 0;
in_sync_cnt = 0; in_sync_cnt = 0;

@ -452,8 +452,12 @@ void rrc::plmn_select_rrc(LIBLTE_RRC_PLMN_IDENTITY_STRUCT plmn_id) {
selected_plmn_id = plmn_id; selected_plmn_id = plmn_id;
if (serving_cell->plmn_equals(selected_plmn_id) && serving_cell->in_sync) { if (serving_cell->plmn_equals(selected_plmn_id) && serving_cell->in_sync) {
rrc_log->info("PLMN Id=%s selected, Selecting serving cell earfcn=%d, pci=%d\n", rrc_log->info("PLMN Id=%s selected, Selecting serving cell earfcn=%d, pci=%d, status=%d\n",
plmn_id_to_string(plmn_id).c_str(), serving_cell->get_earfcn(), serving_cell->phy_cell.id); plmn_id_to_string(plmn_id).c_str(), serving_cell->get_earfcn(), serving_cell->phy_cell.id,
phy->sync_status());
if (!phy->sync_status()) {
phy->cell_select(serving_cell->get_earfcn(), serving_cell->phy_cell);
}
} else { } else {
bool found = false; bool found = false;
for (uint32_t i=0;i<neighbour_cells.size() && !found;i++) { for (uint32_t i=0;i<neighbour_cells.size() && !found;i++) {
@ -838,6 +842,10 @@ float rrc::get_squal(float Qqualmeas) {
// Detection of physical layer problems in RRC_CONNECTED (5.3.11.1) // Detection of physical layer problems in RRC_CONNECTED (5.3.11.1)
void rrc::out_of_sync() { void rrc::out_of_sync() {
rrc_log->info("Received out-of-sync state %s. n310=%d, t311=%s, t310=%s\n",
rrc_state_text[state], n310_cnt,
mac_timers->timer_get(t311)->is_running()?"running":"stop",
mac_timers->timer_get(t310)->is_running()?"running":"stop");
if (state == RRC_STATE_CONNECTED) { if (state == RRC_STATE_CONNECTED) {
if (!mac_timers->timer_get(t311)->is_running() && !mac_timers->timer_get(t310)->is_running()) { if (!mac_timers->timer_get(t311)->is_running() && !mac_timers->timer_get(t310)->is_running()) {
n310_cnt++; n310_cnt++;
@ -1168,14 +1176,15 @@ bool rrc::ho_prepare() {
mac->set_ho_rnti(mob_reconf.mob_ctrl_info.new_ue_id, mob_reconf.mob_ctrl_info.target_pci); mac->set_ho_rnti(mob_reconf.mob_ctrl_info.new_ue_id, mob_reconf.mob_ctrl_info.target_pci);
apply_rr_config_common_dl(&mob_reconf.mob_ctrl_info.rr_cnfg_common); apply_rr_config_common_dl(&mob_reconf.mob_ctrl_info.rr_cnfg_common);
ho_target_pci = neighbour_cells[target_cell_idx]->phy_cell.id;
ho_syncing = true;
rrc_log->info("Selecting new cell pci=%d\n", neighbour_cells[target_cell_idx]->get_pci()); rrc_log->info("Selecting new cell pci=%d\n", neighbour_cells[target_cell_idx]->get_pci());
if (!phy->cell_handover(neighbour_cells[target_cell_idx]->phy_cell)) { if (!phy->cell_handover(neighbour_cells[target_cell_idx]->phy_cell)) {
rrc_log->error("Could not synchronize with target cell pci=%d\n", neighbour_cells[target_cell_idx]->get_pci()); rrc_log->error("Could not synchronize with target cell pci=%d. Trying to return to source PCI\n",
neighbour_cells[target_cell_idx]->get_pci());
ho_failed();
return false; return false;
} }
ho_target_pci = neighbour_cells[target_cell_idx]->phy_cell.id;
ho_syncing = true;
} }
return true; return true;
} }

Loading…
Cancel
Save