Commit Graph

101 Commits

Author SHA1 Message Date
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 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 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
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
Tom Tsou 5cd70dc4ec EDGE: Setup variable sampling on receive path
Allow setting the device to non single SPS sample rates - mainly
running at 4 SPS as the signal processing library does not support
other rates. Wider bandwith support is required on the receive path
to avoid 8-PSK bandlimiting distortion for EDGE.

Signed-off-by: Tom Tsou <tom.tsou@ettus.com>
2016-03-06 19:11:05 -08:00
Tom Tsou 283b22dbce uhd: Remove references to USRP B205
Certain pre-release versions of the B200mini used the B205 naming, which no
longer exists. Update device naming and detection to reflect current UHD
product names.

Signed-off-by: Tom Tsou <tom.tsou@ettus.com>
2015-10-21 17:13:24 -07:00
Tom Tsou d4d3daa12e uhd: Use internal UHD tick conversions
UHD handles built in tick and floating point timestamp conversion
since version 003.005.004. This removes the need for separate UHD
timespec to tick conversion.

Signed-off-by: Tom Tsou <tom.tsou@ettus.com>
2015-08-21 19:29:38 -07:00
Tom Tsou c312905f43 uhd: Add version 3.9.0 support
New functionality includes B200-mini device support and updated
timing values to match FPGA changes.

Signed-off-by: Tom Tsou <tom.tsou@ettus.com>
2015-08-21 19:20:32 -07:00
Alexander Chemeris c4eab8795f uhd: Output Rx/Tx gain limits to log to make it more transparent.
Signed-off-by: Tom Tsou <tom.tsou@ettus.com>
2015-07-30 14:25:17 -07:00
Alexander Chemeris f3b9af65ed uhd: Fix UmTRX tuning broken in commit 90f7a01d.
Commit 90f7a01d lost "return" statement. We also should account the fact that
offset can be negative.
We should return the tuning request immediately after

Signed-off-by: Tom Tsou <tom.tsou@ettus.com>
2015-07-30 14:23:24 -07:00
Alexander Chemeris c052aa1d4c uhd: Fix rounding error in timestamp conversion functions.
Rounding error introduced oscilating timing advance error by regularly
overwriting one bit and then skipping one bit.

This commit also adds an error message to show up in logs if this ever
happens again.

Signed-off-by: Tom Tsou <tom.tsou@ettus.com>
2015-07-30 14:22:28 -07:00
Alexander Chemeris 50747dc65d osmo-trx: Add an option to swap channels on UmTRX.
Signed-off-by: Tom Tsou <tom.tsou@ettus.com>
2015-07-30 14:19:06 -07:00
Tom Tsou 5c7c178369 uhd: Pass UHD command line arguments to constructor
Previous behaviour used UHD command line args string for device search,
but did not apply the values to the device constructor. Now use the user
passed args string for both find and device construction.

Signed-off-by: Tom Tsou <tom.tsou@ettus.com>
2015-05-18 16:51:44 -07:00
Alexander Chemeris 90f7a01d1d umtrx: Don't use DSP tuning, because LMS6002D PLL steps are small enough.
We end up with DSP tuning just for 2-3Hz, which is meaningless and
only distort the signal.

Signed-off-by: Tom Tsou <tom.tsou@ettus.com>
2015-05-18 16:49:24 -07:00
Alexander Chemeris e171425b99 uhd: Set RF frontend bandwidth for UmTRX to improve signal quality.
Signed-off-by: Tom Tsou <tom.tsou@ettus.com>
2015-05-18 16:49:05 -07:00
Alexander Chemeris 4d029d8965 UmTRX: Manually set Tx gain stages for the best signal quality.
New UHD versions support split configuration of Tx gain stages.
We utilize this to set the gain configuration, optimal for
the Tx signal quality. From our measurements, VGA1 must be
18dB plus-minus one and VGA2 is the best when 23dB or lower.

Signed-off-by: Tom Tsou <tom.tsou@ettus.com>
2015-05-18 16:48:17 -07:00
Alexander Chemeris 88bbf1aafd uhd: Use full DAC scale with UmTRX to improve signal quality.
Signed-off-by: Tom Tsou <tom@tsou.cc>
2015-05-18 16:35:25 -07:00
Tom Tsou 93b7f37309 b210: Lock dual-channel tuning access
Frequency tuning is a multi-step process with RF and DDC/DUC protoimns
that can be corrupted if both channels attempt to tune at the same time.

Signed-off-by: Tom Tsou <tom@tsou.cc>
2014-12-15 20:25:27 -08:00
Tom Tsou 4ad9ea69ab Transceiver52M: Add X300/X310 and E310 USRP support
Treat X300 similar to N200 and resample with 100 MHz base clocking,
which provides some amount of oversampling for reduced phase error
compared to the 1 sample per symbol receiver. Treat E310 similar to 13
MHz rate devices for the lowest computational use.

Signed-off-by: Tom Tsou <tom@tsou.cc>
2014-12-15 18:59:45 -08:00
Tom Tsou eb54bddf47 Transceiver52M: Implement POWEROFF command
Add stop and restart capability through the POWEROFF and POWERON
commands. Calling stop causes receive streaming to cease, and I/O
threads to shutdown leaving only the control handling thread running.
Upon receiving a POWERON command, I/O threads and device streaming are
restarted.

Proper shutdown of the transceiver is now initiated by the destructor,
which calls the stop command internally to wind down and deallocate
threads.

Signed-off-by: Tom Tsou <tom@tsou.cc>
2014-12-15 16:20:15 -07:00
Tom Tsou 1ae25561fa uhd: Display current timestamp with buffer status errors
Existing implementation outputs sample buffer parameters, but it is
helpful to know the submitted timestamp that led to the errant
condition.

Signed-off-by: Tom Tsou <tom@tsou.cc>
2014-12-15 16:19:38 -07:00
Thomas Tsou a5c83aeb56 Transceiver52M: Add E1XX USRP device id and timings
Device specific timing settings for the E100 and E110 were missing from
the Tx/Rx offset table. Add E1XX identifier and offsets to the device
list and offset table respectively.

Signed-off-by: Thomas Tsou <tom@tsou.cc>
2014-04-09 23:14:31 -04:00
Thomas Tsou c283916e41 Transceiver52M: Allow startup delay for stream alignment
UHD requires a small amount of time to align multiple streams at
startup. Delay the startup by 100 ms relative to the queried device time
(actual delay inclusive of control latencies will be less).

The following error is only relevant to dual-channel UHD devices (e.g.
Fairwaves UmTRX and Ettus B210).

UHD Error:
    The receive packet handler failed to time-align packets.
    1002 received packets were processed by the handler.
    However, a timestamp match could not be determined.

Signed-off-by: Thomas Tsou <tom@tsou.cc>
2014-03-27 13:57:18 -04:00
Thomas Tsou cecfb2e8f9 Transceiver52M: Set UHD rates before creating streamers
Recent versions of UHD require setting the sample rate before creating
streamers otherwise the following exception occurs.

Boost_105300; UHD_003.007.000-0-g7fef199d

terminate called after throwing an instance of
'boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::math::rounding_error> >'
  what():  Error in function boost::math::round<d>(d): Value -nan can not be represented in the target integer type.

Signed-off-by: Thomas Tsou <tom@tsou.cc>
2014-03-27 13:49:51 -04:00
Thomas Tsou 8e17df7374 Transceivert52M: Add option for baseband frequency offset
Allow command line setting of the DSP frequency in UHD. All channels
will be tuned with the same offset. Dual-channel tuning with the B210,
which uses a single LO, will override the command line offset value
and set the DSP frequency automatically.

Signed-off-by: Thomas Tsou <tom@tsou.cc>
2014-03-06 15:52:49 -05:00
Thomas Tsou 3ebc772dc2 Transceiver52M: Enable B210 dual channel support
The main difference between existing UmTRX dual channel is the
single LO on B210 transmit and receive front-ends vs. independent
tuning paths. In order to support dual-ARFCN frequencies, baseband
offset conversion must be applied by tuning the FPGA CORDIC for
each channel. For B210, the following tuning order is applied.

1. If the new frequency of channel A is within the baseband range
   of channel B, then retune both channels with the RF centered
   and equal valued positive and negative baseband shifts.

2. If the new frequency of channel A is not with the baseband range
   of channel B, then retune channel A directly (without manual
   applied offset). Channel B will no longer be tuned to the
   previous frequency.

Signed-off-by: Thomas Tsou <tom@tsou.cc>
2014-03-03 23:17:57 -05:00
Thomas Tsou 18d3b833bc Transceiver52M: Disable initial device time reset
With dual-channels on B210, we lose the ability to reset both
channels to a synchronized state. Instead, let the timestamp
clock start with an arbitary value, which is the first
timestamp received from the device, instead of a near-zero
value. This approach also makes integration for device, in
general, with free-running timestamp clocks.

Signed-off-by: Thomas Tsou <tom@tsou.cc>
2014-03-03 23:16:59 -05:00
Thomas Tsou e788239fba Transceiver52M: Split B200 and B210 identifiers
Differentiate between the two in order to provide enumeration
for dual-channel support.

Signed-off-by: Thomas Tsou <tom@tsou.cc>
2014-03-03 18:47:36 -05:00
Thomas Tsou 635f1bf2af 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>
2014-02-13 14:35:45 -05:00
Thomas Tsou 2c79110969 Transceiver52M: UHD: Check running status before stopping stream
On startup errors we get a segfault if we stop and shutdown. This
is because we try to send a stop stream command to the device before
it has been created. Setup a check for running status before
attempting to stop the physical device.

Signed-off-by: Thomas Tsou <tom@tsou.cc>
2013-11-16 01:44:07 -05:00
Thomas Tsou 2e622ff131 Transceiver52M: Output device and operating mode to stdout
Very useful user information at startup.

Signed-off-by: Thomas Tsou <tom@tsou.cc>
2013-11-16 01:43:46 -05:00
Thomas Tsou 3f32ab5afa Transceiver52M: Enable all warnings and resolve
Mainly basic signed vs unsigned comparisons and intializer ordering.

Signed-off-by: Thomas Tsou <tom@tsou.cc>
2013-11-15 23:35:07 -05:00
Thomas Tsou e90a42becc Transceiver52M: Add dual channel diversity receiver option
This patch add support for dual channel diversity on the receive
path. This allows two antennas two shared antennas to be used for
each ARFCN handling channel in the receiver. This configuration
may improvde performance in multi-path fading environments,
however, noise andpotential interference levels are increased due
to the higher bandwidth used.

The receive path is oversampled by a factor of four for a rate
of 1.083333 Msps. If the receive paths are tuned within a
maximum channel spacing (currently set at 600 kHz), then both
ARFCN frequencies are processed by each channel of the receiver.
Otherwise, the frequency shifted diversity path is disabled and
standard non-diversity operation takes place.

Diversity processing is handled by selecting the path with the
higheset energy level and discarding the burst on the second
path. Selection occurs on a burst-by-burst basis.

Signed-off-by: Thomas Tsou <tom@tsou.cc>
2013-11-15 23:35:07 -05:00
Thomas Tsou 2c1f85a10c Transceiver52M: UHD: Add string descriptors to device-offset pairs
As we add more channel combintions including but not limited to
new devices, signal processing schemes, and diversity, we'll
need to handle more special cases. Add string descriptions for
just a bit more sanity.

Signed-off-by: Thomas Tsou <tom@tsou.cc>
2013-11-15 23:35:07 -05:00
Thomas Tsou f8bc7c351f Transceiver52M: UHD: Continue on receive and send timeouts
With testing on current UHD releases, currently 003.005.xxx series,
timeout errors on both receive and transmit are recoverable on network
and USB based devices. Remove the fatal error conditions.

Signed-off-by: Thomas Tsou <tom@tsou.cc>
2013-11-15 23:35:07 -05:00
Thomas Tsou acc22fa3ff Transceiver52M: Use USRP1 type window for B2xx devices
B2xx is a USB based device so use the USRP1 based adaptive flow
control window for transmit bursts. This adds additional stability
primarily on ARM platforms.

Signed-off-by: Thomas Tsou <tom@tsou.cc>
2013-11-15 23:32:40 -05:00
Thomas Tsou 7553aa973f Transceiver52M: Set variable thread priority levels
The transceiver and underlying device drivers are threaded. use
the following priority levels.

0.50 - UHD driver internal threads
0.45 - Receive device drive thread
0.44 - Transmit device drive thread
0.43 - UHD asynchronous update thread (error reporting)
0.42 - Receive burst processing thread(s)

Signed-off-by: Thomas Tsou <tom@tsou.cc>
2013-11-15 23:32:40 -05:00
Thomas Tsou 204a9f135a Transceiver52M: Add multi channel transceiver support
This patch primarily addresses devices with multiple RF front end
support. Currently device support is limited to UmTRX.

Vectorize transceiver variables to allow multiple asynchronous
threads on the upper layer with single downlink and uplink threads
driving the UHD I/O interface synchronously.

Signed-off-by: Thomas Tsou <tom@tsou.cc>
2013-11-15 14:45:20 -05:00
Thomas Tsou 0169b310de Transceiver52M: Remove unnecessary UHD clock setting call
There is no need to create this method. Just call the UHD interface
directly.

Signed-off-by: Thomas Tsou <tom@tsou.cc>
2013-11-08 11:33:31 -05:00
Thomas Tsou cf910dcdda 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>
2013-11-07 23:07:49 -05:00
Thomas Tsou 010fff783b 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>
2013-10-18 13:10:18 -04:00
Thomas Tsou 61b4a6ad9f 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>
2013-10-18 13:10:18 -04:00
Thomas Tsou fe269fe31d 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>
2013-10-18 13:10:18 -04:00
Thomas Tsou 69d14c9a14 Transceiver52M: Add B210 support
Identical to B200 support, but explicitly check for the device type
name.

Signed-off-by: Thomas Tsou <tom@tsou.cc>
2013-10-18 13:10:17 -04:00
Thomas Tsou c1f7c42a33 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>
2013-10-18 13:10:17 -04:00
Thomas Tsou 092f757ec2 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>
2013-10-18 13:10:17 -04:00
Thomas Tsou a57bc8a3b9 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>
2013-10-18 13:10:17 -04:00
Thomas Tsou 84c60f6679 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>
2013-10-18 13:10:17 -04:00
Thomas Tsou c88d8d53f8 Transceiver52M: Add UmTRX support
Requires Fairwaves UHD driver.

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

Signed-off-by: Thomas Tsou <tom@tsou.cc>
2013-10-18 13:10:17 -04:00