aboutsummaryrefslogtreecommitdiffstats
path: root/Transceiver52M
AgeCommit message (Collapse)AuthorFilesLines
2011-11-26uhd: verify setting of master clock ratekurtis.heimerl1-8/+15
If the master clock rate fails to set - this basically only happens when the wrong transceiver is choosen for the particular device - the error is fatal and the transceiver should exit. The clock rate setting was previously never verified. Signed-off-by: Thomas Tsou <ttsou@vt.edu> git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@2663 19bc5d8c-e614-43d4-8b26-e1612bc8e597
2011-11-26transceiver: fix bug in setting low-level attenuationkurtis.heimerl1-3/+3
This patch fixes some confusion in gain vs. attenuation setting. The UHD device is controlled through gain settings but OpenBTS represents gain in terms of attenuation relative to maximum - 0 dB attenuation. Signed-off-by: Thomas Tsou <ttsou@vt.edu> git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@2662 19bc5d8c-e614-43d4-8b26-e1612bc8e597
2011-11-26uhd: remove uhd type argumentkurtis.heimerl1-2/+2
UHD recently modified the E100 type name from 'usrp-e' to 'e100' causing the device make to fail. Remove device type checking to keep things working with the older and newer names. Signed-off-by: Thomas Tsou <ttsou@vt.edu> git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@2661 19bc5d8c-e614-43d4-8b26-e1612bc8e597
2011-11-26transceiver: reinsert digital gain scalingkurtis.heimerl2-6/+26
Commit e161523c (transceiver: simplify transmit power control) changed transmit gain control to RF setting only. This was appropriate for a WBX board with 25 dB of gain control, but inappropriate for an RFX with fixed transmit gain. RFX boards will regain the ability to set transmit attenuation. Since gain is set on the RF side first, reintroducing digital gain settings should have limited overall effect on non-RFX daughterboards. Signed-off-by: Thomas Tsou <ttsou@vt.edu> git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@2660 19bc5d8c-e614-43d4-8b26-e1612bc8e597
2011-11-26uhd: flush receive buffer should return true on timeoutkurtis.heimerl1-4/+10
Receive buffer flush should continue to read until either the desired number of packets has been read or timeout, which means that the buffer has been emptied. These are expected behaviours and should return true. Ignore errors at this stage as the data and associated metadata can be considered garbage and not worth reporting. Actual error conditions will be caught further downstream when useful data comes in. Signed-off-by: Thomas Tsou <ttsou@vt.edu> git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@2659 19bc5d8c-e614-43d4-8b26-e1612bc8e597
2011-11-26usrp1: fix transmit side tuning bugkurtis.heimerl1-11/+4
Transmit tuning was primarily setup for side A only. Some boards - WBX - would still tune with improper channel arguments, though receiver performance was disrupted. Previous testing was primarily with single board on side A only or dual configuration with side A transmit, so this bug largely went undetected. Patch tested with RFX and WBX daughterboards in single and dual configurations sides A and B. Signed-off-by: Thomas Tsou <ttsou@vt.edu> git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@2658 19bc5d8c-e614-43d4-8b26-e1612bc8e597
2011-11-26usrp1: fix typo in rx gain setting log messagekurtis.heimerl1-1/+1
Signed-off-by: Thomas Tsou <ttsou@vt.edu> git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@2657 19bc5d8c-e614-43d4-8b26-e1612bc8e597
2011-11-26uhd: log asynchronous errors as errorskurtis.heimerl1-1/+1
Bump abnormal asynchronous events - basically send errors - up to ERROR level. These errors are dominated almost entirely by underflow events, which should not be regularly occuring. Signed-off-by: Thomas Tsou <ttsou@vt.edu> git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@2656 19bc5d8c-e614-43d4-8b26-e1612bc8e597
2011-11-26transceiver: fix energy threshold bugkurtis.heimerl1-0/+3
If no bursts were received over a long enough duration then the threshold would roll into negative territory. The energy detection is based on a comparison with the squared threshold, so all handsets would become effectively barred after a certain period of inactivity. In theory, this bug also exists in the mainline tree, but there the daughterboard receive gain is fixed at max, which always allows the ADC to generate sufficient noise to trigger the energy dectector and keep the system in a valid steady state. To fix, simply add a negative value check like those already in place for other locations. Signed-off-by: Thomas Tsou <ttsou@vt.edu> git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@2655 19bc5d8c-e614-43d4-8b26-e1612bc8e597
2011-11-26transceiver: simplify transmit power controlkurtis.heimerl4-25/+10
UHD will internally accept floats with a range of +/-1.0, which corresponds to a 16-bit signed integer range of apporximately +/- 32000. Set the default amplitude to .3, which is a safe value agaist saturation elsewhere in the transmit chain. The non-UHD maximum amplitude is unchanged at 13500. Remove digital gain control because it's unnecessary and causes extra load on enbedded systems. Signed-off-by: Thomas Tsou <ttsou@vt.edu> git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@2654 19bc5d8c-e614-43d4-8b26-e1612bc8e597
2011-11-26uhd: reorganize error handling, exit when non-recoverablekurtis.heimerl1-11/+34
This is primarily a minor refactor with the exception of non-recoverable errors - notably if the receive times out - which almost always requires a reload of the FPGA. In these cases, quit without trying as resistance is futile. ERROR_TIMING: Soft restart of streaming ERROR_UNHANDLED: Benign errors ERROR_UNRECOVERABLE: Abandon ship Non-recoverable behaviour has not been observed in recent builds, but may exist in older (or future) configurations. Signed-off-by: Thomas Tsou <ttsou@vt.edu> git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@2653 19bc5d8c-e614-43d4-8b26-e1612bc8e597
2011-11-26uhd: enable automatic alignment updateskurtis.heimerl1-1/+1
Overnight testing shows that this shouldn't be required in the majority of cases, but shit happens. Enabling this forces transmit timing realignment at one minute intervals. As a fallback method, timing slips not caught by normal checks will be reset at the update. Signed-off-by: Thomas Tsou <ttsou@vt.edu> git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@2652 19bc5d8c-e614-43d4-8b26-e1612bc8e597
2011-11-26uhd: cleanup startup timestamp alignmentkurtis.heimerl1-12/+8
At startup, instead of flushing initial packets blindly, send a stop streaming command, flush, and start. The same procedure is used in the event of a runtime timestamp validity error. Signed-off-by: Thomas Tsou <ttsou@vt.edu> git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@2651 19bc5d8c-e614-43d4-8b26-e1612bc8e597
2011-11-26transceiver: rework digital gain settingskurtis.heimerl2-5/+4
The output of the modulator or resampler is scaled and converted from floating point to fixed point. The scaling factor is the leftover dB in RF attention (relative to max transmit power), which is handled prior to the integer conversion. This should work across all daughterboards and non-UHD installations. Signed-off-by: Thomas Tsou <ttsou@vt.edu> git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@2650 19bc5d8c-e614-43d4-8b26-e1612bc8e597
2011-11-26uhd: set attenuation relative to max RF gainkurtis.heimerl1-4/+3
Previously this was referenced off the the ad9862 PGA with a range from 0 to -20 dB. Instead base the attenuation factor on the maximum total RF gain returned by the device. Signed-off-by: Thomas Tsou <ttsou@vt.edu> git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@2649 19bc5d8c-e614-43d4-8b26-e1612bc8e597
2011-11-26uhd: disable adaptive buffering in 52 MHz transceiverkurtis.heimerl1-0/+2
Similar to the non-52 Mhz case, 589dd9091ef594ef6ef5804fbf6bfa70f3f02858 This drastically reduces underruns on the E100. Signed-off-by: Thomas Tsou <ttsou@vt.edu> git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@2648 19bc5d8c-e614-43d4-8b26-e1612bc8e597
2011-11-26uhd: rework handling of timestamp errorskurtis.heimerl1-7/+13
On a lapses of time monotonicity (and possibly other errors), stop and restart the receive streaming with a buffer flush in between. This is a cleaner replacement to the previous clock reset with that didn't attempt to stop steaming. Signed-off-by: Thomas Tsou <ttsou@vt.edu> git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@2647 19bc5d8c-e614-43d4-8b26-e1612bc8e597
2011-11-26uhd: fix timestamp conversion bug on 32-bit architectureskurtis.heimerl1-1/+1
Type size_t was used in the UHD time_spec_t to integer conversion, which would overflow at roughly 4 and a half hours causing the sample buffer to error on timestamp validity. Builds where size_t takes on 64-bits were not affected by this bug. Signed-off-by: Thomas Tsou <ttsou@vt.edu> git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@2646 19bc5d8c-e614-43d4-8b26-e1612bc8e597
2011-11-26uhd: reset sample clock when time goes non-monotonickurtis.heimerl1-1/+13
With UHD b4fc0d61bb6cbd1a5614745bab9aeb0abc22cb6f Sample clock will reset to zero after an overrun. Earlier versions may hang the FPGA, which is non-recoverable, requiring a manual image reload or reboot. If reset to zero, attempt to kick the sample clock to the last properly received timestamp value. At this point, there will be a timing continuity jump, which will drop connections, but transmit and receive chains should be aligned allowing for re-establishment. Signed-off-by: Thomas Tsou <ttsou@vt.edu> git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@2645 19bc5d8c-e614-43d4-8b26-e1612bc8e597
2011-11-26uhd: inline thread priority settingkurtis.heimerl3-1/+8
Push the ability to set thread priority out to the 52M Transceiver interface, because that's where the thread control exists. Signed-off-by: Thomas Tsou <ttsou@vt.edu> git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@2644 19bc5d8c-e614-43d4-8b26-e1612bc8e597
2011-11-26uhd: move static functions into the uhd_device classkurtis.heimerl1-43/+48
Simplifies things slightly, and this is supposed to be C++ after all. Signed-off-by: Thomas Tsou <ttsou@vt.edu> git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@2643 19bc5d8c-e614-43d4-8b26-e1612bc8e597
2011-11-26uhd: allow the non-uhd to still compile unchangedkurtis.heimerl1-0/+3
The missing methods are not implemented and simply return. They didn't exist in the first place. Signed-off-by: Thomas Tsou <ttsou@vt.edu> git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@2642 19bc5d8c-e614-43d4-8b26-e1612bc8e597
2011-11-26uhd: move non-52MHz transceiver to common radio device interfacekurtis.heimerl1-0/+4
Use the same header files for the device and start moving toward a commmon transceiver without so much redundant code. Signed-off-by: Thomas Tsou <ttsou@vt.edu> git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@2641 19bc5d8c-e614-43d4-8b26-e1612bc8e597
2011-11-26uhd: set and shadow settings through interfacekurtis.heimerl1-23/+61
Shadow all gains and frequencies, which minimizes device access. This allows the transceiver to variably control the device settings. Signed-off-by: Thomas Tsou <ttsou@vt.edu> git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@2640 19bc5d8c-e614-43d4-8b26-e1612bc8e597
2011-11-26uhd: set receive gain during initializationkurtis.heimerl1-0/+1
This shouldn't matter much, but the gain settings through the interface are short circuited right now, which makes this a problem. Signed-off-by: Thomas Tsou <ttsou@vt.edu> git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@2639 19bc5d8c-e614-43d4-8b26-e1612bc8e597
2011-11-26uhd: set hardware side delay offset for e100kurtis.heimerl1-1/+2
The value is used to align transmit and receive time slots within a sample. This oscilloscope measured value is close, but may need minor tweaking. Signed-off-by: Thomas Tsou <ttsou@vt.edu> git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@2638 19bc5d8c-e614-43d4-8b26-e1612bc8e597
2011-11-26uhd: log useful information on monotonic errorskurtis.heimerl1-3/+8
Track the current errant and previous timestamp values. Signed-off-by: Thomas Tsou <ttsou@vt.edu> git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@2637 19bc5d8c-e614-43d4-8b26-e1612bc8e597
2011-11-26uhd: only the E100 supports FPGA timestamps and adjustable clock ratekurtis.heimerl1-2/+2
Signed-off-by: Thomas Tsou <ttsou@vt.edu> git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@2636 19bc5d8c-e614-43d4-8b26-e1612bc8e597
2011-11-26uhd: flush initial receive sampleskurtis.heimerl1-0/+26
Occasionally, the E100 will have errant timestamps at start related to previous sessions. Early packets will be thrown out anyways, so do this explicitly so the timestamps don't royally fuck up the sample timing. Signed-off-by: Thomas Tsou <ttsou@vt.edu> git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@2635 19bc5d8c-e614-43d4-8b26-e1612bc8e597
2011-11-26uhd: add 52 MHz transceiver supportkurtis.heimerl5-13/+774
These are mostly identical changes as added to the non-52MHz implementation with the exception of sample rate. Signed-off-by: Thomas Tsou <ttsou@vt.edu> git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@2634 19bc5d8c-e614-43d4-8b26-e1612bc8e597
2011-11-26uhd: remove extra type conversionkurtis.heimerl1-1/+0
Type conversion, if necessary, should happen inside the device. Signed-off-by: Thomas Tsou <ttsou@vt.edu> git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@2633 19bc5d8c-e614-43d4-8b26-e1612bc8e597
2011-11-26Transceiver52M: add WBX, DBSRX, and single board supportkurtis.heimerl2-257/+128
Remove all RFX specific parts and control daughterboard functionality using the base API. The tuning is now set to a non-inverted image so remove the I/Q swap as well. Daughterboard configuration is set through an enum variable. Currently, there is no auto-configuration and the default is Tx/RX on sides A/B respectively. For transceiver boards the receive antenna is set to RX2. enum dboardConfigType { TXA_RXB, TXB_RXA, TXA_RXA, TXB_RXB }; const dboardConfigType dboardConfig = TXA_RXB; Signed-off-by: Thomas Tsou <ttsou@vt.edu> git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@2632 19bc5d8c-e614-43d4-8b26-e1612bc8e597
2011-11-26transceiver: fix initialization segfault in radio interfacekurtis.heimerl1-0/+1
'loadTest' variable was never initialized sometimes causing segmentation fault on transceiver startup. Signed-off-by: Thomas Tsou <ttsou@vt.edu> git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@2631 19bc5d8c-e614-43d4-8b26-e1612bc8e597
2011-11-02Reverting r2342kurtis.heimerl2-42/+26
git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@2424 19bc5d8c-e614-43d4-8b26-e1612bc8e597
2011-10-14Updates to working with a single RFX...builds but not working yet.hsamra2-26/+42
git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@2342 19bc5d8c-e614-43d4-8b26-e1612bc8e597
2011-10-12Removed a Makefile that should not have benn checked in.dburgess1-661/+0
git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@2313 19bc5d8c-e614-43d4-8b26-e1612bc8e597
2011-10-12Changes to auto-foo files that should probably be removed anyway.dburgess1-20/+20
git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@2312 19bc5d8c-e614-43d4-8b26-e1612bc8e597
2011-10-12Adding in the missing Transceiver52M directorydburgess23-0/+6516
git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@2307 19bc5d8c-e614-43d4-8b26-e1612bc8e597