aboutsummaryrefslogtreecommitdiffstats
path: root/Transceiver52M/runTransceiver.cpp
AgeCommit message (Collapse)AuthorFilesLines
2013-09-05Transceiver52M: Remove unused test code from mainThomas Tsou1-32/+2
The commented out test code is not maintained and behaviour is unknown. Remove for clarity. Signed-off-by: Thomas Tsou <tom@tsou.cc>
2013-09-05Transceiver52M: Verify global config sanity at startThomas Tsou1-21/+95
The configuration table is instantiated as a global variable with no means to check constructor status. This means various types of database failure conditions (e.g. file existence, permissions, etc.) are not reported. This patch performs a small number of checks to make sure that the configuration is sane. Signed-off-by: Thomas Tsou <tom@tsou.cc>
2013-09-05Transceiver52M: Generate RACH correlation sequence at initializationThomas Tsou1-0/+3
There is no temporal dependency on when the RACH sequence is generated, so there is no need for transceiver to create it in response to a command from GSM core. If we power on the transceiver, we will need the RACH sequence, so just allocate it during initialization. Signed-off-by: Thomas Tsou <tom@tsou.cc>
2013-06-24Transceiver52M: Setup UmTRX dual carrier supportThomas Tsou1-2/+0
2013-06-24multi-arfcn, trx: attach FIFO's internally in transceiverThomas Tsou1-2/+0
The original split-transceiver abstraction did not maintain internal instances of the radio interface or drive loop. The FIFO's were attached through external calls. The control loop, however, made such an approach overly difficult, so the transceiver now maintains pointers to the aforementioned objects. In doing so, we no longer need external attachment calls to setup the FIFO's. Signed-off-by: Thomas Tsou <ttsou@vt.edu>
2013-06-24multi-arfcn, trx: handle thread exiting on shutdownThomas Tsou1-0/+1
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: add and modify transceiver main for new interfacesThomas Tsou1-5/+10
Add a transceiver main() for multi-arfcn use and modify single channel transceiver for use with updated interfaces. Setup multiTRX with 3 channels for default case. Signed-off-by: Thomas Tsou <ttsou@vt.edu>
2013-06-24Transceiver52M: Set resampling option automatically based on deviceThomas Tsou1-2/+15
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: Set sample rate from within the radio deviceThomas Tsou1-7/+1
The GSM transceiver only operates at a whole number multiple of the GSM rate and doesn't care about the actual device rate and if resampling is used. Therefore GSM specific portion of the transceiver should only need to submit the samples-per-symbol value to the device interface. Then, the device should be able to determine the appropriate sample rate (400 ksps or 270.833 ksps) and if resampling is appropriate. Signed-off-by: Thomas Tsou <tom@tsou.cc>
2013-06-24Transceiver52M: Remove and rename oversampling variablesThomas Tsou1-2/+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: Add device offset correction tableThomas Tsou1-1/+1
Previously, two timing correction values were used for UHD devices depending on the sample rate of 270.833e3 or 400e3 for native GSM or resampled device rate respectively. The correction values compensate for residual timing effects due to analog component delays, filters lag times, and general fudge factors. These values are device specific and over-generalized by the two value configuration. This patch adds the following struct to store these correction values by device type and sample rate - through samples-per-symbol. struct uhd_dev_offset { enum uhd_dev_type type; int sps; double offset; }; Signed-off-by: Thomas Tsou <tom@tsou.cc>
2013-06-24Transceiver52M: add antenna selection from configurationThomas Tsou1-0/+15
Set optional transmit and receive antennas from database configuration file. Use default antenna values on empty string or if option does not exist. Signed-off-by: Thomas Tsou <tom@tsou.cc>
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-10-22Transceiver52M: UHD: Setup option to pass arguments from command linettsou1-1/+12
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
2011-11-28transceiver52M: bump critial errors to ALERT levelkurtis.heimerl1-0/+1
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-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-10-12Adding in the missing Transceiver52M directorydburgess1-0/+123
git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@2307 19bc5d8c-e614-43d4-8b26-e1612bc8e597