folowing rtl-sdr commit 89f73b183f2dac9c0dd75beca4cf2f77f20c4a36
So far we had 32 * 256KB which was a bit overkill, 15 are more than
enough.
15 was chosen instead of 16 because at least on Linux there seems to be
a system-wide limit of 63 transfers (when they are 256KB large), so 4
dongles can be used on a single machine without lowering the default
transfer number.
Requires https://github.com/airspy/host
Usage example:
osmocom_fft -a airspy
The following named gain stages are available:
LNA: 0 to 15, step 1
MIX: 0 to 15, step 1
IF: 0 to 15, step 1
At the moment the gains are not in dB but gain indices internal to R820t
tuner.
libbladeRF provides accessors for rational sample rates, which the
integer sample rate functions use under the hood. Therefore, there's no
need to check if the requested rate contains a fractional portion and
switch between the two sets of functions.
Usage example:
osmocom_fft -a sdr-iq=/dev/ttyUSB0
osmocom_fft -a sdr-ip=host[:port]
osmocom_fft -a netsdr=host[:port][,nchan=2]
The following named gain stages are available:
SDR-IQ: ATT: -20 to +10 dB, in 10dB steps
SDR-IP: ATT: -30 to 0 dB, in 10dB steps
The ftdi_sio driver is being used for SDR-IQ. It creates a character
device of the form:
crw-rw---- 1 root dialout 188, 0 Dec 19 22:14 /dev/ttyUSB0
To be able to open the device without root permissions add yourself to
the "dialout" group or do a "chmod 666 /dev/ttyUSB0" after pluggin in.
Several tests have shown that this is the
highest sample rate where no samples
are being dropped on rtl devices.
Signed-off-by: Steve Markgraf <steve@steve-m.de>
Common parameter handling has been moved into bladerf_common::init().
The buflen parameter is now in units of samples, not bytes. This
deviates from the other gr-osmosdr items. However, with the requirement
that buffers be in multiples of 1024 samples, this makes specifying this
parameter a bit easier. The user shouldn't need to know we're operating
on SC16Q12 values under the hood, and have to calculate accordingly.
To avoid confusion when both a bladeRF source and sink are in a flow
graph a [bladeRF source/sink] prefix has been added to output. Error
number have been replaced with bladeRF string representations of these
error values.
Firmware flashing has been removed. The bladeRF-cli or bladeRF-flash
tools are the preferred route for firmware upgrades.
The gr_complex FIFO is no longer used on the TX side, so it doesn't
really make sense to have it in bladerf_common. The associated items
have been moved into bladerf_source, and some renaming has been done in
bladerf_sink to tidy up.
Pending further performance tests of the bladerf_source, the _fifo
member (boost::circular_buffer) may need to be replaced.
- implements broadcast UDP based device discovery
- prints device information (serial/versions) on startup
- reads available frequency range(s) from the device
- integrity checks of IQ stream using sequence numbers
- automatic bandpass or a wideband lowpass selectable
The following named gain stages are available:
ATT: -30 to 0 dB, in 10dB steps
Known limitations:
- setting the sample rate is possible only before the
flowgraph has been started
Unfortunately libhackrf still doesn't offer a way to enumerate devices
*or* to open a specific device by index or it's serial number. Thus we
have implemented a rather hack-ish way to detect the presence of a
device by trying to open it and closing right after that.
Removed the use of an intermediate sample FIFO in the sink
implementation. Note the the FIFO has not been moved out of
bladerf_common --> bladerf_source_c in this commit.
work() now handles converting samples from complex to SC16_Q12, and filling
"transmit-ready" buffers. The callbacks are now only responsible for
marking the provided buffer free, and returning the next buffer.
It appears that a small deadlock issues remains in this changest, which
can be induced by:
1: Using a small sample rate (160Khz)
2: Switching back and forth between sinusoid <-> GSM burst
In this case, it appears that work() is blocked waiting for a buffer to
become free. More investigation here is required...