Commit Graph

273 Commits

Author SHA1 Message Date
Dimitri Stolnikov 2bd29cbe99 netsdr: implement sample rate change in run mode 2014-01-26 17:34:55 +01:00
Steve Markgraf eb3865010d rtl: add R828D tuner
Signed-off-by: Steve Markgraf <steve@steve-m.de>
2013-11-04 21:22:11 +01:00
Dimitri Stolnikov 8c5e74c213 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-04 21:22:07 +01:00
Jon Szymaniak dd35921292 bladerf: Don't reload the FPGA unless the force-reload param is set 2013-11-04 21:22:00 +01:00
Jon Szymaniak e735418224 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-11-04 21:21:54 +01:00
Jon Szymaniak 3ef7394f61 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-11-04 21:21:48 +01:00
Daniel Gröber 0d75ab353d bladerf: Added device caching, this enables full-duplex operation. 2013-11-04 21:21:44 +01:00
Sylvain Munaut 49a3772491 osmocom_fft: Make the scope area fill all available space
The control area is now fixed / packed

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2013-10-26 21:27:47 +02:00
Sylvain Munaut 2cbc1e14e0 osmocom_fft: Use the new WX version of fosphor sink
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2013-10-26 21:27:43 +02:00
Dimitri Stolnikov 0ee591f163 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:09:43 +02:00
Dimitri Stolnikov 8f86bd2dca apps/osmocom_fft: use reasonable defaults for gain & center frequency 2013-10-26 15:05:47 +02:00
Dimitri Stolnikov f7640dc11c bladerf: remove unused variable 2013-10-25 23:45:48 +02:00
Dimitri Stolnikov 26acce3d35 use numchan instead of nchan to prevent ambiguity...
..when specifying total number of channels offered by the block
2013-10-25 23:45:30 +02:00
Dimitri Stolnikov dd7d584137 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:45:24 +02:00
Dimitri Stolnikov 68481ac40d uhd: improve device discovery 2013-10-25 23:45:20 +02:00
Dimitri Stolnikov 860962e501 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:51:44 +02:00
Dimitri Stolnikov 8300354c05 cmake: fix flag passing to Clang compiler 2013-10-19 16:36:39 +02:00
Dimitri Stolnikov 2934d8512b apps: catch corner cases for file= mode in osmocom_fft
verified for gqrx and sdrangerlove as well:

file=/tmp/lte.cfile,rate=40e6,freq=1815e6,repeat=true,throttle=true
2013-10-18 19:47:21 +02:00
Sylvain Munaut 5534662c0c 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 <tnt@246tNt.com>
2013-10-17 21:27:41 +02:00
Dimitri Stolnikov f61734e58b cmake: make uhd component optional in standalone mode 2013-10-05 12:08:27 +02:00
Dimitri Stolnikov d81936d907 bladerf: use newstyle version getters 2013-10-04 18:31:39 +02:00
Dimitri Stolnikov 7b199a8b95 bladerf: make source less picky wrt rf gain 2013-10-03 14:37:02 +02:00
Dimitri Stolnikov 1f44c44054 source/sink: initialize sample rate cache variable
Thanks to Jiří Pinkava for bringing this up.
2013-10-03 14:25:28 +02:00
Dimitri Stolnikov 56281a6a30 source/sink: fix automatic bandwidth selection 2013-10-03 14:20:31 +02:00
Dimitri Stolnikov 882cac8465 rtl: don't try to parse empty device index values 2013-09-28 13:46:36 +02:00
Dimitri Stolnikov 217872a785 apps: filter bandwidth follows sample rate in osmocom_fft 2013-09-28 13:40:03 +02:00
Dimitri Stolnikov b97cac30c6 updated header documentation for bandwidth setter 2013-09-28 13:35:26 +02:00
Dimitri Stolnikov d8534d8721 bladerf: implement automatic bandwidth selection 2013-09-28 13:33:30 +02:00
Dimitri Stolnikov 851e94b82f hackrf: enable AMP gain stage by default 2013-09-28 13:29:03 +02:00
Dimitri Stolnikov a279fb1455 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:27:58 +02:00
Jon Szymaniak cbf791469c 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:05:32 +02:00
Dimitri Stolnikov 0690c077d2 bladerf: migration to async api (WIP)
receive works, transmit locks up in work() after few seconds
2013-09-28 00:05:25 +02:00
Dimitri Stolnikov 154100a11f cmake: drop gnuradio-pmt dependency in .pc file 2013-09-20 21:37:58 +02:00
Sylvain Munaut 970658c071 apps: Improve the GSM burst generation
Not sure the power window is really aligned to the samples yet though.

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2013-09-12 23:50:05 +02:00
Frederik M.J. Vestre cdeb105495 Support setting external sampling to bladerf 2013-08-29 23:37:20 +02:00
Dimitri Stolnikov 6fe392546a bladerf: follow recent API changes
tested against aea04c5f119288370166ece05166a8a4157da6fa
2013-08-27 22:40:52 +02:00
Dimitri Stolnikov e65dd08785 cmake: use *_INCLUDE_DIRS in modules 2013-08-13 20:10:51 +02:00
Dimitri Stolnikov 80f72d52ea grc: move around documentation 2013-08-04 22:31:44 +02:00
Dimitri Stolnikov bdc8f22132 uhd: use gr-uhd by default, fall back to built-in code if not found 2013-08-04 10:16:06 +02:00
Dimitri Stolnikov 6e29bf179f rtl_tcp: remove gr-blocks usage for float-to-complex conversion
thanks to Hoernchen for the initial patch
2013-08-04 00:20:29 +02:00
Dimitri Stolnikov bd800ed89e file: import file_source to make it independent from gr blocks 2013-08-04 00:10:40 +02:00
Dimitri Stolnikov f4fd3a176a runtime: always export runtime and blocks symbols 2013-08-03 21:51:51 +02:00
Dimitri Stolnikov 3df0e00276 uhd: import gr-uhd code to be independent from gnuradio-runtime
stripped stream tags support due to lack of pmt
2013-08-03 21:05:18 +02:00
Dimitri Stolnikov be1314af10 runtime: import minimal gr runtime for standalone mode (wip)
stripped pmt and message infrastructure, no logging, no nothing...
2013-08-03 21:00:47 +02:00
Dimitri Stolnikov 9dfe3a6354 bladerf: update common sample rate values 2013-07-28 16:35:48 +02:00
Dimitri Stolnikov 93ad959d8d bladerf: migrate to new api to enable/disable TX/RX modules
TX support has been verified with osmocom_siggen and fpga image from git
f6c6a3abcb22d2794946e5adbc556805a73788a3
2013-07-26 21:46:47 +02:00
Dimitri Stolnikov b196ee12c0 cmake: require Python v2 for build configuration
based on a gnuradio patch by Jiri Pinkava
http://gnuradio.org/cgit/gnuradio.git/commit/?id=8144572532b8bfa37af01e1264a334d2a898ea8d
2013-07-22 20:05:24 +02:00
Dimitri Stolnikov e5f7b28093 bladerf: add support for nuand LLC bladeRF (WIP)
This is based on the original work (https://github.com/Nuand/gr-osmosdr)
done by folks at nuand LLC for the gr3.6 branch of gr-osmosdr.

The following modifications have been done in this commit:

* port to gr-osmosdr master codebase (gr3.7)
* moved shared properties to bladerf_common
* added & verified IF filter bandwidth setters
* set LMS6002D registers with values taken from FAQ 5.27
* print device information (serial/versions) on startup
* added fpga= and fw= device arguments to program MCU/FPGA
* added bladerf=# dev. arg. to select a specific bladeRF
* grc gain field controls RF path VGA for RX/TX
* grc BB gain field controls BB path VGA for RX/TX

Usage example:

osmocom_fft -a "bladerf,fpga=/tmp/hostedx115.rbf"

The following RX named gain stages are available:

LNA: 0 to 6 dB, in 3dB steps
VGA1: 5 to 30 dB, in 1dB steps; nonlinear mapping done inside the lib
VGA2: 0 to 60 dB, in 3dB steps; not recommended to be used above 30dB

The following TX named gain stages are available:

VGA1: -35 to -4 dB, in 1dB steps, BB side
VGA2: 0 to 25 dB, in 1dB steps, RF side

Thanks a lot to the team of nuand LLC for this major contribution.
2013-07-21 11:59:22 +02:00
Dimitri Stolnikov 0edfcfcba0 rtl: remove residue DC component introduced by RTL chip
received from Juha Vierinen:

A student here noticed that there is dc bias even with the rafael tuner.
We looked into this issue and found that using 127.4f instead of 127.5f
removes this bias. I assume this is associated with a bug in the digital
downconversion of the RTL chip. This change fixes the problem.
2013-07-16 23:31:29 +02:00
Dimitri Stolnikov 3ce7c33981 fcd: add support for FUNcube Dongle Pro+
The gnuradio block https://github.com/dl1ksv/gr-fcdproplus must be
installed before building gr-osmosdr.

Available named gains:

Dongle Classic:

LNA: -5 to 30 dB, in 2.5 dB steps
MIX: 4 or 12 dB

Dongle Pro+:

LNA: 0 or 1, meaning off/on only. no information about real values.
MIX: 0 or 1, meaning off/on only. no information about real values.
BB: 0 to 59 dB, in 1 dB steps

This patch also introduces optional "device" and "type" arguments which
allow to override the values automatically picked by gr-osmosdr:

osmocom_fft -a "fcd,device=hw:2,type=2"

The "device" argument overrides the audio device used by the underlying
driver to access the dongle's IQ sample stream.

The "type" argument selects the dongle type, 1 for Classic, 2 for Pro+.

Thanks to Alexey Bazhin for the initial patch and Volker Schroer for
testing.
2013-07-14 12:09:55 +02:00