aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2011-12-15Matching UHD changes in gnuradiokurtis.heimerl1-3/+3
git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@2817 19bc5d8c-e614-43d4-8b26-e1612bc8e597
2011-11-28transceiver52M: bump critial errors to ALERT levelkurtis.heimerl3-6/+8
Device errors regarding properties such as sample rate or frequency tuning are almost always fatal and lead to the common error "assuming TRX is dead". Make sure that these errors are clearly presented to the user. Signed-off-by: Thomas Tsou <ttsou@vt.edu> git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@2700 19bc5d8c-e614-43d4-8b26-e1612bc8e597
2011-11-28transceiver, uhd: exit informatively if no devices are foundkurtis.heimerl1-4/+11
Perform a UHD device search before constructing the object, and inform the user if no device is found. No device found is the most common reason for the transceiver to fail with the dreaded error "assuming TRX is dead". Signed-off-by: Thomas Tsou <ttsou@vt.edu> git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@2699 19bc5d8c-e614-43d4-8b26-e1612bc8e597
2011-11-28transceiver, uhd: reject usrp1 if compiled with uhd supportkurtis.heimerl1-5/+6
This configuration is invalid because of FPGA based timestamp support for the USRP1 in the UHD driver. Kindly inform the user to recompile with libusrp support from GNU Radio. Signed-off-by: Thomas Tsou <ttsou@vt.edu> git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@2698 19bc5d8c-e614-43d4-8b26-e1612bc8e597
2011-11-28transceiver, uhd: runtime check for setting master clock ratekurtis.heimerl1-0/+11
Before setting the master clock rate, make sure that the device is capable of being set. For now, assume that devices that operate with default clock rates above 64 MHz, specifically USRP2/N200/N210, cannot be set at 52 MHz. Inform the user that these devices can be used with the compile time option of host based resampling. Signed-off-by: Thomas Tsou <ttsou@vt.edu> git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@2697 19bc5d8c-e614-43d4-8b26-e1612bc8e597
2011-11-26changing config scripts to explitly target UHD/USRP1kurtis.heimerl1-0/+12
git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@2692 19bc5d8c-e614-43d4-8b26-e1612bc8e597
2011-11-26transceiver, resamp: enlarge transmit resampler output bufferkurtis.heimerl1-2/+10
It was possible to reach a state where a resampled burst would overrun the transmit output buffer and corrupt the global allocated signal vectors. The result was a segmentation fault when attempting to access heap allocated signal vectors since the pointers were garbage. Whether the segfault occured or not appears to depend on the memory location of the signal vector pointers, since it does not occur on all systems. Double buffer size to accomodate an incoming burst plus up to a full chunk that may be remaining from the previous resampling operation. Signed-off-by: Thomas Tsou <ttsou@vt.edu> git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@2691 19bc5d8c-e614-43d4-8b26-e1612bc8e597
2011-11-26transceiver: enable USRP1 firmware binary installkurtis.heimerl1-4/+4
Not sure why this functionality is commented out. Make install places the FPGA firmware image in: /usr/local/share/usrp/rev2/ /usr/local/share/usrp/rev4/ Signed-off-by: Thomas Tsou <ttsou@vt.edu> git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@2690 19bc5d8c-e614-43d4-8b26-e1612bc8e597
2011-11-26transceiver, resamp: insert missing filter valueskurtis.heimerl4-5/+87
With transceiver integration, the resampling filter files were dropped. This created a working resampling implementation for the USRP2 / N200, but with spectrum irregulaties that likely caused issues at longer range operation. Simply reinsert the filter files and modify the filter initialization to use them. Signed-off-by: Thomas Tsou <ttsou@vt.edu> git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@2689 19bc5d8c-e614-43d4-8b26-e1612bc8e597
2011-11-26transceiver: uhd: increase log level on constructor errorskurtis.heimerl1-1/+1
Exceptions on make are major no-start conditions. Make these errors more apparent. Signed-off-by: Thomas Tsou <ttsou@vt.edu> git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@2688 19bc5d8c-e614-43d4-8b26-e1612bc8e597
2011-11-26transceiver: usrp1: select single dboard use at compile timekurtis.heimerl1-0/+8
The following option selects single daughterboard use on side A only. Otherwise, the default setting is TX on A and Rx on B. ./configure --with-singledb Other options are possible, as per the following enum, but for simplicity with configure options, there are only two choices. enum dboardConfigType { TXA_RXB, TXB_RXA, TXA_RXA, TXB_RXB }; Signed-off-by: Thomas Tsou <ttsou@vt.edu> git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@2687 19bc5d8c-e614-43d4-8b26-e1612bc8e597
2011-11-26transceiver: uhd: make external reference a compile time optionkurtis.heimerl1-6/+4
External reference selection was already compile-time determined by a hard coded value. Make it selectable as a configure option. Signed-off-by: Thomas Tsou <ttsou@vt.edu> git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@2686 19bc5d8c-e614-43d4-8b26-e1612bc8e597
2011-11-26uhd: increase initial transmit transport latencykurtis.heimerl1-1/+1
For network based devices (USRP2, N200, etc.), increase the latency from 2 to 3 frames, which effectively buffers more samples on the host in front of the Ethernet interface. USB devices (USRP1 and B100) utilize an adaptive mechanism so they are less effected by this value. Signed-off-by: Thomas Tsou <ttsou@vt.edu> git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@2685 19bc5d8c-e614-43d4-8b26-e1612bc8e597
2011-11-26transceiver: update main to non-device specific interfacekurtis.heimerl1-5/+11
The low-level RadioDevice interface is agnostic to libusrp or uhd based devices. 'make' allocates and returns a pointer to a generic RadioDevice implemented for whatever class of device determined at compile time. Signed-off-by: Thomas Tsou <ttsou@vt.edu> git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@2684 19bc5d8c-e614-43d4-8b26-e1612bc8e597
2011-11-26transceiver: update to log messages to work with P2.8kurtis.heimerl3-33/+33
Log level changes in P2.8: ERROR -> ERR WARN -> WARNING DEEPDEBUG -> DEBUG Signed-off-by: Thomas Tsou <ttsou@vt.edu> git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@2683 19bc5d8c-e614-43d4-8b26-e1612bc8e597
2011-11-26build: insert autofoo for usrp transceiver and optionskurtis.heimerl1-7/+25
Usage: ./configure --with-usrp1 Enable non-UHD USRP1 support through the gnuradio-based driver. Requires gnuradio (libusrp) to be installed. ./configure --with-resample Enable host-based 400ksps to 270.833ksps resampling. Only supported for UHD devices. If not enabled, the GSM sample rate is requested directly from the device. Signed-off-by: Thomas Tsou <ttsou@vt.edu> git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@2681 19bc5d8c-e614-43d4-8b26-e1612bc8e597
2011-11-26transceiver: add a newline for uhd information outputskurtis.heimerl1-3/+3
Minor change to clarify the logging output. Signed-off-by: Thomas Tsou <ttsou@vt.edu> git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@2679 19bc5d8c-e614-43d4-8b26-e1612bc8e597
2011-11-26transceiver: reject usrp1 if detected using uhdkurtis.heimerl1-20/+40
git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@2678 19bc5d8c-e614-43d4-8b26-e1612bc8e597
2011-11-26transceiver: make the transmit drive loop bus dependentkurtis.heimerl5-25/+58
With the introduction of the B100, there is USB support using UHD devices. The characteristics of the trasmit side burst submissions are more reflective of the bus type than the device or driver. Use a fixed latency interval for network devices and the adaptive underrun approach for USB devices - regardless of driver or device type. The GPMC based transport on the E100 appears unaffected by either latency scheme, which defaults to network. Signed-off-by: Thomas Tsou <ttsou@vt.edu> git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@2677 19bc5d8c-e614-43d4-8b26-e1612bc8e597
2011-11-26transceiver: reroute uhd messages to logging facilitykurtis.heimerl1-0/+26
Pipe the following uhd message types to standard warning levels (INFO, WARN, ERROR) respectively. Ignore fastpath logging messages and, instead, catch them from the asynchronous device interface. enum type_t{ status = 's', warning = 'w', error = 'e', fastpath= 'f' }; Signed-off-by: Thomas Tsou <ttsou@vt.edu> git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@2676 19bc5d8c-e614-43d4-8b26-e1612bc8e597
2011-11-26transceiver: clean variable init of radio interface constructorkurtis.heimerl1-13/+6
Signed-off-by: Thomas Tsou <ttsou@vt.edu> git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@2675 19bc5d8c-e614-43d4-8b26-e1612bc8e597
2011-11-26transceiver: move various radio interface definitionskurtis.heimerl2-11/+41
Move them out of the interface file - primarily for readability. Signed-off-by: Thomas Tsou <ttsou@vt.edu> git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@2674 19bc5d8c-e614-43d4-8b26-e1612bc8e597
2011-11-26transceiver: rename getting radio vector time to getTime()kurtis.heimerl3-22/+22
Small name change to match setTime for a get/set pair. Signed-off-by: Thomas Tsou <ttsou@vt.edu> git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@2673 19bc5d8c-e614-43d4-8b26-e1612bc8e597
2011-11-26transceiver: add option for host based resamplingkurtis.heimerl2-2/+330
The resampling transceiver is unified with the 52MHz version. The option to resample 400ksps from the device to a GSM appropriate 270.833ksps is enabled at compile time with the following option. ./configure --with-resamp Signed-off-by: Thomas Tsou <ttsou@vt.edu> git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@2672 19bc5d8c-e614-43d4-8b26-e1612bc8e597
2011-11-26uhd: keep reading on overrun or other non-fatal errorskurtis.heimerl1-1/+1
The readSamples call does not return less than the number of samples requested. Doing otherwise is a fatal error. So on overruns, which are not fatal, continue reading until the requested number of samples is received. Signed-off-by: Thomas Tsou <ttsou@vt.edu> git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@2671 19bc5d8c-e614-43d4-8b26-e1612bc8e597
2011-11-26transceiver: separate I/O portion of radio interface implementationkurtis.heimerl4-93/+133
Move push and pull of buffers into a dedicated file. This will allow us to swap out resampling, non-resampling, and possibly floating point device interfaces while presenting a single floating point abstration in the interface itself. Signed-off-by: Thomas Tsou <ttsou@vt.edu> git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@2670 19bc5d8c-e614-43d4-8b26-e1612bc8e597
2011-11-26transceiver: separate radio clock and vector interfaceskurtis.heimerl8-141/+273
Remove radio clock and vector interfaces into their own files. This clears up and simplifies the radio interface and, additionaly, prepares for a further split of the I/O portion for optional resampler use. Signed-off-by: Thomas Tsou <ttsou@vt.edu> git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@2669 19bc5d8c-e614-43d4-8b26-e1612bc8e597
2011-11-26transceiver: uhd: update copyright headerkurtis.heimerl1-22/+19
Signed-off-by: Thomas Tsou <ttsou@vt.edu> git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@2668 19bc5d8c-e614-43d4-8b26-e1612bc8e597
2011-11-26transceiver: minor cleanup of sample type sizing in uhdkurtis.heimerl1-6/+10
A small simplification of buffer indexing and sizing. Signed-off-by: Thomas Tsou <ttsou@vt.edu> git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@2667 19bc5d8c-e614-43d4-8b26-e1612bc8e597
2011-11-26transceiver: remove extraneous commentskurtis.heimerl1-2/+3
These lines are virtually never enabled. Signed-off-by: Thomas Tsou <ttsou@vt.edu> git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@2666 19bc5d8c-e614-43d4-8b26-e1612bc8e597
2011-11-26transceiver: remove extra typedefs to remove warningskurtis.heimerl1-2/+2
These typedefs serve no purpose and the compiler complains. Signed-off-by: Thomas Tsou <ttsou@vt.edu> git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@2665 19bc5d8c-e614-43d4-8b26-e1612bc8e597
2011-11-26uhd: remove external clock polarity settingkurtis.heimerl1-1/+0
Unused and causes the follwing errors on certain UHD versions. "ValueError: unhandled clock configuration reference source: _external_" Signed-off-by: Thomas Tsou <ttsou@vt.edu> git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@2664 19bc5d8c-e614-43d4-8b26-e1612bc8e597
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