Comments on: RTL-SDR Server as a service on Raspberry Pi https://photobyte.org/rtl-sdr-server-as-a-service-on-raspberry-pi/ Freelance Technical Author, Illustrator & Photographer Wed, 25 Aug 2021 18:34:39 +0000 hourly 1 https://wordpress.org/?v=6.4.2 By: Mike Richards https://photobyte.org/rtl-sdr-server-as-a-service-on-raspberry-pi/#comment-229803 Wed, 25 Aug 2021 18:34:39 +0000 https://photobyte.org/?p=1696#comment-229803 In reply to Mike.

Hi Mike,

Thanks for the feedback. I’m sure that will be very helpful to anyone installing from the repository. However, I prefer to build from source as radio related applications in the Pi repository are often out of date. Building from source is very quick and easy to follow. I’ve modified the original post to make the requirement clearer.

Thanks,

Mike – G4WNC

]]>
By: Mike https://photobyte.org/rtl-sdr-server-as-a-service-on-raspberry-pi/#comment-229710 Wed, 25 Aug 2021 13:37:56 +0000 https://photobyte.org/?p=1696#comment-229710 It took me ages to figure out why this doesn’t work.

Firstly, when you install the package rather than build from source it is not installed in /usr/local/bin but /usr/bin – in that case the script needs altering.

Secondly, with the package, the udev rules are not installed in /etc but in /lib AND they have mode set to 0660 rather than 0666. This mode setting seems to prevent the UDEV rules working unless you modify it to 0666. Devil in the detail literally.

Thirdly – if you are on the internet then chances are you not running the default user “pi” and you need to modify the script accordingly.

]]>
By: Mike Richards https://photobyte.org/rtl-sdr-server-as-a-service-on-raspberry-pi/#comment-134089 Sun, 27 Sep 2020 17:43:24 +0000 https://photobyte.org/?p=1696#comment-134089 In reply to Scott.

Hi Scott, Very useful observation. Thanks Mike – G4WNC

]]>
By: Scott https://photobyte.org/rtl-sdr-server-as-a-service-on-raspberry-pi/#comment-134070 Sun, 27 Sep 2020 16:26:11 +0000 https://photobyte.org/?p=1696#comment-134070 In case anyone is stuck getting this to work, I copied and pasted the code shown but the single quotes came over as ` instead of ‘ in the rtl_tcp command. Retyping those with the correct single quote character made it work.

]]>
By: Kim https://photobyte.org/rtl-sdr-server-as-a-service-on-raspberry-pi/#comment-31317 Fri, 24 Aug 2018 16:02:04 +0000 https://photobyte.org/?p=1696#comment-31317 In reply to Mike Richards.

Hi Mike,

IP is correct.
sudo systemctl status rtlsdr throws an error.
Access not possible.

Thx for looking at it.

Kim

pi@raspberrypi:~ $ sudo systemctl stop rtlsdr
pi@raspberrypi:~ $ hostname -I
10.10.176.18
2a02:a03f:54ec:5000:a7c8:cdb:5f88:945f
pi@raspberrypi:~ $ sudo systemctl start rtlsdr
pi@raspberrypi:~ $ sudo systemctl status rtlsdr
? rtlsdr.service – RTL-SDR Server
Loaded: loaded (/etc/systemd/system/rtlsdr.service; disabled; vendor preset:
Active: activating (start-pre) since Fri 2018-08-24 17:50:25 CEST; 6s ago
Process: 1127 ExecStart=/bin/sh -c ‘/usr/local/bin/rtl_tcp -a $(hostname -I)’
Main PID: 1127 (code=exited, status=127); Control PID: 1130 (sleep)
CGroup: /system.slice/rtlsdr.service
??control
??1130 /bin/sleep 15

aug 24 17:50:25 raspberrypi systemd[1]: Starting RTL-SDR Server…
lines 1-10/10 (END)

]]>
By: Mike Richards https://photobyte.org/rtl-sdr-server-as-a-service-on-raspberry-pi/#comment-31312 Thu, 23 Aug 2018 21:51:43 +0000 https://photobyte.org/?p=1696#comment-31312 In reply to Kim.

Ok. With the Pi running make sure the service is stopped by entering:
sudo systemctl stop rtlsdr
Enter: hostname -I to make sure the Pi has an IP address
Enter: sudo systemctl start rtlsdr
That should start the service
Now enter sudo systemctl status rtlsdr and let me know what you get. If it all appears to be running test access from your SDR software.

Mike – G4WNC

]]>
By: Kim https://photobyte.org/rtl-sdr-server-as-a-service-on-raspberry-pi/#comment-31309 Thu, 23 Aug 2018 20:34:39 +0000 https://photobyte.org/?p=1696#comment-31309 In reply to Mike Richards.

Hi Mike,

That line is included and I have tried different timings.

Regards,

Kim

]]>
By: Mike Richards https://photobyte.org/rtl-sdr-server-as-a-service-on-raspberry-pi/#comment-31307 Thu, 23 Aug 2018 15:50:14 +0000 https://photobyte.org/?p=1696#comment-31307 In reply to Kim.

Hi Kim,

This may be because your Pi doesn’t have an IP address when the rtlsdr service starts. Try updating the unit file to include the following line in the [Service] section:
ExecStartPre=/bin/sleep 15

This adds a 15 second delay to allow the IP address to be allocated after the network is up.

See the latest instructions for full details.

Regards,

Mike – G4WNC

]]>
By: Kim https://photobyte.org/rtl-sdr-server-as-a-service-on-raspberry-pi/#comment-31306 Thu, 23 Aug 2018 14:47:26 +0000 https://photobyte.org/?p=1696#comment-31306 Server does not start @reboot ( see previous posts )
Only works with rtl_tcp -a IP_adddress

pi@raspberrypi:~ $ sudo systemctl status rtlsdr
? rtlsdr.service – RTL-SDR Server
Loaded: loaded (/etc/systemd/system/rtlsdr.service; enabled; vendor preset: enabled)
Active: activating (start-pre) since Thu 2018-08-23 16:34:37 CEST; 6s ago
Process: 736 ExecStart=/bin/sh -c ‘/usr/local/bin/rtl_tcp -a $(hostname -I)’ (code=exited, status=127)
Main PID: 736 (code=exited, status=127); Control PID: 745 (sleep)
CGroup: /system.slice/rtlsdr.service
??control
??745 /bin/sleep 15

aug 23 16:34:37 raspberrypi systemd[1]: Starting RTL-SDR Server…

]]>
By: Neil P https://photobyte.org/rtl-sdr-server-as-a-service-on-raspberry-pi/#comment-30895 Fri, 27 Jul 2018 07:15:14 +0000 https://photobyte.org/?p=1696#comment-30895 Ok, fresh install of rasp stretch lite and now working …to a degree. Works with rtl_tcp command but not as start service

Also You have error in the text to stop the service

you have
sudo systemd stop rtlsdr.service which does not work

Think it should be
sudo systemctl stop rtlsdr.service

The service shows started, it does not actually work at the ‘far end’

In order to get it to work, still must use the command
rtl_tcp -a 192.168.1.49

The remote end reports a ‘network error’ when started as service with:
sudo systemctl start rtlsdr.service

but works fine with:
rtl_tcp -a 192.168.1.49

pi@rtltcp:~ $ sudo systemctl start rtlsdr.service
pi@rtltcp:~ $ sudo systemctl status rtlsdr.service
? rtlsdr.service – RTL-SDR Server
Loaded: loaded (/etc/systemd/system/rtlsdr.service; disabled; vendor preset: enabled)
Active: active (running) since Fri 2018-07-27 07:13:21 GMT; 4s ago
Main PID: 847 (sh)
CGroup: /system.slice/rtlsdr.service
??847 /bin/sh -c /usr/local/bin/rtl_tcp -a -I)
??848 /usr/local/bin/rtl_tcp

Jul 27 07:13:21 rtltcp systemd[1]: Started RTL-SDR Server.
Jul 27 07:13:21 rtltcp sh[847]: Found 1 device(s):
Jul 27 07:13:21 rtltcp sh[847]: 0: Realtek, RTL2838UHIDIR, SN: 00000001
Jul 27 07:13:21 rtltcp sh[847]: Using device 0: Generic RTL2832U OEM
Jul 27 07:13:21 rtltcp sh[847]: Found Rafael Micro R820T tuner
Jul 27 07:13:21 rtltcp sh[847]: [R82XX] PLL not locked!
Jul 27 07:13:21 rtltcp sh[847]: Tuned to 100000000 Hz.
pi@rtltcp:~ $ sudo systemd stop rtlsdr.service
Excess arguments.
pi@rtltcp:~ $ sudo systemctl stop rtlsdr.service
pi@rtltcp:~ $ sudo systemctl status rtlsdr.service
? rtlsdr.service – RTL-SDR Server
Loaded: loaded (/etc/systemd/system/rtlsdr.service; disabled; vendor preset: enabled)
Active: inactive (dead)

Jul 27 07:13:21 rtltcp sh[847]: [R82XX] PLL not locked!
Jul 27 07:13:21 rtltcp sh[847]: Tuned to 100000000 Hz.
Jul 27 07:13:49 rtltcp sh[847]: Signal caught, exiting!
Jul 27 07:13:49 rtltcp systemd[1]: Stopping RTL-SDR Server…
Jul 27 07:13:49 rtltcp sh[847]: Signal caught, exiting!
Jul 27 07:13:49 rtltcp sh[847]: listening…
Jul 27 07:13:49 rtltcp sh[847]: Use the device argument ‘rtl_tcp=127.0.0.1:1234’ in OsmoSDR (gr-osmosdr) source
Jul 27 07:13:49 rtltcp sh[847]: to receive samples in GRC and control rtl_tcp parameters (frequency, gain, …).
Jul 27 07:13:49 rtltcp sh[847]: bye!
Jul 27 07:13:49 rtltcp systemd[1]: Stopped RTL-SDR Server.
pi@rtltcp:~ $

]]>