aboutsummaryrefslogtreecommitdiffstats
path: root/Transceiver52M
AgeCommit message (Collapse)AuthorFilesLines
2014-10-31ms: Move clock indications generation to lower drive loopmsTom Tsou1-9/+8
During BTS operation, active downlink bursts drive the clock indication, but the flow of bursts is not present in MS mode. Shift the indication trigger to the lower non-blocking loop with FN mod 100 as the interval. Signed-off-by: Tom Tsou <tom@tsou.cc>
2014-10-08ms: Specify SETRXMASK argument with hex maskThomas Tsou1-6/+8
Use a 64-bit hex value as the mask specifier because the integer string is rather unwieldly. Fix 64-bit register handling on the mask check. Receive burst masking is only available on in MS tracking mode (post SCH acquisition). Modulus values greater than 64 remain unsupported. Signed-off-by: Thomas Tsou <tom@tsou.cc>
2014-10-07ms: Add command line option and allow negative Tx/Rx offsetThomas Tsou2-4/+28
The +/- 3 frame offset for Tx/Rx is setup in the RadioInterface constructor, so we need to know whether we are operating in MS or BTS mode at the very beginning. For MS mode, handle negative frame offsets, which would previously cause an assertion error. Signed-off-by: Thomas Tsou <tom@tsou.cc>
2014-10-07ms: Enable synchronized uplink burstsThomas Tsou7-38/+46
Extend the measured SCH timing offset from the downlink to the uplink path. In order to absorb the frame timing adjustment and remove the potential of thread contention during the change, combine the lower FIFO threads into single drive loop. Force timing changes through to the UHD interface with stream flags triggered through the updateAlignment() call. Signed-off-by: Thomas Tsou <tom@tsou.cc>
2014-10-06ms: Add SETRXMASK commandThomas Tsou2-1/+28
Create 64-bit multiframe masks for each physical slot. These are set through the SETRXMASK command with first and second arguemnts timeslot and mask respectively. Modulus value of 102 is currently not handled and will cause all receive bursts on that slot to be disabled in MS tracking mode. Signed-off-by: Thomas Tsou <tom@tsou.cc>
2014-10-06ms: Add BSIC request commandThomas Tsou2-1/+11
The GETBSIC command returns 1 if no SCH has been decoded, and 0 with the BSIC value if SCH decoding has been successful. Signed-off-by: Thomas Tsou <tom@tsou.cc>
2014-10-06Transceiver52M: Use multiple SCH correlation rangesThomas Tsou3-7/+24
Setup two SCH detection ranges - full search and narrow search. Full search correlates the full burst length to find for SCH detection. Narrow uses a reduced search range, which is the same as that used for RACH detection. Narrow searching is enabled after the SCH is successfully decoded and the MS is locked to the frame timing. Signed-off-by: Thomas Tsou <tom@tsou.cc>
2014-10-06Transceiver52M: Add FCCH based frequency correctionThomas Tsou10-25/+182
Enable frequency detection and correction by buffering the previous frame to allow FCCH measurement and compensation after frame timing is locked using the SCH. When the SCH is detected and symbol timing matched, measure the FCCH burst from one frame prior and compensate by baseband tuning the DDC on the device. Avoid appying frequency corrections to the RF portion due to possible tuning delays, which is not an issue with DDC tuning. Signed-off-by: Thomas Tsou <tom@tsou.cc>
2014-10-06Transceiver52M: Decode SCH and adjust GSM clockThomas Tsou10-9/+310
When in MS acquisition mode, attempt to decode SCH and establish the BTS frame timing. Lock the transceiver GSM clock to the BTS by adjusting the clock value by the measured burst-SCH offset. Add tracking state, TRX_MODE_MS_TRACKING, which continues to detect and decode the SCH with timing tracking, but only on SCH poitions within the 51 multiframe. Signed-off-by: Thomas Tsou <tom@tsou.cc>
2014-10-06Transceiver52M: Setup TRX mode for MS acquisitionThomas Tsou2-11/+42
On receipt of a SYNC command on the socket interface, set the mode to TRX_MODE_MS_ACQUIRE, which attempts to synchronize against a remote BTS signal by detecting the SCH burst and timing offset. The transceiver defaults to TRX_MODE_OFF, which implies no BTS or MS capability has been enabled. There is currently no command to enable the BTS mode. The MS mode also disables uplink transmission since no such capability is implemented. Signed-off-by: Thomas Tsou <tom@tsou.cc>
2014-10-06Transceiver52M: Add SCH detection capabilityThomas Tsou8-7/+175
Use similar approach for detecting normal and RACH bursts, but apply a sample shift after detection in order to gradually zero the measured timing offset. SCH synchronization sequence and setup are added similar to RACH detection with the main difference, aside being the SCH runs full length of the burst. History is also added to accommodate full length burst correlation. Signed-off-by: Thomas Tsou <tom@tsou.cc>
2014-05-08Transceiver52M: Fix SSE convolution shuffle registerThomas Tsou1-1/+1
An errant shuffle register value used in complex-complex convolution causes distorted correlation peak-to-average values for certain TSC values. The error effect varies for different TSC sequences with the most noticeable effect of degraded detection on TSC 1 and no effect on TSC 7. Signed-off-by: Thomas Tsou <tom@tsou.cc>
2014-04-15Transceiver52M: Fix retransmissions when filler table is enabledThomas Tsou1-0/+4
Commit 15d743efaf8d3ec8dacd37fbac434c1e719c0b30 "Disable filler table retransmissions by default" made OpenBTS style filler table behavior optional. When enabled, dummy bursts were automatically loaded into the filler table, but the table was not updated and only filler busts were retransmitted. Enable the restransmit state flag when the filler table option is specified. Only preload filler table and enable retransmissions on channel zero. Signed-off-by: Thomas Tsou <tom@tsou.cc>
2014-04-09Transceiver52M: Add E1XX USRP device id and timingsThomas Tsou1-2/+21
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-03-27Transceiver52M: Allow startup delay for stream alignmentThomas Tsou1-5/+11
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-27Transceiver52M: Set UHD rates before creating streamersThomas Tsou1-12/+12
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-06Transceivert52M: Add option for baseband frequency offsetThomas Tsou3-13/+28
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-03Transceiver52M: Enable B210 dual channel supportThomas Tsou1-12/+89
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-03Transceiver52M: Disable initial device time resetThomas Tsou2-21/+31
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-03Transceiver52M: Split B200 and B210 identifiersThomas Tsou1-7/+13
Differentiate between the two in order to provide enumeration for dual-channel support. Signed-off-by: Thomas Tsou <tom@tsou.cc>
2014-02-13Transceiver52M: Set B2XX clock frequency to 26 MHzThomas Tsou1-1/+1
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-01-26Transceiver52M: Disable filler table retransmissions by defaultThomas Tsou3-23/+60
Burst selection at a particular time works in the following order of priority. 1. Slot is disabled with channel combination set to NONE (default) 1. Burst exists in priority queue for the current time. 2. Filler table entry is used This patch sets default behaviour to force all filler table entries to zero and disallows filler table changes. This effectively means that only bursts received from upper layers will be transmitted and nothing will be automatically transmitted in the absence or delay of incoming burts at a particular time. New Command line option "Enable C0 filler table" allows reverting to previous idle burst generation and retransmission behaviour on TRX0. Retransmission cannot be enabled on non-C0 channels. Signed-off-by: Thomas Tsou <tom@tsou.cc>
2013-11-18Transceiver52M: Add missing scaling vector resizeThomas Tsou1-0/+1
Downlink scaling factors, which are stored in a vector for multiple channels, was not being sized correctly. Signed-off-by: Thomas Tsou <tom@tsou.cc>
2013-11-17Transceiver52M: Remove database configuration file requirementThomas Tsou1-31/+14
We don't require any parameters stored in the configuration table, so don't bother with the existence of the persistent database file. This also removes an unnecessary step during initial setup since relevant parameters can be configured from the command line. Signed-off-by: Thomas Tsou <tom@tsou.cc>
2013-11-16Transceiver52M: Ignore channel estimation if we are not equalizingThomas Tsou1-1/+1
Equalization is currently disabled by default. As such, we don't need to run channel estimates or even track the update state, which would otherwise be allocating/decallocating the channel state vector at regular intervals. Signed-off-by: Thomas Tsou <tom@tsou.cc>
2013-11-16Transceiver52M: UHD: Check running status before stopping streamThomas Tsou1-1/+4
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-16Transceiver52M: Create new osmo-trx executableThomas Tsou4-237/+420
Create new main executable with full command line option parsing of relevant parameters. Database configuration table still exists (and must exist because of the global gConfig object), but can be bypassed with command line options. Signed-off-by: Thomas Tsou <tom@tsou.cc>
2013-11-16Transceiver52M: Output device and operating mode to stdoutThomas Tsou1-12/+17
Very useful user information at startup. Signed-off-by: Thomas Tsou <tom@tsou.cc>
2013-11-15Transceiver52M: Enable all warnings and resolveThomas Tsou8-17/+17
Mainly basic signed vs unsigned comparisons and intializer ordering. Signed-off-by: Thomas Tsou <tom@tsou.cc>
2013-11-15Transceiver52M: Add virtual destructor for radio deviceThomas Tsou1-0/+2
Empty destructor removes compile warning. Signed-off-by: Thomas Tsou <tom@tsou.cc>
2013-11-15Transceiver52M: Remove unused codeThomas Tsou6-68/+3
This includes unknown and unused variables, functions, and non-relevant documentation. Signed-off-by: Thomas Tsou <tom@tsou.cc>
2013-11-15Transceiver52M: Allow only channel zero to set TSC valueThomas Tsou1-3/+5
We support one TSC value per each transceiver object. Only channel zero can set this value. Other channels can attempt to set the TSC value, but will error if the TSC does not match the existing value. In either case, non-zero channels do not manipulate the gloabl TSC setting. Signed-off-by: Thomas Tsou <tom@tsou.cc>
2013-11-15Transceiver52M: Use independent power scaling varables for each channelThomas Tsou4-22/+20
Simply vectorize the existing power state variable. Signed-off-by: Thomas Tsou <tom@tsou.cc>
2013-11-15Transceiver52M: Set const qualifier on appropriate radio vector methodsThomas Tsou2-4/+4
Pointer accessor and noise average methods for radio and noise vectors respectively. Signed-off-by: Thomas Tsou <tom@tsou.cc>
2013-11-15Transceiver52M: Use independent noise vectors for each channelThomas Tsou4-24/+27
Each ARFCN channel may be independently configureted and possibly on separate hardware, so don't share a single vector for noise estimate calculations. Allow a non-pointer based iterator so we can get away with using the default copy constructor. Signed-off-by: Thomas Tsou <tom@tsou.cc>
2013-11-15Transceiver52M: Ignore detected bursts at the noise floorThomas Tsou1-4/+5
The transceiver has the ability to detect bursts below the noise floor, but little hope in successful decoding, so don't even try. We still use the detected burst to differentiate against noise vs actual data. Signed-off-by: Thomas Tsou <tom@tsou.cc>
2013-11-15Transceiver52M: Check time slot validity of incoming burstsThomas Tsou1-0/+5
In errant cases, GSM core may send bursts with invalid slot values, which is allowed by the GSM::Time object. If we find a burst like this coming into the transceiver, then drop it immediately. Signed-off-by: Thomas Tsou <tom@tsou.cc>
2013-11-15Transceiver52M: Add dual channel diversity receiver optionThomas Tsou11-50/+390
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-15Transceiver52M: Refactor receive path outer burst handlingThomas Tsou2-95/+141
Separate the large pullRadioVector() call, which forms the central portion of the receive path burst processing. Break out RACH, normal burst, and demodulation into separate methods. This makes the burst handling from the FIFO read to soft bit output somewhat more manageable. Signed-off-by: Thomas Tsou <tom@tsou.cc>
2013-11-15Transceiver52M: sigproc: Wrap internal phase on frequency shiftThomas Tsou1-0/+4
The call into table lookup will loop on values outside of the table range. With continuously increasing phase, this leads to an eventual permanent hard spin. Wrap the phase value to prevent that from happening. Signed-off-by: Thomas Tsou <tom@tsou.cc>
2013-11-15Transceiver52M: UHD: Add string descriptors to device-offset pairsThomas Tsou1-10/+11
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-15Transceiver52M: Add vectorized radio burst capabilityThomas Tsou5-26/+62
This patch allows multiple signalVectors to be stored within a single radioVector object. The motivation is to provide a facility for diversity and/or MIMO burst handling. When no channel value is specified, single channel bevhaviour is maintained. Signed-off-by: Thomas Tsou <tom@tsou.cc>
2013-11-15Transceiver52M: Rearrange socket port assignemntsThomas Tsou1-4/+8
Style change for clarity only. Signed-off-by: Thomas Tsou <tom@tsou.cc>
2013-11-15Transceiver52M: Dynamically allocate correlation vectorsThomas Tsou1-6/+10
Stack allocating the correlation output generates a call to the copy constructor of an zero valued vector. We can avoid this extra copy constructor with a pointer reference and dynamic allocation. Signed-off-by: Thomas Tsou <tom@tsou.cc>
2013-11-15Transceiver52M: Allow separate in/out vectors for delay and decimationThomas Tsou2-55/+65
Allow non-in-place use of the delay setting. Internally, the delay call creates a new vector and copies the contents back into the original. Instead, provide the option to return the computed output vector directly and remove an an extra copy in the process. Signed-off-by: Thomas Tsou <tom@tsou.cc>
2013-11-15Transceiver52M: Setup sinc() call directly with table lookupThomas Tsou1-2/+23
On Beagle Board the call into the sinc() function is generating a lot of load on the peak interpolation. Simplify the sinc() function with a dedicated table lookup. Eventually, this table may be removed in favour of using a precomputed filterbank for fractional delay determination. Signed-off-by: Thomas Tsou <tom@tsou.cc>
2013-11-15Transceiver52M: Preallocate head room for burst correlationThomas Tsou3-4/+17
Set a transceiver high level length value that specifies the largest number of complex or real filter taps that we will encounter. This allows preallocation of head room and prevents an extra allocation and copy on every incoming receive burst. Signed-off-by: Thomas Tsou <tom@tsou.cc>
2013-11-15Transceiver52M: UHD: Continue on receive and send timeoutsThomas Tsou2-8/+0
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-15Transceiver52M: Set priority on downlink socket threadThomas Tsou1-0/+2
Clock indications passed up to GSM core originate on the transciever downlink side. Set priority to keep the flow of clock updates consistent. Signed-off-by: Thomas Tsou <tom@tsou.cc>
2013-11-15Transceiver52M: Default to 1 sample-per-symbol low powered devicesThomas Tsou1-3/+10
This includes ARM Cortex A8 and A15 powered device such as Beagle Board, Gumstix driven E100 USRP, and Arndale board. Set the reduced SPS value automatically for the user. For x86, if we don't support SSE3, then the architecture is probably ancient and not with using. Drop the sampling down anyways to at least make an attempt. Non floating point SIMD devices (e.g. Raspberry Pi) also fall in this category Signed-off-by: Thomas Tsou <tom@tsou.cc>