rtl-sdr/tcp

Need help installing or figuring out something about your SDR? Ask here.
Post Reply
foxonezero
Posts: 2
Joined: Sun Feb 22, 2015 3:30 pm

rtl-sdr/tcp

Post by foxonezero » Sun Feb 22, 2015 3:46 pm

Hi
After many attempts on various computers and operating systems I finally got dongle installed, but every time I switch on I get warning message
NO CONNECTION COULD BE MADE BECAUSE THE TARGET MACHINE ACTIVELY REFUSED IT 127.0.0.1:1234
Any idea what is going on with my dongle?
It works fine on another computer with HDSDR.
foxonezero

rtlsdrblog
Site Admin
Posts: 1876
Joined: Mon Nov 19, 2012 11:54 pm

Re: rtl-sdr/tcp

Post by rtlsdrblog » Sun Feb 22, 2015 11:08 pm

Any reason as to why you are using RTL/TCP? RTL/TCP is for when you want to run the dongle remotely and send data over TCP.

For normal use with the dongle plugged directly into your PC you should select RTL-SDR/USB.

n1bpd
Posts: 1
Joined: Thu Mar 09, 2017 12:22 am

Re: rtl-sdr/tcp

Post by n1bpd » Thu Mar 09, 2017 12:23 am

Had the same issue with the "actively refused connection..."

Found this command to get it started -

rtl_tcp -a <ip address>

So I use -

Code: Select all

rtl_tcp -a 192.168.1.121
I know this is bring back a dead post, but I found this and many other threads like it that went somewhat unanswered before I found the above, hopefully will help someone in the future when searching.

hotpaw2
Posts: 58
Joined: Sat Jan 14, 2017 11:07 pm
Contact:

Re: rtl-sdr/tcp

Post by hotpaw2 » Thu Mar 09, 2017 1:27 am

That error message might imply that you have a firewall enabled on the computer running rtl_tcp. You might want to look up the command to turn off the firewall for port 1234 (or whatever port you are using).

One huge reason to use rtl_tcp is that opening a network socket may be far simpler than trying to build or linking to librtlsdr on many systems.

rtlsdrblog
Site Admin
Posts: 1876
Joined: Mon Nov 19, 2012 11:54 pm

Re: rtl-sdr/tcp

Post by rtlsdrblog » Thu Mar 09, 2017 11:17 pm

It's not clear if you guys are actually needing to use rtl_tcp. If you're just using the dongle on your local PC, you don't need it.

You only need to use rtl_tcp with SDR# if your trying to use the dongle on a remote networked PC.

NeilP
Posts: 11
Joined: Fri Jul 20, 2018 12:32 pm

Re: rtl-sdr/tcp

Post by NeilP » Mon Sep 24, 2018 11:55 am

Why would this same message suddenly appear on a working system with no system changes ?

One day it is working, the next day not

systemctl status rtlsdr gives no indications that it is not running

Stoping it running as a service and running it with
rtl_sdr -a
also shows up good

this is all done via SSH to the remote RPi in the attic.

Nothing changed on the router or the Pi.

Just today decided not to work. Re boot of router or Pi does not help

Code: Select all

[email protected]:~ $ sudo systemctl status rtlsdr
● rtlsdr.service - RTL_SDR Server
   Loaded: loaded (/etc/systemd/system/rtlsdr.service; enabled; vendor preset: enabled)
   Active: active (running) since Mon 2018-09-24 12:30:57 BST; 5min ago
 Main PID: 500 (sh)
   CGroup: /system.slice/rtlsdr.service
           ├─500 /bin/sh -c /usr/local/bin/rtl_tcp -a $(hostname -I)
           └─508 /usr/local/bin/rtl_tcp -a 2a02:c28:ad68:12:2a98:d71c:34e3:19c5

Sep 24 12:30:57 raspberrypi systemd[1]: Started RTL_SDR Server.
Sep 24 12:30:57 raspberrypi sh[500]: Found 1 device(s):
Sep 24 12:30:57 raspberrypi sh[500]:   0:  Realtek, RTL2838UHIDIR, SN: 00000001
Sep 24 12:30:57 raspberrypi sh[500]: Using device 0: Generic RTL2832U OEM
Sep 24 12:30:58 raspberrypi sh[500]: Found Rafael Micro R820T tuner
Sep 24 12:30:58 raspberrypi sh[500]: [R82XX] PLL not locked!
Sep 24 12:30:58 raspberrypi sh[500]: Tuned to 100000000 Hz.
[email protected]:~ $ sudo systemctl stop rtlsdr
[email protected]:~ $ sudo systemctl status rtlsdr
● rtlsdr.service - RTL_SDR Server
   Loaded: loaded (/etc/systemd/system/rtlsdr.service; enabled; vendor preset: enabled)
   Active: inactive (dead) since Mon 2018-09-24 12:44:15 BST; 2s ago
  Process: 500 ExecStart=/bin/sh -c /usr/local/bin/rtl_tcp -a $(hostname -I) (code=killed, signal=TERM)
 Main PID: 500 (code=killed, signal=TERM)

Sep 24 12:44:15 raspberrypi sh[500]: r82xx_write: i2c wr failed=-4 reg=06 len=1
Sep 24 12:44:15 raspberrypi sh[500]: rtlsdr_demod_write_reg failed with -4
Sep 24 12:44:15 raspberrypi sh[500]: rtlsdr_demod_read_reg failed with -4
Sep 24 12:44:15 raspberrypi sh[500]: rtlsdr_write_reg failed with -4
Sep 24 12:44:15 raspberrypi sh[500]: listening...
Sep 24 12:44:15 raspberrypi sh[500]: Use the device argument 'rtl_tcp=2a02:c28:ad68:12:2a98:d71c:34e3:19c5:1234' in Osmo
Sep 24 12:44:15 raspberrypi sh[500]: to receive samples in GRC and control rtl_tcp parameters (frequency, gain, ...).
Sep 24 12:44:15 raspberrypi sh[500]: bye!
Sep 24 12:44:15 raspberrypi systemd[1]: Stopping RTL_SDR Server...
Sep 24 12:44:15 raspberrypi systemd[1]: Stopped RTL_SDR Server.

[email protected]:~ $ rtl_tcp -a 192.186.1.49
Found 1 device(s):
  0:  Realtek, RTL2838UHIDIR, SN: 00000001

Using device 0: Generic RTL2832U OEM
Found Rafael Micro R820T tuner
[R82XX] PLL not locked!
Tuned to 100000000 Hz.
listening...
Use the device argument 'rtl_tcp=192.186.1.49:1234' in OsmoSDR (gr-osmosdr) source
to receive samples in GRC and control rtl_tcp parameters (frequency, gain, ...).

[email protected]:~ $ rtl_tcp test
Found 1 device(s):
  0:  Realtek, RTL2838UHIDIR, SN: 00000001

Using device 0: Generic RTL2832U OEM
Found Rafael Micro R820T tuner
[R82XX] PLL not locked!
Tuned to 100000000 Hz.
listening...
Use the device argument 'rtl_tcp=127.0.0.1:1234' in OsmoSDR (gr-osmosdr) source
to receive samples in GRC and control rtl_tcp parameters (frequency, gain, ...).




NeilP
Posts: 11
Joined: Fri Jul 20, 2018 12:32 pm

Re: rtl-sdr/tcp

Post by NeilP » Mon Sep 24, 2018 1:54 pm

Found the issue

Code: Select all

[email protected]:~ $ sudo systemctl status rtlsdr
● rtlsdr.service - RTL_SDR Server
   Loaded: loaded (/etc/systemd/system/rtlsdr.service; enabled; vendor preset: enabled)
   Active: active (running) since Mon 2018-09-24 12:30:57 BST; 5min ago
 Main PID: 500 (sh)
   CGroup: /system.slice/rtlsdr.service
           ├─500 /bin/sh -c /usr/local/bin/rtl_tcp -a $(hostname -I)
           └─508 /usr/local/bin/rtl_tcp -a 2a02:c28:ad68:12:2a98:d71c:34e3:19c5


508 /usr/local/bin/rtl_tcp -a 2a02:c28:ad68:12:2a98:d71c:34e3:19c5


Service starting before DHCP had issued an IP address

Added
ExecStartPre=/bin/sleep 15

to the rtlsdr service file to give a delay

Post Reply