Commit Graph

418 Commits

Author SHA1 Message Date
Tom Tsou 43242efc85 uhd: Add missing B200 sample timing for 4 SPS receive
Only B210 timing was previously set in the timing table.

Change-Id: Idc8d1be8201ad086c57dd9b3d6d72d277306cd2b
2016-10-18 11:30:09 -07:00
Neels Hofmeyr 76b98cf236 add contrib/jenkins.sh, for gerrit build bot
Change-Id: If8887525b0062090e9445a35e32b03e3b8e7eede
2016-10-17 17:53:26 +02:00
Tom Tsou aa15d62a8c sigproc: Match differential GMSK start/end bits to tail bits
Invert the initial and trailing diffential bits in the 4 sps
GMSK modulator to fix power-time mask irregularity at start
and end of burst. GSM tail bits are always zero, so we can
safely use fixed bit values.

Signed-off-by: Tom Tsou <tom.tsou@ettus.com>
2016-08-11 14:44:57 -07:00
Neels Hofmeyr 2e5e2c537b The INSTALL file is being overwritten by autoreconf, but it is committed
as empty file. As a result, the INSTALL file always shows as modified.
Instead, remove INSTALL from git and ignore it.
2016-08-08 11:55:41 -07:00
Tom Tsou 8f0ccf618d uhd: Update USRP2/N200/N210 for 4 SPS Rx
Requires changing the radioInterface API to pass in Rx side SPS
value. Update the (deprecated) diversity configuration to match
as well.

Signed-off-by: Tom Tsou <tom.tsou@ettus.com>
2016-07-20 16:36:27 -07:00
Tom Tsou 06676ead63 sigproc: Fix missing 8-PSK tail symbols
Agilent E4406A measurement of TSC synchronized RF envelope measurement.
showed failing power levels at the tail end of EDGE bursts. Regression
traced back to following commit.

Commit d2b070369d
"uhd: Correct timing alignment in 8-PSK and GMSK downlink bursts"

In the patch, the EDGE burst was delayed one symbol, but erroneously
truncated at the tail end causing the failing RF envelope measurement.

The missing tail symbol did not appear to affect end-to-end EGPRS tests.
This patch corrects the truncation.

Signed-off-by: Tom Tsou <tom.tsou@ettus.com>
2016-07-19 12:56:24 -07:00
Tom Tsou 4609f3285c transceiver: Fix 4 SPS receive TOA value
The time-of-arrival (TOA) value out of sigProc is specified
in symbols or, equivalently, 1 sample per symbol and does
not need to be normalized.

Signed-off-by: Tom Tsou <tom.tsou@ettus.com>
2016-07-19 11:30:49 -07:00
Tom Tsou 7c741ec6a6 transceiver: Fix mixed GSMK / 8-PSK transmission
Input burst construction was declared static causing the first
downlink burst from upstream to determine subsequent burst size
and modulation. Consequently, fixed sequence EGPRS tests would
pass, however, switching between 8-PSK and GMSK bursts would
fail with only one modulation type being transmitted.

Internally generated test sequences '-r' option were not affected
because the bursts are not received through the socket interface.

Signed-off-by: Tom Tsou <tom.tsou@ettus.com>
2016-07-19 11:26:05 -07:00
Tom Tsou 2f3e60bc1f uhd: Add command line option for GPS reference
Unlike earlier versions of UHD, the current release (3.9.2)
does not automatically select on-board GPSDO as the reference
source. Modify the command line settings to allow explicit
selection of GPS in addition to the external setting.

Simultaneous GPS and external reference settingis disallowed.

Signed-off-by: Tom Tsou <tom.tsou@ettus.com>
2016-07-17 19:34:22 -07:00
Alexander Chemeris cbfef6e40a UHD: Initial LimeSDR support.
Only EDGE mode is currently supported. Traditional 1 SPS Rx / 4 SPS Tx
mode requires different sampling rates which is not currently working.

RF performance is also sub-optimal and requires more tuning.
2016-07-12 16:26:51 -07:00
Tom Tsou b577ef014f radioInterface: Fix multi-channel buffer index bug
Discrete RF multi-channel was using hard coded buffer index
on the channel iteration for transmit sample conversion. End
result was segmentation fault on dual RF channel devices with
both channels active (Ettus B210 and UmTRX).

Signed-off-by: Tom Tsou <tom.tsou@ettus.com>
2016-07-12 16:11:13 -07:00
Tom Tsou c37594f3b9 mcbts: Allow out of order channel setup
Previous checks on multi-channel TSC and ARFCN settings would fail
if channels were initialized out of order. Namely, if channel 0
was not configured first, osmo-trx would error on the control
interface leading osmo-bts to fail.

Allow global TSC setting on all channels with added logging notice.
Notify if channel frequency is unexpected - which may happen if
channels are setup out of order - but do no report as error.

Signed-off-by: Tom Tsou <tom.tsou@ettus.com>
2016-07-08 14:46:25 -07:00
Tom Tsou ffee30d190 transceiver: Remove HANDOVER warnings
These warnings simply echo the socket command arguments with no
indication of any unexpected or improper operation.

Signed-off-by: Tom Tsou <tom.tsou@ettus.com>
2016-07-07 19:39:18 -07:00
Neels Hofmeyr 24575a6530 configure.ac: check for boost/config.hpp header 2016-07-05 15:43:19 -07:00
Neels Hofmeyr 1e9801411b add basic .gitignore 2016-07-05 15:42:35 -07:00
Tom Tsou 64464e6c34 egprs: Enable 8-PSK burst detection when EDGE is enabled
The command line EDGE option will enable 8-PSK burst
detection on any slot where a normal burst is expected.
The burst search order is 8-PSK first followed by GMSK.

EDGE will force 4 SPS sampling on Tx and Rx. Along with
twice the search correlation from 8-PSK and GMSK, EDGE
will increase CPU utilization. Whether the increase is
notable or not is dependent on the particular machine.

Signed-off-by: Tom Tsou <tom.tsou@ettus.com>
2016-07-01 03:50:02 -07:00
Tom Tsou e88710881b egprs: Enable 8-PSK length vectors on the Tx interface
Allow EGPRS 8-PSK length bit vectors of length 444 (148 * 3)
to pass in through the Tx socket interface. Length is the sole
factor in determining whether to modulate a bit vector using
GMSK or 8-PSK.

Tested with 8-PSK training sequences with random payload
originating from osmo-bts. Output verified with Agilent E4406A.

Signed-off-by: Tom Tsou <tom.tsou@ettus.com>
2016-07-01 03:16:03 -07:00
Tom Tsou a84e162672 sigproc: Adjust burst detection threshold criteria
Reduce the burst detection threshold to pass more bursts to upper
layers, but force stricter requirements on the computation itself.
For the latter, we now require at least 5 samples (rather than 2)
to compute a peak-to-average value.

End result is increased burst detection at low SNR conditions with
a small increase in false positive bursts when no signal is present.

Signed-off-by: Tom Tsou <tom.tsou@ettus.com>
2016-07-01 03:14:29 -07:00
Tom Tsou 7676427816 mcbts: Add multi-ARFCN radio support
Add new radio interface "radioInterfaceMulti" for multi-carrier
support.

Only USRP B200/B210 devices are supported because of sample
rate requirements (3.2 Msps).

Only 4 SPS operation Tx/RX is supported.

8-PSK is supported.

Other options may be added at a later time

Signed-off-by: Tom Tsou <tom.tsou@ettus.com>
2016-07-01 03:14:15 -07:00
Tom Tsou 35222296fe mcbts: Add multi-ARFCN channelizing filters
Introduce polyphase channelizer (Rx) and synthesis (Tx) filterbanks,
which serve as the signal processing backend for multi-carrier GSM.

Fast Fourier Transform (FFT) is used internally. FFTW is added as
a new build dependency.

Signed-off-by: Tom Tsou <tom.tsou@ettus.com>
2016-07-01 03:07:27 -07:00
Tom Tsou 28670fb5da iface: Add inner ring-buffer implementation
Two buffers, inner and outer, are used in the transceiver
implementation. The outer buffer interfaces with the device receive
interface to guarantee timestamp aligned and contiguously allocated
sample buffers. The inner buffer absorbs vector size differences between
GSM bursts (156 or 157 samples) and the resampler interface (typically
fixed multiples of 65).

Reimplement the inner buffer with a ring buffer that allows fixed size
segments on the outer (resampler) portion and variable lengths (GSM
side) on the inner side. Compared to the previous stack-like version,
this implementation removes unnecessary copying of buffer contents.

Signed-off-by: Tom Tsou <tom.tsou@ettus.com>
2016-07-01 03:03:11 -07:00
Tom Tsou 05c6feb71d radioInterface: Convert diversity argument to general type
Rather than a simple bool type, convert the diversity switch
to the device interface specifer:

  enum InterfaceType {
    NORMAL,
    RESAMP_64M,
    RESAMP_100M,
    DIVERSITY,
  };

The more general specifier allows passing in special cases
other then selection diversity such as multi-ARFCN support.

Signed-off-by: Tom Tsou <tom.tsou@ettus.com>
2016-07-01 03:03:03 -07:00
Tom Tsou 2e4ed10722 transceiver: Add Rx samples-per-symbol option
Previous approach was to enable 4 SPS on the receive path only
for EDGE use, which is not a requirement for 4 SPS operation.
Make the 4 SPS configuration setting directly settable.

Signed-off-by: Tom Tsou <tom.tsou@ettus.com>
2016-07-01 03:02:56 -07:00
Tom Tsou c8c4eac55e transceiver: Do not report error on SETTSC when radio is on
OsmoTRX does not support the use of multiple TSC settings per
internal TRX instance. There should not be an error to modifiy
the TSC value after POWERON. Setting TSC value on TRX channels
other then 0 is a NOP operation that should only error if the
requested TSC differs from that of TRX channel 0.

Reported-by: Max <msuraev@sysmocom.de>
Signed-off-by: Tom Tsou <tom.tsou@ettus.com>
2016-06-28 17:08:34 -07:00
Alexander Chemeris 37c52c79cf transceiver: Add an option to emulate a RACH delay in random filler mode.
Signed-off-by: Tom Tsou <tom.tsou@ettus.com>
2016-06-22 15:18:13 -07:00
Alexander Chemeris 58e9591f9e transceiver: Log channel number in DEBUG output of demoded bursts.
Signed-off-by: Tom Tsou <tom.tsou@ettus.com>
2016-06-22 14:28:22 -07:00
Alexander Chemeris 19174f581b radioInterface: Initialize power scale with a meaningful default.
Right now if you forget to send "POWER" control command, osmo-trx
will transmitt zeros. This is counter-intuitive and I've spent several
hours debugging this "issue". The issue may happen easily, because
osmo-bts doesn't send "POWER" command if there is no "power" setting
in the configuration file. Given that "POWER" command actually sets
attenuation, it's percieved as optional and in absence of it should
default to "POWER 0" (no attenuation), which translates to power
scale being 1.0.

Signed-off-by: Tom Tsou <tom.tsou@ettus.com>
2016-06-22 14:28:07 -07:00
Alexander Chemeris 1ba69e7762 uhd: Fix comment.
It's osmo-trx, not OpenBTS anymore.

Signed-off-by: Tom Tsou <tom.tsou@ettus.com>
2016-06-22 14:27:38 -07:00
Alexander Chemeris f931cf226b radioDevice: GSMRATE macro must have parentheses around its definition.
So we had the following define:
   #define GSMRATE       1625e3/6

Now, I wanted to use it in the following expression:
   3.0/GSMRATE
which turns into:
   3.0/1625e3/6
while what I really wanted is:
   3.0/(1625e3/6) = 3.0/1625e3*6

To avoid this, all macros with calculations must be enclosed in parentheses.

Signed-off-by: Tom Tsou <tom.tsou@ettus.com>
2016-06-22 14:27:24 -07:00
Alexander Chemeris e476231deb makefile: Fix build from an external path.
When you build from an external path, compiler can't find convert.h
include, because it was specified relative to the current directory.
Change this to specify the include dit relative to the Makefile
location.

Signed-off-by: Tom Tsou <tom.tsou@ettus.com>
2016-06-22 14:27:00 -07:00
Tom Tsou e90c24c8d5 sigproc: Expand RACH, TSC, and EDGE correlation windows
Slightly widen the search range to accommodate timing jitter
on certain classes of devices. The expanded range minimizes
the possibility of missing bursts that arrive too early or
too late due to timing error.

Signed-off-by: Tom Tsou <tom.tsou@ettus.com>
2016-06-21 16:19:54 -07:00
Tom Tsou 3b093bb13b uhd: Set minimum UHD version requirement for E3XX
Create runtime version check for minimum supported UHD driver
when using USRP E3XX devices. The minimum version, 3.9.0, matches
supported version on current E3XX release images.

Signed-off-by: Tom Tsou <tom.tsou@ettus.com>
2016-05-03 19:06:56 -07:00
Tom Tsou 3f4a13f049 uhd: Make device offset check a private method
Removes extra arguments and a static call.

Signed-off-by: Tom Tsou <tom.tsou@ettus.com>
2016-05-03 19:04:00 -07:00
Tom Tsou 0fe41a583c uhd: Set default Tx sampling to 4 sps
The majority of GSM host platforms are capable of operating with
the 4x oversampled modulator, which justifies the new default
setting. The small number exceptions (e.g. Raspberry Pi) can still
use the lower complexity 1 sps modulator with the '-s 1' command
line option if required.

Signed-off-by: Tom Tsou <tom.tsou@ettus.com>
2016-05-03 15:17:39 -07:00
Tom Tsou a5e0f1cdba uhd: Update default E3XX settings
Tune timing values after testing on UHD 003.009.002 for E3XX.
Table value for 1 sps was off by 10 samples causing improper
operation. Table value for 4 sps was shifted by 1 sample for
more accurate timing.

Also update E3XX description string detection.

Signed-off-by: Tom Tsou <tom.tsou@ettus.com>
2016-05-03 15:14:06 -07:00
Tom Tsou 2c650a6895 common: Add mandatory length field to UDP receive calls
Current UDP receive reads up to MAX_UDP_LENGTH bytes into the
passed in buffer, which may lead to buffer overflow if the
write buffer is of insufficient size.

Add mandatory length argument to UDP socket receive calls.

Reported-by: Simone Margaritelli <simone@zimperium.com>
Signed-off-by: Tom Tsou <tom.tsou@ettus.com>
2016-05-02 17:37:05 -07:00
Tom Tsou d4555f267e common: Restrict UDP binding to localhost only
Reported security vulnerability where control and data UDP
packets can be injected into the transceiver externally due
to socket binding to all interfaces using INADDR_ANY.

Existing socket interface does not allow specifying local
address; only the local port and remote address/port are
arguments.

Restrict socket bind to localhost with INADDR_LOOPBACK. If
external interfaces do need to be used, the API should be
modified to allow specifying the local socket address.

Reported-by: Simone Margaritelli <simone@zimperium.com>
Signed-off-by: Tom Tsou <tom.tsou@ettus.com>
2016-05-02 17:35:01 -07:00
Tom Tsou 047956259b EDGE: Fix demodulation slicer input
EDGE 8-PSK soft slicer was receiving input from the output of the
downsampler. Equalization and derotation were missing causing the
soft symbol output to be invalid.

Signed-off-by: Tom Tsou <tom.tsou@ettus.com>
2016-04-26 21:20:43 -07:00
Tom Tsou d2b070369d uhd: Correct timing alignment in 8-PSK and GMSK downlink bursts
Delay the EDGE downlink bursts by one symbol in order to match GMSK
pulse shaping group delay. The difference in group delay arises from
the dual pulse filter combination of the GMSK Laurent represenation
whereas 8-PSK uses a single pulse linear filter.

Signed-off-by: Tom Tsou <tom.tsou@ettus.com>
2016-04-26 19:31:14 -07:00
Alexander Chemeris 9664c3a6e7 transceiver: Do not pass transceiver state struct to function where it's not used. 2016-04-26 12:03:20 -07:00
Alexander Chemeris 1ab5e7f7bc osmo-trx: Output Rx SPS as a part of configuration output. 2016-04-26 12:02:51 -07:00
Alexander Chemeris 5efe05021a transceiver: Add an option to generate random Access Bursts. 2016-04-20 13:46:02 -07:00
Alexander Chemeris 78d1fc9a13 transceiver: Properly handle MAXDLY.
Previously MAXDLY value was applied to Normal Bursts, which was nice
when working with sloppy test equipment like CMD57, but useless for
real world usage. At the same time documentation and de facto usage
of MAXDLY in OsmoBTS and OpenBTS assumed that it actually applies to
Access Bursts (RACH). So this patch changes osmo-rx behavior to apply
MAXDLY to RACH bursts and introduces a new command MAXDLYNB for the
old behavior.
2016-04-20 13:45:00 -07:00
Alexander Chemeris a8cf208616 Common: Make sure gLogEarly() log to the same facilities as the normal log. 2016-04-20 12:33:41 -07:00
Alexander Chemeris f84232d30a Common: Get rid of a compilation warning.
debugLogEarly was replaced to an empty space and arguments of the function
became operators, grouped together by ():
Configuration.cpp: In member function 'bool ConfigurationTable::defines(const string&)':
Configuration.cpp:272:28: warning: left operand of comma operator has no effect [-Wunused-value]
   debugLogEarly(LOG_ALERT, "configuration parameter %s not found", key.c_str());
                            ^

This fix removes debugLogEarly together with its arguments.
2016-04-20 12:26:57 -07:00
Tom Tsou 9bd649ec73 EDGE: Fix USRP B210 device support
Commit 871b8782 "EDGE: Add support for UmTRX" disabled B210 support
using EDGE. Add B210 explicitly to the timing offset table to avoid
this issue.

Signed-off-by: Tom Tsou <tom.tsou@ettus.com>
2016-03-23 17:20:08 -07:00
Alexander Chemeris 871b87829f EDGE: Add support for UmTRX.
Signed-off-by: Tom Tsou <tom.tsou@ettus.com>
2016-03-22 11:01:34 -07:00
Holger Hans Peter Freyther d17b189cbc debian: Add packaging to master taken from fairwaves/master
There doesn't seem to be a reason why this shouldn't be in master.
The fairwaves/master branch is removing --march=native as well that
looks like a good idea as well.
2016-03-18 20:22:58 +01:00
Tom Tsou 7fec3030d4 EDGE: Combine shared GMSK and 8-PSK demodulator sections
Timing recovery and single tap channel compensation are identical
in both GMSK and EDGE receivers. This is the section ahead of and
including the optional 4-1 downsampler. GMSK and EDGE specific
sections operate at 1 SPS.

Signed-off-by: Tom Tsou <tom.tsou@ettus.com>
2016-03-08 17:45:53 -08:00
Tom Tsou af717b2d3c EDGE: Add random burst generator filler option
When EDGE is enabled with the '-e' option, the random burst generator
switches from GMSK normal bursts to 8-PSK EDGE bursts.

  $ ./osmo-trx -e -r 7

Signed-off-by: Tom Tsou <tom.tsou@ettus.com>
2016-03-08 17:45:53 -08:00