Commit Graph

661 Commits (development)

Author SHA1 Message Date
hayati ayguen 6d8eff3f85 fix millisecond parsing - used in rtl_raw2wav command line
see https://github.com/librtlsdr/librtlsdr/issues/86

Signed-off-by: hayati ayguen <h_ayguen@web.de>
2020-08-25 02:18:47 +02:00
hayati ayguen 04cab17135 patch from ValZapod to fix compilation/link issue on latest debian
see https://github.com/librtlsdr/librtlsdr/issues/82

Signed-off-by: hayati ayguen <h_ayguen@web.de>
2020-08-24 11:56:44 +02:00
hayati ayguen ef238fe069 rtl_power: epoch time
(cherry picked from commit c6e6be52f783bb11d4554b6122a6439454e82713)
fixed conflicts and removed compiler warnings
see https://github.com/librtlsdr/librtlsdr/issues/17

Signed-off-by: hayati ayguen <h_ayguen@web.de>
2020-08-24 04:49:18 +02:00
hayati ayguen f03ed7a887 allow setting options from environment variable "LIBRTLSDR_OPT"
same syntax as rtlsdr_set_opt_string()

Signed-off-by: hayati ayguen <h_ayguen@web.de>
2020-08-24 04:18:12 +02:00
hayati ayguen 6cda6ddac7 added LOG_API_CALLS for debugging
Signed-off-by: hayati ayguen <h_ayguen@web.de>
2020-08-24 04:18:12 +02:00
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 2d56e3202c suppress PLL error printfs for tuner range tests with 'rtl_test -t'
without, terminal is flooded with errors

Signed-off-by: hayati ayguen <h_ayguen@web.de>
2020-08-22 16:40:18 -07:00
hayati ayguen 6efb9de24d fixed usage for '-O ifm=' (VGA gain) and default value for that register
* before having possibility to set VGA from outside,
it was set to 0x8 (=16.3 dB) for manual, but
it was set to 0xb (=26.5 dB) for automatic (LNA/Mixer) gain.
erroneously it was initialized to 0x0 in r82xx_init_array[]
* also fixed parsing/processing of ifm value
* might fix https://github.com/librtlsdr/librtlsdr/issues/81

Signed-off-by: hayati ayguen <h_ayguen@web.de>
2020-08-22 06:44:51 -07:00
hayati ayguen 656a5b5d86 rtl_test: tests and verbose output for "lost at least .. bytes"
see https://github.com/librtlsdr/librtlsdr/issues/77

Signed-off-by: hayati ayguen <h_ayguen@web.de>
2020-08-22 03:37:06 -07:00
hayati ayguen a5a2cc201d amended README_improvements.md - mainly on rtl_fm
see https://github.com/librtlsdr/librtlsdr/issues/43
asking for "README with high level overview/status for this fork"

Signed-off-by: hayati ayguen <h_ayguen@web.de>
2020-08-21 17:20:59 -07:00
hayati ayguen 27628aa4e2 convenience: No junk when device info isn't properly extracted.
(cherry picked from commit d426cfd23126be10eb296abad4636e3e7ec149b4)

fixed conflicts .. applied to correct file: rtl_convenience.c
and improved that patch

Signed-off-by: hayati ayguen <h_ayguen@web.de>
2020-08-21 16:31:20 -07:00
hayati ayguen 04ce5ec246 rtl_test: abort tuner range test, for error -4 == LIBUSB_ERROR_NO_DEVICE
* abort early - before flooding the terminal

Signed-off-by: hayati ayguen <h_ayguen@web.de>
2020-08-21 16:02:29 -07:00
hayati ayguen e315a41ec5 bugfix, 3rd try: avoid printing "PLL not locked"
* bugfix wrong return value in r82xx_set_pll(),
when "PLL not locked" was printed.
removed all similar messages - regarded as noise,
e.g. when running rtl_test -t
* suppress output of tuning band 0 - 0 Hz in rtl_test

Signed-off-by: hayati ayguen <h_ayguen@web.de>
2020-08-21 13:29:10 -07:00
hayati ayguen 4123e706ee rtl_test: generic tuner range test
This scans 0 - 3GHz looking for frequencies that can be tuned to without
error, and refines the band edges further once a tuneable band is found. It
should work with any tuner that correctly reports tuning errors. It takes
about 1.5 minutes to complete on a R820T.

(cherry picked from commit a710e4eed2a1662fa758b3d538e7643760330d52)

Signed-off-by: hayati ayguen <h_ayguen@web.de>
2020-08-21 13:19:24 -07:00
hayati ayguen e42e5771fc rtl_test: r820t tuning range
(cherry picked from commit c5d7ebee5c7a40e52dbc50e3931f7d5096d7a9a6)
set rtlsdr_set_opt_string() - especially sideband,
before testing tuning range

Signed-off-by: hayati ayguen <h_ayguen@web.de>
2020-08-21 12:55:18 -07:00
hayati ayguen 48da9065cf option to configure GPIO pin for biasT with rtlsdr_set_opt_string() from CLI
Signed-off-by: hayati ayguen <h_ayguen@web.de>
2020-08-21 12:24:21 -07:00
hayati ayguen 981586ccc3 fix aplay example in usage of rtl_fm
* aplay doesn't accept "k" suffix with rate option "-r":
aplay: main:637: invalid rate argument '32k'

Signed-off-by: hayati ayguen <h_ayguen@web.de>
2020-08-21 08:38:17 -07:00
hayati ayguen c605fa928a minor comment
Signed-off-by: hayati ayguen <h_ayguen@web.de>
2020-08-21 08:31:45 -07:00
hayati ayguen 38cd80a1b7 lib: cache i2c repeater
(cherry picked from commit d59b178cc1eb27f0beca802a9cf82f1d6ded3a48)

* adapted for thread mutex .. thus, we can't do early exit
* removed all the additional rtlsdr_set_i2c_repeater() calls!
* checked all calls to rtlsdr_set_i2c_repeater()

Signed-off-by: hayati ayguen <h_ayguen@web.de>
2020-08-21 08:31:21 -07:00
hayati ayguen 8ba6592f62 rtl_fm: esbensen's discriminant
(cherry picked from commit 3dfa4add72969500f874f0ada99efdeec6fa0a06)

Signed-off-by: hayati ayguen <h_ayguen@web.de>
2020-08-21 05:58:52 -07:00
Kyle Keen 4a50d08481 rtl_fm: bugfix from M. Curtis
(cherry picked from commit ebb5f2a4cfa995efa2420853e36d96697e02ef63)
2020-08-21 05:34:01 -07:00
hayati ayguen 8098c2c4f6 fixed errors, see https://github.com/librtlsdr/librtlsdr/issues/79
Signed-off-by: hayati ayguen <h_ayguen@web.de>
2020-08-21 05:26:33 -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
Thomas Petazzoni 7396271f26 cmake/Modules/Version.cmake: don't use Git version if not in a Git repo
If the librtlsdr code comes from a tarball, it doesn't have any .git/
metadata, and therefore even if Git (as a tool) is found, the logic in
cmake/Modules/Version.cmake fails finding a version through Git:

-- Extracting version information from git describe...
fatal: Not a git repository (or any of the parent directories): .git

As a consequence, the VERSION variable is empty, which later causes
cmake to bail out with:

CMake Error at /home/test/autobuild/run/instance-1/output-1/host/share/cmake-3.15/Modules/WriteBasicConfigVersionFile.cmake:43 (message):
  No VERSION specified for WRITE_BASIC_CONFIG_VERSION_FILE()
Call Stack (most recent call first):
  /home/test/autobuild/run/instance-1/output-1/host/share/cmake-3.15/Modules/CMakePackageConfigHelpers.cmake:225 (write_basic_config_version_file)
  CMakeLists.txt:173 (write_basic_package_version_file)

To avoid this, we only use Git to determine the version if the cmake
project top-level source directory has a .git/ folder.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
(cherry picked from commit feb5d9c6b7bcec788f9b01781c205e31fff260e7)
2020-08-19 22:29:34 -07:00
hayati ayguen c6bae8327a added README_improvements.md
see https://github.com/librtlsdr/librtlsdr/issues/43
asking for "README with high level overview/status for this fork"

Signed-off-by: hayati ayguen <h_ayguen@web.de>
2020-08-19 22:15:41 -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 cfceb5ad69 fixed gcc-9.3.0 compiler warnings and missing symbol in rtlsdr_rpc
Signed-off-by: hayati ayguen <h_ayguen@web.de>
2020-08-19 18:29:16 -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 2c2877e3c5 rtl_power: fix NaN on 32 bit platforms (T. Kaminski)
(cherry picked from commit 1b1c03d4e9330c30c9f4cc6de11fbe1572664fe7)
and fixed merge conflicts

Signed-off-by: hayati ayguen <h_ayguen@web.de>
2020-08-19 08:55:51 -07:00
hayati ayguen 2213a49673 remove compiler warnings - amongst a lock error
* multi-command definition of safe_cond_wait() was used in if without '{ }'
 with rtl_fm.

Signed-off-by: hayati ayguen <h_ayguen@web.de>
2020-08-19 02:58:45 -07:00
Steve Markgraf c59f109319 lib: fix memory leak in rtlsdr_open()
Thanks to Vincent Perrier for reporting the bug.

(cherry picked from commit be1d1206bfb6e6c41f7d91b20b77e20f929fa6a7)
2020-08-19 02:05:42 -07:00
hayati ayguen 883229dfc6 bugfix, 2nd try: avoid printing "PLL not locked"
* other case: setting bandwidth before r82xx_set_freq()
* r82xx_set_tv_standard() now sets rf_freq
* r82xx_set_pll() keeps last valid frequency for freq=0

Signed-off-by: hayati ayguen <h_ayguen@web.de>
2020-08-18 17:30:06 -07:00
hayati ayguen 220d41c55f bugfix: avoid printing "PLL not locked" when frequency is not initialized
* see https://github.com/librtlsdr/librtlsdr/issues/57
* it's necessary to remember the rf_frequency,
 from last r82xx_set_freq() call

Signed-off-by: hayati ayguen <h_ayguen@web.de>
2020-08-18 16:01:51 -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 e78ecb0cf6 added driver option '-O' for direct sampling mode 'dm=' and threshold freq
see https://github.com/librtlsdr/librtlsdr/issues/16

Signed-off-by: hayati ayguen <h_ayguen@web.de>
2020-08-18 06:14:10 -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
Lev Serebryakov cb5b953d25 Non-volatile access to volatile object is UB. 2020-08-01 17:37:27 +00:00
Lev Serebryakov 037d192d76 Add "volatile" to two fields of rtlsdr_dev
librtlsdr uses two fileds of struct rtlsdr_dev to communicate
between threads. On hardware with weak memory model it is not
guaranteed that it will work, as C memory model guarantees
nothing for simple variables.

 Using C11 atomics seems to be overkill here, but async_status
and async_cancel better be marked as "volatile".
2020-08-01 17:36:09 +00:00
Jerome b09c635885 specify number of seconds to run 2020-08-01 17:11:00 +00:00
Joseph Poirier 748e4564e9 fixes issue #39 2020-08-01 16:57:47 +00:00
hayati ayguen 07370a3a22
Merge pull request #72 from stef/development
added support for rtlsdr_rpc_set_and_get_tuner_bandwidth in rtl_rpc
2020-08-01 16:22:42 +00:00
hayati ayguen 91dbae89d7
Merge pull request #68 from hayguen/development
option '-H' to write wave Header for rtl_sdr and rtl_fm
2020-08-01 08:11:08 +00:00
hayati ayguen 0f8d1fc354 bugfix rtlsdr option -n, which could sometimes run endless ..
Signed-off-by: hayati ayguen <h_ayguen@web.de>
2020-05-08 22:57:17 +00:00
stf 423aee453f added support for rtlsdr_rpc_set_and_get_tuner_bandwidth in rtl_rpc 2020-04-05 19:35:23 +00:00
hayati ayguen 3196b9a974 detailed RTL driver options usage, 'sb' options 0 (LSB) or 1 (USB)
Signed-off-by: hayati ayguen <h_ayguen@web.de>
2020-03-19 05:33:25 +00:00