Commit 4391f92c authored by aligungr's avatar aligungr

L3 RRC/NAS developments

parent 6416362c
...@@ -42,7 +42,7 @@ void NasMm::performPlmnSelection() ...@@ -42,7 +42,7 @@ void NasMm::performPlmnSelection()
int64_t loggingThreshold = m_mmSubState == EMmSubState::MM_DEREGISTERED_PLMN_SEARCH || int64_t loggingThreshold = m_mmSubState == EMmSubState::MM_DEREGISTERED_PLMN_SEARCH ||
m_mmSubState == EMmSubState::MM_REGISTERED_PLMN_SEARCH m_mmSubState == EMmSubState::MM_REGISTERED_PLMN_SEARCH
? 2'000LL ? 2'000LL
: 15'000LL; : 30'000LL;
bool logFailures = currentTime - m_lastTimePlmnSearchFailureLogged >= loggingThreshold; bool logFailures = currentTime - m_lastTimePlmnSearchFailureLogged >= loggingThreshold;
......
...@@ -22,11 +22,15 @@ void UeRrcTask::performCellSelection() ...@@ -22,11 +22,15 @@ void UeRrcTask::performCellSelection()
if (m_state == ERrcState::RRC_CONNECTED) if (m_state == ERrcState::RRC_CONNECTED)
return; return;
if (utils::CurrentTimeMillis() - m_startedTime <= 1000LL && m_cellDesc.empty()) int64_t currentTime = utils::CurrentTimeMillis();
if (currentTime - m_startedTime <= 1000LL && m_cellDesc.empty())
return; return;
int lastCell = m_base->shCtx.currentCell.get<int>([](auto &value) { return value.cellId; }); int lastCell = m_base->shCtx.currentCell.get<int>([](auto &value) { return value.cellId; });
bool shouldLogErrors = lastCell != 0 || (currentTime - m_lastTimePlmnSearchFailureLogged >= 30'000LL);
CurrentCellInfo cellInfo; CurrentCellInfo cellInfo;
CellSelectionReport report; CellSelectionReport report;
...@@ -35,6 +39,8 @@ void UeRrcTask::performCellSelection() ...@@ -35,6 +39,8 @@ void UeRrcTask::performCellSelection()
{ {
cellFound = lookForSuitableCell(cellInfo, report); cellFound = lookForSuitableCell(cellInfo, report);
if (!cellFound) if (!cellFound)
{
if (shouldLogErrors)
{ {
if (!m_cellDesc.empty()) if (!m_cellDesc.empty())
{ {
...@@ -48,6 +54,9 @@ void UeRrcTask::performCellSelection() ...@@ -48,6 +54,9 @@ void UeRrcTask::performCellSelection()
{ {
m_logger->warn("Suitable cell selection failed, no cell is in coverage"); m_logger->warn("Suitable cell selection failed, no cell is in coverage");
} }
m_lastTimePlmnSearchFailureLogged = currentTime;
}
} }
} }
...@@ -58,11 +67,13 @@ void UeRrcTask::performCellSelection() ...@@ -58,11 +67,13 @@ void UeRrcTask::performCellSelection()
cellFound = lookForAcceptableCell(cellInfo, report); cellFound = lookForAcceptableCell(cellInfo, report);
if (!cellFound) if (!cellFound)
{
if (shouldLogErrors)
{ {
if (!m_cellDesc.empty()) if (!m_cellDesc.empty())
{ {
m_logger->warn( m_logger->warn("Acceptable cell selection failed in [%d] cells. [%d] no SI, [%d] reserved, [%d] "
"Acceptable cell selection failed in [%d] cells. [%d] no SI, [%d] reserved, [%d] barred, ftai [%d]", "barred, ftai [%d]",
static_cast<int>(m_cellDesc.size()), report.sib1MissingCells, report.reservedCells, static_cast<int>(m_cellDesc.size()), report.sib1MissingCells, report.reservedCells,
report.barredCells, report.forbiddenTaiCells); report.barredCells, report.forbiddenTaiCells);
} }
...@@ -72,6 +83,9 @@ void UeRrcTask::performCellSelection() ...@@ -72,6 +83,9 @@ void UeRrcTask::performCellSelection()
} }
m_logger->err("Cell selection failure, no suitable or acceptable cell found"); m_logger->err("Cell selection failure, no suitable or acceptable cell found");
m_lastTimePlmnSearchFailureLogged = currentTime;
}
} }
} }
......
...@@ -59,6 +59,7 @@ class UeRrcTask : public NtsTask ...@@ -59,6 +59,7 @@ class UeRrcTask : public NtsTask
ASN_RRC_InitialUE_Identity_t m_initialId{}; ASN_RRC_InitialUE_Identity_t m_initialId{};
OctetString m_initialNasPdu{}; OctetString m_initialNasPdu{};
int64_t m_lastTimePlmnSearchFailureLogged{};
friend class UeCmdHandler; friend class UeCmdHandler;
......
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