mirror of https://github.com/PentHertz/srsLTE.git
Improved cell reestablishment procedure timers (still not working the authentication)
This commit is contained in:
parent
240eba2af5
commit
177f36fc8c
|
@ -158,7 +158,7 @@ private:
|
|||
uint32_t current_earfcn;
|
||||
|
||||
uint32_t sync_sfn_cnt;
|
||||
const static uint32_t SYNC_SFN_TIMEOUT = 200;
|
||||
const static uint32_t SYNC_SFN_TIMEOUT = 1000;
|
||||
float ul_dl_factor;
|
||||
int cur_earfcn_index;
|
||||
bool cell_search_in_progress;
|
||||
|
@ -166,7 +166,7 @@ private:
|
|||
float measure_rsrp;
|
||||
srslte_ue_dl_t ue_dl_measure;
|
||||
|
||||
const static int RSRP_MEASURE_NOF_FRAMES = 5;
|
||||
const static int RSRP_MEASURE_NOF_FRAMES = 10;
|
||||
|
||||
int cell_sync_sfn();
|
||||
int cell_meas_rsrp();
|
||||
|
|
|
@ -98,6 +98,8 @@ private:
|
|||
uint8_t transaction_id;
|
||||
bool drb_up;
|
||||
|
||||
bool reestablishment_in_progress;
|
||||
|
||||
// timeouts in ms
|
||||
|
||||
uint32_t connecting_timeout;
|
||||
|
@ -244,7 +246,8 @@ private:
|
|||
|
||||
// Helpers
|
||||
void rrc_connection_release();
|
||||
void radio_link_failure();
|
||||
void con_restablish_cell_reselected();
|
||||
void radio_link_failure();
|
||||
static void* start_sib_thread(void *rrc_);
|
||||
void sib_search();
|
||||
void apply_sib2_configs(LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_2_STRUCT *sib2);
|
||||
|
|
|
@ -117,7 +117,8 @@ void mac::reset()
|
|||
|
||||
Info("Resetting MAC\n");
|
||||
|
||||
timers.stop_all();
|
||||
timers.get(timer_alignment)->stop();
|
||||
timers.get(contention_resolution_timer)->stop();
|
||||
|
||||
ul_harq.reset_ndi();
|
||||
|
||||
|
|
|
@ -336,6 +336,7 @@ void phch_common::reset_ul()
|
|||
pthread_mutex_trylock(&tx_mutex[i]);
|
||||
pthread_mutex_unlock(&tx_mutex[i]);
|
||||
}
|
||||
radio_h->tx_end();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -35,8 +35,6 @@
|
|||
#include "srslte/common/security.h"
|
||||
#include "srslte/common/bcd_helpers.h"
|
||||
|
||||
#define TIMEOUT_RESYNC_REESTABLISH 100
|
||||
|
||||
using namespace srslte;
|
||||
|
||||
namespace srsue {
|
||||
|
@ -92,6 +90,8 @@ void rrc::init(phy_interface_rrc *phy_,
|
|||
|
||||
pthread_mutex_init(&mutex, NULL);
|
||||
|
||||
reestablishment_in_progress = false;
|
||||
|
||||
ue_category = SRSLTE_UE_CATEGORY;
|
||||
t301 = mac_timers->timer_get_unique_id();
|
||||
t310 = mac_timers->timer_get_unique_id();
|
||||
|
@ -207,7 +207,11 @@ void rrc::run_thread() {
|
|||
break;
|
||||
case RRC_STATE_CELL_SELECTED:
|
||||
rrc_log->info("RRC Cell Selected: Sending connection request...\n");
|
||||
send_con_request();
|
||||
if (reestablishment_in_progress) {
|
||||
con_restablish_cell_reselected();
|
||||
} else {
|
||||
send_con_request();
|
||||
}
|
||||
state = RRC_STATE_CONNECTING;
|
||||
connecting_timeout = 0;
|
||||
break;
|
||||
|
@ -226,6 +230,7 @@ void rrc::run_thread() {
|
|||
usleep(60000);
|
||||
rrc_log->info("Leaving RRC_CONNECTED state\n");
|
||||
drb_up = false;
|
||||
reestablishment_in_progress = false;
|
||||
pdcp->reset();
|
||||
rlc->reset();
|
||||
phy->reset();
|
||||
|
@ -663,6 +668,8 @@ void rrc::send_con_restablish_request() {
|
|||
ul_ccch_msg.msg.rrc_con_reest_req.cause = LIBLTE_RRC_CON_REEST_REQ_CAUSE_OTHER_FAILURE;
|
||||
liblte_rrc_pack_ul_ccch_msg(&ul_ccch_msg, (LIBLTE_BIT_MSG_STRUCT *) &bit_buf);
|
||||
|
||||
reestablishment_in_progress = true;
|
||||
|
||||
rrc_log->info("Initiating RRC Connection Reestablishment Procedure\n");
|
||||
rrc_log->console("RRC Connection Reestablishment\n");
|
||||
mac_timers->timer_get(t310)->stop();
|
||||
|
@ -673,19 +680,16 @@ void rrc::send_con_restablish_request() {
|
|||
set_phy_default();
|
||||
mac->reset();
|
||||
set_mac_default();
|
||||
}
|
||||
|
||||
// FIXME: Cell selection should be different??
|
||||
|
||||
// Wait for cell re-synchronization
|
||||
uint32_t timeout_cnt = 0;
|
||||
while (!phy->sync_status() && timeout_cnt < TIMEOUT_RESYNC_REESTABLISH) {
|
||||
usleep(10000);
|
||||
timeout_cnt++;
|
||||
}
|
||||
// Actions following cell reselection 5.3.7.3
|
||||
void rrc::con_restablish_cell_reselected()
|
||||
{
|
||||
reestablishment_in_progress = false;
|
||||
rrc_log->info("Cell Selection finished. Initiating transmission of RRC Connection Reestablishment Request\n");
|
||||
mac_timers->timer_get(t301)->reset();
|
||||
mac_timers->timer_get(t301)->run();
|
||||
mac_timers->timer_get(t311)->stop();
|
||||
rrc_log->info("Cell Selection finished. Initiating transmission of RRC Connection Reestablishment Request\n");
|
||||
|
||||
// Byte align and pack the message bits for PDCP
|
||||
if ((bit_buf.N_bits % 8) != 0) {
|
||||
|
|
Loading…
Reference in New Issue