aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2013-06-24umtrx: set timing offset and clocking frequencyThomas Tsou1-2/+2
Measured offset and set to zero based on Nokia 3120 handset. Signed-off-by: Thomas Tsou <tom@tsou.cc>
2013-06-24Transceier52M: Make error response to an unknown command on UDP command ↵Alexander Chemeris1-0/+1
interface more understandable. Previously we just repeated the last response which could confuse a command sender.
2013-06-24Transceiver52M: Check for correctly set TSC before setting timeslot types.Alexander Chemeris2-6/+7
2013-06-24Modified fillerTable usage in pushRadioVector function.Ivan Kluchnikov1-4/+21
Now we put to fillerTable only frames of BEACON channels, all others frames in fillerTable are dummy bursts.
2013-06-24umtrx: flush any possible garbage bursts at startThomas Tsou1-5/+7
In certain cases (higher sample-per-symbol counts), there is some sensitivity to either timeouts or bad metadata on the first packet. The first packet sets the transceiver clock, so this is essential. As a workaround, drop the first 50 packets to guarantee that we get a packet with a valid timestamp Signed-off-by: Thomas Tsou <ttsou@vt.edu>
2013-06-24transceiver: workaround for transmit testing with no clock resetThomas Tsou2-4/+17
Non-functional clock reset causes huge initial timing offset between expected and received timestamps. Receive an initial packet to 'set' the expected starting timestamp value for both transmit and receive. Signed-off-by: Thomas Tsou <ttsou@vt.edu>
2013-06-24Transceiver52M: add antenna selection from configurationThomas Tsou3-0/+45
Set optional transmit and receive antennas from database configuration file. Use default antenna values on empty string or if option does not exist. Signed-off-by: Thomas Tsou <tom@tsou.cc>
2013-06-16Fix build of the Transceiver.Alexander Chemeris6-4/+10
2013-06-16Checking in build system for the Transceiver.Alexander Chemeris19-0/+149116
2013-06-15Transceiver52M: Add more complete specification of GPRS typesttsou2-8/+20
Submitted by: Ivan Kluchnikov <kluchnikovi@gmail.com> Signed-off-by: Thomas Tsou <tom@tsou.cc> git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@5690 19bc5d8c-e614-43d4-8b26-e1612bc8e597
2013-06-15Transceiver52M: Add GPRS combinations to correlation typesttsou2-1/+8
Submitted-by: Andreas Eversberg <jolly@eversberg.eu> Signed-off-by: Thomas Tsou <tom@tsou.cc> git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@5677 19bc5d8c-e614-43d4-8b26-e1612bc8e597
2013-05-31syncing commonlibs with Many thanks to Michael Iedema for these patches, ↵kurtis.heimerl25-215/+2034
makes config a lot better. git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@5655 19bc5d8c-e614-43d4-8b26-e1612bc8e597
2013-04-04Transceiver52M: Fix calculation of TS correlation for 2 sps and higherttsou1-2/+2
The correlation starting point for normal burst training sequence calculation should be a scaled value of the same symbol regardless of the samples-per-symbol used. Use of 2 samples-per-symbols double the index values, but yields the following outputs, which results in a late time-of-arrival value at the output of the correlation. This patch modifies the parameter calculation accordingly. 1 sps parameters maxTOA = 3 spanTOA = 5; startIx = 61; endIx = 87; windowLen = 26; corrLen = 7; 2 sps parameters (errant case) maxTOA = 6; spanTOA = 10; startIx = 112; endIx = 184; windowLen = 72; corrLen =13; 2 sps parameters (corrected) maxTOA = 6; spanTOA = 10; startIx = 122; endIx = 174; windowLen = 52; corrLen =13; Signed-off-by: Thomas Tsou <tom@tsou.cc> git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@5183 19bc5d8c-e614-43d4-8b26-e1612bc8e597
2013-03-27Transceiver52: allow for handling of TCH/H slotsttsou1-4/+1
Although currently unsupported in GSM core, enable TCH/H support in Transceiver52M for testing and future availability. Signed-off-by: Thomas Tsou <tom@tsou.cc> git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@5169 19bc5d8c-e614-43d4-8b26-e1612bc8e597
2013-02-15Synced sqlite3utils with private and fixed a small recursive bug in ↵kurtis.heimerl1-8/+15
SIPEngine that was already fixed in private git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@4912 19bc5d8c-e614-43d4-8b26-e1612bc8e597
2012-12-22Correction of trivial warnings.kurtis.heimerl3-4/+4
git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@4670 19bc5d8c-e614-43d4-8b26-e1612bc8e597
2012-12-17From b453f10d65dd1ff1df0dd3747adf63f4e1fd7d30 Mon Sep 17 00:00:00 2001kurtis.heimerl1-11/+34
From: Alexander Chemeris <Alexander.Chemeris@gmail.com> Date: Sun, 16 Dec 2012 17:44:10 +0400 Subject: [PATCH] Use gethostbyname2_r() instead of gethostbyname() if available. gethostbyname() is not thread-safe. It's recommended to use gethostbyname_r() or gethostbyname2_r() instead. --- CommonLibs/Sockets.cpp | 44 +++++++++++++++++++++++++++++++++----------- configure.ac | 4 ++++ 2 files changed, 37 insertions(+), 11 deletions(-) git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@4637 19bc5d8c-e614-43d4-8b26-e1612bc8e597
2012-12-17From 32bbfc3c89b1c56672bf2fd3660a45c513ac54d4 Mon Sep 17 00:00:00 2001kurtis.heimerl1-2/+2
From: Alexander Chemeris <Alexander.Chemeris@gmail.com> Date: Sun, 16 Dec 2012 17:33:46 +0400 Subject: [PATCH 1/4] Fix typos in comments. --- CommonLibs/Logger.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@4635 19bc5d8c-e614-43d4-8b26-e1612bc8e597
2012-12-16Transceiver52M: Read IP address and port to bind to from a configuration ↵ttsou1-1/+1
instead of hardcoding them. Signed-off-by: Thomas Tsou <tom@tsou.cc> git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@4634 19bc5d8c-e614-43d4-8b26-e1612bc8e597
2012-12-16Transceiver52M: Properly pass samplerate to RadioDevice::make()ttsou1-1/+1
Without this patch, if SAMPSPERSYM is set bigger than 1, then erratic behaviour will occur. Signed-off-by: Thomas Tsou <tom@tsou.cc> git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@4633 19bc5d8c-e614-43d4-8b26-e1612bc8e597
2012-12-16OH GOOD GIT MISSED THESE FILES THANKS GITkurtis.heimerl2-0/+231
git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@4630 19bc5d8c-e614-43d4-8b26-e1612bc8e597
2012-12-16Sylvain patch #2, with modifications:kurtis.heimerl5-17/+25
CommonLibs: Avoid direct syslog calls in ConfigurationTable We instead introduce a 'log early' facility in Logger.h to accomplish the same Signed-off-by: Sylvain Munaut <tnt@246tNt.com> I added similar code to the reporting functions, which did not exist when sylvain made this patch git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@4629 19bc5d8c-e614-43d4-8b26-e1612bc8e597
2012-12-16Patch 4545 in private:kurtis.heimerl2-3/+12
Added support for performance-reporting counters. and Patch 4588 in private: For some reason, ReportingTest won't build on all systems. Since it is not part of the actuall application, I am commenting it out from the Makefile.am for now. git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@4627 19bc5d8c-e614-43d4-8b26-e1612bc8e597
2012-12-06transceiver52m: reset energy threshold on receive gain changesttsou1-1/+4
The adaptive energy detection threshold does not scale relative to signal level. In other words, the adjustment factor will be the same whether the at 40% of signal level or 4%. If the receive gain is reduced by a large amount, suppose 20 dB, the receiver may take minutes to adjust to the new level. When the receive gain is changed, reset the threshold back to the initial level. This reduces issues of runtime gain adjustment and prevents blocking bursts while the threhold level slowly adjusts. Signed-off-by: Thomas Tsou <tom@tsou.cc> git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@4595 19bc5d8c-e614-43d4-8b26-e1612bc8e597
2012-11-23missed something in one of the socket patches. now works as expectedkurtis.heimerl1-0/+1
git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@4516 19bc5d8c-e614-43d4-8b26-e1612bc8e597
2012-11-23Alexander's patches:kurtis.heimerl3-5/+4
1)I did an experiment and compiled OpenBTS with clang yesterday, which immediately highlighted two potential bugs in the Transceiver52 code. I'm not sure they are indeed bugs and not the intended behavior, but they look very much like that. The first one is below and the second one is in the following mail. GSM::Time() arguments are defined like #define USB_LATENCY_INTRVL (10,0), which means that they are expanded into GSM::Time((10,0)). This expression is a GSM::Time() with a single parameter where (10,0) return value of the last argument, 0 in this case. I.e. GSM::Time((10,0)) is equivalent to GSM::Time(0). I think this was not the intention. 2) Printing \n after every complex number breaks output when you want to print it in a single line, e.g. in many debug output. I do not claim any copyright over this change, as it's very basic. Looking forward to see it merged into mainline. git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@4515 19bc5d8c-e614-43d4-8b26-e1612bc8e597
2012-11-23r4425 in private:kurtis.heimerl1-1/+2
Double check the FD set to be sure that the correct FD was really touched. git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@4513 19bc5d8c-e614-43d4-8b26-e1612bc8e597
2012-11-23r4408 in private:kurtis.heimerl1-1/+1
Add code from David to keep the transceiver running when OpenBTS crashes and check if it is running when starting up. git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@4512 19bc5d8c-e614-43d4-8b26-e1612bc8e597
2012-11-22Oh kay. Lots of patches trying to catch up to mainline:kurtis.heimerl1-0/+2
r4232: Major change in hos entries are removed from a TransactionTable. >From now on, the only place were entries are actually removed is in TransactionTable::innerRemove. Anywhere else, the remove methods just set a flag to tag the entry for later removal be innerRemove. This allows us to survive situations where we try to touch transactions that have been removed already. We still log at the ERR level, but no more segfaults. Updated all of the TransactionTable "find" methods to not return pointers to dead or removed tranactions. Updated find-by-channel search to return the transaction entry with the highest transaction number, which fixes a bug that sometimes picked up the wrong transaction records during EA TCH assignment. r4253: New exception class for when someone tries to use a "removed" transaction. r4254: Updated copyright notice. r4265: Unlock TransactionEntry::mLock while blocked on SIP message FIFOs in SIPEngine. This does wonders to reduce lock contention and make everything more snappy. Use Mutex::tryLock in TransactionEntry::dead and if lock is held, assume that it is not dead. This also does a lot to reduce lock contention. r4294: Change Um congestion response back to SIP 503. r4295: When deleting an entry that has failed to respond to paging, send a SIP 480 response so the switch knows that transaction is dead. r4412: Fixed bug that was causing SIPInterface to crash when the IMSI cannot be extracted from the To: header. git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@4497 19bc5d8c-e614-43d4-8b26-e1612bc8e597
2012-11-14Alexander's patch #1:kurtis.heimerl3-2/+180
This patch makes a step towards using a system-wide sqlite3 lib. It moves sqlite3util.cpp/.h to CommonLibs and leaves only original sqlite3 files in the sqlite3 dir of OpenBTS. I do not claim any copyright over this change, as it's very basic. Looking forward to see it merged into mainline. git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@4467 19bc5d8c-e614-43d4-8b26-e1612bc8e597
2012-11-11Alexander's patch #3: Configuration Tests should not include crashingkurtis.heimerl1-1/+5
git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@4459 19bc5d8c-e614-43d4-8b26-e1612bc8e597
2012-10-26merged private Config to public: r4211:kurtis.heimerl3-36/+267
Changes to ConfigurationTable class. Cleaner locking operations, fewer messages for normal operations, ALERT logging for truly abnormal operations. git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@4348 19bc5d8c-e614-43d4-8b26-e1612bc8e597
2012-10-22Transceiver52M: UHD: Setup option to pass arguments from command linettsou6-10/+22
UHD accepts optional 'args' that can be used for device descriptions such as IP address, device type, etc. Allow these to be passed in on the transceiver command line as the third argument (number of supported carriers is the second argument). This option benefits those who may have multiple UHD devices attached to a single system. This option is not yet supported by GSM core and requires starting the transceiver independently on the command line. This option has no effect when USRP1 is used. Signed-off-by: Thomas Tsou <tom@tsou.cc> git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@4315 19bc5d8c-e614-43d4-8b26-e1612bc8e597
2012-08-08transceiver: uhd: prevent output of underrun message at ERROR levelttsou1-4/+8
The appearance of underruns on B100 due to the latency transmit window scares people. These should not be logged at ERROR level because the events are generally not real errors. So use the same behaviour of USRP1 of not logging these events. The presence of underrun events can be determined by changes in the latency window that is shown with log level set at INFO. Signed-off-by: Thomas Tsou <ttsou@vt.edu> git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@3988 19bc5d8c-e614-43d4-8b26-e1612bc8e597
2012-08-08transceiver: uhd: allow underrun flag to reset during timing alignmentttsou1-1/+1
Allowing the underrun flag to reset will prevent a single event from causing large jumps in the transmit latency threshold. This should keep unreasonable timing latencies from occurring (e.g. latencies of 20+ frames). git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@3981 19bc5d8c-e614-43d4-8b26-e1612bc8e597
2012-08-08transceiver: b100: raise minimum transmit latency valuettsou1-3/+13
Put a floor on the transmit latency of the B100 in order to suppress underruns in typical conditions. Empirical data from a handful of relatively recent machines shows that the B100 will underrun when the transmit threshold is reduced to a time of 6 and a half frames, so we set a minimum 7 frame threshold. The overall benefit should be marginal and may increase the possibility of bursts arriving stale (after the trasmit deadline), but will reduce the number of alarming UHD related messages that appear in the log file. This patch is UHD and B100 specific - USRP1 is unaffected. Signed-off-by: Thomas Tsou <ttsou@vt.edu> git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@3980 19bc5d8c-e614-43d4-8b26-e1612bc8e597
2012-07-22Public release now works with g++4.7. In 4.7, unistd.h is no longer imported ↵kurtis.heimerl2-1/+2
by default git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@3918 19bc5d8c-e614-43d4-8b26-e1612bc8e597
2012-03-13transceiver, usrp1: fix transmit gain setting bugttsou1-1/+1
Transmit gain setting would deceptively set the receive gain instead. Since transmit attenuation is a combination of RF gain and digital scaling, this major copy/paste bug may have gone unnoticed by many users. Reported-by: Robin Coxe <coxe@close-haul.com> Signed-off-by: Thomas Tsou <ttsou@vt.edu> git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@3309 19bc5d8c-e614-43d4-8b26-e1612bc8e597
2012-03-13transceiver, uhd: output timestamps on monontonic errorttsou1-2/+2
The "Loss of monotonic time" error occurs when a timestamp arrives from the device that is earlier in time than the previous timestamp. The output is an ALERT level message generally accompanied by a transmit side timeout from the device. UHD: Loss of monotonic time UHD: Loss of monotonic time UHD: Device send timed out Add to the error description the timestamp values that generated the error and output with ALERT rather than ERR log. Signed-off-by: Thomas Tsou <ttsou@vt.edu> git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@3307 19bc5d8c-e614-43d4-8b26-e1612bc8e597
2012-03-08Harvind found a bug in BitVector.cpp:kurtis.heimerl1-1/+1
Basically the unpack method and fillField method assume MSB-first bit packing. The unpack method calls fillField for each byte that needs to be unpacked. The problem occurs on its final call to fillField when it has a partial byte to unpack; it uses the LSB bits instead of the MSB bits. git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@3288 19bc5d8c-e614-43d4-8b26-e1612bc8e597
2012-02-14transceiver, uhd: fix build error due to log levelttsou1-1/+1
Previous commit r3181 used a 2.6 logging level. ALARM->ALERT Fix for 2.8 levels. Signed-off-by: Thomas Tsou <ttsou@vt.edu> git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@3187 19bc5d8c-e614-43d4-8b26-e1612bc8e597
2012-02-14transceiver, uhd: display device information on make failurettsou1-1/+1
The failure "UHD make failed" implies that a suitable device was found, but construction failed. Output the the found target device information along with message. Signed-off-by: Thomas Tsou <ttsou@vt.edu> git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@3181 19bc5d8c-e614-43d4-8b26-e1612bc8e597
2012-01-09transceiver, uhd: alert user on unrecoverable errorsttsou1-5/+13
Unrecoverable device errors include send and receive timeouts and mangled packets. Other device errors, such as non-monotonic timestamps are sometimes recoverable through a soft restart. These fatal are generally limited to development versions of UHD driver or device firmware, but can occur in release versions. Alert user on such device errors along with current UHD version. Signed-off-by: Thomas Tsou <ttsou@vt.edu> git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@3012 19bc5d8c-e614-43d4-8b26-e1612bc8e597
2011-12-24Locking gethostbyname call, as Alexander notes that it is not thread safekurtis.heimerl1-3/+4
git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@2865 19bc5d8c-e614-43d4-8b26-e1612bc8e597
2011-12-17Reverted bad function header. There are no timing inversion deadlocks, I ↵kurtis.heimerl1-1/+0
made those up. git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@2836 19bc5d8c-e614-43d4-8b26-e1612bc8e597
2011-12-17Alexander's change. Fixes MTC bug by supporting 64bit processors in Timeval. ↵kurtis.heimerl1-2/+2
Math was bad. git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@2835 19bc5d8c-e614-43d4-8b26-e1612bc8e597
2011-12-15Fixing Thomas's MTC receive bug. We don't have a ticket for it, but there ↵kurtis.heimerl1-0/+1
seemed to be a timing inversion deadlock in Interthread.h. We mostly duck it, instead of solving it. git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@2822 19bc5d8c-e614-43d4-8b26-e1612bc8e597
2011-12-15Matching UHD changes in gnuradiokurtis.heimerl1-3/+3
git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@2817 19bc5d8c-e614-43d4-8b26-e1612bc8e597
2011-11-28transceiver52M: bump critial errors to ALERT levelkurtis.heimerl3-6/+8
Device errors regarding properties such as sample rate or frequency tuning are almost always fatal and lead to the common error "assuming TRX is dead". Make sure that these errors are clearly presented to the user. Signed-off-by: Thomas Tsou <ttsou@vt.edu> git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@2700 19bc5d8c-e614-43d4-8b26-e1612bc8e597
2011-11-28transceiver, uhd: exit informatively if no devices are foundkurtis.heimerl1-4/+11
Perform a UHD device search before constructing the object, and inform the user if no device is found. No device found is the most common reason for the transceiver to fail with the dreaded error "assuming TRX is dead". Signed-off-by: Thomas Tsou <ttsou@vt.edu> git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@2699 19bc5d8c-e614-43d4-8b26-e1612bc8e597