325 Commits

Author SHA1 Message Date
Michael Iedema
529d0388d4 prep for v4.0.0 tag v4.0.0 2014-03-26 01:01:25 +01:00
Michael Iedema
cdcf1cdebe - drop back to branch 4.0 versioning 2014-03-25 23:33:30 +01:00
Michael Iedema
822941d019 - lock submodules to 4.0
- bump version for 4.0.0 tag
2014-03-25 23:25:12 +01:00
Michael Iedema
eb93d0da84 - strip unsupported config keys from audit cross check 2014-03-25 21:14:04 +01:00
Michael Iedema
56b34aeeb9 - reference public liba53, not the commercial range-liba53 2014-03-25 20:00:53 +01:00
Michael Iedema
fbe5202745 regenerate OpenBTS.example.sql 2014-03-25 02:05:49 +01:00
Michael Iedema
93825536fe fixup building where we do not have an a5/3 packages for shlibs
update NodeManager after commit within
ignore more stuff locally
2014-03-25 02:02:30 +01:00
Michael Iedema
c13f8bde8f merged in commercial openbts 2014-03-25 00:06:30 +01:00
Michael Iedema
9ab1b0d9d5 update submodules, ignore more stuff 2014-03-22 16:25:07 +01:00
Michael Iedema
1444e7b186 replicating svn:externals behavior with git modules tracking master (git >-1.8.2 needed to support this) 2014-03-22 15:44:23 +01:00
Thomas Tsou
e5aa3f9975 Transceiver52M: Set B2XX clock frequency to 26 MHz
Change from the original USRP1 rate of 52 MHz. On B2XX we can use
26 MHz, which is closer to the default 32 MHz of the device.

Signed-off-by: Thomas Tsou <tom@tsou.cc>

git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@7530 19bc5d8c-e614-43d4-8b26-e1612bc8e597
2014-02-13 21:00:22 +00:00
Harvind Samra
2254ed7f61 Fix incorrect buffer management in send and rcv buffering.
git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@7258 19bc5d8c-e614-43d4-8b26-e1612bc8e597
2014-01-14 02:29:55 +00:00
Kurtis Heimerl
ae2591f20e Fixes handover assert. Basically, an earlier patch changed the RTP packet size.
git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@7154 19bc5d8c-e614-43d4-8b26-e1612bc8e597
2013-12-31 00:44:10 +00:00
Thomas Tsou
f889ede9ba Transceiver52M: Fix SSE preprocessor definition
Using non-SSE4.1 enabled architecture would cause undefined
reference to 'convert_si16_ps' call.

Signed-off-by: Thomas Tsou <tom@tsou.cc>

git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@6844 19bc5d8c-e614-43d4-8b26-e1612bc8e597
2013-11-08 04:11:28 +00:00
Thomas Tsou
b8b6625287 Transceiver52M: Reset overrun and underrun indicators
Underruns are only explicitly set on the downlink side. Overruns
are logged but unused. In either case, reset indicators to false
to avoid sending false state information.

Signed-off-by: Thomas Tsou <tom@tsou.cc>

git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@6817 19bc5d8c-e614-43d4-8b26-e1612bc8e597
2013-10-25 14:42:00 +00:00
Thomas Tsou
ece2c027a5 Transceiver52M: Update RSSI calculation
Use the same measurement method for RSSI as the noise level. Previous
method was to use the peak correlation amplitude relative to the
expected value. This created two very different amplitude approaches
between the noise measurement and RSSI measurement, which would
throw off the upper layer MS power control loop.

Signed-off-by: Thomas Tsou <tom@tsou.cc>

git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@6761 19bc5d8c-e614-43d4-8b26-e1612bc8e597
2013-10-18 14:59:57 +00:00
Kurtis Heimerl
a795f499a3 small bug fixes from last patch
git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@6759 19bc5d8c-e614-43d4-8b26-e1612bc8e597
2013-10-18 07:21:40 +00:00
Kurtis Heimerl
50a65783f8 Patching cleaning up rotted code. Now able to select device to run for both 52M and RAD1 from a config variable. Also fixed RAD1 not listening to TRX.Port or TRX.IP.
git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@6757 19bc5d8c-e614-43d4-8b26-e1612bc8e597
2013-10-18 06:10:23 +00:00
Thomas Tsou
0e3a904814 Transceiver52M: Update noise measurement calculation
Previous removal of the energy detector requirement broke
the noise level calculation loop. The previous adaptive
approach was finicky - noticably at high gain levels. Since
we no longer use the energy threshold for primary burst gating,
we can return to a simpler world.

In the new approach, we compute a running average of energy
levels and track them with a noise vector. A timeslot that
passes the correlator threshold is a valid burst. These are
not used in the noise calculation. Everything else is
considered noise and used to compute the noise level with
respect to full scale input level, which for almost all
supported devices is 2^15.

Signed-off-by: Thomas Tsou <tom@tsou.cc>

git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@6755 19bc5d8c-e614-43d4-8b26-e1612bc8e597
2013-10-18 01:45:41 +00:00
Thomas Tsou
cf111aaad1 Transceiver52M: Move reference select from compile time to database
Enabling the external reference on UHD devices through the configure
time switch is awkward. Use a database variable "TRX.Reference" with
'0' or '1' value for internal and external references respectively.
Use internal reference is no entry is defined.

Signed-off-by: Thomas Tsou <tom@tsou.cc>

git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@6754 19bc5d8c-e614-43d4-8b26-e1612bc8e597
2013-10-17 06:19:30 +00:00
Thomas Tsou
f8b26f9aba Transceiver52M: Delay UHD messaging registration until after start
We want to push UHD logs to the OpenBTS logging system, but most
device errors occur at startup, so keep the output on stdout until
after device initialization. That way obvious errors are easily
viewable before seeing the useless TRX timeout message.

Signed-off-by: Thomas Tsou <tom@tsou.cc>

git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@6753 19bc5d8c-e614-43d4-8b26-e1612bc8e597
2013-10-17 06:19:26 +00:00
Thomas Tsou
a03aa57de4 Transceiver52M: Deallocate high level resources on shutdown
This primarily addresses the error case at initialization.
In the event that the transceiver fails to start, we should
be able cleanly shutdown and release while providing a useful
reason for exiting.

After the radio is started and threads launched, there
are no thread state variables or shutdown messaging between
threads, and the transceiver cannot be consistently
shutdown. This issue remains to be solved.

Signed-off-by: Thomas Tsou <tom@tsou.cc>

git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@6752 19bc5d8c-e614-43d4-8b26-e1612bc8e597
2013-10-17 06:19:23 +00:00
Thomas Tsou
8794ac38c7 Transceiver52M: Reduce and place bounds checking on I/O buffers
Previous send and receive buffers at the radio interface were
arbitrarily set to a sufficient size. For normal (non-resampling)
devices, use a block (chunk) size of 625 samples. For 64 or 100
MHz resampling devices, use 4 times the reduced resampling
numerator or denominator and provide bounds checking where
appropriate.

Signed-off-by: Thomas Tsou <tom@tsou.cc>

git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@6751 19bc5d8c-e614-43d4-8b26-e1612bc8e597
2013-10-17 06:19:19 +00:00
Thomas Tsou
85c5a93f2c Transceiver52M: Add 64 MHz resampling option with B100
Move B100 to the resampling interface with default
clocking. This temporarily resolves undetermined
FPGA clocking issues. This also provides extensible
support for multiple clocking rates and resampling
ratios.

Signed-off-by: Thomas Tsou <tom@tsou.cc>

git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@6750 19bc5d8c-e614-43d4-8b26-e1612bc8e597
2013-10-17 06:19:16 +00:00
Thomas Tsou
2a8f0adbb9 Transceiver52M: Remove support for ancient libusrp versions
Current functionality with these old versions is questionable.
There is no reason to use any version of GNU Radio / libusrp older
than 3.3. Version 3.4.2 is the only recommended version for USRP1
users.

Non-USRP1 users must use UHD driver from Ettus Research.

Signed-off-by: Thomas Tsou <tom@tsou.cc>

git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@6749 19bc5d8c-e614-43d4-8b26-e1612bc8e597
2013-10-17 06:19:12 +00:00
Thomas Tsou
52795e97f7 Transceiver52M: Add B210 support
Identical to B200 support, but explicitly check for the device type
name.

Signed-off-by: Thomas Tsou <tom@tsou.cc>

git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@6748 19bc5d8c-e614-43d4-8b26-e1612bc8e597
2013-10-17 06:19:08 +00:00
Thomas Tsou
22bc28edc4 Transceiver52M: Setup dual sample rate transceiver
This patch applies oversampling, when selected with 4 sps,
to the downlink only, while running the receiver with
minimal sampling at 1 sps. These split sample rates allow
us to run a highly accurate downlink signal with minimal
distortion, while keeping receive path channel filtering
on the FPGA.

Without this patch, we oversample the receive path and
require a steep receive filter to get similar adjacent
channel suppression as the FPGA halfband / CIC filter
combination, which comes with a high computational cost.

Signed-off-by: Thomas Tsou <tom@tsou.cc>

git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@6747 19bc5d8c-e614-43d4-8b26-e1612bc8e597
2013-10-17 06:19:05 +00:00
Thomas Tsou
8652b22386 Transceiver52M: Generate delay filter with SSE memory alignment
This requires an additional memcpy() on the signal vector
constructor, but allows the interpolation filter to use
SSE optimzationed convolution.

Signed-off-by: Thomas Tsou <tom@tsou.cc>

git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@6746 19bc5d8c-e614-43d4-8b26-e1612bc8e597
2013-10-17 06:18:59 +00:00
Thomas Tsou
efdcd66a2f Transceiver52M: Separate main transmit and receive drive threads
This patch primarily addresses observed repeated overrun
conditions in embedded environments - namely ARM.

The heartbeat of the transceiver is derived from the receive
sample stream, which drives the main GSM clock. Detach the
transmit thread from the receive loop to avoid interfering with
the receive I/O, which is sensitive to overrun conditions if
pull process is interrupted.

Signed-off-by: Thomas Tsou <tom@tsou.cc>

git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@6745 19bc5d8c-e614-43d4-8b26-e1612bc8e597
2013-10-17 06:18:56 +00:00
Thomas Tsou
97d44b5d60 Transceiver52M: Disable equalization
Unsupported at 4 sps, and performance benefits remain
to be proven at 1 sps. Disable until further testing.

Signed-off-by: Thomas Tsou <tom@tsou.cc>

git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@6744 19bc5d8c-e614-43d4-8b26-e1612bc8e597
2013-10-17 06:18:53 +00:00
Thomas Tsou
914fe4e164 Transceiver52M: Reduce RACH and TSC correlation windows
Start the correlation search window at 4 symbols before
the expected correlation peak. End the search at 10
symbols and 4 + maximum expected delay for RACH and TSC
bursts respectively.

This change lowers receive side cpu utilization while
maintaining reasonable timing jitter and accuracy tolerance.

Signed-off-by: Thomas Tsou <tom@tsou.cc>

git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@6743 19bc5d8c-e614-43d4-8b26-e1612bc8e597
2013-10-17 06:18:49 +00:00
Thomas Tsou
4bd5f6e64a Transceiver52M: Narrow resampling filter bandwidth
This patch only applies to resampling use at 4 samples-per-symbol.
By extention that means only USRP2 / N2xx devices are affected.
At 4 samples-per-symbol we restrict output bandwidth to roughly
roughly 700 MHz, which combined with the 2 pulse Laurent
approximation yields < 0.5 degrees of RMS phase error at the
resampler output.

Signed-off-by: Thomas Tsou <tom@tsou.cc>

git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@6742 19bc5d8c-e614-43d4-8b26-e1612bc8e597
2013-10-17 06:18:46 +00:00
Thomas Tsou
b8ad607382 Transceiver52M: Add B200 support
Set master clock rate to 52 MHz for B200. Also, we want to avoid
floating point comparison errors on clock rate settings, but we
expect to be able really set the rates we specify. Set the
offset limit to 1 Hz. If we can't set our rates with that level
of precision, then something is wrong.

Signed-off-by: Thomas Tsou <tom@tsou.cc>

git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@6741 19bc5d8c-e614-43d4-8b26-e1612bc8e597
2013-10-17 06:18:43 +00:00
Thomas Tsou
43d3fcfa76 Transceiver52M: Setup dual Laurent pulse shaping filter
Provides substantially improved transmit phase error
performance when enabled. Requires use of 4 samples
per symbol, and is enabled by default when set.

Signed-off-by: Thomas Tsou <tom@tsou.cc>

git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@6740 19bc5d8c-e614-43d4-8b26-e1612bc8e597
2013-10-17 06:18:39 +00:00
Thomas Tsou
58d1896ae8 Transceiver52M: Check that sample rates are sane before using
If there is an error in the sample rate determination, noted
by a negative return sample rate value, error directly and
don't try to set the device rate.

Signed-off-by: Thomas Tsou <tom@tsou.cc>

git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@6739 19bc5d8c-e614-43d4-8b26-e1612bc8e597
2013-10-17 06:18:36 +00:00
Thomas Tsou
abc5f65b0e Transceiver52M: Refactor RACH and normal burst detection
Both RACH and normal bursts are detected with the same approach of
midamble correlation combined with peak-to-average ratio. The
difference is the midamble placements and lengths. Thus, there is
no reason to have independent implementations.

This patch creates a common call burstDetect(), while leaving the
correlation window indexing in the original calls.

Signed-off-by: Thomas Tsou <tom@tsou.cc>

git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@6738 19bc5d8c-e614-43d4-8b26-e1612bc8e597
2013-10-17 06:18:32 +00:00
Thomas Tsou
e6d3c22c56 Transceiver52M: Add UmTRX support
Requires Fairwaves UHD driver.

  https://github.com/chemeris/UHD-Fairwaves.git

Signed-off-by: Thomas Tsou <tom@tsou.cc>

git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@6737 19bc5d8c-e614-43d4-8b26-e1612bc8e597
2013-10-17 06:18:29 +00:00
Thomas Tsou
d2193d4c18 Transceiver52M: Add 4 samples-per-symbol Laurent pulse shape
When 4 samples-per-symbol operation is selected, replace the
existing pulse approximation, which becomes inaccurate with
non-unit oversampling, with the primary pulse, C0, from the
Laurent linear pulse approximation.

Pierre Laurent, "Exact and Approximate Construction of Digital Phase
  Modulations by Superposition of Amplitude Modulated Pulses", IEEE
  Transactions of Communications, Vol. 34, No. 2, Feb 1986.

Octave pulse generation code for the first three pulses of the
linear approximation are included.

Signed-off-by: Thomas Tsou <tom@tsou.cc>

git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@6736 19bc5d8c-e614-43d4-8b26-e1612bc8e597
2013-10-17 06:18:26 +00:00
Thomas Tsou
1d7e468b06 Transceiver52M: Disable energy detector
The adaptive energy threshold gating suffers a near-far problem
at certain gain levels. This is due to exponential threshold
raising, but linear decreases. A large signal level followed by
a period low signal level causes (comparatively) weak signals to
go undetected. Additionally, the algorithm performs differently
at multiple RF gain levels.

This patch switches solely to correlation based gating for burst
detection. The main computational load with this approach is
sub-sample width peak interpolation, which we disable for intial
detection and run after threshold passing.

Signed-off-by: Thomas Tsou <tom@tsou.cc>

git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@6735 19bc5d8c-e614-43d4-8b26-e1612bc8e597
2013-10-17 06:18:22 +00:00
Thomas Tsou
7251140a21 Transceiver52M: Add SSE floating point / integer conversion
Convertions are performed in multiples of 4 or 8. All loads are
considered unaligned.

Signed-off-by: Thomas Tsou <tom@tsou.cc>

git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@6734 19bc5d8c-e614-43d4-8b26-e1612bc8e597
2013-10-17 06:18:18 +00:00
Thomas Tsou
9dbadffcc5 Transceiver52M: Replace resampler with SSE enabled implementation
Replace the polyphase filter and resampler with a separate
implementation using SSE enabled convolution. The USRP2 (including
derived devices N200, N210) are the only supported devices that
require sample rate conversion, so set the default resampling
parameters for the 100 MHz FPGA clock. This changes the previous
resampling ratios.

  270.833 kHz -> 400 kHz      (65 / 96)
  270.833 kHz -> 390.625 kHz  (52 / 75)

The new resampling factor uses a USRP resampling factor of 256
instead of 250. On the device, this allows two halfband filters to
be used rather than one. The end result is reduced distortial and
aliasing effecits from CIC filter rolloff.

B100 and USRP1 will no be supported at 400 ksps with these changes.

Signed-off-by: Thomas Tsou <tom@tsou.cc>

git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@6733 19bc5d8c-e614-43d4-8b26-e1612bc8e597
2013-10-17 06:18:14 +00:00
Thomas Tsou
00d6835d72 Transceiver52M: Replace convolve and related calls with SSE implementation
This large patch replaced the convolve() call with an SSE vector
enabled version. The lower C and SSE intrinsic based code operates
on fixed and aligned vectors for the filter taps. The storage format
of interleaved I/Q for both complex and real vectors is maintained.

SSE filter tap values must:

  1. Start 16-byte aligned
  2. Number with a multiple of 4 between 4 and 20 for real taps
  3. Number with a multiple of 4 for complex taps

Non-compliant values will fall back to non-SSE usage. Fixed length
iterators mean that head and tail cases may require reallocation of
the input vector, which is automatically handled by the upper C++
interface.

Other calls are affected by these changes and adjusted or rewritten
accordingly. The underlying algorithms, however, are unchanged.

  generateGSMPulse()
  analyzeTrafficBurst()
  detectRACHBurst()

Intel SSE configuration is automatically detected and configured at
build time with Autoconf macros.

Signed-off-by: Thomas Tsou <tom@tsou.cc>

git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@6732 19bc5d8c-e614-43d4-8b26-e1612bc8e597
2013-10-17 06:18:09 +00:00
Thomas Tsou
9887f4a179 Transceiver52M: Generate RACH correlation sequence at initialization
There is no temporal dependency on when the RACH sequence is generated,
so there is no need for transceiver to create it in response to a
command from GSM core. If we power on the transceiver, we will need
the RACH sequence, so just allocate it during initialization.

Signed-off-by: Thomas Tsou <tom@tsou.cc>

git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@6731 19bc5d8c-e614-43d4-8b26-e1612bc8e597
2013-10-17 06:18:04 +00:00
Thomas Tsou
969ed83431 Transceiver52M: Remove logging from signal processing core
The only logging outputs in the the signal processing library
are debug lines that generate copious amounts of output while
providing little useful information to the user. The relevant
information (time-of-arrival, channel gains, etc.) can and
should be logged from transceiver instance itself.

Signed-off-by: Thomas Tsou <tom@tsou.cc>

git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@6730 19bc5d8c-e614-43d4-8b26-e1612bc8e597
2013-10-17 06:18:00 +00:00
Thomas Tsou
c48eb33e78 Transceiver52M: Add destructors to correlation seqeunce objects
Add destructor calls so we can avoid the nested vector deallocations.
Also remove the unnecessary pointer NULL checks prior to destruction.

Signed-off-by: Thomas Tsou <tom@tsou.cc>

git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@6729 19bc5d8c-e614-43d4-8b26-e1612bc8e597
2013-10-17 06:17:57 +00:00
Thomas Tsou
20e44cb379 Transceiver52M: Make GSM pulse filter internal to implementation
There is no reason expose the pulse shaping filter outside of the
signal processing calls. The main transceiver object makes no use
of the filter and there's no reason to pass it around.

Initialize the pulse shape with the signal processing library, and
maintain an internal static member like many of the other library
variables. Similarly destroy the object when the library is closed.

Signed-off-by: Thomas Tsou <tom@tsou.cc>

git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@6728 19bc5d8c-e614-43d4-8b26-e1612bc8e597
2013-10-17 06:17:53 +00:00
Thomas Tsou
ecc81ab384 Transceiver52M: Rename samples-per-symbol variable names
Because repeatedly typing mSamplesPerSymbol is giving me
carpal tunnel syndrome. Replace with the much shorter,
easier to type, and just as clear name of 'sps'.

Signed-off-by: Thomas Tsou <tom@tsou.cc>

git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@6727 19bc5d8c-e614-43d4-8b26-e1612bc8e597
2013-10-17 06:17:50 +00:00
Thomas Tsou
98ebd4963d Transceiver52M: Verify global config sanity before using
The configuration table is instantiated as a global variable with
no means to check constructor status. This means various types
of database failure conditions (e.g. file existence, permissions,
etc.) are not reported. This patch performs a small number of
checks to make sure that the configuration is sane.

Signed-off-by: Thomas Tsou <tom@tsou.cc>

git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@6726 19bc5d8c-e614-43d4-8b26-e1612bc8e597
2013-10-17 06:17:45 +00:00
Thomas Tsou
b6168292a2 Transceiver52M: Remove unused test code from main
The commented out test code is not maintained and behaviour is
unknown. Remove for clarity.

Signed-off-by: Thomas Tsou <tom@tsou.cc>

git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@6725 19bc5d8c-e614-43d4-8b26-e1612bc8e597
2013-10-17 06:17:42 +00:00
Thomas Tsou
83d8630c1b Transceiver52M: Use exception blocks for rate changes
UHD will throw if something goes awry in these sensitive sections,
so we should catch and shutdown gracefully. There is no recovery
if we can't set rates.

Signed-off-by: Thomas Tsou <tom@tsou.cc>

git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@6724 19bc5d8c-e614-43d4-8b26-e1612bc8e597
2013-10-17 06:17:39 +00:00