Commit Graph

263 Commits

Author SHA1 Message Date
Hoernchen
f1ac20c371 disable force canceling for now to prevent crashes 2013-01-10 01:41:05 +01:00
Hoernchen
1cde8634ca rtl_tcp: add option to tame the linked list 2013-01-10 00:01:28 +01:00
Kyle Keen
5673a56223 rtl_adsb: improve sensitivity, stability
Signed-off-by: Steve Markgraf <steve@steve-m.de>
2013-01-04 21:29:14 +01:00
Steve Markgraf
7840ec21d3 lib: reset device if needed
This improves the situation on hosts with flaky host
controllers like the Raspberry Pi and the WR703N.

Signed-off-by: Steve Markgraf <steve@steve-m.de>
2013-01-04 21:26:43 +01:00
Steve Markgraf
4b057fea0f rtlsdr_set_sample_rate(): don't access dev structure before checking for NULL
Thanks to Derek Lieber for reporting this bug.

Signed-off-by: Steve Markgraf <steve@steve-m.de>
2013-01-02 20:19:19 +01:00
Dimitri Stolnikov
314683a51e librtlsdr: remove unneeded casting
Signed-off-by: Hoernchen <la@tfc-server.de>
2012-12-29 16:06:26 +01:00
Dimitri Stolnikov
e82a07e67a rtl_tcp: add support for tuner caps discovery
Signed-off-by: Hoernchen <la@tfc-server.de>
2012-12-29 16:06:26 +01:00
Hoernchen
d0534878f3 rtl_adsb: windows fix 2012-12-28 19:33:18 +01:00
edy555
aa60c2aaed fix segv on reconnect
Signed-off-by: Hoernchen <la@tfc-server.de>

improve staibility (for sdr#)

Signed-off-by: Hoernchen <la@tfc-server.de>
2012-12-28 18:59:41 +01:00
Kyle Keen
196bb15169 rtl_adsb: performance tweaks
Signed-off-by: Steve Markgraf <steve@steve-m.de>
2012-12-28 16:42:05 +01:00
Kyle Keen
8033414974 rtl_adsb: sensitivity tweaks
Signed-off-by: Steve Markgraf <steve@steve-m.de>
2012-12-16 16:23:48 +01:00
Kyle Keen
71b254a238 rtl_fm: non-gnu str functions
Signed-off-by: Steve Markgraf <steve@steve-m.de>
2012-12-10 23:26:57 +01:00
Kyle Keen
562fd7e8e3 rtl_adsb: prototype
Signed-off-by: Steve Markgraf <steve@steve-m.de>
2012-12-10 22:37:25 +01:00
Kyle Keen
d6107bb059 rtl_fm: frequency ranges, flexible squelch
Signed-off-by: Steve Markgraf <steve@steve-m.de>
2012-12-09 17:15:01 +01:00
Kyle Keen
e4e8ef55fc rtl_fm: ppm and k/M/G suffixes
Signed-off-by: Steve Markgraf <steve@steve-m.de>
2012-12-09 17:14:56 +01:00
Steve Markgraf
43c0145200 rtl_eeprom: clean up get_string_descriptor()
Signed-off-by: Steve Markgraf <steve@steve-m.de>
2012-11-04 15:57:34 +01:00
Steve Markgraf
d3c9015d26 lib: add rtlsdr_get_index_by_serial()
This allows to open a device by a name (serial number string)
that has been programmed with rtl_eeprom -s.

Signed-off-by: Steve Markgraf <steve@steve-m.de>
2012-11-04 13:57:56 +01:00
Steve Markgraf
cc35aa64be rtl_eeprom, rtl_test: remove unused variables and labels
Signed-off-by: Steve Markgraf <steve@steve-m.de>
2012-11-04 13:53:11 +01:00
Steve Markgraf
fdc9dcbc6b rtl_eeprom: add other configurations to choose from
Signed-off-by: Steve Markgraf <steve@steve-m.de>
2012-11-03 17:29:59 +01:00
Steve Markgraf
b85ffcfea5 add library support for EEPROM access and tool for modification
rtl_eeprom can be used to modify the USB descriptor
strings etc.

Signed-off-by: Steve Markgraf <steve@steve-m.de>
2012-11-02 21:47:14 +01:00
Steve Markgraf
aad68f3a21 tuner_fc0013: disable loopthrough output
Signed-off-by: Steve Markgraf <steve@steve-m.de>
2012-10-28 22:24:37 +01:00
Steve Markgraf
ac05f9084c make sure offset tuning works with gr-osmosdr
Signed-off-by: Steve Markgraf <steve@steve-m.de>
2012-10-28 15:42:39 +01:00
Kyle Keen
3fdea955ca rtl_fm: windows support
Signed-off-by: Steve Markgraf <steve@steve-m.de>
2012-10-27 14:16:22 +02:00
Hoernchen
30cf1f3598 rtl_sdr: set binary file mode on win32
Signed-off-by: Steve Markgraf <steve@steve-m.de>
2012-10-26 23:31:10 +02:00
Steve Markgraf
c179f860d5 tuner_r820t: check if Nint is within allowed range
Signed-off-by: Steve Markgraf <steve@steve-m.de>
2012-10-26 19:22:52 +02:00
Steve Markgraf
105e77c5d9 add vid/pid of PixelView PV-DT235U(RN)
Signed-off-by: Steve Markgraf <steve@steve-m.de>
2012-10-26 19:18:22 +02:00
Kyle Keen
b0b9e3d24f rtl_fm: WBFM, AM, LSB and USB demod, raw IQ mode
Signed-off-by: Steve Markgraf <steve@steve-m.de>
2012-10-24 17:35:34 +02:00
Kyle Keen
995a195f4d rtl_test: add ppm measurement
Use with caution, the result highly depends on the
accuracy of the clocksource your machine uses.
On some machines it may be quite accurate, on
others completely off.

Signed-off-by: Steve Markgraf <steve@steve-m.de>
2012-10-24 17:35:30 +02:00
Steve Markgraf
ed449bc04d add PID of MSI DigiVox Micro HD
Signed-off-by: Steve Markgraf <steve@steve-m.de>
2012-10-21 17:22:39 +02:00
Steve Markgraf
cf66e3aa8b rtl_sdr: add -n parameter (only read n samples)
Signed-off-by: Steve Markgraf <steve@steve-m.de>
2012-10-20 19:43:13 +02:00
Steve Markgraf
25789493c6 tuner_r820t: add manual RF gain setting
Signed-off-by: Steve Markgraf <steve@steve-m.de>
2012-10-19 01:17:28 +02:00
Hoernchen
aabd42dd05 rtl_tcp: increase the timeout in worker thread
the reset takes ages on windows

Signed-off-by: Steve Markgraf <steve@steve-m.de>
2012-10-18 01:33:21 +02:00
Steve Markgraf
7ff4abd378 rtl_tcp: allow to set xtal frequencies
Signed-off-by: Steve Markgraf <steve@steve-m.de>
2012-10-14 20:39:09 +02:00
Steve Markgraf
c5d47b7f04 e4000_init(): use corrected xtal frequency
Otherwise the tuner would use the uncorrected xtal value
after enabling and disabling the direct sampling mode

Signed-off-by: Steve Markgraf <steve@steve-m.de>
2012-10-08 23:28:13 +02:00
Steve Markgraf
9b8b0e53f6 add getters for direct sampling and offset tuning mode
Signed-off-by: Steve Markgraf <steve@steve-m.de>
2012-10-07 17:43:32 +02:00
Steve Markgraf
22549e0da0 rtlsdr_set_direct_sampling(): fix issue when switching between inputs
Switching back from input 2 to 1 didn't work.

Signed-off-by: Steve Markgraf <steve@steve-m.de>
2012-10-07 16:24:18 +02:00
Steve Markgraf
d64c969bd6 tuner_r820t: improve tuning accuracy, allow freq correction
We now use Hz instead of KHz for calculating the PLL
parameters, and use the actual crystal frequency in Hz,
which allows to correct the frequency error in ppm.

Signed-off-by: Steve Markgraf <steve@steve-m.de>
2012-10-07 02:32:14 +02:00
Steve Markgraf
4c58bf8b1a rtl_tcp: make more functions of librtlsdr accessible via tcp
Signed-off-by: Steve Markgraf <steve@steve-m.de>
2012-10-06 19:47:36 +02:00
Steve Markgraf
b70c7d99f1 add function for offset tuning with zero-IF tuners
Signed-off-by: Steve Markgraf <steve@steve-m.de>
2012-10-06 19:43:25 +02:00
Steve Markgraf
1e67d2a9a3 rtlsdr_demod_write_reg(): return 0 on success
Thanks to DreamNik for reporting this issue.

Signed-off-by: Steve Markgraf <steve@steve-m.de>
2012-10-04 19:54:19 +02:00
Steve Markgraf
28ea914422 add new product ID
thanks to Andrew Harrison for reporting it.

Signed-off-by: Steve Markgraf <steve@steve-m.de>
2012-10-04 19:53:00 +02:00
Steve Markgraf
18687916d6 tuner_fc001x: fix tuning for frequencies < 45 MHz
This allows tuning to 27 MHz for example (civil band).
Best results are achieved when setting the gain to
very low values.

Signed-off-by: Steve Markgraf <steve@steve-m.de>
2012-10-03 17:19:29 +02:00
Steve Markgraf
b4e48d9555 rtlsdr_init_baseband: initialize possibly uninitialized registers
Signed-off-by: Steve Markgraf <steve@steve-m.de>
2012-10-01 02:13:25 +02:00
Steve Markgraf
a48f48e3b1 correct sample frequency with ppm offset
Signed-off-by: Steve Markgraf <steve@steve-m.de>
2012-10-01 01:55:46 +02:00
Steve Markgraf
35263d0df3 rtlsdr_set_direct_sampling: reset IF freq to 0 on zero-IF tuners
Signed-off-by: Steve Markgraf <steve@steve-m.de>
2012-09-20 23:44:49 +02:00
Steve Markgraf
143b103061 tuner_fc0013: fix and improve manual LNA gain
Signed-off-by: Steve Markgraf <steve@steve-m.de>
2012-09-20 00:47:11 +02:00
Steve Markgraf
15b9e7ef02 tuner_fc0013: setting GPIO not needed for filter selection
The driver selects the VHF/UHF filter via I2C.

Signed-off-by: Steve Markgraf <steve@steve-m.de>
2012-09-19 06:06:09 +02:00
Steve Markgraf
a943a2ed25 tuner_fc001x: check if PLL values are within boundaries
This fixes the issue of the FC0013 locking up at frequencies
between 928.0 and 950.0 MHz, which happened because
the numerator of the fraction exceeded its 5 bit limit.
For the tuner to behave normally again, the dongle needed
to be replugged.

For the FC0013 this now results in a small gap between
948.6 MHz and 950.0 MHz, where no valid PLL values
are existant.

For the FC0012 tuning is aborted when the maximum
frequency has been reached (948.6 MHz).

Signed-off-by: Steve Markgraf <steve@steve-m.de>
2012-09-19 03:15:43 +02:00
Steve Markgraf
01d8d308fc disable second ADC in IF mode, make input selectable in DS-mode
Signed-off-by: Steve Markgraf <steve@steve-m.de>
2012-09-16 16:24:58 +02:00
Steve Markgraf
519406264c make rtlsdr_close() build on win32 again
Signed-off-by: Steve Markgraf <steve@steve-m.de>
2012-09-13 23:27:35 +02:00
Steve Markgraf
fc5881d4cd add support for direct sampling mode
This commit adds the function rtlsdr_set_direct_sampling()
which can be used to enable/disable a mode where the
RTL2832 acts as a direct sampling receiver.

This mode disables the tuner, and by attaching a long
wire, or better, a 50Ω to 200Ω transformer and a lowpass-
filter to the In-phase ADC input (pin 1 or 2 of the RTL2832,
whereas pin 1 is at the molded dot) it is possible to listen to
shortwave radio stations. The coupling capacitors can be
left in place, but for better results they should be removed.

Tuning in this mode is done with the DDC, and since the
ADC samples with 28.8 MHz, tuning is possible from 0 to
28.8 MHz.

Signed-off-by: Steve Markgraf <steve@steve-m.de>
2012-09-13 21:53:51 +02:00
Kyle Keen
1533422f98 rtl_fm: half the oversample bugs
Signed-off-by: Steve Markgraf <steve@steve-m.de>
2012-09-10 18:51:07 +02:00
Kyle Keen
a8e7c7b21e rtl_fm: Axiomatic's automatic termination
Signed-off-by: Steve Markgraf <steve@steve-m.de>
2012-09-10 18:51:07 +02:00
Kyle Keen
f4a8a570c4 rtl_fm: fix auto/manual gain
Signed-off-by: Steve Markgraf <steve@steve-m.de>
2012-09-10 18:51:07 +02:00
Kyle Keen
c792c4aeac rtl_fm: bugs found by Axiomatic, alkw0ia and cgommer
Signed-off-by: Steve Markgraf <steve@steve-m.de>
2012-09-10 18:51:07 +02:00
Steve Markgraf
0c3c356d19 tuner_r820t: don't perform IMR calibration on init
This takes simply too much time (almost 3 seconds)
and doesn't really seem to make any difference for our
use case.

Signed-off-by: Steve Markgraf <steve@steve-m.de>
2012-09-09 17:45:00 +02:00
Steve Markgraf
5a26bd51e7 add initial support for the R820T tuner
Signed-off-by: Steve Markgraf <steve@steve-m.de>
2012-09-08 02:37:30 +02:00
Steve Markgraf
5f88049c0c rtlsdr_i2c_rad_reg: fix uninitialized variable
This could lead to a misdetection of the tuner on some
platforms (E4K instead of FC0013 on the raspberry pi).

Thanks to Christoph Gommel for reporting this issue.

Signed-off-by: Steve Markgraf <steve@steve-m.de>
2012-08-10 02:11:40 +02:00
Dimitri Stolnikov
22b9d82fb5 implement a more robust cancelation mechanism of async reader 2012-08-08 21:21:46 +02:00
Dimitri Stolnikov
b49a8336ee disable e4k enhanced mixer gain as it seems to have no effect 2012-08-05 16:35:47 +02:00
Dimitri Stolnikov
88cd4b33cf return RTLSDR_TUNER_UNKNOWN (0) on failure of rtlsdr_get_tuner_type 2012-08-02 19:32:40 +02:00
Steve Markgraf
54fe3eca01 don't print i2c read/write errors for now
During autodetection of the tuner they are
normal and may cause confusion.

Signed-off-by: Steve Markgraf <steve@steve-m.de>
2012-07-21 20:50:51 +02:00
Steve Markgraf
3dff6f3c26 add pid of MyGica TD312 stick
Signed-off-by: Steve Markgraf <steve@steve-m.de>
2012-07-20 22:36:22 +02:00
Hoernchen
2b8dfe43f8 fix win32 build
Signed-off-by: Steve Markgraf <steve@steve-m.de>
2012-07-17 23:01:33 +02:00
Steve Markgraf
ec925a64ad rtl_fm: disable win build for now, install rtl_fm
Signed-off-by: Steve Markgraf <steve@steve-m.de>
2012-07-17 21:38:52 +02:00
Steve Markgraf
de978c3b3a rtl_fm: fix typo that caused warning
Signed-off-by: Steve Markgraf <steve@steve-m.de>
2012-07-17 21:20:41 +02:00
Steve Markgraf
f7f02836c4 rtl_fm: use getopt on win32 as well
Signed-off-by: Steve Markgraf <steve@steve-m.de>
2012-07-17 20:47:07 +02:00
Kyle Keen
374abaebb8 rtl_fm: add experimental options
Signed-off-by: Steve Markgraf <steve@steve-m.de>
2012-07-17 20:42:03 +02:00
Kyle Keen
d2f8faa204 rtl_fm: disabling fast_atan2() for now, too noisy
Signed-off-by: Steve Markgraf <steve@steve-m.de>
2012-07-17 20:42:03 +02:00
Kyle Keen
62cc815863 rtl_fm: crude integer atan2, around 40% faster
Signed-off-by: Steve Markgraf <steve@steve-m.de>
2012-07-17 20:42:03 +02:00
Kyle Keen
6e80117205 rtl_fm: missed a var init
Signed-off-by: Steve Markgraf <steve@steve-m.de>
2012-07-17 20:42:03 +02:00
Kyle Keen
d56267a42f rtl_fm: tweaks for nicer scanning
Signed-off-by: Steve Markgraf <steve@steve-m.de>
2012-07-17 20:42:03 +02:00
Kyle Keen
c3dde1db91 rtl_fm: multithreaded and frequency scanning
Signed-off-by: Steve Markgraf <steve@steve-m.de>
2012-07-17 20:42:03 +02:00
Kyle Keen
defa7af74b rtl_fm: broken multi freq scanning
Signed-off-by: Steve Markgraf <steve@steve-m.de>
2012-07-17 20:42:03 +02:00
Kyle Keen
6a9f5c14c2 rtl_fm: add -E for optional lower edge tuning
Signed-off-by: Steve Markgraf <steve@steve-m.de>
2012-07-17 20:42:03 +02:00
Kyle Keen
37f5559d1c rtl_fm: satisfactory squelch
Signed-off-by: Steve Markgraf <steve@steve-m.de>
2012-07-17 20:42:03 +02:00
Steve Markgraf
fc390b3224 build rtl_fm
Signed-off-by: Steve Markgraf <steve@steve-m.de>
2012-07-17 20:41:27 +02:00
Kyle Keen
6328e11da6 rtl_fm: prototype FM demod
Signed-off-by: Steve Markgraf <steve@steve-m.de>
2012-07-17 20:40:15 +02:00
Steve Markgraf
9d0232385b add debug messages to rtlsdr_read/write_array
Signed-off-by: Steve Markgraf <steve@steve-m.de>
2012-07-16 21:11:26 +02:00
Dimitri Stolnikov
42a6592e63 disable sample rate correction until we find a proper solution 2012-07-09 22:22:55 +02:00
Steve Markgraf
2ad7b39e2d rtlsdr_set_tuner_if_gain(): enable i2c repeater
Thanks to Stefan Sydow for noticing this bug.

Signed-off-by: Steve Markgraf <steve@steve-m.de>
2012-07-08 23:28:31 +02:00
Dimitri Stolnikov
f9b5d7b0a6 apply frequency correction value on the xtal clock directly
by using this approach both, the tuning frequency and the sample rate
should be corrected at the same time.
2012-07-08 15:52:59 +02:00
Steve Markgraf
7dc15d9fd7 add PIDs for 2 variants of the Terratex NOXON dongle
Signed-off-by: Steve Markgraf <steve@steve-m.de>
2012-07-07 22:52:29 +02:00
Steve Markgraf
f3cf83e3d7 disable DAGC by default, add control function
This adds rtlsdr_set_agc_mode() to enable/disable it.
Thanks to Leif Asbrink for finding this setting.

Signed-off-by: Steve Markgraf <steve@steve-m.de>
2012-07-07 21:06:38 +02:00
Steve Markgraf
98d1b864b6 have *_write_reg() functions pass through the return value
Signed-off-by: Steve Markgraf <steve@steve-m.de>
2012-07-07 20:56:12 +02:00
Dimitri Stolnikov
6ea029d92c add api function to control the IF gain for E4000 tuners 2012-07-05 00:28:52 +02:00
Steve Markgraf
304c7c863d rtl_test: tuner PLL benchmark only works with E4000
Signed-off-by: Steve Markgraf <steve@steve-m.de>
2012-06-28 14:44:25 +02:00
Steve Markgraf
fc736ae67f init: disable 4 MHz clock output
The pin where this clock is outputted is quite close to the
ADC inputs, so better disable it.

Signed-off-by: Steve Markgraf <steve@steve-m.de>
2012-06-22 15:52:35 +02:00
Dimitri Stolnikov
b09628b3e8 fix symbol visibility for automake builds 2012-06-13 01:29:37 +02:00
Steve Markgraf
e5afd9894d tuner_fc0012: add manual gain support
Signed-off-by: Steve Markgraf <steve@steve-m.de>
2012-06-09 00:17:09 +02:00
Steve Markgraf
6aec27c6d0 tuner_e4k: relicense driver under GPLv2+
All authors have agreed to relicense the driver under
GPLv2+, for easing integration in other projects
(such as V4L).

Signed-off-by: Steve Markgraf <steve@steve-m.de>
2012-06-08 18:52:47 +02:00
Steve Markgraf
1686a0f905 add another PID for Noxon v1 stick
Signed-off-by: Steve Markgraf <steve@steve-m.de>
2012-06-07 14:00:40 +02:00
Steve Markgraf
3838df8669 rtl_tcp: ignore SIGPIPE
Signed-off-by: Steve Markgraf <steve@steve-m.de>
2012-06-05 18:04:10 +02:00
Steve Markgraf
9d58aec8cf correctly clear DDC shift and if_freq registers
This fixes the 2 kHz LO shift.

Signed-off-by: Steve Markgraf <steve@steve-m.de>
2012-06-03 21:02:48 +02:00
Dimitri Stolnikov
7bd3933c41 introduce getters for tuner parameters (gain, type) 2012-06-02 01:36:42 +02:00
Dimitri Stolnikov
d5bfa3867f print the frequency for which the PLL couldn't lock 2012-06-01 20:53:35 +02:00
Steve Markgraf
352e50df43 add PID for Zaapa ZT-MINDVBZP
Signed-off-by: Steve Markgraf <steve@steve-m.de>
2012-05-30 20:59:59 +02:00
Steve Markgraf
b136a5ae9e link applications to shared library
This saves space on low-memory devices.

Signed-off-by: Steve Markgraf <steve@steve-m.de>
2012-05-29 22:00:54 +02:00
Steve Markgraf
4031d6ed04 tuner_fc0012: use new cleaned-up driver
The driver was taken from http://git.linuxtv.org/ and adapted
for librtlsdr. Manual gain will be added in a follow-up commit.

Signed-off-by: Steve Markgraf <steve@steve-m.de>
2012-05-29 03:31:49 +02:00
Steve Markgraf
92d936568c rtl_tcp: add parameter for changing number of buffers
This is useful for devices with low memory, e.g.
routers with OpenWRT (decrease to 8 for example).

Signed-off-by: Steve Markgraf <steve@steve-m.de>
2012-05-29 02:40:49 +02:00