39 Commits

Author SHA1 Message Date
rtlsdrblog
65c8e96bb2 add -D direct sampling flag to rtl_tcp 2023-08-23 22:40:21 +12:00
Tobias Girstmair
142325a93c Fix signal handler from getting stuck in an endless loop
The signal handler for SIGINT/TERM/QUIT and, importantly, SIGPIPE tries
to write an informational message to stderr. When however stderr is
redirected to a closed pipe, this will cause (another) SIGPIPE, and in
turn the signal handler will get called again, and again and again.

Since we intend to exit rtl_fm anyways, we can just ignore this signal.
2022-12-17 21:18:49 +01:00
Martin Hauke
d770add42e Fix minGW build
MinGW-w64 ships all Windows SDK headers as lowercase, which prevents
cross-compiling this code from Linux.
2021-09-11 19:09:17 +02:00
Oliver Smith
3163b8817f rtl_tcp: put new DEFAULT_* constants in defines
Fix failures with some GCC versions:
  /usr/src/packages/BUILD/src/rtl_tcp.c:90:24: error: initializer element is not constant
   static int llbuf_num = DEFAULT_MAX_NUM_BUFFERS;

Fixes: 641c22 ("rtl_tcp: Extracted some constants out of printf strings")
Change-Id: Ia9e18d4c22d957f561dcdaf2657bb6d201374375
2021-08-18 10:32:10 +02:00
David Neiss
641c221fab rtl_tcp: Extracted some constants out of printf strings
The help output contained constants that should print values
based on code constants and not be hardcoded into the print strings.
2021-08-17 23:39:17 +02:00
Eric Wild
0847e93e08 fix windows build
We really should not have pkgconfig as a build requirement on windows.
2020-11-01 01:13:33 +01:00
Steve Markgraf
f427883320 rtl_tcp: Initialize listensocket
Older versions of GCC will complain that it can be used
uninitialized - which is not the case, but it breaks our Jenkins
build as we build with -Werror.
2020-02-26 23:52:02 +01:00
A. Maitland Bottoms
8985b45e1f rtl_tcp: Add IPv6 support
I've prepared this patch in response to Debian bug #870804
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=870804

It passes the text from the -a and -p options through
getaddrinfo() and uses the first result that has a valid
socket with a successful bind.

While not a complete bind to all possible valid names, it
does appear to address the use case of the bug submitter
without completely changing the program flow.
2020-02-26 22:55:23 +01:00
hayati ayguen
18bf26989c Add option '-T' for activating bias-T in rtl_(adsb|fm|power|tcp)
* added debug output when activating
Signed-off-by: hayati ayguen <h_ayguen@web.de>
* fixed options argument
Signed-off-by: Fabian P. Schmidt <kerel-fs@gmx.de>
Signed-off-by: Steve Markgraf <steve@steve-m.de>
2017-06-13 01:20:32 +02:00
Dimitri Stolnikov
fa3a113b77 rtl_tcp: add command for bias tee control 2017-06-12 00:04:05 +02:00
Steve Markgraf
6ee5573606 rtl_tcp: make all global variables static
Signed-off-by: Steve Markgraf <steve@steve-m.de>
2014-02-10 23:59:21 +01: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
c25f9cbc38 rtl_tcp: fix warning
Signed-off-by: Steve Markgraf <steve@steve-m.de>
2014-01-24 14:35:22 +01:00
Kyle Keen
27c0929939 utils: convenience functions
Signed-off-by: Steve Markgraf <steve@steve-m.de>
2014-01-23 23:21:23 +01:00
Hoernchen
7855c7c876 rtl_tcp: clean up error handling
Signed-off-by: Steve Markgraf <steve@steve-m.de>
2013-12-27 00:22:30 +01:00
Hoernchen
dbede4e3c0 tools: play nice with mingw/cygwin 2013-10-25 01:11:44 +02:00
Dimitri Stolnikov
698a8a152e rtl_tcp: fix printing of if gain values 2013-02-17 17:49:12 +01:00
Hoernchen
1cde8634ca rtl_tcp: add option to tame the linked list 2013-01-10 00:01:28 +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
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
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
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
3838df8669 rtl_tcp: ignore SIGPIPE
Signed-off-by: Steve Markgraf <steve@steve-m.de>
2012-06-05 18:04:10 +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
Steve Markgraf
d08c4770ab add local copy of getopt() for win32 build
Now all commandline utilities have a platform-independent
syntax.

Signed-off-by: Steve Markgraf <steve@steve-m.de>
2012-05-29 02:13:18 +02:00
Steve Markgraf
bc2c445055 rtl_tcp: fix includes
Signed-off-by: Steve Markgraf <steve@steve-m.de>
2012-05-29 00:32:12 +02:00
Christian Vogel
f3a6302866 rtl_tcp: silence warning about socklen_t/int sign.
rtl_tcp.c:457:57: warning: pointer types point to integer types
	with different sign passing 'int *', expected
	'socklen_t *' [-Wpointer-sign]

Signed-off-by: Steve Markgraf <steve@steve-m.de>
2012-05-25 20:54:03 +02:00
Dimitri Stolnikov
b5beddca4f fix gain setting and update usage information for CLI tools 2012-05-25 20:45:47 +02:00
Dimitri Stolnikov
6328438479 add help message to rtl_tcp spectrum server 2012-05-23 22:19:01 +02:00
Christian Vogel
73f54be2ed #include <math.h> was not needed.
Signed-off-by: Steve Markgraf <steve@steve-m.de>
2012-05-17 21:59:01 +02:00
Steve Markgraf
8dda694101 rtl_tcp: convert command parameters from network to host byteorder
Signed-off-by: Steve Markgraf <steve@steve-m.de>
2012-05-13 23:04:09 +02:00
Dimitri Stolnikov
e042c36cb5 rtl_sdr, rtl_tcp: cleaned up gain handling 2012-05-07 22:59:34 +02:00
Dimitri Stolnikov
b290116ac7 rtl_tcp: add handler for freq correction command 2012-05-07 22:38:25 +02:00
Dimitri Stolnikov
e5adc9a3ad rtl_tcp: add handlers for sample rate and gain mode commands 2012-05-06 19:39:39 +02:00
Dimitri Stolnikov
9167a01248 consolidate program arguments 2012-05-06 00:34:13 +02:00
Steve Markgraf
86c34428aa use new E4000 tuner driver, allow manual gain
Many thanks to Hoernchen for making the driver work properly
and adding manual gain!

Signed-off-by: Steve Markgraf <steve@steve-m.de>
2012-05-04 23:02:29 +02:00
Hoernchen
eb9a437de7 rtl_tcp: proper linux support
as well as some cosmetic fixes

Signed-off-by: Steve Markgraf <steve@steve-m.de>
2012-04-24 18:04:46 +02:00
Hoernchen
d55b491c43 add initial version of tcp server 2012-04-19 17:51:39 +02:00