aboutsummaryrefslogtreecommitdiffstats
path: root/Transceiver52M/radioInterface.h
AgeCommit message (Collapse)AuthorFilesLines
2013-07-14Transceiver52M: Remove unused thread mAlignRadioServiceLoopThread;Alexander Chemeris1-1/+0
2013-07-14Transceiver52M: Setup independent gain and tune elements for dual channelThomas Tsou1-3/+3
2013-06-24Transceiver52M: Setup UmTRX dual carrier supportThomas Tsou1-47/+7
2013-06-24multi-arfcn: refactor to match upstream GSM coreThomas Tsou1-4/+6
This patch aligns the multicarrier (MC) USRP code with released GSM core changes that accommodate the MC RAD1. Primary changes are: 1. Runtime setting of number of channelizer paths 2. Matching channelizer path to ARFCN mapping of GSM core 3. Use a single clock update socket on the drive loop 4. Match transceiver data and control socket ports Setting of channelizer paths (or width) was previously fixed at compile time. In either case, channelizer width is limited by the sample rate of the device and channel spacing of the maximally decimated filterbank. Available settings are 1, 5, and 10 channels, which accommodate any number of ARFCN's in between. Also add the frequency offsets to handle the effective shift in setting RF frequency. Previous assumption was to place C0 at the center frequency, but RAD1 assumes C0 at the leftmost carrier, so adjust accordingly. The rest is general consolidation to mostly match the RAD1 interaction with GSM core. There is some loss of flexibility to run, say, multiple independent instances of OpenBTS through a single bank of channelized transceivers. But, the better compatibility and reduction in code is the appropriate tradeoff. Signed-off-by: Thomas Tsou <ttsou@vt.edu>
2013-06-24multi-arfcn, trx: handle thread exiting on shutdownThomas Tsou1-0/+7
Previous approach was to allow stack unwinding to take care shutdown and thread ending, which was unpredictable and occasionally segfault. Attempt to shutdown more gracefully. There are thread cancellation points in the transceiver code using pthread_testcancel(), but the thread abstraction library does not allow direct access to the pthread variables. This prevents thread shutdown through pthread_cancel(). To get around this, use boolean status values in the receive socket service loops and main drive loop. The socket read calls will block indefinitly, so shutdown may cause the socket implementation to throw a SocketError exception. Use of timeout values with reads does not seem to work correctly or reliably, so catch the exception and ignore if it occurs on shutdown. The following error may appear as the socket is shutdown while the Transceiver is blocking on read(). DatagramSocket::read() failed: Bad file descriptor So be it; the API doesn't allow us to do any more. Signed-off-by: Thomas Tsou <ttsou@vt.edu>
2013-06-24multi-arfcn, trx: allocate threads on heap and fix thread releaseThomas Tsou1-1/+1
The underlying pthread of the Thread object isn't created until Thread::start(). If the Thread object is contructed, but not started, then the destructor will fail with a variety of unpredictable errors such as the following or double free() in certain cases. Program received signal SIGSEGV, Segmentation fault. __GI___libc_free (mem=0x3811abed3e946178) at malloc.c:2972 2972 if (chunk_is_mmapped(p)) If the Thread object is stack allocated, but start() isn't called, destructor is guaranteed to run and will fail. The previous approach was to dynamically allocate threads, but not free them, thus avoiding memory errors, but creating memory leaks. To get around this limitation, dynamically allocate Thread objects and initialize with NULL. Then allocate immediately prior to start such that pthread allocation is tied to the Thread object constructor. Deallocation can check that the Thread pointer is valid through NULL or other tracking methods. Signed-off-by: Thomas Tsou <ttsou@vt.edu>
2013-06-24multi-arfcn, trx: remove unused attach call()Thomas Tsou1-3/+1
At one point an attach() call was used to connect multiple transceivers to the radio interface. The current approach is to pass the radio interface to the transceiver instances through the constructor. Remove the unused and deprecated call. Signed-off-by: Thomas Tsou <ttsou@vt.edu>
2013-06-24multi-arfcn, trx: modify radio interface for multi-channel useThomas Tsou1-9/+22
The radio interface needs to feed the device I/O buffers synchronously in order to drive the channelizer. Asynchronous channel access occurs opposite the radio interface through a bank of thread-safe FIFO's or priority queue's on receive and transmit sides respectively. Setup 'M' channels and allow only a subset to be active at a given time. When a channel is unused, there is no need to feed the particular receive FIFO or pull data from the channel priority queue. Signed-off-by: Thomas Tsou <ttsou@vt.edu>
2013-06-24multi-arfcn, trx: add header wrappers for radio interfaceThomas Tsou1-1/+4
Signed-off-by: Thomas Tsou <ttsou@vt.edu>
2013-06-24Transceiver52M: Set resampling option automatically based on deviceThomas Tsou1-3/+20
Remove the built time resampling selection and link both options. Move the normal push/pullBuffer() calls back to the base class and overload them in the inherited resampling class. USRP2/N2xx devices are the only devices that require resampling so return that resampling is necessary on the device open(), which is the point at which the device type will be known. Signed-off-by: Thomas Tsou <tom@tsou.cc>
2013-06-24Transceiver52M: Remove and rename oversampling variablesThomas Tsou1-4/+1
The transceiver only uses a single integer oversampling value, which is more simply referred to as samples-per-symbol. mRadioOversampling --> mSPS mTransceiverOversampling (removed) Signed-off-by: Thomas Tsou <tom@tsou.cc>
2013-06-24Transceiver52M: Remove periodic alignment update from UHD buildThomas Tsou1-4/+4
Periodic timing alignment should never be required for UHD devices, though the mechanism was used as a fallback mechanism should UHD not properly recover after an underrun - as may occur in old 003.003.000 based revisions. This issue is not a concern in more recent UHD releases and deprecates this code for legacy USRP1 use only. Signed-off-by: Thomas Tsou <tom@tsou.cc>
2013-06-24Transceiver52M: Add UHD device type checkingThomas Tsou1-2/+2
UHD device type was previously detected, but only categorized in terms of bus type, USB or Ethernet, and sample rate capability. With the number of supported device increasing, we can no longer easily group devices since we need to handle more and more device-specific peculiarities. Some of these factors are managed internally by the UHD driver, but other factors (e.g. timing offsets) are specific to a single device. Start by maintaining an enumerated list of relevant device types that we can use for applying device specific operations. Also rename the USB/Ethernet grouping to transmit window type because that's what it is. enum uhd_dev_type { USRP1, USRP2, B100, NUM_USRP_TYPES, }; Signed-off-by: Thomas Tsou <tom@tsou.cc>
2013-06-16Fix build of the Transceiver.Alexander Chemeris1-0/+2
2011-11-26transceiver: make the transmit drive loop bus dependentkurtis.heimerl1-0/+3
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: move various radio interface definitionskurtis.heimerl1-9/+8
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: separate I/O portion of radio interface implementationkurtis.heimerl1-7/+7
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.heimerl1-95/+2
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: reinsert digital gain scalingkurtis.heimerl1-1/+4
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-26transceiver: simplify transmit power controlkurtis.heimerl1-1/+1
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: inline thread priority settingkurtis.heimerl1-0/+2
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-10-12Adding in the missing Transceiver52M directorydburgess1-0/+243
git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@2307 19bc5d8c-e614-43d4-8b26-e1612bc8e597