You can subscribe to this list here.
| 2011 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(81) |
Dec
(12) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2012 |
Jan
(19) |
Feb
(20) |
Mar
(12) |
Apr
(2) |
May
(6) |
Jun
(10) |
Jul
(7) |
Aug
(5) |
Sep
(10) |
Oct
(15) |
Nov
(28) |
Dec
(25) |
| 2013 |
Jan
(1) |
Feb
(13) |
Mar
(3) |
Apr
(1) |
May
(10) |
Jun
(21) |
Jul
(12) |
Aug
(54) |
Sep
(40) |
Oct
(51) |
Nov
(1) |
Dec
(2) |
| 2014 |
Jan
(1) |
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
Author: dburgess
Date: 2011-11-19 18:22:41 -0600 (Sat, 19 Nov 2011)
New Revision: 2583
Added:
software/public/subscriberRegistry/features/a3a8/
Modified:
software/public/CommonLibs/trunk/Logger.cpp
software/public/CommonLibs/trunk/Logger.h
software/public/openbts/trunk/CommonLibs/Logger.cpp
software/public/openbts/trunk/CommonLibs/Logger.h
software/public/subscriberRegistry/features/a3a8/Makefile
software/public/subscriberRegistry/features/a3a8/SubscriberRegistry.cpp
software/public/subscriberRegistry/features/a3a8/SubscriberRegistry.h
software/public/subscriberRegistry/trunk/SubscriberRegistry.cpp
Log:
Brining A3/A8 into the sipauthserve public release.
Modified: software/public/CommonLibs/trunk/Logger.cpp
===================================================================
--- software/public/CommonLibs/trunk/Logger.cpp 2011-11-19 20:11:10 UTC (rev 2582)
+++ software/public/CommonLibs/trunk/Logger.cpp 2011-11-20 00:22:41 UTC (rev 2583)
@@ -150,6 +150,7 @@
Log::~Log()
{
+ if (mDummyInit) return;
// Anything at or above LOG_CRIT is an "alarm".
// Save alarms in the local list and echo them to stderr.
if (mPriority <= LOG_CRIT) {
@@ -162,6 +163,13 @@
}
+Log::Log(const char* name, const char* level, int facility)
+{
+ mDummyInit = true;
+ gLogInit(name, level, facility);
+}
+
+
ostringstream& Log::get()
{
assert(mPriority<numLevels);
Modified: software/public/CommonLibs/trunk/Logger.h
===================================================================
--- software/public/CommonLibs/trunk/Logger.h 2011-11-19 20:11:10 UTC (rev 2582)
+++ software/public/CommonLibs/trunk/Logger.h 2011-11-20 00:22:41 UTC (rev 2583)
@@ -40,10 +40,18 @@
#define _LOG(level) \
Log(LOG_##level).get() << pthread_self() \
<< " " __FILE__ ":" << __LINE__ << ":" << __FUNCTION__ << ": "
+
+#ifdef NDEBUG
#define LOG(wLevel) \
+ if (LOG_##wLevel!=LOG_DEBUG && gGetLoggingLevel(__FILE__)>=LOG_##wLevel) _LOG(wLevel)
+#else
+#define LOG(wLevel) \
if (gGetLoggingLevel(__FILE__)>=LOG_##wLevel) _LOG(wLevel)
+#endif
+
+
#define OBJLOG(wLevel) \
- if (gGetLoggingLevel(__FILE__)>=LOG_##wLevel) _LOG(wLevel) << "obj: " << this << ' '
+ LOG(wLevel) << "obj: " << this << ' '
#define LOG_ASSERT(x) { if (!(x)) LOG(EMERG) << "assertion " #x " failed"; } assert(x);
@@ -66,13 +74,16 @@
std::ostringstream mStream; ///< This is where we buffer up the log entry.
int mPriority; ///< Priority of current repot.
+ bool mDummyInit;
public:
Log(int wPriority)
- :mPriority(wPriority)
+ :mPriority(wPriority), mDummyInit(false)
{ }
+ Log(const char* name, const char* level=NULL, int facility=LOG_USER);
+
// Most of the work is in the desctructor.
/** The destructor actually generates the log entry. */
~Log();
Modified: software/public/openbts/trunk/CommonLibs/Logger.cpp
===================================================================
--- software/public/openbts/trunk/CommonLibs/Logger.cpp 2011-11-19 20:11:10 UTC (rev 2582)
+++ software/public/openbts/trunk/CommonLibs/Logger.cpp 2011-11-20 00:22:41 UTC (rev 2583)
@@ -150,6 +150,7 @@
Log::~Log()
{
+ if (mDummyInit) return;
// Anything at or above LOG_CRIT is an "alarm".
// Save alarms in the local list and echo them to stderr.
if (mPriority <= LOG_CRIT) {
@@ -162,6 +163,13 @@
}
+Log::Log(const char* name, const char* level, int facility)
+{
+ mDummyInit = true;
+ gLogInit(name, level, facility);
+}
+
+
ostringstream& Log::get()
{
assert(mPriority<numLevels);
Modified: software/public/openbts/trunk/CommonLibs/Logger.h
===================================================================
--- software/public/openbts/trunk/CommonLibs/Logger.h 2011-11-19 20:11:10 UTC (rev 2582)
+++ software/public/openbts/trunk/CommonLibs/Logger.h 2011-11-20 00:22:41 UTC (rev 2583)
@@ -40,10 +40,18 @@
#define _LOG(level) \
Log(LOG_##level).get() << pthread_self() \
<< " " __FILE__ ":" << __LINE__ << ":" << __FUNCTION__ << ": "
+
+#ifdef NDEBUG
#define LOG(wLevel) \
+ if (LOG_##wLevel!=LOG_DEBUG && gGetLoggingLevel(__FILE__)>=LOG_##wLevel) _LOG(wLevel)
+#else
+#define LOG(wLevel) \
if (gGetLoggingLevel(__FILE__)>=LOG_##wLevel) _LOG(wLevel)
+#endif
+
+
#define OBJLOG(wLevel) \
- if (gGetLoggingLevel(__FILE__)>=LOG_##wLevel) _LOG(wLevel) << "obj: " << this << ' '
+ LOG(wLevel) << "obj: " << this << ' '
#define LOG_ASSERT(x) { if (!(x)) LOG(EMERG) << "assertion " #x " failed"; } assert(x);
@@ -66,13 +74,16 @@
std::ostringstream mStream; ///< This is where we buffer up the log entry.
int mPriority; ///< Priority of current repot.
+ bool mDummyInit;
public:
Log(int wPriority)
- :mPriority(wPriority)
+ :mPriority(wPriority), mDummyInit(false)
{ }
+ Log(const char* name, const char* level=NULL, int facility=LOG_USER);
+
// Most of the work is in the desctructor.
/** The destructor actually generates the log entry. */
~Log();
Modified: software/public/subscriberRegistry/features/a3a8/Makefile
===================================================================
--- software/commercial/subscriberRegistry/trunk/Makefile 2011-11-19 13:50:50 UTC (rev 2578)
+++ software/public/subscriberRegistry/features/a3a8/Makefile 2011-11-20 00:22:41 UTC (rev 2583)
@@ -1,21 +1,14 @@
-TRUNK=../../
-COM=$(TRUNK)/CommonLibs/trunk/
-#SQL=$(TRUNK)/sqlite3/trunk/
-SQL=../../smqueue/trunk/sqlite3/
-SR=$(TRUNK)/subscriberRegistry/trunk
-LOCALLIBS=$(COM)/Logger.cpp $(COM)/Timeval.cpp $(COM)/Threads.cpp $(COM)/Sockets.cpp $(COM)/Configuration.cpp $(SQL)/sqlite3util.cpp $(SR)/SubscriberRegistry.cpp servershare.cpp
-LIBS= -L$(SQL) $(LOCALLIBS) -losipparser2 -losip2 -lc -lpthread -lsqlite
-INCLUDES=-I$(COM) -I$(SQL) -I$(SR)
+TRUNK=../../../openbts/trunk
+COM=$(TRUNK)/CommonLibs
+SQL=$(TRUNK)/sqlite3
+#SR=$(TRUNK)/subscriberRegistry/trunk-public-staging
+LOCALLIBS=$(COM)/Logger.cpp $(COM)/Timeval.cpp $(COM)/Threads.cpp $(COM)/Sockets.cpp $(COM)/Configuration.cpp $(SQL)/sqlite3util.cpp SubscriberRegistry.cpp servershare.cpp
+LIBS=$(LOCALLIBS) -losipparser2 -losip2 -lc -lpthread -lsqlite3
+INCLUDES=-I$(COM) -I$(SQL)
CPPFLAGS=-g -Wall -Wno-deprecated
-all: comp128 srmanager.cgi subscriberserver.cgi sipauthserve
+all: srmanager.cgi sipauthserve
-comp128: comp128.c
- g++ -o comp128 comp128.c
-
-subscriberserver.cgi: subscriberserver.cpp $(LOCALLIBS)
- g++ -o subscriberserver.cgi $(CPPFLAGS) $(INCLUDES) subscriberserver.cpp $(LIBS)
-
srmanager.cgi: srmanager.cpp $(LOCALLIBS)
g++ -o srmanager.cgi $(CPPFLAGS) $(INCLUDES) srmanager.cpp $(LIBS)
@@ -23,21 +16,5 @@
g++ -o sipauthserve $(CPPFLAGS) $(INCLUDES) sipauthserve.cpp $(LIBS)
clean:
- rm -f comp128 subscriberserver.cgi srmanager.cgi sipauthserve test.SubscriberRegistry/test
+ rm -f srmanager.cgi sipauthserve test.SubscriberRegistry/test
rm -r -f *.dSYM
-
-# this needs "local7.debug<at least one tab>/var/log/openbts.log" in /etc/syslog.conf
-test: all
- cd test.SubscriberRegistry; ./runtest
- cd test.sipauthserve; ./runtest
- cd test.srmanager; ./runtest
- cd test.subscriberserver; ./runtest
-
-just3: all
- cd test.SubscriberRegistry; ./runtest
- cd test.srmanager; ./runtest
- cd test.subscriberserver; ./runtest
-
-# specifically for boa web server
-install: all
- cp srmanager.cgi subscriberserver.cgi /var/www
Modified: software/public/subscriberRegistry/features/a3a8/SubscriberRegistry.cpp
===================================================================
--- software/commercial/subscriberRegistry/trunk/SubscriberRegistry.cpp 2011-11-19 13:50:50 UTC (rev 2578)
+++ software/public/subscriberRegistry/features/a3a8/SubscriberRegistry.cpp 2011-11-20 00:22:41 UTC (rev 2583)
@@ -144,8 +144,6 @@
"sres varchar(33) default '', "
"ki varchar(33) default '', "
"kc varchar(33) default '', "
- "prepaid int(1) DEFAULT 0 not null, "
- "secondsRemaining int(11) DEFAULT 0 not null, "
"RRLPSupported int(1) default 1 not null, "
"regTime INTEGER default 0 NOT NULL, " // Unix time of most recent registration
"a3_a8 varchar(45) default NULL"
@@ -512,68 +510,7 @@
-bool SubscriberRegistry::useGateway(const char* ISDN)
-{
- // FIXME -- Do something more general in Asterisk.
- // This is a hack for Burning Man.
- int cmp = strncmp(ISDN,"88351000125",11);
- return cmp!=0;
-}
-
-
-SubscriberRegistry::Status SubscriberRegistry::setPrepaid(const char *IMSI, bool yes)
-{
- ostringstream os;
- os << "update sip_buddies set prepaid = " << (yes ? 1 : 0) << " where name = " << '"' << IMSI << '"';
- return sqlUpdate(os.str().c_str());
-}
-
-
-SubscriberRegistry::Status SubscriberRegistry::isPrepaid(const char *IMSI, bool &yes)
-{
- char *st = sqlQuery("prepaid", "sip_buddies", "name", IMSI);
- if (!st) return FAILURE;
- yes = *st == '1';
- free(st);
- return SUCCESS;
-}
-
-
-SubscriberRegistry::Status SubscriberRegistry::secondsRemaining(const char *IMSI, int &seconds)
-{
- char *st = sqlQuery("secondsRemaining", "sip_buddies", "name", IMSI);
- if (!st) return FAILURE;
- seconds = (int)strtol(st, (char **)NULL, 10);
- free(st);
- return SUCCESS;
-}
-
-
-SubscriberRegistry::Status SubscriberRegistry::addSeconds(const char *IMSI, int secondsToAdd, int &wSecondsRemaining)
-{
- ostringstream os;
- os << "update sip_buddies set secondsRemaining = secondsRemaining + " << secondsToAdd << " where name = " << '"' << IMSI << '"';
- if (sqlUpdate(os.str().c_str()) == FAILURE) return FAILURE;
- int n;
- if (secondsRemaining(IMSI, n) == FAILURE) return FAILURE;
- if (n < 0) {
- wSecondsRemaining = 0;
- } else {
- wSecondsRemaining = n;
- }
- return SUCCESS;
-}
-
-
-SubscriberRegistry::Status SubscriberRegistry::setSeconds(const char *IMSI, int seconds)
-{
- ostringstream os;
- os << "update sip_buddies set secondsRemaining = " << seconds << " where name = " << '"' << IMSI << '"';
- return sqlUpdate(os.str().c_str());
-}
-
-
HttpQuery::HttpQuery(const char *req)
{
sends = map<string,string>();
Modified: software/public/subscriberRegistry/features/a3a8/SubscriberRegistry.h
===================================================================
--- software/commercial/subscriberRegistry/trunk/SubscriberRegistry.h 2011-11-19 13:50:50 UTC (rev 2578)
+++ software/public/subscriberRegistry/features/a3a8/SubscriberRegistry.h 2011-11-20 00:22:41 UTC (rev 2583)
@@ -155,55 +155,6 @@
- bool useGateway(const char* ISDN);
-
-
- /**
- Set whether a subscriber is prepaid.
- @param IMSI Subscriber's IMSI
- @param yes true for prepaid, false for postpaid
- @return SUCCESS or FAILURE
- */
- Status setPrepaid(const char *IMSI, bool yes);
-
-
- /**
- Is a subscriber postpaid?
- @param IMSI Subscriber's IMSI
- @param yes set to true if subscriber is postpaid, false if prepaid
- @return SUCCESS or FAILURE
- */
- Status isPrepaid(const char *IMSI, bool &yes);
-
-
- /**
- Get the seconds remaining in a subscriber's account.
- @param IMSI Subscriber's IMSI
- @param seconds set to number of seconds remaining
- @return SUCCESS or FAILURE
- */
- Status secondsRemaining(const char *IMSI, int &seconds);
-
-
- /**
- Atomic operation to add seconds to subscriber's account and return remaining seconds
- @param IMSI subscriber's IMSI
- @param secondsToAdd seconds to add (negative to subtract)
- @param secondsRemaining set to seconds remaining after addition
- @return SUCCESS or FAILURE
- */
- Status addSeconds(const char *IMSI, int secondsToAdd, int &secondsRemaining);
-
-
- /**
- Set the number of seconds in a subscriber's account
- @param IMSI subscriber's IMSI
- @param seconds number of seconds to which to set subscriber's account
- @return SUCCESS or FAILURE
- */
- Status setSeconds(const char *IMSI, int seconds);
-
-
private:
Modified: software/public/subscriberRegistry/trunk/SubscriberRegistry.cpp
===================================================================
--- software/public/subscriberRegistry/trunk/SubscriberRegistry.cpp 2011-11-19 20:11:10 UTC (rev 2582)
+++ software/public/subscriberRegistry/trunk/SubscriberRegistry.cpp 2011-11-20 00:22:41 UTC (rev 2583)
@@ -144,8 +144,6 @@
"sres varchar(33) default '', "
"ki varchar(33) default '', "
"kc varchar(33) default '', "
- "prepaid int(1) DEFAULT 0 not null, "
- "secondsRemaining int(11) DEFAULT 0 not null, "
"RRLPSupported int(1) default 1 not null, "
"regTime INTEGER default 0 NOT NULL, " // Unix time of most recent registration
"a3_a8 varchar(45) default NULL"
|
|
From: <do_...@wu...> - 2011-11-18 22:35:26
|
Author: kurtis.heimerl
Date: 2011-11-18 16:35:19 -0600 (Fri, 18 Nov 2011)
New Revision: 2573
Modified:
software/public/RRLP/trunk/rrlpserver.erl
Log:
we don't require specialized directories in the public build
Modified: software/public/RRLP/trunk/rrlpserver.erl
===================================================================
--- software/public/RRLP/trunk/rrlpserver.erl 2011-11-18 22:13:58 UTC (rev 2572)
+++ software/public/RRLP/trunk/rrlpserver.erl 2011-11-18 22:35:19 UTC (rev 2573)
@@ -731,7 +731,7 @@
Table = parseTable(),
% read the file
% the url and max cache time are config params
- Lines = getFile("/var/run/rrlp/almanac", getStr("GSM.RRLP.ALMANAC.URL"), getNum("GSM.RRLP.ALMANAC.REFRESH.TIME")),
+ Lines = getFile("/var/run/almanac", getStr("GSM.RRLP.ALMANAC.URL"), getNum("GSM.RRLP.ALMANAC.REFRESH.TIME")),
% io:format("Lines=~p\n", [Lines]),
% Apply the parser to the lines.
parseAlmanac([], Lines, [], Table, 0).
@@ -907,7 +907,7 @@
% read the adjustment table that gives corrections, scaling, etc
AdjustTable = ephemerisAdjustTable(),
% read the file. the url and max cache age are config params
- Lines = getFile("/var/run/rrlp/ephemeris", getStr("GSM.RRLP.EPHEMERIS.URL"), getNum("GSM.RRLP.EPHEMERIS.REFRESH.TIME")),
+ Lines = getFile("/var/run/ephemeris", getStr("GSM.RRLP.EPHEMERIS.URL"), getNum("GSM.RRLP.EPHEMERIS.REFRESH.TIME")),
% io:format("Lines=~p\n", [Lines]),
% parse the lines from the global part of the ephemeris
% RestOfLines = the satellite part of the ephemeris
|
|
From: <do_...@wu...> - 2011-11-18 22:14:05
|
Author: kurtis.heimerl Date: 2011-11-18 16:13:58 -0600 (Fri, 18 Nov 2011) New Revision: 2572 Modified: software/public/RRLP/trunk/rrfake Log: doug's comments for my benefit Modified: software/public/RRLP/trunk/rrfake =================================================================== --- software/public/RRLP/trunk/rrfake 2011-11-18 22:09:47 UTC (rev 2571) +++ software/public/RRLP/trunk/rrfake 2011-11-18 22:13:58 UTC (rev 2572) @@ -1,3 +1,15 @@ #!/bin/bash export QUERY_STRING='GSM.RRLP.ACCURACY=7&GSM.RRLP.RESPONSETIME=4&GSM.RRLP.ALMANAC.URL=687474703a2f2f7777772e6e617663656e2e757363672e676f762f3f706167654e616d653d63757272656e74416c6d616e616326666f726d61743d79756d61&GSM.RRLP.EPHEMERIS.URL=6674703a2f2f6674702e7472696d626c652e636f6d2f7075622f6570682f437572526e784e2e6e6176&GSM.RRLP.ALMANAC.REFRESH.TIME=24.0&GSM.RRLP.EPHEMERIS.REFRESH.TIME=1.0&GSM.RRLP.SEED.LATITUDE=37.357331&GSM.RRLP.SEED.LONGITUDE=-122.037807&GSM.RRLP.SEED.ALTITUDE=0&GSM.RRLP.ALMANAC.ASSIST.PRESENT=0&GSM.RRLP.EPHEMERIS.ASSIST.COUNT=6&query='$1 ./rrlpserver.cgi + +# First try +# ./rrfake testlled +# That verifies that the erlang stuff is running. +# If it doesn't work, perhaps you didn't compile. Or don't have erlang. +# +# Then you can try +# ./rrfake loc +# ./rrfake assist +# ./rrfake testpos +# These all depend on reading the ephemeris. +# If it doesn't work, perhaps you don't have a writable /var/run/rrlp where it caches the ephemeris. |
|
From: <do_...@wu...> - 2011-11-18 22:09:54
|
Author: kurtis.heimerl
Date: 2011-11-18 16:09:47 -0600 (Fri, 18 Nov 2011)
New Revision: 2571
Modified:
software/public/subscriberRegistry/trunk/sipauthserve.example.sql
Log:
some small clarifications on the sipauthserve sql file
Modified: software/public/subscriberRegistry/trunk/sipauthserve.example.sql
===================================================================
--- software/public/subscriberRegistry/trunk/sipauthserve.example.sql 2011-11-18 22:09:44 UTC (rev 2570)
+++ software/public/subscriberRegistry/trunk/sipauthserve.example.sql 2011-11-18 22:09:47 UTC (rev 2571)
@@ -5,4 +5,7 @@
INSERT INTO "CONFIG" VALUES('Log.Level','WARNING',0,0,'Default logging level when no other level is defined for a file.');
INSERT INTO "CONFIG" VALUES('SubscriberRegistry.db','/var/lib/asterisk/sqlite3dir/sqlite3.db',0,0,'The location of the sqlite3 database holding the subscriber registry.');
INSERT INTO "CONFIG" VALUES('SubscriberRegistry.Port','5064',0,0,'The port for the subscriber registry. Static.');
+-- following two are only used by srmanager, which is not built be default
+--INSERT INTO "CONFIG" VALUES('SubscriberRegistry.Manager.Title','No Idea',0,0,'No idea what this is supposed to be -kurtis');
+--INSERT INTO "CONFIG" VALUES('SubscriberRegistry.Manager.VisibleColumns','No Idea',0,0,'No idea what this is supposed to be');
COMMIT;
|
|
From: <do_...@wu...> - 2011-11-18 22:09:52
|
Author: kurtis.heimerl
Date: 2011-11-18 16:09:44 -0600 (Fri, 18 Nov 2011)
New Revision: 2570
Added:
software/public/subscriberRegistry/trunk/sipauthserve.example.sql
Modified:
software/public/openbts/trunk/apps/OpenBTS.example.sql
software/public/subscriberRegistry/trunk/sipauthserve.cpp
Log:
moved sipauthserve to it's own database
Modified: software/public/openbts/trunk/apps/OpenBTS.example.sql
===================================================================
--- software/public/openbts/trunk/apps/OpenBTS.example.sql 2011-11-18 18:48:28 UTC (rev 2569)
+++ software/public/openbts/trunk/apps/OpenBTS.example.sql 2011-11-18 22:09:44 UTC (rev 2570)
@@ -113,7 +113,6 @@
INSERT INTO "CONFIG" VALUES('SubscriberRegistry.Manager.Url','http://127.0.0.1/cgi/srmanager.cgi',0,0,'URL of the subscriber registry database manager.');
INSERT INTO "CONFIG" VALUES('SubscriberRegistry.Manager.VisibleColumns','name username type context host',0,0,'Field names in subscriber registry visible in the database manager.');
INSERT INTO "CONFIG" VALUES('SubscriberRegistry.db','/var/lib/asterisk/sqlite3dir/sqlite3.db',0,0,'The location of the sqlite3 database holding the subscriber registry.');
-INSERT INTO "CONFIG" VALUES('SubscriberRegistry.Port','5064',0,0,'The port for the subscriber registry. Static.');
INSERT INTO "CONFIG" VALUES('TRX.IP','127.0.0.1',1,0,'IP address of the transceiver application. Static.');
INSERT INTO "CONFIG" VALUES('TRX.Port','5700',1,0,'IP port of the transceiver application. Static.');
INSERT INTO "CONFIG" VALUES('TRX.RadioFrequencyOffset','128',1,0,'Fine-tuning adjustment for the transceiver master clock. Roughly 170 Hz/step. Set at the factory. Do not adjust without proper calibration. Static.');
Modified: software/public/subscriberRegistry/trunk/sipauthserve.cpp
===================================================================
--- software/public/subscriberRegistry/trunk/sipauthserve.cpp 2011-11-18 18:48:28 UTC (rev 2569)
+++ software/public/subscriberRegistry/trunk/sipauthserve.cpp 2011-11-18 22:09:44 UTC (rev 2570)
@@ -50,7 +50,7 @@
using namespace std;
-ConfigurationTable gConfig("/etc/OpenBTS/OpenBTS.db");
+ConfigurationTable gConfig("/etc/OpenBTS/sipauthserve.db");
int my_udp_port;
|
|
From: <do_...@wu...> - 2011-11-15 01:30:48
|
Author: kurtis.heimerl
Date: 2011-11-14 19:06:45 -0600 (Mon, 14 Nov 2011)
New Revision: 2506
Modified:
software/public/openbts/trunk/apps/OpenBTS.example.sql
Log:
changed GSM.RACCH.AC to signal no emergency service by default.
Modified: software/public/openbts/trunk/apps/OpenBTS.example.sql
===================================================================
--- software/public/openbts/trunk/apps/OpenBTS.example.sql 2011-11-14 19:18:46 UTC (rev 2505)
+++ software/public/openbts/trunk/apps/OpenBTS.example.sql 2011-11-15 01:06:45 UTC (rev 2506)
@@ -48,7 +48,7 @@
INSERT INTO "CONFIG" VALUES('GSM.MS.TA.Damping','50',0,0,'Damping value for timing advance control loop.');
INSERT INTO "CONFIG" VALUES('GSM.MS.TA.Max','5',0,0,'Maximum allowed timing advance in symbol periods. Ignore RACH bursts with delays greater than this. Can be used to limit service range.');
INSERT INTO "CONFIG" VALUES('GSM.MaxSpeechLatency','2',0,0,'Maximum allowed speech buffering latency, in 20 ms frames. If the jitter is larger than this delay, frames will be lost.');
-INSERT INTO "CONFIG" VALUES('GSM.RACH.AC','0',0,0,'Access class flags. This is the raw parameter sent on the BCCH. See GSM 04.08 10.5.2.29 for encoding. Set to 0 to allow full access. If you do not have proper PSAP integration, set to 0x0400 to indicate no support for emergency calls.');
+INSERT INTO "CONFIG" VALUES('GSM.RACH.AC','1024',0,0,'Access class flags. This is the raw parameter sent on the BCCH. See GSM 04.08 10.5.2.29 for encoding. Set to 0 to allow full access. If you do not have proper PSAP integration, set to 0x0400 to indicate no support for emergency calls.');
INSERT INTO "CONFIG" VALUES('GSM.RACH.MaxRetrans','1',0,0,'Maximum RACH retransmission attempts. This is the raw parameter sent on the BCCH. See GSM 04.08 10.5.2.29 for encoding.');
INSERT INTO "CONFIG" VALUES('GSM.RACH.TxInteger','14',0,0,'Parameter to spread RACH busts over time. This is the raw parameter sent on the BCCH. See GSM 04.08 10.5.2.29 for encoding.');
INSERT INTO "CONFIG" VALUES('GSM.RADIO-LINK-TIMEOUT','15',0,0,' L1 radio link timeout. This is the raw parameter sent on the BCCH; see GSM 10.5.2.3 for encoding. Should be coordinated with T3109.');
|
|
From: <do_...@wu...> - 2011-11-11 22:16:45
|
Author: kurtis.heimerl
Date: 2011-11-11 16:16:38 -0600 (Fri, 11 Nov 2011)
New Revision: 2486
Modified:
software/public/openbts/trunk/apps/OpenBTS.example.sql
Log:
Added SubscriberRegistry.Port to the default config
Modified: software/public/openbts/trunk/apps/OpenBTS.example.sql
===================================================================
--- software/public/openbts/trunk/apps/OpenBTS.example.sql 2011-11-11 17:11:00 UTC (rev 2485)
+++ software/public/openbts/trunk/apps/OpenBTS.example.sql 2011-11-11 22:16:38 UTC (rev 2486)
@@ -113,6 +113,7 @@
INSERT INTO "CONFIG" VALUES('SubscriberRegistry.Manager.Url','http://127.0.0.1/cgi/srmanager.cgi',0,0,'URL of the subscriber registry database manager.');
INSERT INTO "CONFIG" VALUES('SubscriberRegistry.Manager.VisibleColumns','name username type context host',0,0,'Field names in subscriber registry visible in the database manager.');
INSERT INTO "CONFIG" VALUES('SubscriberRegistry.db','/var/lib/asterisk/sqlite3dir/sqlite3.db',0,0,'The location of the sqlite3 database holding the subscriber registry.');
+INSERT INTO "CONFIG" VALUES('SubscriberRegistry.Port','5064',0,0,'The port for the subscriber registry. Static.');
INSERT INTO "CONFIG" VALUES('TRX.IP','127.0.0.1',1,0,'IP address of the transceiver application. Static.');
INSERT INTO "CONFIG" VALUES('TRX.Port','5700',1,0,'IP port of the transceiver application. Static.');
INSERT INTO "CONFIG" VALUES('TRX.RadioFrequencyOffset','128',1,0,'Fine-tuning adjustment for the transceiver master clock. Roughly 170 Hz/step. Set at the factory. Do not adjust without proper calibration. Static.');
|
|
From: <do_...@wu...> - 2011-11-06 04:23:38
|
Author: kurtis.heimerl
Date: 2011-11-05 23:23:31 -0500 (Sat, 05 Nov 2011)
New Revision: 2437
Modified:
software/public/openbts/trunk/apps/OpenBTS.example.sql
Log:
removing need for /var/run/OpenBTS as per chemeris
Modified: software/public/openbts/trunk/apps/OpenBTS.example.sql
===================================================================
--- software/public/openbts/trunk/apps/OpenBTS.example.sql 2011-11-06 00:27:28 UTC (rev 2436)
+++ software/public/openbts/trunk/apps/OpenBTS.example.sql 2011-11-06 04:23:31 UTC (rev 2437)
@@ -2,8 +2,8 @@
BEGIN TRANSACTION;
CREATE TABLE CONFIG ( KEYSTRING TEXT UNIQUE NOT NULL, VALUESTRING TEXT, STATIC INTEGER DEFAULT 0, OPTIONAL INTEGER DEFAULT 0, COMMENTS TEXT DEFAULT '');
INSERT INTO "CONFIG" VALUES('CLI.Prompt','OpenBTS> ',0,0,'Prompt for the OpenBTS command line interface.');
-INSERT INTO "CONFIG" VALUES('Control.Reporting.PhysStatusTable','/var/run/OpenBTS/ChannelTable.db',1,0,'File path for channel status reporting database. Static.');
-INSERT INTO "CONFIG" VALUES('Control.Reporting.TMSITable','/var/run/OpenBTS/TMSITable.db',1,0,'File path for TMSITable database. Static.');
+INSERT INTO "CONFIG" VALUES('Control.Reporting.PhysStatusTable','/var/run/OpenBTSChannelTable.db',1,0,'File path for channel status reporting database. Static.');
+INSERT INTO "CONFIG" VALUES('Control.Reporting.TMSITable','/var/run/OpenBTSTMSITable.db',1,0,'File path for TMSITable database. Static.');
INSERT INTO "CONFIG" VALUES('Control.GSMTAP.TargetIP','127.0.0.1',0,1,'Target IP address for GSMTAP packets; the IP address of Wireshark, if you use it for GSM.');
INSERT INTO "CONFIG" VALUES('Control.LUR.AttachDetach',1,0,0,'Attach/detach flag. Set to 1 to use attach/detach procedure, 0 otherwise. This will make initial LUR more prompt. It will also cause an un-regstration if the handset powers off and really heavy LUR loads in areas with spotty coverage.');
INSERT INTO "CONFIG" VALUES('Control.LUR.FailedRegistration.Message','Your handset is not provisioned for this network. ',0,1,'If defined, send this text message, followed by the IMSI, to unprovisioned handsets that are denied registration.');
|
|
From: <do_...@wu...> - 2011-11-06 00:27:36
|
Author: kurtis.heimerl Date: 2011-11-05 19:27:28 -0500 (Sat, 05 Nov 2011) New Revision: 2436 Modified: software/public/subscriberRegistry/trunk/Makefile Log: allow sipauthserve to build against the openbts CommonLibs and sqlite3 directories. Not a great long-term solution. Modified: software/public/subscriberRegistry/trunk/Makefile =================================================================== --- software/public/subscriberRegistry/trunk/Makefile 2011-11-04 05:52:11 UTC (rev 2435) +++ software/public/subscriberRegistry/trunk/Makefile 2011-11-06 00:27:28 UTC (rev 2436) @@ -1,6 +1,6 @@ -TRUNK=../.. -COM=$(TRUNK)/CommonLibs/trunk-public-staging -SQL=$(TRUNK)/sqlite3/trunk-public-staging +TRUNK=../../openbts/trunk +COM=$(TRUNK)/CommonLibs +SQL=$(TRUNK)/sqlite3 #SR=$(TRUNK)/subscriberRegistry/trunk-public-staging LOCALLIBS=$(COM)/Logger.cpp $(COM)/Timeval.cpp $(COM)/Threads.cpp $(COM)/Sockets.cpp $(COM)/Configuration.cpp $(SQL)/sqlite3util.cpp SubscriberRegistry.cpp servershare.cpp LIBS=$(LOCALLIBS) -losipparser2 -losip2 -lc -lpthread -lsqlite3 |
|
From: <do_...@wu...> - 2011-11-04 05:52:19
|
Author: kurtis.heimerl
Date: 2011-11-04 00:52:11 -0500 (Fri, 04 Nov 2011)
New Revision: 2435
Modified:
software/public/openbts/trunk/FreeswitchConfig/chatplan/openbts-chatplan.xml
software/public/openbts/trunk/FreeswitchConfig/dialplan/openbts-dialplan.xml
software/public/openbts/trunk/FreeswitchConfig/scripts/OpenBTS_DB.py
software/public/openbts/trunk/FreeswitchConfig/scripts/OpenBTS_New_User.py
software/public/openbts/trunk/FreeswitchConfig/scripts/OpenBTS_Parse_SMS.py
software/public/openbts/trunk/FreeswitchConfig/scripts/OpenBTS_Send_SMS.py
Log:
new versions of freeswitch stuff
Modified: software/public/openbts/trunk/FreeswitchConfig/chatplan/openbts-chatplan.xml
===================================================================
--- software/public/openbts/trunk/FreeswitchConfig/chatplan/openbts-chatplan.xml 2011-11-03 21:28:14 UTC (rev 2434)
+++ software/public/openbts/trunk/FreeswitchConfig/chatplan/openbts-chatplan.xml 2011-11-04 05:52:11 UTC (rev 2435)
@@ -33,29 +33,43 @@
<!-- set all the openbts variables -->
<extension name="openbts" continue="true">
<condition field="to_user" expression="^smsc$">
+ <!-- first, parse SMS -->
<action inline="true" application="python" data="OpenBTS_Parse_SMS"/>
+ <!-- second, look up sender -->
+ <!-- freeswitch eats 's, switch them up here -->
+ <action inline="true" application="python" data='OpenBTS_DB SELECT callerid FROM sip_buddies WHERE name="${from_user}"'/>
+ <!-- result in _openbts_ret -->
+ <action inline="true" application="set" data="openbts_callerid=${_openbts_ret}"/>
</condition>
</extension>
- <!-- openbts_db_loc set in vars.xml -->
+ <!-- register a user in the subscriber registry -->
<extension name="registration">
<condition field="openbts_tp_dest_address" expression="^101$"/>
<!-- is it a number? -->
<condition field="openbts_text" expression="^\d{7,10}$">
- <!-- if so, try to register user -->
- <action application="set" data="caller_number=${python(OpenBTS_DB -d ${openbts_db_loc} -c ${from_user})}" />
- <!-- return value in _openbts_ret -->
<action application="python" data="OpenBTS_New_User"/>
+ <action application="set" data="response_text=${_openbts_ret}"/>
+ <!-- lookup new number -->
+ <action application="python" data='OpenBTS_DB SELECT callerid FROM sip_buddies WHERE name="${from_user}"'/>
<!-- text back the return value -->
- <action application="python" data="OpenBTS_Send_SMS ${caller_number}|101|${_openbts_ret}"/>
+ <action application="python" data="OpenBTS_Send_SMS ${_openbts_ret}|101|${response_text}"/>
- <!-- if not, look up user and respond with instructions -->
- <anti-action application="set" data="caller_number=${python(OpenBTS_DB -d ${openbts_db_loc} -c ${from_user})}" />
- <anti-action application="python" data="OpenBTS_Send_SMS ${caller_number}|101|Please send just the number you want!"/>
+ <!-- if not, reply -->
+ <!-- this doesn't work yet, missing MC->MS encoder
+ <anti-action application="python" data="OpenBTS_Reply_SMS 101|101|Please send a 7-10 digit number!"/>
+ -->
+
</condition>
</extension>
+ <extension name="echo">
+ <condition field="openbts_tp_dest_address" expression="^9189$">
+ <action application="python" data="OpenBTS_Send_SMS ${openbts_callerid}|9189|${openbts_text}"/>
+ </condition>
+ </extension>
+
<extension name="callbacks">
<condition field="openbts_tp_dest_address" expression="^919(\d)$">
<!-- bgapi lets us finish this without waiting for the originate -->
Modified: software/public/openbts/trunk/FreeswitchConfig/dialplan/openbts-dialplan.xml
===================================================================
--- software/public/openbts/trunk/FreeswitchConfig/dialplan/openbts-dialplan.xml 2011-11-03 21:28:14 UTC (rev 2434)
+++ software/public/openbts/trunk/FreeswitchConfig/dialplan/openbts-dialplan.xml 2011-11-04 05:52:11 UTC (rev 2435)
@@ -29,12 +29,11 @@
<extension name="local_call">
<!-- openbts_db_loc set in vars.xml -->
- <condition field="destination_number" expression="^\d{7}$"/>
- <condition field="${python(OpenBTS_DB -d ${openbts_db_loc} -t ${destination_number})}" expression="IMSI\d{15}"/>
- <condition field="${python(OpenBTS_DB -d ${openbts_db_loc} -c ${username})}" expression="\d{7}">
- <action application="set" data="target=${python(OpenBTS_DB -d ${openbts_db_loc} -t ${destination_number})}" />
- <action application="set" data="effective_caller_id_number=${python(OpenBTS_DB -d ${openbts_db_loc} -c ${username})}" />
- <action application="bridge" data="sofia/internal/${target}@${domain}:${sip_received_port}"/>
+ <condition field='${python(OpenBTS_DB SELECT name FROM sip_buddies WHERE callerid="${destination_number}")}' expression="IMSI\d{15}"/>
+ <condition field='${python(OpenBTS_DB SELECT callerid FROM sip_buddies WHERE name="${username}"' expression="\d{7,10}">
+ <action application="set" data='target=${python(OpenBTS_DB SELECT name FROM sip_buddies WHERE callerid="${destination_number}")}' />
+ <action application="set" data='effective_caller_id_number=${python(OpenBTS_DB SELECT callerid FROM sip_buddies WHERE name="${username}"'/>
+ <action application="bridge" data="sofia/internal/${target}@${domain}:${sip_received_port}"/>
</condition>
</extension>
Modified: software/public/openbts/trunk/FreeswitchConfig/scripts/OpenBTS_DB.py
===================================================================
--- software/public/openbts/trunk/FreeswitchConfig/scripts/OpenBTS_DB.py 2011-11-03 21:28:14 UTC (rev 2434)
+++ software/public/openbts/trunk/FreeswitchConfig/scripts/OpenBTS_DB.py 2011-11-04 05:52:11 UTC (rev 2435)
@@ -26,66 +26,47 @@
import csv
import sqlite3
-import getopt
+import sys
from freeswitch import *
-def get_target(cur, destination):
- cur.execute('select name from sip_buddies where callerid=?', (destination,))
+def execute_cmd(db_loc, cmd):
+ conn = sqlite3.connect(db_loc)
+ cur = conn.cursor()
+ cur.execute(cmd)
res = cur.fetchone()
- if (res):
- return res[0]
- else:
- return res
+ conn.close()
+ return res
-def get_caller_id(cur, caller):
- cur.execute('select callerid from sip_buddies where name=?', (caller,))
- res = cur.fetchone()
- if (res):
- return res[0]
- else:
- return res
-
-def usage(stream, code):
- stream.write("ERROR: %d" % code)
+def err(msg):
+ consoleLog(msg)
exit(1)
-def fsapi(session, stream, env, args):
- db_loc = None
- caller = None
- destination = None
+def parse_and_op(args):
+ sys.stderr.write(args + "\n")
+ args = args.split('|')
+ cmd = args[0]
+ db_loc = getGlobalVariable('openbts_db_loc')
+ if (len(args) > 1):
+ db_loc = args[1]
-
- opts, args = getopt.getopt(args.split(" "), "d:c:t:", ["db=", "caller=", "target="])
+ if not(db_loc):
+ err('Missing DB. Is openbts_db_loc defined?\n')
- for o,a in opts:
- if o in ("-d", "--db="):
- db_loc = a
- elif o in ("-c", "--caller="):
- caller = a
- elif o in ("-t", "--target="):
- destination = a
- else:
- usage(stream,0)
-
- if (not db_loc):
- usage(stream,1)
- if (caller and destination):
- usage(stream,2)
+ try:
+ res = execute_cmd(db_loc, cmd)
+ return str(res[0])
+ except Exception as err:
+ consoleLog('err', str(err) + "\n")
+ exit(1)
- conn = sqlite3.connect(db_loc)
- cur = conn.cursor()
- if (caller):
- stream.write(str(get_caller_id(cur, caller)))
- else:
- stream.write(str(get_target(cur, destination)))
- conn.close()
+def chat(message, args):
+ res = parse_and_op(args)
+ consoleLog('info', "Returned: " + res)
+ message.chat_execute('set', '_openbts_ret=%s' % res)
-#not using this now
-def handler(session,args):
- db_loc = session.getVariable("db_loc")
- caller = session.getVariable("username")
- destination = session.getVariable("destination_number")
- if (db_loc and caller and destination):
- res = get_vars(db_loc, caller, destination)
-
+def fsapi(session, stream, env, args):
+ res = parse_and_op(args)
+ consoleLog('info', "Returned: " + res)
+ if (res):
+ stream.write(str(res))
Modified: software/public/openbts/trunk/FreeswitchConfig/scripts/OpenBTS_New_User.py
===================================================================
--- software/public/openbts/trunk/FreeswitchConfig/scripts/OpenBTS_New_User.py 2011-11-03 21:28:14 UTC (rev 2434)
+++ software/public/openbts/trunk/FreeswitchConfig/scripts/OpenBTS_New_User.py 2011-11-04 05:52:11 UTC (rev 2435)
@@ -86,21 +86,29 @@
def fsapi(session, stream, env, args):
args = args.split('|')
- db_loc = args[0]
- caller = args[1]
- target = args[2]
- port = args[3]
+ if (len(args) < 3):
+ err('Missing Args\n')
+ caller = args[0]
+ target = args[1]
+ port = args[2]
+ db_loc = None
+ if (len(args) == 4):
+ db_loc = args[3]
+
#if they don't all exist
if (not db_loc or db_loc == ''):
db_loc = getGlobalVariable("openbts_db_loc")
- if not (db_loc and caller and target and port):
- err("Missing/Malformed Args \n")
+ if (not db_loc):
+ err("Missing DB. Is openbts_db_loc defined?\n")
+ if not (caller and target and port):
+ err("Malformed Args \n")
+
if (caller == '' or
target == '' or
port == ''):
- err("Missing/Malformed Args \n")
+ err("Malformed Args \n")
stream.write(str(create_user(db_loc, caller, target, port)))
Modified: software/public/openbts/trunk/FreeswitchConfig/scripts/OpenBTS_Parse_SMS.py
===================================================================
--- software/public/openbts/trunk/FreeswitchConfig/scripts/OpenBTS_Parse_SMS.py 2011-11-03 21:28:14 UTC (rev 2434)
+++ software/public/openbts/trunk/FreeswitchConfig/scripts/OpenBTS_Parse_SMS.py 2011-11-04 05:52:11 UTC (rev 2435)
@@ -114,15 +114,21 @@
(rp_dest_address_type, rp_dest_address, rp_message) = get_rp_destination_address(rp_message)
rp_user_data = get_rp_user_data(rp_message)
-#rp_message finished
+ #rp_message finished
(tp_message_type, rp_user_data) = get_tp_message_type(rp_user_data)
(tp_message_reference, rp_user_data) = get_tp_message_reference(rp_user_data)
(tp_dest_address_type, tp_dest_address, rp_user_data) = get_tp_destination_address(rp_user_data)
(tp_protocol_id, rp_user_data) = get_tp_protocol_identifier(rp_user_data)
(tp_data_coding_scheme, rp_user_data) = get_tp_data_coding_scheme(rp_user_data)
- (tp_validity_period, rp_user_data) = get_tp_validity_period(rp_user_data)
+ #check to see if validity period field is there
+ if (int(tp_message_type, 16) & 0x10 == 0):
+ tp_validity_period = None
+ else:
+ (tp_validity_period, rp_user_data) = get_tp_validity_period(rp_user_data)
(tp_user_data, rp_user_data) = get_tp_user_data(rp_user_data)
+ sys.stderr.write(tp_user_data)
+
return {"openbts_rp_message_type" : rp_message_type,
"openbts_rp_message_reference" : rp_message_reference,
"openbts_rp_originator_address" : rp_originator_address,
@@ -136,14 +142,10 @@
"openbts_tp_data_coding_scheme" : tp_data_coding_scheme,
"openbts_tp_validity_period" : tp_validity_period,
"openbts_tp_user_data" : tp_user_data,
- "openbts_text" : messaging.utils.unpack_msg(tp_user_data).encode('UTF8')
+ "openbts_text" : messaging.utils.unpack_msg(tp_user_data).encode('UTF8').rstrip('\0')
}
- if (len(rp_user_data[0]) != rp_user_data[1]): #index equals total
- raise Exception("EXTRA DATA AFTER TP-USER-DATA")
-
def chat(message, args):
- #sys.stderr.write(str(message.serialize()))
try:
content = parse(message.getBody())
for key in content.keys():
@@ -151,7 +153,12 @@
except Exception as err:
consoleLog('err', str(err))
sys.stderr.write(str(err))
+ exit(1)
+def fsapi(session, stream, env, args):
+ consoleLog('err', 'Cannot call Parse_SMS from the FS API\n')
+ exit(1)
+
if __name__ == '__main__':
if (len(sys.argv) < 2):
print ("GIVE IT A HEX STRING!")
Modified: software/public/openbts/trunk/FreeswitchConfig/scripts/OpenBTS_Send_SMS.py
===================================================================
--- software/public/openbts/trunk/FreeswitchConfig/scripts/OpenBTS_Send_SMS.py 2011-11-03 21:28:14 UTC (rev 2434)
+++ software/public/openbts/trunk/FreeswitchConfig/scripts/OpenBTS_Send_SMS.py 2011-11-04 05:52:11 UTC (rev 2435)
@@ -68,8 +68,8 @@
tp_len = (len(tp_header) + len(tp_user_data))/2 #octets, not bytes
return rp_header + gen_hex(tp_len) + tp_header + tp_user_data
-def send_message(to, fromm, text):
- #fromm = 'IMSI641104278340235'
+#forward the message to smqueue for store-and-forwarding
+def send_smqueue_message(to, fromm, text):
event = Event("CUSTOM", "SMS::SEND_MESSAGE")
event.addHeader("proto", "sip");
event.addHeader("dest_proto", "sip");
@@ -82,18 +82,21 @@
event.addHeader("replying", "false");
event.addBody(gen_body(to, text));
- #sys.stderr.write(event.serialize())
event.fire()
def chat(message, args):
args = args.split('|')
+ if (len(args) < 3):
+ consoleLog('err', 'Missing Args\n')
+ exit(1)
to = args[0]
fromm = args[1]
text = args[2]
if ((not to or to == '') or
(not fromm or fromm == '')):
- consoleLog('err', 'Missing Args\n')
- send_message(to, fromm, text)
+ consoleLog('err', 'Malformed Args\n')
+ exit(1)
+ send_smqueue_message(to, fromm, text)
def fsapi(session, stream, env, args):
#chat doesn't use message anyhow
|
|
From: <do_...@wu...> - 2011-11-02 05:39:57
|
Author: kurtis.heimerl Date: 2011-11-02 00:39:50 -0500 (Wed, 02 Nov 2011) New Revision: 2426 Added: software/public/openbts/trunk/FreeswitchConfig/ software/public/openbts/trunk/FreeswitchConfig/chatplan/ software/public/openbts/trunk/FreeswitchConfig/chatplan/openbts-chatplan.xml software/public/openbts/trunk/FreeswitchConfig/dialplan/ software/public/openbts/trunk/FreeswitchConfig/dialplan/openbts-dialplan.xml software/public/openbts/trunk/FreeswitchConfig/scripts/ software/public/openbts/trunk/FreeswitchConfig/scripts/OpenBTS_DB.py software/public/openbts/trunk/FreeswitchConfig/scripts/OpenBTS_New_User.py software/public/openbts/trunk/FreeswitchConfig/scripts/OpenBTS_Parse_SMS.py software/public/openbts/trunk/FreeswitchConfig/scripts/OpenBTS_Send_SMS.py Log: initial FreeSwitch config added to the repository. |
|
From: <do_...@wu...> - 2011-11-02 05:19:29
|
Author: kurtis.heimerl Date: 2011-11-02 00:19:21 -0500 (Wed, 02 Nov 2011) New Revision: 2425 Modified: software/public/openbts/trunk/README Log: local git commit Modified: software/public/openbts/trunk/README =================================================================== --- software/public/openbts/trunk/README 2011-11-02 00:06:34 UTC (rev 2424) +++ software/public/openbts/trunk/README 2011-11-02 05:19:21 UTC (rev 2425) @@ -14,7 +14,6 @@ CommonLib Common-use libraries, mostly C++ wrappers for basic facilities. Control Control-layer functions for the protocols of GSM 04.08 and SIP. GSM The GSM stack. -RRLP Radio Resource Location Protocol SIP Components of the SIP state machines ued by the control layer. SMS The SMS stack. SR The subscriber registry. |
|
From: <do_...@wu...> - 2011-11-02 00:06:41
|
Author: kurtis.heimerl
Date: 2011-11-01 19:06:34 -0500 (Tue, 01 Nov 2011)
New Revision: 2424
Modified:
software/public/openbts/trunk/Transceiver52M/USRPDevice.cpp
software/public/openbts/trunk/Transceiver52M/USRPDevice.h
Log:
Reverting r2342
Modified: software/public/openbts/trunk/Transceiver52M/USRPDevice.cpp
===================================================================
--- software/public/openbts/trunk/Transceiver52M/USRPDevice.cpp 2011-11-01 22:40:52 UTC (rev 2423)
+++ software/public/openbts/trunk/Transceiver52M/USRPDevice.cpp 2011-11-02 00:06:34 UTC (rev 2424)
@@ -133,17 +133,17 @@
if (R==0) return false;
writeLock.lock();
- m_uRx->_write_spi(0,SPI_ENABLE_RX_A,SPI_FMT_MSB | SPI_FMT_HDR_0,
+ m_uRx->_write_spi(0,SPI_ENABLE_RX_B,SPI_FMT_MSB | SPI_FMT_HDR_0,
write_it((R & ~0x3) | 1));
- m_uRx->_write_spi(0,SPI_ENABLE_RX_A,SPI_FMT_MSB | SPI_FMT_HDR_0,
+ m_uRx->_write_spi(0,SPI_ENABLE_RX_B,SPI_FMT_MSB | SPI_FMT_HDR_0,
write_it((control & ~0x3) | 0));
usleep(10000);
- m_uRx->_write_spi(0,SPI_ENABLE_RX_A,SPI_FMT_MSB | SPI_FMT_HDR_0,
+ m_uRx->_write_spi(0,SPI_ENABLE_RX_B,SPI_FMT_MSB | SPI_FMT_HDR_0,
write_it((N & ~0x3) | 2));
writeLock.unlock();
- if (m_uRx->read_io(0) & PLL_LOCK_DETECT) return true;
- if (m_uRx->read_io(0) & PLL_LOCK_DETECT) return true;
+ if (m_uRx->read_io(1) & PLL_LOCK_DETECT) return true;
+ if (m_uRx->read_io(1) & PLL_LOCK_DETECT) return true;
return false;
}
@@ -197,9 +197,6 @@
m_uRx.reset();
return false;
}
- m_uRx->_write_oe(0,0,0xffff);
- m_uRx->_write_oe(0,(POWER_UP|RX_TXN|ENABLE), 0xffff);
- m_uRx->write_io(0,(POWER_UP|RX_TXN),(POWER_UP|RX_TXN|ENABLE));
}
try {
@@ -216,10 +213,6 @@
return false;
}
- m_uTx->_write_oe(0,0,0xffff);
- m_uTx->_write_oe(0,(POWER_UP|RX_TXN|ENABLE), 0xffff);
- m_uTx->write_io(0,(POWER_UP|RX_TXN),(POWER_UP|RX_TXN|ENABLE));
-
if (m_uTx->fpga_master_clock_freq() != masterClockRate)
{
LOG(ALERT) << "WRONG FPGA clock freq = " << m_uTx->fpga_master_clock_freq()
@@ -255,13 +248,9 @@
writeLock.lock();
// power up and configure daughterboards
m_uTx->_write_oe(0,0,0xffff);
-
m_uTx->_write_oe(0,(POWER_UP|RX_TXN|ENABLE), 0xffff);
- //m_uTx->write_io(0,(POWER_UP|RX_TXN),(POWER_UP|RX_TXN|ENABLE));
- //m_uTx->write_io(0,ENABLE,(RX_TXN | ENABLE));
- //m_uTx->write_io(0,(RX_TXN | ENABLE), (RX_TXN | ENABLE));//only for litie
- m_uTx->write_io(0,ENABLE,(POWER_UP|RX_TXN|ENABLE)); /* POWER_UP inverted */
-
+ m_uTx->write_io(0,(~POWER_UP|RX_TXN),(POWER_UP|RX_TXN|ENABLE));
+ m_uTx->write_io(0,ENABLE,(RX_TXN | ENABLE));
m_uTx->_write_fpga_reg(FR_ATR_MASK_0 ,0);//RX_TXN|ENABLE);
m_uTx->_write_fpga_reg(FR_ATR_TXVAL_0,0);//,0 |ENABLE);
m_uTx->_write_fpga_reg(FR_ATR_RXVAL_0,0);//,RX_TXN|0);
@@ -275,20 +264,17 @@
if (!skipRx) {
writeLock.lock();
- m_uRx->_write_fpga_reg(FR_ATR_MASK_0 + 1*3,0);
- m_uRx->_write_fpga_reg(FR_ATR_TXVAL_0 + 1*3,0);
- m_uRx->_write_fpga_reg(FR_ATR_RXVAL_0 + 1*3,0);
- m_uRx->_write_fpga_reg(41,0);
+ m_uRx->_write_fpga_reg(FR_ATR_MASK_0 + 3*3,0);
+ m_uRx->_write_fpga_reg(FR_ATR_TXVAL_0 + 3*3,0);
+ m_uRx->_write_fpga_reg(FR_ATR_RXVAL_0 + 3*3,0);
m_uRx->_write_fpga_reg(43,0);
- m_uRx->_write_oe(0,(POWER_UP|RX_TXN|ENABLE), 0xffff);
- m_uRx->write_io(0,(POWER_UP|RX_TXN|ENABLE),(POWER_UP|RX_TXN|ENABLE));
+ m_uRx->_write_oe(1,(POWER_UP|RX_TXN|ENABLE), 0xffff);
+ m_uRx->write_io(1,(~POWER_UP|RX_TXN|ENABLE),(POWER_UP|RX_TXN|ENABLE));
//m_uRx->write_io(1,0,RX2_RX1N); // using Tx/Rx/
- m_uRx->write_io(0,RX2_RX1N,RX2_RX1N); // using Rx2
- m_uRx->set_adc_buffer_bypass(0,true);
- m_uRx->set_adc_buffer_bypass(1,true);
- m_uRx->set_pga(0,m_uRx->pga_max()); // should be 20dB
- m_uRx->set_pga(1,m_uRx->pga_max());
- m_uRx->set_mux(0x00000010);
+ m_uRx->write_io(1,RX2_RX1N,RX2_RX1N); // using Rx2
+ m_uRx->set_adc_buffer_bypass(2,true);
+ m_uRx->set_adc_buffer_bypass(3,true);
+ m_uRx->set_mux(0x00000032);
writeLock.unlock();
// FIXME -- This should be configurable.
setRxGain(47); //maxRxGain());
@@ -325,7 +311,7 @@
// power down
m_uTx->write_io(0,(~POWER_UP|RX_TXN),(POWER_UP|RX_TXN|ENABLE));
- m_uRx->write_io(0,~POWER_UP,(POWER_UP|ENABLE));
+ m_uRx->write_io(1,~POWER_UP,(POWER_UP|ENABLE));
delete[] currData;
@@ -365,15 +351,15 @@
double rfMax = 70.0;
if (dB > rfMax) {
- m_uRx->set_pga(0,dB-rfMax);
- m_uRx->set_pga(1,dB-rfMax);
+ m_uRx->set_pga(2,dB-rfMax);
+ m_uRx->set_pga(3,dB-rfMax);
dB = rfMax;
}
else {
- m_uRx->set_pga(0,0);
- m_uRx->set_pga(1,0);
+ m_uRx->set_pga(2,0);
+ m_uRx->set_pga(3,0);
}
- m_uRx->write_aux_dac(0,0,
+ m_uRx->write_aux_dac(1,0,
(int) ceil((1.2 + 0.02 - (dB/rfMax))*4096.0/3.3));
LOG(DEBUG) << "Setting DAC voltage to " << (1.2+0.02 - (dB/rfMax)) << " " << (int) ceil((1.2 + 0.02 - (dB/rfMax))*4096.0/3.3);
@@ -552,7 +538,7 @@
#ifndef SWLOOPBACK
if (!m_uTx) return 0;
- static uint32_t outData[128*200];
+ static uint32_t outData[128*20];
for (int i = 0; i < len*2; i++) {
buf[i] = host_to_usrp_short(buf[i]);
@@ -603,7 +589,7 @@
#ifndef SWLOOPBACK
short data[] = {0x00,0x02,0x00,0x00};
uint32_t *wordPtr = (uint32_t *) data;
- //*wordPtr = host_to_usrp_u32(*wordPtr);
+ *wordPtr = host_to_usrp_u32(*wordPtr);
bool tmpUnderrun;
if (writeSamples((short *) data,1,&tmpUnderrun,timestamp & 0x0ffffffffll,true)) {
pingTimestamp = timestamp;
@@ -622,7 +608,6 @@
if (!tx_setFreq(wFreq+1*LO_OFFSET,&actFreq)) return false;
bool retVal = m_uTx->set_tx_freq(0,(wFreq-actFreq));
LOG(INFO) << "set TX: " << wFreq-actFreq << " actual TX: " << m_uTx->tx_freq(0);
- //m_uTx->write_io(0,RX_TXN,RX_TXN);
return retVal;
};
@@ -637,7 +622,6 @@
if (!rx_setFreq(wFreq-2*LO_OFFSET,&actFreq)) return false;
bool retVal = m_uRx->set_rx_freq(0,(wFreq-actFreq));
LOG(DEBUG) << "set RX: " << wFreq-actFreq << " actual RX: " << m_uRx->rx_freq(0);
- //m_uRx->write_io(0,RX_TXN,RX_TXN);
return retVal;
};
Modified: software/public/openbts/trunk/Transceiver52M/USRPDevice.h
===================================================================
--- software/public/openbts/trunk/Transceiver52M/USRPDevice.h 2011-11-01 22:40:52 UTC (rev 2423)
+++ software/public/openbts/trunk/Transceiver52M/USRPDevice.h 2011-11-02 00:06:34 UTC (rev 2424)
@@ -215,10 +215,10 @@
bool setRxFreq(double wFreq);
/** Returns the starting write Timestamp*/
- TIMESTAMP initialWriteTimestamp(void) { return 40000;}
+ TIMESTAMP initialWriteTimestamp(void) { return 20000;}
/** Returns the starting read Timestamp*/
- TIMESTAMP initialReadTimestamp(void) { return 40000;}
+ TIMESTAMP initialReadTimestamp(void) { return 20000;}
/** returns the full-scale transmit amplitude **/
double fullScaleInputValue() {return 13500.0;}
|