commit-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Commit-gnuradio] r9990 - in openbts/trunk: . Control GSM SIP Transceive


From: dburgess00
Subject: [Commit-gnuradio] r9990 - in openbts/trunk: . Control GSM SIP Transceiver
Date: Fri, 14 Nov 2008 14:04:46 -0700 (MST)

Author: dburgess00
Date: 2008-11-14 14:04:45 -0700 (Fri, 14 Nov 2008)
New Revision: 9990

Modified:
   openbts/trunk/Control/CallControl.cpp
   openbts/trunk/Control/ControlCommon.cpp
   openbts/trunk/GSM/GSML1FEC.cpp
   openbts/trunk/GSM/GSML2LAPDm.cpp
   openbts/trunk/Makefile
   openbts/trunk/Makefile.include
   openbts/trunk/SIP/SIPUtility.cpp
   openbts/trunk/Transceiver/Transceiver.cpp
   openbts/trunk/Transceiver/radioInterface.cpp
Log:
Merged-in final changes from SF.net SVN.


Modified: openbts/trunk/Control/CallControl.cpp
===================================================================
--- openbts/trunk/Control/CallControl.cpp       2008-11-14 16:12:38 UTC (rev 
9989)
+++ openbts/trunk/Control/CallControl.cpp       2008-11-14 21:04:45 UTC (rev 
9990)
@@ -21,8 +21,6 @@
 */
 
 
-
-
 /*
        Abbreviations:
        MTC -- Mobile Terminated Connect (someone calling the mobile)
@@ -542,6 +540,7 @@
        unsigned basePort = allocateRTPPorts();
        SIPState state = 
transaction.SIP().MOCSendINVITE(bcd_digits,"127.0.0.1",basePort,SIP::RTPGSM610);
        CLDCOUT("MOC: SIP state="<<state)
+       CLDCOUT("MOC: Q.931 state=" << transaction.Q931State());
 
        // Finally done with the Setup message.
        delete setup;
@@ -567,7 +566,6 @@
        // Once we can start SIP call setup, send Call Proceeding.
        CLDCOUT("MOC: Sending Call Proceeding ");
        TCH->send(L3CallProceeding(1,L3TI));
-       //TCH->send(L3CallProceeding(1,L3TI)); // HACK
        transaction.Q931State(TransactionEntry::MOCProceeding);
 
        // Look for RINGING or OK from the SIP side.
@@ -591,7 +589,6 @@
                        case SIP::Ringing:
                                CLDCOUT("MOC A: SIP:Ringing, send Alerting and 
move on");
                                TCH->send(L3Alerting(1,L3TI));
-                               //TCH->send(L3Alerting(1,L3TI)); // HACK
                                
transaction.Q931State(TransactionEntry::CallReceived);
                                break;
                        case SIP::Active:
@@ -658,9 +655,8 @@
        
        // Let the phone know the call is connected.
        CLDCOUT("MOC: sending Connect to handset");
-       msleep(1000); // HACK
+       msleep(1000); // HACK to prevent a race condition
        TCH->send(L3Connect(1,L3TI));
-       //TCH->send(L3Connect(1,L3TI)); // HACK
        transaction.T313().set();
        transaction.Q931State(TransactionEntry::ConnectIndication);
 
@@ -712,7 +708,6 @@
        // GSM 04.08 5.2.2.1
        CLDCOUT("MTC: sending GSM Setup");
        SDCCH->send(L3Setup(0,L3TI));
-       //SDCCH->send(L3Setup(0,L3TI)); // HACK
        transaction.T303().set();
        transaction.Q931State(TransactionEntry::CallPresent);
 

Modified: openbts/trunk/Control/ControlCommon.cpp
===================================================================
--- openbts/trunk/Control/ControlCommon.cpp     2008-11-14 16:12:38 UTC (rev 
9989)
+++ openbts/trunk/Control/ControlCommon.cpp     2008-11-14 21:04:45 UTC (rev 
9990)
@@ -22,8 +22,6 @@
 */
 
 
-
-
 #include "ControlCommon.h"
 #include "GSMLogicalChannel.h"
 #include "GSML3Message.h"
@@ -104,8 +102,9 @@
        switch (state) {
                case TransactionEntry::NullState: os << "null"; break;
                case TransactionEntry::Paging: os << "paging"; break;
-               case TransactionEntry::MOCProceeding: os << "proceeding"; break;
-               case TransactionEntry::MTCConfirmed: os << "confirmed"; break;
+               case TransactionEntry::MOCInitiated: os << "MOC initiated"; 
break;
+               case TransactionEntry::MOCProceeding: os << "MOC proceeding"; 
break;
+               case TransactionEntry::MTCConfirmed: os << "MTC confirmed"; 
break;
                case TransactionEntry::CallReceived: os << "call received"; 
break;
                case TransactionEntry::CallPresent: os << "call present"; break;
                case TransactionEntry::ConnectIndication: os << "connect 
indication"; break;

Modified: openbts/trunk/GSM/GSML1FEC.cpp
===================================================================
--- openbts/trunk/GSM/GSML1FEC.cpp      2008-11-14 16:12:38 UTC (rev 9989)
+++ openbts/trunk/GSM/GSML1FEC.cpp      2008-11-14 21:04:45 UTC (rev 9990)
@@ -20,10 +20,9 @@
 */
 
 
+#define NDEBUG
 
-//#define NDEBUG
 
-
 #include "GSML1FEC.h"
 #include "GSMCommon.h"
 #include "GSMSAPMux.h"
@@ -1278,7 +1277,7 @@
                OBJDCOUT("TCHFACCHL1Encoder::dispatch TCH c[]=" << mC);
        } else {
                // This filler pattern was captured from a Nokia 3310, BTW.
-               static const BitVector 
fillerC("11010000100011110000000011100111110101110011110100111100000000000011011110111111111010011010101010101010101010101010101010101010101001000011000000000000000000000000000000000000000000110100111100000000000000000000000000000000000000000000000011101001111010101010101010101010101010101010101010100100001100000000000000000011010011110000000011100111110110100000110000110100110100000000000000000001100110000000000000000000000000000000000000000000000000000000000");
+               static const BitVector 
fillerC("110100001000111100000000111001111101011100111101001111000000000000110111101111111110100110101010101010101010101010101010101010101010010000110000000000000000000000000000000000000000001101001111000000000000000000000000000000000000000000000000111010011010101010101010101010101010101010101010101001000011000000000000000000110100111100000000111001111101101000001100001101001111000000000000000000011001100000000000000000000000000000000000000000000000000000000001");
                fillerC.copyTo(mC);
                OBJDCOUT("TCHFACCHL1Encoder::dispatch filler FACCH=" << 
currentFACCH << " c[]=" << mC);
                // We have no ready data but must send SOMETHING.

Modified: openbts/trunk/GSM/GSML2LAPDm.cpp
===================================================================
--- openbts/trunk/GSM/GSML2LAPDm.cpp    2008-11-14 16:12:38 UTC (rev 9989)
+++ openbts/trunk/GSM/GSML2LAPDm.cpp    2008-11-14 21:04:45 UTC (rev 9990)
@@ -364,8 +364,11 @@
                // Allow other threads to modify state while blocked.
                // Add 2 ms to prevent race condition due to roundoff error.
                unsigned timeout = mT200.remaining() + 2;
-               if (!mT200.active()) timeout=gBigReadTimeout;
-               OBJDCOUT("L2LAPDm::serviceLoop read bocking up to " << timeout 
<< " ms, state=" << mState);
+               if (!mT200.active()) {
+                       if (mState==LinkReleased) timeout=gBigReadTimeout;
+                       else timeout = T200();
+               }
+               OBJDCOUT("L2LAPDm::serviceLoop read blocking up to " << timeout 
<< " ms, state=" << mState);
                mLock.unlock();
                L2Frame* frame = mL1In.read(timeout);
                mLock.lock();

Modified: openbts/trunk/Makefile
===================================================================
--- openbts/trunk/Makefile      2008-11-14 16:12:38 UTC (rev 9989)
+++ openbts/trunk/Makefile      2008-11-14 21:04:45 UTC (rev 9990)
@@ -67,6 +67,7 @@
        - $(MAKE) -C $(TRANSCEIVER) clean
        - $(MAKE) -C $(SIP) clean
        - $(MAKE) -C $(SMS) clean
+       - $(MAKE) -C $(APPS) clean
        
 
 

Modified: openbts/trunk/Makefile.include
===================================================================
--- openbts/trunk/Makefile.include      2008-11-14 16:12:38 UTC (rev 9989)
+++ openbts/trunk/Makefile.include      2008-11-14 21:04:45 UTC (rev 9990)
@@ -37,6 +37,7 @@
 TRANSCEIVER = $(ROOT)/Transceiver
 SIP = $(ROOT)/SIP
 SMS = $(ROOT)/SMS
+APPS = $(ROOT)/APPS
 
 
 # Paths

Modified: openbts/trunk/SIP/SIPUtility.cpp
===================================================================
--- openbts/trunk/SIP/SIPUtility.cpp    2008-11-14 16:12:38 UTC (rev 9989)
+++ openbts/trunk/SIP/SIPUtility.cpp    2008-11-14 21:04:45 UTC (rev 9990)
@@ -20,7 +20,6 @@
 */
 
 
-
 #include <stdio.h>
 #include <stdlib.h>
 #include <signal.h>
@@ -49,7 +48,7 @@
 
 void SIP::get_owner_ip( osip_message_t * msg, char * o_addr ){
        
-       osip_body_t * sdp_body = (osip_body_t*)osip_list_get(msg->bodies, 0);
+       osip_body_t * sdp_body = (osip_body_t*)osip_list_get(&msg->bodies, 0);
        char * sdp_str = sdp_body->body;
 
        sdp_message_t * sdp;
@@ -61,8 +60,7 @@
 
 void SIP::get_rtp_params(const osip_message_t * msg, char * port, char * 
ip_addr )
 {
-
-       osip_body_t * sdp_body = (osip_body_t*)osip_list_get(msg->bodies, 0);
+       osip_body_t * sdp_body = (osip_body_t*)osip_list_get(&msg->bodies, 0);
        char * sdp_str = sdp_body->body;
 
        sdp_message_t * sdp;

Modified: openbts/trunk/Transceiver/Transceiver.cpp
===================================================================
--- openbts/trunk/Transceiver/Transceiver.cpp   2008-11-14 16:12:38 UTC (rev 
9989)
+++ openbts/trunk/Transceiver/Transceiver.cpp   2008-11-14 21:04:45 UTC (rev 
9990)
@@ -699,7 +699,7 @@
 void Transceiver::writeClockInterface()
 {
   char command[50];
-  sprintf(command,"IND CLOCK %llu",(unsigned long long) 
(mTransmitDeadlineClock.FN()+0*10));
+  sprintf(command,"IND CLOCK %llu",(unsigned long long) 
(mTransmitDeadlineClock.FN()+10));
 
   DCOUT("ClockInterface: sending " << command);
 

Modified: openbts/trunk/Transceiver/radioInterface.cpp
===================================================================
--- openbts/trunk/Transceiver/radioInterface.cpp        2008-11-14 16:12:38 UTC 
(rev 9989)
+++ openbts/trunk/Transceiver/radioInterface.cpp        2008-11-14 21:04:45 UTC 
(rev 9990)
@@ -20,7 +20,6 @@
 */
 
 
-
 #include "radioInterface.h"
 
 #define DEBUG 0
@@ -142,8 +141,9 @@
                                            INRATE,sendLPF);
   delete inputVector;
  
-  //scaleVector(*resampledVector,13500.0/2.25); // this gets 2W out of 3318PA 
at 885Mhz
-  scaleVector(*resampledVector,100.0);
+  // Set transmit gain and power here.
+  scaleVector(*resampledVector,13500.0/2.25); // this gets 2W out of 3318PA at 
885Mhz
+  //scaleVector(*resampledVector,100.0);
 
   short *resampledVectorShort = USRPifyVector(*resampledVector);
 
@@ -360,14 +360,15 @@
   unsigned tN = rcvClock.TN();
   int rcvSz = rcvBuffer->size();
   int readSz = 0;
+  const int symbolsPerSlot = gSlotLen + 8;
 
   // while there's enough data in receive buffer, form received 
   //    GSM bursts and pass up to Transceiver
   // Using the 157-156-156-156 symbols per timeslot format.
-  while (rcvSz > (gSlotLen + 8 +(tN % 4 == 0))*samplesPerSymbol) {
+  while (rcvSz > (symbolsPerSlot + (tN % 4 == 0))*samplesPerSymbol) {
     signalVector rxVector(rcvBuffer->begin(),
                          readSz,
-                         (gSlotLen + 8 +(tN % 4 == 0))*samplesPerSymbol);
+                         (symbolsPerSlot + (tN % 4 == 0))*samplesPerSymbol);
     GSM::Time tmpTime = rcvClock;
     if (rcvClock.FN() >= 0) {
       DCOUT("FN: " << rcvClock.FN());
@@ -379,8 +380,8 @@
     if (mReceiveFIFO.size() >= 16) mReceiveFIFO.wait(8);
 
     DCOUT("receiveFIFO: wrote radio vector at time: " << mClock.get() << ", 
new size: " << mReceiveFIFO.size() );
-    readSz += (156+(tN % 4 == 0))*samplesPerSymbol;
-    rcvSz -= (156+(tN % 4 == 0))*samplesPerSymbol;
+    readSz += (symbolsPerSlot+(tN % 4 == 0))*samplesPerSymbol;
+    rcvSz -= (symbolsPerSlot+(tN % 4 == 0))*samplesPerSymbol;
 
     tN = rcvClock.TN();
   }





reply via email to

[Prev in Thread] Current Thread [Next in Thread]