Commit Graph

75 Commits (6cda6ddac7380c97d5f899945bd3a5552ebffb90)

Author SHA1 Message Date
hayati ayguen d8f4482344 (try to) fix 'd6d3be3 is breaking kal -s GSM900 channel visability'
* see https://github.com/librtlsdr/librtlsdr/issues/81
* looks to be an initialization problem of R820T/2's I2C registers

Signed-off-by: hayati ayguen <h_ayguen@web.de>
2020-08-24 04:17:58 +02:00
hayati ayguen 3aa88a9885 bugfix and clarify API function rtlsdr_get_tuner_gain()
Signed-off-by: hayati ayguen <h_ayguen@web.de>
2020-08-23 08:29:28 -07:00
hayati ayguen d1395e22ba fix API description for rtlsdr_set_tuner_if_mode()
Signed-off-by: hayati ayguen <h_ayguen@web.de>
2020-08-23 07:55:57 -07:00
hayati ayguen 76ee57b74b prepare version for next release: 0.8
* removed version defines in rtl-sdr.h
version is now from single source: rtl_app_ver.h.in
* output version information with usage() - in all tools:
- of their build
- and the utilized library (.so)
* unified usage() messages over all tools

Signed-off-by: hayati ayguen <h_ayguen@web.de>
2020-08-21 05:18:01 -07:00
hayati ayguen d6337a2429 rtl_biast: Add rtl_biast
This is an import of the rtl_biast command line tool from the
rtlsdrblog github repository.  It's easier to include it here than
try to package up the separate application because they both
wish to install dynamic libraries.

(cherry picked from commit 43b257854c2c4f6d30649e34d1d1473e72630c5a)
resolved conflicts and amended API documentation on
rtlsdr_set_bias_tee() and rtlsdr_set_bias_tee_gpio()

Signed-off-by: hayati ayguen <h_ayguen@web.de>
2020-08-19 18:29:47 -07:00
hayati ayguen 284b415ec3 lib: Add GPIO version of the bias tee configuration API
rtl_biast allows for non-default GPIO pins to be used.
Add an API call which allows for that.

(cherry picked from commit 5d0735f5dfe276203261b8bcd3817341d4630ab2)
fixed conflicts

Signed-off-by: hayati ayguen <h_ayguen@web.de>
2020-08-19 15:06:55 -07:00
hayati ayguen a88dee8482 fix api documentation in rtl-sdr.h
Signed-off-by: hayati ayguen <h_ayguen@web.de>
2020-08-19 14:50:26 -07:00
hayati ayguen dc1e5a1618 replaced all 'R820T' by 'R820T/2'
this is to indicate, they are not distinguishable in software

Signed-off-by: hayati ayguen <h_ayguen@web.de>
2020-08-18 12:27:55 -07:00
hayati ayguen 756d05cf2d fixed/amended API documentation on return
* added documentation for rtlsdr_open()
* added documentation for rtlsdr_close()
* fixed documentation for rtlsdr_set_center_freq()
* amended documentation for rtlsdr_get_freq_correction()
 and rtlsdr_get_tuner_gain() - but no good error indication possible
 without API change
* added documentation for rtlsdr_reset_buffer() and rtlsdr_read_sync()

Signed-off-by: hayati ayguen <h_ayguen@web.de>
2020-08-18 12:16:17 -07:00
hayati ayguen f93712213d
Merge pull request #74 from xloem/patch-1
Update rtl-sdr.h
2020-08-01 21:36:11 +00:00
xloem 0d369d9178
Update rtl-sdr.h
Recently merged PR left this unaddressed.
2020-08-01 17:27:53 -04:00
hayati ayguen a500314933 rtlsdr_set_tuner_if_mode() further simplified
* modified API mode values/ranges

Signed-off-by: hayati ayguen <h_ayguen@web.de>
2019-08-20 20:45:46 +00:00
hayati ayguen bc15b17dd0 rtlsdr_set_tuner_agc_mode() -> rtlsdr_set_tuner_if_mode() and simplified
* renamed API
* renamed TCP command enum to SET_TUNER_IF_MODE
* simplified interface
* if_mode/gain is now applied independent of AGC

Signed-off-by: hayati ayguen <h_ayguen@web.de>
2019-08-18 22:39:56 +00:00
hayati ayguen 9825bcefe5 additional agc_variant modes for rtlsdr_set_tuner_agc_mode()
set VGA explicitly with active AGC on LNA/Mixer

Signed-off-by: hayati ayguen <h_ayguen@web.de>
2019-08-05 06:40:30 +00:00
hayati ayguen ab50557d89 added agc_variant = -2 for rtlsdr_set_tuner_agc_mode()
Signed-off-by: hayati ayguen <h_ayguen@web.de>
2019-07-30 23:59:12 +02:00
hayati ayguen 22a920d0a6 merge of great additions, e.g. rtlsdr_set_tuner_sideband()
* rtlsdr_set_tuner_sideband():
- "HF-Hase" Bernhard Kistinger (DB9PP) found out,
that one of the undocumented I2C register bits of R820T tuner
controls the used tuner/mixer lower or supper sideband.
That was by testing/playing with a special QIRX version,
showing and allowing change of all I2C registers.
- previous additions in rtl_tcp allowed control of I2C registers;
in addition register contents can be transmitted periodically (to QIRX)
- "Oldenburger" developed a first version controlling the sideband bit,
and additional spectral flipping (spectrum inversion) in the RTL2832
- i've merged Oldenburger's changes with my rtlsdr_set_tuner_band_center()
=> altogether, there's no spectrum inversion, the band center stays,
just the IF filters (steep lowpass and not-so-steep highpass) switch positions

* Oldenburger's changes for FC0012 tuner
* Oldenburger added description of R820T's I2C registers
* rtl_tcp's new response channel now occupies an additional port,
usally 1235, which is +1 of default control port.
this can be deactivated by command line

Signed-off-by: hayati ayguen <h_ayguen@web.de>
2019-07-28 01:31:03 +02:00
hayati ayguen 75f97e566d enhance version information, added API functions for version
distinguish between library version .. and program version

Signed-off-by: hayati ayguen <h_ayguen@web.de>
2019-07-28 00:15:34 +02:00
hayati ayguen fdaaed9580 cmake option WITH_RPC - defaulting to OFF
Signed-off-by: hayati ayguen <h_ayguen@web.de>
2019-07-20 04:12:28 +02:00
hayati ayguen d6d3be3952 added API rtlsdr_set_tuner_agc_mode(), updated r82xx_set_bandwidth()
* added TCP/UDP command SET_TUNER_AGC_VARIANT = 0x46
* updated r82xx_set_bandwidth()
* added several commands to UDP control server:
  f: set RF center frequency
  b: set tuner bandwidth
  c: set tuner bandwidth center in output
  a: set tuner AGC variant
  m: set manual tuner gain
  M: set gainMode
  h: print help

Signed-off-by: hayati ayguen <h_ayguen@web.de>
2019-07-20 00:37:03 +02:00
hayati ayguen cfc56ba7e6 add API rtlsdr_set_tuner_band_center() +rtl_tcp +rtl_udp
* use rtlsdr_get_opt_help() in usage of tools

Signed-off-by: hayati ayguen <h_ayguen@web.de>
2019-06-19 03:30:00 +02:00
hayati ayguen ce12ac0fd9 further changes/additions for udp server
* added API rtlsdr_set_tuner_i2c_override() to keep register contents
* added SET_I2C_TUNER_REGISTER and SET_I2C_TUNER_OVERRIDE commands
 to rtl_tcp for the R820T tuner
* moved udp server variables into struct rtlsdr_dev
* added hexadecimal and binary format at input for udp server
* start udp server optionally at rtlsdr_set_opt_string()
 with option '-O port='

Signed-off-by: hayati ayguen <h_ayguen@web.de>
2019-05-05 19:27:10 +02:00
hayati ayguen dd313f8d15 expose/permit hacking of Tuner-specific I2C registers
implemented for R820T tuner

Signed-off-by: hayati ayguen <h_ayguen@web.de>
2019-04-20 15:31:53 +02:00
hayati ayguen dc3c2dae0e new API function rtlsdr_set_opt_string()
* idea is, that CLI programs don't need to implement
  every single RTL option themselves
* option '-O' for test in rtl_test and rtl_fm

Signed-off-by: hayati ayguen <h_ayguen@web.de>
2019-01-13 16:03:32 +00:00
Karl Semich 3180dba9ff Merge commit '9573e68' from 'osmocom/master' 2018-10-03 20:32:19 +00:00
Lucas Teske 2be1612e60 lib: Use GPIO P0 to toggle an (optional) bias-t
At least one distributor of rtl-sdr dongles (rtl-sdr.com) added
a bias-t to their dongles which could be toggled via GPIO P0 of the
RTL2832U chip.

source: http://www.rtl-sdr.com/rtl-sdr-blog-v-3-dongles-user-guide/

Signed-off-by: Steve Markgraf <steve@steve-m.de>
2017-06-09 15:06:23 +02:00
Lucas Teske 0c27010054
Fixed missing stddef.h in rtl-sdr.h 2016-12-04 14:21:19 -02:00
Lucas Teske 30a3216b2d
Moved include rtl_tcp.h from rtl-sdr.h to rtl_tcp.c (where it should be)
*	So @f4exb was right to include the rtl_tcp.h in CMakeLists install. If anyone is making a C program that communicates with rtl_tcp, it will probably use the enums. (See PR #22 and issue #21)
*	Added rtl_tcp.h to CMakeLists install script and moved rtl_tcp.h include to rtl_tcp.c file
*	Added Eclipse gitignore (for anyone that uses eclipse to compile)
*	Closes Issue #21
2016-11-27 22:22:25 -02:00
hayati ayguen 43c4028b00
direct sampling mode switching depending on center_frequency
added API function rtlsdr_set_ds_mode(dev, enum rtlsdr_ds_mode, freq_threshold)
added CLI option '-D' to rtl_(fm|power|tcp) for mode and threshold frequency

Signed-off-by: hayati ayguen <h_ayguen@web.de>
2016-11-27 22:22:25 -02:00
Lucas Teske 7fe3ba3835
Added Bias T Support from RTL-SDR Blog V3 Dongle 2016-11-27 22:21:46 -02:00
Lucas Teske f0c0e8a9ed
Disabling RPC in Windows builds. It uses POSIX calls and we should port it
in the future.
2016-08-17 10:44:02 -03:00
rxseger a577352932 Merge branch 'development' into ir
Change infrared wait time flag to -W to fix conflict with the
new development-branch -w flag for tuner bandwidth

Conflicts:
	src/rtl_tcp.c
2016-07-03 23:42:53 +00:00
rxseger 61d845e694 rtlsdr_ir_query() returns packed buffer, rtl_ir prints 2016-07-02 23:46:49 -07:00
rxseger ed6c2deb9a rtl_ir: query IR in a loop 2016-07-02 22:13:08 -07:00
rxseger 45abfbeb5b Fix rtl28xxu_wr_reg_mask return code, now <0 is error 2016-07-02 20:15:17 -07:00
Hayati Ayguen 240abf6076 use offset tuning when using bandwidth option
bandwidth filter are around center frequency
without offset tuning rtl_fm automatically uses the frequency -fs/4 for demodulation
  but this lies outside the bandwidth filter!
  switch on offset option to use the center frequency for demodulation

fixed/precised output texts
output available bandwidths in kHz for better readability
2016-03-25 16:58:36 +01:00
Hayati Ayguen af20337c93 added rtlsdr_set_and_get_tuner_bandwidth() to RTLSDR_API
this allows to return the configured/applied bandwidth to the caller
this also allows pre-determining all possible bandwidth values (with apply_bw=0)
  see rtl_fm with verbose flag, when using -w option
API does only work for R820T tuner. other tuner always return 0 (=unknown) bandwidth

Signed-off-by: Lucas Teske <lucas@teske.net.br>
2016-03-20 12:48:21 -03:00
Lucas Teske ba43a14e92 Updates on rtl_tcp
*	Added Bandwidth Parameter (-w) to rtl_tcp to set the device bandwidth through cmd args
*	Added Bandwidth Network Parameter (0x0E) to rtl_tcp to set the device bandwidth through network
*	Added RTL_TCP_COMMANDS enum to better organize the network commands
*	Added binary files to gitignore
2016-03-20 12:48:21 -03:00
Lucas Teske 25d0e8e673 Ported SDR# R820T Manual Gain Settings Plugin
*	Ported Manual Gain Settings for R820T from http://sourceforge.net/projects/sdrr820tmanualgainsettings/
2016-01-31 16:05:12 -02:00
Jiří Pinkava 92df068dc5 New functions rtlsdr_set_tuner_bandwidth()
Signed-off-by: Steve Markgraf <steve@steve-m.de>
2015-05-16 00:38:01 +02:00
Steve Markgraf 89f73b183f lib: change default number of transfers to 15
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.

Signed-off-by: Steve Markgraf <steve@steve-m.de>
2014-02-10 23:57:19 +01:00
Steve Markgraf 003bd51167 lib: check for validity of sample rates
Thanks to Joris van Rantwijk for finding what seems to be
a hardware limitation/bug (bit 28 of the rsamp register being
forced to the value of bit 27).

Signed-off-by: Steve Markgraf <steve@steve-m.de>
2014-01-05 22:51:44 +01:00
Steve Markgraf e61731d230 add support for R828D tuner
Signed-off-by: Steve Markgraf <steve@steve-m.de>
2013-11-04 21:51:35 +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 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 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 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 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 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
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
Dimitri Stolnikov 88cd4b33cf return RTLSDR_TUNER_UNKNOWN (0) on failure of rtlsdr_get_tuner_type 2012-08-02 19:32:40 +02:00