From 5e65b531e0b9253c33a476f50bffc23eb4f0afa0 Mon Sep 17 00:00:00 2001 From: Alexander Chemeris Date: Fri, 24 Mar 2017 23:24:22 -0700 Subject: [PATCH] sigProcLib: Fix number of tail bits in random Normal Bursts and zero Stealing Bits. This bug only affects generation of normal bursts filled with random bits which are used in test mode. It doesn't affect operation of osmo-trx during normal operation. That's why it has stayed unnoticed for so long. Each Normal Burst has 3 tail bits, not 4. Also it's better to set stealing bits to 0 for maximum compatibility. We may want to introduce a selector for each bit whether to set it to 0, to 1 or to a random number. Change-Id: I0377029556c8b681b3ba3b635bf19572b34546ea --- Transceiver52M/sigProcLib.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/Transceiver52M/sigProcLib.cpp b/Transceiver52M/sigProcLib.cpp index c51d0947..9a8c8246 100644 --- a/Transceiver52M/sigProcLib.cpp +++ b/Transceiver52M/sigProcLib.cpp @@ -927,19 +927,25 @@ signalVector *genRandNormalBurst(int tsc, int sps, int tn) signalVector *burst; /* Tail bits */ - for (; i < 4; i++) + for (; i < 3; i++) (*bits)[i] = 0; /* Random bits */ - for (; i < 61; i++) + for (; i < 60; i++) (*bits)[i] = rand() % 2; + /* Stealing bit */ + (*bits)[i++] = 0; + /* Training sequence */ for (int n = 0; i < 87; i++, n++) (*bits)[i] = gTrainingSequence[tsc][n]; + /* Stealing bit */ + (*bits)[i++] = 0; + /* Random bits */ - for (; i < 144; i++) + for (; i < 145; i++) (*bits)[i] = rand() % 2; /* Tail bits */