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>
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>
It no longer exists; 64MHz USRP1 support is out. Enable the
resampler in the 52MHz transceiver at build time for
external reference capable USRP2 and N2xx devices.
Signed-off-by: Thomas Tsou <ttsou@vt.edu>
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>
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>
With the unified transceiver, we need to select between
two device sample rates, GSM symbol rate and 400ksps for
resampler use. Make this selection available for configure
time options.
Signed-off-by: Thomas Tsou <ttsou@vt.edu>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
* remote-cli: (22 commits)
Throw exception if usrp is not found. Don't crash transceiver.
Update OpenBTS init script
Correctly exit OpenBTS even if console is not started yet.
Add option to run OpenBTS in a failsafe loop.
Shutdown without core dump on a usual SocketError.
Remove Transceiver PID file on OpenBTS exit.
Save transceiver PID to a file and use it to kill old transceivers.
Correct comment for Server.WritePID.
Set FD_CLOEXEC flag on all sockets.
Stupid bug fixed - can't move stack variables initialization to a separate function.
Gracefully shutdown OpenBTS on transceiver timeout/error.
Make functions and variables in OpenBTS.cpp static to avoid their use outside of the file.
Remove PID file on program exit.
Implemented daemon mode, configured from config.
Better default name for OpenBTS control UNIX socket.
Initialize logger right after loading config file.
Use normal cout and cerr while we have only one thread.
Better comments for previous commit.
Catch SIGINT, SIGTERM and SIGHUP and shutdown the server gracefully.
Uncomment real BTS start/stop.
...
* sms-split:
smqueue: Add SMSC short code to smqueue.config.example
Checking in forgotten smsc.cpp and smsc.h files.
Ignore User-Data-Header in SMS TPDU when decoding text in TLUserData::encode7bit().
Transparently pass TP-UHDI (User-Data-Header-Indicator) from SMS-SUBMIT to SMS-DELIVER.
Slightly cleaner output in TLUserData::write().
Log contents of a message instead of its memory addresss in SMS::parseTPDU().
Use decoded text from original message in bounce and e-mail messages.
More readable bounce message.
Maximum SMS length is 160 symbols in default alphabet.
Avoid duplication of "IMSI" in SC.Register.Msg.
Set Log.Alarms.* values in smqueue config.
Make "from" address for bounce messages configurable.
Move most of the SMS processing to smqueue (initial check-in).
Better documentation and error reporting for ThreadSemaphore.
Implementation of Semaphore.
Implemented "trans" CLI command to list all active transacions.
We don't want them to be inherited on exec(). We use exec() to run Transceiver and it OpenBTS process crashes, transceiver becomes owner of all LISTEN sockets.