aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTom Tsou <tom.tsou@ettus.com>2016-07-08 14:39:42 -0700
committerTom Tsou <tom.tsou@ettus.com>2016-07-08 14:46:25 -0700
commitc37594f3b96a22d440d1ec8f52e0d968fca37185 (patch)
tree2b1d95726e665d07cd5e4040e847c6288fb59962
parentffee30d19047a6f6bff061d95c3bbbb21a81098f (diff)
mcbts: Allow out of order channel setup
Previous checks on multi-channel TSC and ARFCN settings would fail if channels were initialized out of order. Namely, if channel 0 was not configured first, osmo-trx would error on the control interface leading osmo-bts to fail. Allow global TSC setting on all channels with added logging notice. Notify if channel frequency is unexpected - which may happen if channels are setup out of order - but do no report as error. Signed-off-by: Tom Tsou <tom.tsou@ettus.com>
-rw-r--r--Transceiver52M/Transceiver.cpp3
-rw-r--r--Transceiver52M/radioInterfaceMulti.cpp12
2 files changed, 9 insertions, 6 deletions
diff --git a/Transceiver52M/Transceiver.cpp b/Transceiver52M/Transceiver.cpp
index 0ccb9a4..d3dce49 100644
--- a/Transceiver52M/Transceiver.cpp
+++ b/Transceiver52M/Transceiver.cpp
@@ -841,9 +841,8 @@ void Transceiver::driveControl(size_t chan)
sscanf(buffer, "%3s %s %d", cmdcheck, command, &TSC);
if ((TSC < 0) || (TSC > 7))
sprintf(response, "RSP SETTSC 1 %d", TSC);
- else if (chan && (TSC != mTSC))
- sprintf(response, "RSP SETTSC 1 %d", TSC);
else {
+ LOG(NOTICE) << "Changing TSC from " << mTSC << " to " << TSC;
mTSC = TSC;
sprintf(response,"RSP SETTSC 0 %d", TSC);
}
diff --git a/Transceiver52M/radioInterfaceMulti.cpp b/Transceiver52M/radioInterfaceMulti.cpp
index ba81fe1..650fd85 100644
--- a/Transceiver52M/radioInterfaceMulti.cpp
+++ b/Transceiver52M/radioInterfaceMulti.cpp
@@ -355,8 +355,10 @@ bool RadioInterfaceMulti::tuneTx(double freq, size_t chan)
return mRadio->setTxFreq(freq + shift * MCBTS_SPACING);
double center = mRadio->getTxFreq();
- if (!fltcmp(freq, center + (double) (chan - shift) * MCBTS_SPACING))
- return false;
+ if (!fltcmp(freq, center + (double) (chan - shift) * MCBTS_SPACING)) {
+ LOG(NOTICE) << "Channel " << chan << " RF frequency offset is "
+ << freq / 1e6 << " MHz";
+ }
return true;
}
@@ -372,8 +374,10 @@ bool RadioInterfaceMulti::tuneRx(double freq, size_t chan)
return mRadio->setRxFreq(freq + shift * MCBTS_SPACING);
double center = mRadio->getRxFreq();
- if (!fltcmp(freq, center + (double) (chan - shift) * MCBTS_SPACING))
- return false;
+ if (!fltcmp(freq, center + (double) (chan - shift) * MCBTS_SPACING)) {
+ LOG(NOTICE) << "Channel " << chan << " RF frequency offset is "
+ << freq / 1e6 << " MHz";
+ }
return true;
}