Commit Graph

626 Commits (5868a660a463a0c7c89eb1ba88c821a8572d7a98)

Author SHA1 Message Date
hayati ayguen 5868a660a4 added github actions, building linux and macos
Signed-off-by: hayati ayguen <h_ayguen@web.de>
2020-09-06 21:27:38 +02:00
hayati ayguen e5cdaf1ac9 added docs on GPIO pins and the API
Signed-off-by: hayati ayguen <h_ayguen@web.de>
2020-09-03 22:53:51 +02:00
hayati ayguen 2b88e8934b caching of GPIO mode (in/out) and rtl_tcp commands for GPIO
Signed-off-by: hayati ayguen <h_ayguen@web.de>
2020-09-01 20:28:47 +02:00
hayati ayguen 35b8c01015 added gpio functions to API and extended rtl_biast
* functions were provided from Marko Cebokli
at http://lea.hamradio.si/~s57uuu/mischam/rtlsdr/ports.html
* changed functions to return error/status
* added rtlsdr_set_gpio_status() - for testing

Signed-off-by: hayati ayguen <h_ayguen@web.de>
2020-08-31 07:41:10 +02:00
hayati ayguen 3864bf7889
Merge pull request #90 from theresiasnow/bugfix/mac_os_time_struct_fix
Bugfix/mac os time struct fix
2020-08-30 22:32:35 +02:00
Theresia Sofia Snow 39d225267e fixed bug with mac os using another time struct 2020-08-30 22:17:57 +02:00
hayati ayguen 1af2be095e (try to) fix compilation error on mac os catalina
see https://github.com/librtlsdr/librtlsdr/issues/89
simply deactivated sub-second precision

Signed-off-by: hayati ayguen <h_ayguen@web.de>
2020-08-30 22:00:15 +02:00
hayati ayguen a3349bd52b activate/use RTL's IF AGC control .. from https://github.com/old-dab/rtlsdr
purpose: make AGC more smooth .. and NOT freeze

Signed-off-by: hayati ayguen <h_ayguen@web.de>
2020-08-26 22:42:56 +02:00
hayati ayguen bff8cf771d remove compiler warnings, unused variables
Signed-off-by: hayati ayguen <h_ayguen@web.de>
2020-08-26 21:31:25 +02:00
hayati ayguen 9f6e5979b1 remove example in README .. as QIRX had other reasons ..
Signed-off-by: hayati ayguen <h_ayguen@web.de>
2020-08-26 01:01:11 +02:00
hayati ayguen 3b36ae5462 document rtlsdr_set_dithering() in README_improvements
Signed-off-by: hayati ayguen <h_ayguen@web.de>
2020-08-25 06:22:21 +02:00
hayati ayguen 9d96df8f66 fixed R820T I2C register docs on PW_SDM and added DITHER bit
Signed-off-by: hayati ayguen <h_ayguen@web.de>
2020-08-25 05:01:50 +02:00
hayati ayguen 8456c0d641 r82xx: set_dithering()
(cherry picked from commit 3f2632dcaf5ea2c2f28af99a94c64b804a063bfd)
fixed conflicts
see https://www.reddit.com/r/RTLSDR/comments/2cix12/improvements_to_hopping_and_filters_testing/
and https://github.com/librtlsdr/librtlsdr/issues/84

Signed-off-by: hayati ayguen <h_ayguen@web.de>
2020-08-25 04:49:39 +02:00
hayati ayguen 9856fa3db1 2nd try for fix R820T register value from environment
see https://github.com/librtlsdr/librtlsdr/issues/81#issuecomment-679449830

Signed-off-by: hayati ayguen <h_ayguen@web.de>
2020-08-25 03:42:07 +02:00
hayati ayguen f911bccfde fix R820T register value from environment .. and deactivate all env stuff
* ranges for RTL_R820_R30_HI(FILTER_EXT) / RTL_R820_R30_LO(PDET_CLK)
 were wrong. see https://github.com/librtlsdr/librtlsdr/issues/81#issuecomment-679304897
* deactivated USE_R82XX_ENV_VARS, which was only for development/tests

Signed-off-by: hayati ayguen <h_ayguen@web.de>
2020-08-25 03:17:43 +02:00
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