From f765352be7309bf798c6faa19440f7875d210025 Mon Sep 17 00:00:00 2001 From: luis_pereira87 Date: Thu, 6 Mar 2025 16:23:37 +0000 Subject: [PATCH] Reset timing_advance on sync/re-sync This prevents the UE to use an outdated timing_advance after a re-sync. It prevents the UE to send a PRACH with a wrong TA, thus preventing a RAPID mismatch in Msg2 (example: '[UE 0][RAPROC][0.0] Received RAR preamble (29) doesn't match the intended RAPID (30)') --- executables/nr-ue.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/executables/nr-ue.c b/executables/nr-ue.c index a5c4f69ed5..d954c6756b 100644 --- a/executables/nr-ue.c +++ b/executables/nr-ue.c @@ -970,6 +970,8 @@ void *UE_thread(void *arg) syncMsg->UE = UE; memset(&syncMsg->proc, 0, sizeof(syncMsg->proc)); pushNotifiedFIFO(&UE->sync_actor.fifo, Msg); + timing_advance = 0; + UE->timing_advance = 0; trashed_frames = 0; syncRunning = true; continue;