aboutsummaryrefslogtreecommitdiffstats
path: root/Transceiver52M/Transceiver.cpp
diff options
context:
space:
mode:
authorAlexander Chemeris <Alexander.Chemeris@gmail.com>2016-03-19 21:16:22 +0300
committerTom Tsou <tom.tsou@ettus.com>2016-04-20 13:45:00 -0700
commit78d1fc9a13f84b273facb2f22a291c3d2e6ebd33 (patch)
tree04889e88b9281c0a9ce658e7d454e3f96bfe6f98 /Transceiver52M/Transceiver.cpp
parenta8cf2086165480597251c2af240e0f44c47097f8 (diff)
transceiver: Properly handle MAXDLY.
Previously MAXDLY value was applied to Normal Bursts, which was nice when working with sloppy test equipment like CMD57, but useless for real world usage. At the same time documentation and de facto usage of MAXDLY in OsmoBTS and OpenBTS assumed that it actually applies to Access Bursts (RACH). So this patch changes osmo-rx behavior to apply MAXDLY to RACH bursts and introduces a new command MAXDLYNB for the old behavior.
Diffstat (limited to 'Transceiver52M/Transceiver.cpp')
-rw-r--r--Transceiver52M/Transceiver.cpp19
1 files changed, 14 insertions, 5 deletions
diff --git a/Transceiver52M/Transceiver.cpp b/Transceiver52M/Transceiver.cpp
index a1c6f1b..1f59f78 100644
--- a/Transceiver52M/Transceiver.cpp
+++ b/Transceiver52M/Transceiver.cpp
@@ -119,7 +119,8 @@ Transceiver::Transceiver(int wBasePort,
mTransmitLatency(wTransmitLatency), mRadioInterface(wRadioInterface),
rssiOffset(wRssiOffset),
mSPSTx(tx_sps), mSPSRx(rx_sps), mChans(chans), mOn(false),
- mTxFreq(0.0), mRxFreq(0.0), mTSC(0), mMaxExpectedDelay(0), mWriteBurstToDiskMask(0)
+ mTxFreq(0.0), mRxFreq(0.0), mTSC(0), mMaxExpectedDelayAB(0), mMaxExpectedDelayNB(0),
+ mWriteBurstToDiskMask(0)
{
txFullScale = mRadioInterface->fullScaleInputValue();
rxFullScale = mRadioInterface->fullScaleOutputValue();
@@ -535,18 +536,19 @@ int Transceiver::detectBurst(TransceiverState *state, signalVector &burst,
switch (type) {
case EDGE:
rc = detectEdgeBurst(burst, mTSC, threshold, mSPSRx,
- amp, toa, mMaxExpectedDelay);
+ amp, toa, mMaxExpectedDelayNB);
if (rc > 0)
break;
else
type = TSC;
case TSC:
rc = analyzeTrafficBurst(burst, mTSC, threshold, mSPSRx,
- amp, toa, mMaxExpectedDelay);
+ amp, toa, mMaxExpectedDelayNB);
break;
case RACH:
threshold = 6.0;
- rc = detectRACHBurst(burst, threshold, mSPSRx, amp, toa);
+ rc = detectRACHBurst(burst, threshold, mSPSRx, amp, toa,
+ mMaxExpectedDelayAB);
break;
default:
LOG(ERR) << "Invalid correlation type";
@@ -753,9 +755,16 @@ void Transceiver::driveControl(size_t chan)
//set expected maximum time-of-arrival
int maxDelay;
sscanf(buffer,"%3s %s %d",cmdcheck,command,&maxDelay);
- mMaxExpectedDelay = maxDelay; // 1 GSM symbol is approx. 1 km
+ mMaxExpectedDelayAB = maxDelay; // 1 GSM symbol is approx. 1 km
sprintf(response,"RSP SETMAXDLY 0 %d",maxDelay);
}
+ else if (strcmp(command,"SETMAXDLYNB")==0) {
+ //set expected maximum time-of-arrival
+ int maxDelay;
+ sscanf(buffer,"%3s %s %d",cmdcheck,command,&maxDelay);
+ mMaxExpectedDelayNB = maxDelay; // 1 GSM symbol is approx. 1 km
+ sprintf(response,"RSP SETMAXDLYNB 0 %d",maxDelay);
+ }
else if (strcmp(command,"SETRXGAIN")==0) {
//set expected maximum time-of-arrival
int newGain;