Commit Graph

279 Commits

Author SHA1 Message Date
Dimitri Stolnikov 5d0bade320 bladerf: shorten the serial number that is being shown to the user 2014-01-11 09:03:28 +01:00
Dimitri Stolnikov e68f8505df bladerf: implement DC offset and IQ imbalance correction
This patch has been provided by Brent J.
2014-01-11 08:57:49 +01:00
Dimitri Stolnikov 80c4af4f31 bladerf: FX3 firmware loading not supported from within gr-osmosdr 2013-12-28 13:05:45 +01:00
Dimitri Stolnikov df443ff5bd bladerf: prepare functions to control DC offset / IQ balance (WIP) 2013-12-28 01:02:35 +01:00
Dimitri Stolnikov 15d3699d72 apps/osmocom_fft: gui to set DC offset / IQ imbalance correction mode 2013-12-28 00:56:11 +01:00
Dimitri Stolnikov 18e11438a0 rfspace: add missing header for basename() 2013-12-27 22:45:32 +01:00
Sylvain Munaut 2287f08bad osmocom_fft: Properly set initial sample rate for fosphor output
Signed-off-by: Sylvain Munaut <>
2013-12-22 17:05:08 +01:00
Dimitri Stolnikov 9c6ac9e3e3 rfspace: add support for RFSPACE SDR-IQ and SDR-IP
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.
2013-12-22 16:28:27 +01:00
Dimitri Stolnikov 5410ee53b2 device: implement "nofake" hint to exclude dummy devices from discovery
usage example:

osmosdr::device_t hint( "nofake" );
osmosdr::devices_t devs = osmosdr::device::find( hint );
2013-12-10 16:59:01 +01:00
Dimitri Stolnikov 750a0b4549 cmake: pull updates from gnuradio master 2013-12-10 16:57:11 +01:00
Dimitri Stolnikov a98e682693 add UmTRX to the list of supported devices
requires Fairwaves' port of the Ettus UHD library:
2013-12-10 16:56:14 +01:00
Dimitri Stolnikov 05d51b5340 file: add missing include for boost::format 2013-12-05 00:12:34 +01:00
Steve Markgraf 8cbde92c94 rtl/rtl_tcp: add 2.56e6 as 'good' sample rate
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 <>
2013-12-05 00:12:27 +01:00
Dimitri Stolnikov 0d10f5e9bc apps/osmocom_fft: recover when .step property is not given for a range 2013-11-06 21:27:04 +01:00
Dimitri Stolnikov 7d2a577571 sink/source: fix error message when unable to connect blocks internally 2013-11-06 20:55:46 +01:00
Dimitri Stolnikov 8b3f711f12 netsdr: implement sample rate change in run mode 2013-11-05 20:33:43 +01:00
Steve Markgraf 1aa67f08bc rtl: add R828D tuner
Signed-off-by: Steve Markgraf <>
2013-11-04 21:00:08 +01:00
Dimitri Stolnikov e1b699fda0 netsdr: replace boost asio sockets with native bsd sockets
until we find out what's exactly interfering with fosphor when using
python based flowgraphs (osmocom_fft). c++ flowgraphs are not affected.
2013-11-01 15:56:13 +01:00
Jon Szymaniak b844149628 bladerf: Don't reload the FPGA unless the force-reload param is set 2013-10-30 18:59:59 +01:00
Jon Szymaniak 44bd325a86 bladerf: Moved initializations to bladerf_common.c, misc. cleanup
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.
2013-10-30 18:59:54 +01:00
Jon Szymaniak 03c42ef320 bladerf: Moved no longer "common" items out of bladerf_common
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.
2013-10-30 18:59:48 +01:00
Daniel Gröber 46a241624a bladerf: Added device caching, this enables full-duplex operation. 2013-10-29 23:20:21 +01:00
Sylvain Munaut c21b09ae4a osmocom_fft: Make the scope area fill all available space
The control area is now fixed / packed

Signed-off-by: Sylvain Munaut <>
2013-10-26 21:17:36 +02:00
Sylvain Munaut a2fcadaef3 osmocom_fft: Use the new WX version of fosphor sink
Signed-off-by: Sylvain Munaut <>
2013-10-26 21:17:36 +02:00
Dimitri Stolnikov 8facbbcca1 netsdr: add support for RFSPACE NetSDR receiver
- 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
2013-10-26 15:04:41 +02:00
Dimitri Stolnikov b7e2dd013b apps/osmocom_fft: use reasonable defaults for gain & center frequency 2013-10-26 15:04:36 +02:00
Dimitri Stolnikov 71d8d02793 use numchan instead of nchan to prevent ambiguity...
..when specifying total number of channels offered by the block
2013-10-25 23:39:17 +02:00
Dimitri Stolnikov a71fbeeaa5 hackrf: implement device discovery
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.
2013-10-25 23:36:32 +02:00
Dimitri Stolnikov 55d005e28d uhd: improve device discovery 2013-10-25 23:32:58 +02:00
Dimitri Stolnikov c744a7b35a remove unused variables 2013-10-25 23:32:13 +02:00
Dimitri Stolnikov 60120746aa file: allow changing the sample rate when throttle=true
this is dangerous from signal processing perspective and should be used
with caution.
2013-10-20 18:39:17 +02:00
Sylvain Munaut c904d26eb4 apps/osmocom_fft: Add option to use fosphor for the main display
Currently the GLFW variant as it's all that's available currently

Signed-off-by: Sylvain Munaut <>
2013-10-19 16:41:09 +02:00
Dimitri Stolnikov 4fe58149c1 cmake: fix flag passing to Clang compiler 2013-10-19 16:40:02 +02:00
Dimitri Stolnikov 0851071ba2 apps: catch corner cases for file= mode in osmocom_fft
verified for gqrx and sdrangerlove as well:

2013-10-18 19:48:15 +02:00
Dimitri Stolnikov 6f4e16ff28 bladerf: use newstyle version getters 2013-10-04 18:32:34 +02:00
Dimitri Stolnikov 2feacf957b bladerf: make source less picky wrt rf gain 2013-10-03 14:43:18 +02:00
Dimitri Stolnikov e303948ffb source/sink: initialize sample rate cache variable
Thanks to Jiří Pinkava for bringing this up.
2013-10-03 14:43:13 +02:00
Dimitri Stolnikov d335280b2e source/sink: fix automatic bandwidth selection 2013-10-03 14:43:04 +02:00
Dimitri Stolnikov a01a0b3cf5 rtl: don't try to parse empty device index values 2013-09-28 13:49:34 +02:00
Dimitri Stolnikov 40a5194276 apps: filter bandwidth follows sample rate in osmocom_fft 2013-09-28 13:49:25 +02:00
Dimitri Stolnikov f99995db69 updated header documentation for bandwidth setter 2013-09-28 13:49:18 +02:00
Dimitri Stolnikov f057decd1c bladerf: implement automatic bandwidth selection 2013-09-28 13:49:13 +02:00
Dimitri Stolnikov c1fb07bca7 hackrf: enable AMP gain stage by default 2013-09-28 13:49:09 +02:00
Dimitri Stolnikov b3bbe0935e hackrf: don't set automatic bandwidth on samplerate change
automatic bandwidth selection may be triggered by calling
set_bandwidth(0) after changing the sample rate
2013-09-28 13:49:00 +02:00
Jon Szymaniak 9b41c6aa20 bladeRF: Refactored buffering scheme in sink
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...
2013-09-28 00:07:55 +02:00
Dimitri Stolnikov ba7188727c bladerf: migration to async api (WIP)
receive works, transmit locks up in work() after few seconds
2013-09-28 00:07:49 +02:00
Sylvain Munaut 04b4c8b66a apps: Improve the GSM burst generation
Not sure the power window is really aligned to the samples yet though.

Signed-off-by: Sylvain Munaut <>
2013-09-12 23:51:30 +02:00
Frederik M.J. Vestre 68ed1854e7 Support setting external sampling to bladerf 2013-08-29 23:38:11 +02:00
Dimitri Stolnikov 265de87c45 bladerf: follow recent API changes
tested against aea04c5f119288370166ece05166a8a4157da6fa
2013-08-27 22:41:54 +02:00
Dimitri Stolnikov e97339c137 cmake: use *_INCLUDE_DIRS in modules 2013-08-13 20:17:17 +02:00