aboutsummaryrefslogtreecommitdiffstats
path: root/Transceiver52M
AgeCommit message (Collapse)AuthorFilesLines
2012-12-16Transceiver52M: Read IP address and port to bind to from a configuration ↵ttsou1-1/+1
instead of hardcoding them. Signed-off-by: Thomas Tsou <tom@tsou.cc> git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@4634 19bc5d8c-e614-43d4-8b26-e1612bc8e597
2012-12-16Transceiver52M: Properly pass samplerate to RadioDevice::make()ttsou1-1/+1
Without this patch, if SAMPSPERSYM is set bigger than 1, then erratic behaviour will occur. Signed-off-by: Thomas Tsou <tom@tsou.cc> git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@4633 19bc5d8c-e614-43d4-8b26-e1612bc8e597
2012-12-06transceiver52m: reset energy threshold on receive gain changesttsou1-1/+4
The adaptive energy detection threshold does not scale relative to signal level. In other words, the adjustment factor will be the same whether the at 40% of signal level or 4%. If the receive gain is reduced by a large amount, suppose 20 dB, the receiver may take minutes to adjust to the new level. When the receive gain is changed, reset the threshold back to the initial level. This reduces issues of runtime gain adjustment and prevents blocking bursts while the threhold level slowly adjusts. Signed-off-by: Thomas Tsou <tom@tsou.cc> git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@4595 19bc5d8c-e614-43d4-8b26-e1612bc8e597
2012-11-23Alexander's patches:kurtis.heimerl3-5/+4
1)I did an experiment and compiled OpenBTS with clang yesterday, which immediately highlighted two potential bugs in the Transceiver52 code. I'm not sure they are indeed bugs and not the intended behavior, but they look very much like that. The first one is below and the second one is in the following mail. GSM::Time() arguments are defined like #define USB_LATENCY_INTRVL (10,0), which means that they are expanded into GSM::Time((10,0)). This expression is a GSM::Time() with a single parameter where (10,0) return value of the last argument, 0 in this case. I.e. GSM::Time((10,0)) is equivalent to GSM::Time(0). I think this was not the intention. 2) Printing \n after every complex number breaks output when you want to print it in a single line, e.g. in many debug output. I do not claim any copyright over this change, as it's very basic. Looking forward to see it merged into mainline. git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@4515 19bc5d8c-e614-43d4-8b26-e1612bc8e597
2012-10-22Transceiver52M: UHD: Setup option to pass arguments from command linettsou6-10/+22
UHD accepts optional 'args' that can be used for device descriptions such as IP address, device type, etc. Allow these to be passed in on the transceiver command line as the third argument (number of supported carriers is the second argument). This option benefits those who may have multiple UHD devices attached to a single system. This option is not yet supported by GSM core and requires starting the transceiver independently on the command line. This option has no effect when USRP1 is used. Signed-off-by: Thomas Tsou <tom@tsou.cc> git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@4315 19bc5d8c-e614-43d4-8b26-e1612bc8e597
2012-08-08transceiver: uhd: prevent output of underrun message at ERROR levelttsou1-4/+8
The appearance of underruns on B100 due to the latency transmit window scares people. These should not be logged at ERROR level because the events are generally not real errors. So use the same behaviour of USRP1 of not logging these events. The presence of underrun events can be determined by changes in the latency window that is shown with log level set at INFO. Signed-off-by: Thomas Tsou <ttsou@vt.edu> git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@3988 19bc5d8c-e614-43d4-8b26-e1612bc8e597
2012-08-08transceiver: uhd: allow underrun flag to reset during timing alignmentttsou1-1/+1
Allowing the underrun flag to reset will prevent a single event from causing large jumps in the transmit latency threshold. This should keep unreasonable timing latencies from occurring (e.g. latencies of 20+ frames). git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@3981 19bc5d8c-e614-43d4-8b26-e1612bc8e597
2012-08-08transceiver: b100: raise minimum transmit latency valuettsou1-3/+13
Put a floor on the transmit latency of the B100 in order to suppress underruns in typical conditions. Empirical data from a handful of relatively recent machines shows that the B100 will underrun when the transmit threshold is reduced to a time of 6 and a half frames, so we set a minimum 7 frame threshold. The overall benefit should be marginal and may increase the possibility of bursts arriving stale (after the trasmit deadline), but will reduce the number of alarming UHD related messages that appear in the log file. This patch is UHD and B100 specific - USRP1 is unaffected. Signed-off-by: Thomas Tsou <ttsou@vt.edu> git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@3980 19bc5d8c-e614-43d4-8b26-e1612bc8e597
2012-03-13transceiver, usrp1: fix transmit gain setting bugttsou1-1/+1
Transmit gain setting would deceptively set the receive gain instead. Since transmit attenuation is a combination of RF gain and digital scaling, this major copy/paste bug may have gone unnoticed by many users. Reported-by: Robin Coxe <coxe@close-haul.com> Signed-off-by: Thomas Tsou <ttsou@vt.edu> git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@3309 19bc5d8c-e614-43d4-8b26-e1612bc8e597
2012-03-13transceiver, uhd: output timestamps on monontonic errorttsou1-2/+2
The "Loss of monotonic time" error occurs when a timestamp arrives from the device that is earlier in time than the previous timestamp. The output is an ALERT level message generally accompanied by a transmit side timeout from the device. UHD: Loss of monotonic time UHD: Loss of monotonic time UHD: Device send timed out Add to the error description the timestamp values that generated the error and output with ALERT rather than ERR log. Signed-off-by: Thomas Tsou <ttsou@vt.edu> git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@3307 19bc5d8c-e614-43d4-8b26-e1612bc8e597
2012-02-14transceiver, uhd: fix build error due to log levelttsou1-1/+1
Previous commit r3181 used a 2.6 logging level. ALARM->ALERT Fix for 2.8 levels. Signed-off-by: Thomas Tsou <ttsou@vt.edu> git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@3187 19bc5d8c-e614-43d4-8b26-e1612bc8e597
2012-02-14transceiver, uhd: display device information on make failurettsou1-1/+1
The failure "UHD make failed" implies that a suitable device was found, but construction failed. Output the the found target device information along with message. Signed-off-by: Thomas Tsou <ttsou@vt.edu> git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@3181 19bc5d8c-e614-43d4-8b26-e1612bc8e597
2012-01-09transceiver, uhd: alert user on unrecoverable errorsttsou1-5/+13
Unrecoverable device errors include send and receive timeouts and mangled packets. Other device errors, such as non-monotonic timestamps are sometimes recoverable through a soft restart. These fatal are generally limited to development versions of UHD driver or device firmware, but can occur in release versions. Alert user on such device errors along with current UHD version. Signed-off-by: Thomas Tsou <ttsou@vt.edu> git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@3012 19bc5d8c-e614-43d4-8b26-e1612bc8e597
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