aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Transceiver52M/Transceiver.cpp11
-rw-r--r--Transceiver52M/Transceiver.h1
2 files changed, 11 insertions, 1 deletions
diff --git a/Transceiver52M/Transceiver.cpp b/Transceiver52M/Transceiver.cpp
index 05f3b16..1e76ec0 100644
--- a/Transceiver52M/Transceiver.cpp
+++ b/Transceiver52M/Transceiver.cpp
@@ -98,7 +98,8 @@ Transceiver::Transceiver(int wBasePort,
: mBasePort(wBasePort), mAddr(TRXAddress),
mTransmitLatency(wTransmitLatency), mClockSocket(NULL),
mRadioInterface(wRadioInterface), mSPSTx(wSPS), mSPSRx(1), mChans(wChans),
- mOn(false), mTxFreq(0.0), mRxFreq(0.0), mPower(-10), mMaxExpectedDelay(0)
+ mOn(false), mTxFreq(0.0), mRxFreq(0.0), mPower(-10), mMaxExpectedDelay(0),
+ mBSIC(-1)
{
GSM::Time startTime(random() % gHyperframe,0);
@@ -435,6 +436,8 @@ bool Transceiver::decodeSCH(SoftVector *burst, GSM::Time *time)
if (!gsm_sch_decode(info, data)) {
gsm_sch_parse(info, &sch);
+ mBSIC = sch.bsic;
+
std::cout << "SCH : Decoded values" << std::endl;
std::cout << " BSIC: " << sch.bsic << std::endl;
std::cout << " T1 : " << sch.t1 << std::endl;
@@ -851,6 +854,12 @@ void Transceiver::driveControl(size_t chan)
sprintf(response,"RSP SETTSC 0 %d", TSC);
}
}
+ else if (!strcmp(command,"GETBSIC")) {
+ if (mBSIC < 0)
+ sprintf(response, "RSP GETBSIC 1");
+ else
+ sprintf(response, "RSP GETBSIC 0 %d", mBSIC);
+ }
else if (strcmp(command,"SETSLOT")==0) {
// set TSC
int corrCode;
diff --git a/Transceiver52M/Transceiver.h b/Transceiver52M/Transceiver.h
index 8f3e47b..e31a9a9 100644
--- a/Transceiver52M/Transceiver.h
+++ b/Transceiver52M/Transceiver.h
@@ -183,6 +183,7 @@ private:
int mPower; ///< the transmit power in dB
unsigned mTSC; ///< the midamble sequence code
unsigned mMaxExpectedDelay; ///< maximum expected time-of-arrival offset in GSM symbols
+ int mBSIC; ///< MS - detected BSIC
std::vector<TransceiverState> mStates;