Commit Graph

62 Commits

Author SHA1 Message Date
Dimitri Stolnikov 3c7d3f1664 rtl,rtl_tcp: add bias=0|1 parameter to switch off|on bias voltage on
gpio0
2017-06-11 22:04:03 +02:00
Krzysztof Halasa 33a8d1c2ae RTL-SDR: convert _lut to float[] to reduce size by a factor of 256
The _lut is being indexed by I + Q (16 bits = 65536 entries), however
both samples can be processed independently, resulting in 8-bit LUT.
Saves a bit of RAM and CPU cache.
2017-06-11 21:30:38 +02:00
Alexandru Csete c6ed80aea7 rtl, rtl_tcp: Use std::abs.
Fixes compile error on Mac OS X.
2017-02-27 22:29:18 +01:00
Jiří Pinkava ac15e7897b do not check for NULL before calling free 2016-01-10 22:48:31 +01:00
Jiří Pinkava 225faa2e6a rtl: fix large output buffers handling
When size of output buffer was larger than size of input buffer,
uderflow occured because no check on number of avalilable data was done.

This also improves buffer filling for large output buffers, fill output
until anny input is available.
2014-08-14 23:35:23 +02:00
Dimitri Stolnikov 6610909913 rtl: implement methods allowing runtime to control sampling process 2014-03-10 16:25:23 +01:00
Dimitri Stolnikov eb76e35689 osmosdr/rtl/miri/hackrf: use 15 buffers by default
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.
2014-02-11 20:52:56 +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 <steve@steve-m.de>
2013-12-05 00:12:27 +01:00
Steve Markgraf 1aa67f08bc rtl: add R828D tuner
Signed-off-by: Steve Markgraf <steve@steve-m.de>
2013-11-04 21:00:08 +01:00
Dimitri Stolnikov a01a0b3cf5 rtl: don't try to parse empty device index values 2013-09-28 13:49:34 +02:00
Dimitri Stolnikov e97339c137 cmake: use *_INCLUDE_DIRS in modules 2013-08-13 20:17:17 +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 7e55cb9224 introduce osmosdr namespace, remove _c suffix
- the namespace conversion adopts the common gnuradio coding guidelines
- suffix removal is a preparation to support 8/16 bit complex data types
2013-05-30 16:14:22 +02:00
Dimitri Stolnikov 3e6a24e5d9 convert to gnuradio 3.7 interface 2013-05-29 22:34:40 +02:00
Dimitri Stolnikov a0c50c2df1 source/sink: rename antennas to express their function 2013-04-30 21:44:31 +02:00
Dimitri Stolnikov 901dca8135 remove APPEND from include_directories 2013-03-12 20:17:24 +01:00
Hoernchen 69e0003407 This reverts commit 3fb4f96bb7.
This reverts commit 1772222cb3.
reorder include dirs
2013-03-12 19:39:30 +01:00
Hoernchen 3fb4f96bb7 fix the other config.h includes as well 2013-03-12 14:51:01 +01:00
Dimitri Stolnikov 864712bad0 rtl: add named gain stage "IF" 2013-02-16 15:01:29 +01:00
Dimitri Stolnikov 10573261c2 rtl: notify work function on exit of async read
this is required to handle the interruption of a flowgraph in a clean
way by returning WORK_DONE in work() function.
2013-01-16 20:30:37 +01:00
Dimitri Stolnikov aed2a94769 rtl: return new style label (with SN) in get_devices 2013-01-10 20:29:19 +01:00
Dimitri Stolnikov 9bfce2694f rtl: return an appropriate tuning range when in direct sampling mode 2013-01-02 23:13:10 +01:00
Dimitri Stolnikov 6ae9c1b4dc update tuning ranges 2013-01-01 23:03:31 +01:00
Dimitri Stolnikov 2193c32ae0 rtl, rtl_tcp: enable 250k rate as it has been verified for gmr and tetra 2012-11-28 22:40:28 +01:00
Dimitri Stolnikov 8041472ff7 rtl: introduce buflen argument
this might be helful for rates <1MSPS
value must be multiple of 512 bytes
2012-11-28 20:52:41 +01:00
Dimitri Stolnikov cf807398c8 rtl: print a user friendly message if unable to parse the argument 2012-11-04 15:08:16 +01:00
Dimitri Stolnikov 933c0e21b1 rtl: open device by given serial, fall back to index value if not found
the serial number of a rtl device can be changed using the "rtl_eeprom -
2012-11-04 14:25:00 +01:00
Steve Markgraf 8c3786336f rtl: add offset tuning as device parameter
Signed-off-by: Steve Markgraf <steve@steve-m.de>
2012-10-10 21:03:48 +02:00
Dimitri Stolnikov dee9d3e696 update available samplerates for rtl devices
250k didn't work for TETRA and GMR, 2M has.
2012-09-30 20:58:21 +02:00
Steve Markgraf 0f25daec61 rtl: add direct_samp as device parameter
This can be used to enable the direct sampling mode
of an rtlsdr stick, e.g.:

For input 1 (In-phase ADC):
rtl=0,direct_samp=1

For input 2 (Quadrature ADC):
rtl=0,direct_samp=2

Signed-off-by: Steve Markgraf <steve@steve-m.de>
2012-09-16 17:01:32 +02:00
Dimitri Stolnikov e3c60c4a70 rtl: print overflow marker to stderr 2012-08-08 20:45:03 +02:00
Dimitri Stolnikov a43fef00a7 rtl: wait for worker thread to complete without a timeout 2012-08-08 20:31:51 +02:00
Dimitri Stolnikov e3bea99310 rtl: check for NULL buffers 2012-08-08 20:27:27 +02:00
Dimitri Stolnikov ff6615e08f rtl: explicitly set agc mode (off by default) 2012-08-01 22:57:11 +02:00
Dimitri Stolnikov 86ec5d3b73 add if gain setter API for rtl-sdr
and OsmoSDR devices

Observations lead to an useful gain
range from 15 to 30dB, a value of
24dB is used by default.
2012-07-18 21:24:57 +02:00
Dimitri Stolnikov f9acc7edf6 rtl: automatically increase if gain when required 2012-07-08 23:56:05 +02:00
Dimitri Stolnikov 604a9d79b0 use clip method provided by range class to pick gain values 2012-07-01 11:38:46 +02:00
Dimitri Stolnikov 1ea5a90b19 rtl: add sample rate 250k 2012-07-01 11:20:40 +02:00
Dimitri Stolnikov 8fc150c64d fix frequency range definition for e4k based devices 2012-07-01 11:18:29 +02:00
Dimitri Stolnikov c92822469c use endianness provided by boost 2012-06-29 21:27:22 +02:00
Dimitri Stolnikov 05700e6092 rtl, osmosdr: reorder buffer allocation to prevent memory leak
the leak would occur if the requested device could not be opened
2012-06-02 22:50:48 +02:00
Dimitri Stolnikov 9ec656dc05 make it play nice with windows
thanks to Hoernchen <la@tfc-server.de>
2012-06-02 21:56:17 +02:00
Dimitri Stolnikov a8625f0290 fix copy & paste errors 2012-06-02 17:02:31 +02:00
Dimitri Stolnikov 27dff71304 rtl: read out gain values via library api 2012-06-02 01:18:07 +02:00
Dimitri Stolnikov 7ef9ebc7bb cleanup: make _samp_avail signed integer 2012-05-27 14:32:50 +02:00
Dimitri Stolnikov 6194958d71 rtl: clean up work function 2012-05-27 14:27:05 +02:00
Dimitri Stolnikov 4b6018b68c remove OSMOSDR_API usage where appropriate 2012-05-27 13:50:58 +02:00
Dimitri Stolnikov 3ea0b38810 introduce device discovery api
This API allows to acquire a list of devices connected to the host and
creates an argument string ready to be passed to a source object for
cunstruction.

Each device_t entry contains a "label" entry, which holds the generic
device name which may be shown to the user for device selection.

For certain radio hardware extended entries ("name", "serial", "type")
may be available to make bijective device addressing possible.

The argument string for target types "rtl_tcp" and "file" might be
constructed using the osmosdr::device_t class facilities.

Example:

 #include <osmosdr_device.h>
 #include <osmosdr_source_c.h>

osmosdr::devices_t devs = osmosdr::device::find();

BOOST_FOREACH(osmosdr::device_t &dev, devs) // try to create each dev
  osmosdr_source_c_sptr src = osmosdr_make_source_c(dev.to_string());
2012-05-20 12:55:52 +02:00
Dimitri Stolnikov 6bef750ac9 change gain mode argument to 'automatic' for clarity 2012-05-17 10:35:58 +02:00
Dimitri Stolnikov 0e3d1995a0 rtl: skip one buffer full of garbage at the beginning 2012-05-13 20:01:50 +02:00