Command to rtl_tcp

Need help installing or figuring out something about your SDR? Ask here.
Post Reply
Peter Axelsson
Posts: 1
Joined: Mon Oct 09, 2017 7:44 am

Command to rtl_tcp

Post by Peter Axelsson » Mon Oct 09, 2017 2:10 pm

How can I send commands to rtl_tcp from terminal/bash in linux?
I have tried to send commands with netcat and I can see that rtl_tcp give me some response but i cant figure out the correct prefix.
Can someone please give me some examples.

Best regards

Posts: 54
Joined: Sat Jan 14, 2017 11:07 pm

Re: Command to rtl_tcp

Post by hotpaw2 » Mon Oct 09, 2017 5:48 pm

There are both command-line options when starting rtl_tcp, and 5 byte parameterized-command messages that can get sent to the tcp socket/port when the socket is open (usually on port 1234).

You can find source code to rtl_tcp here: ... /rtl_tcp.c

(Note that there are several versions of the rtl_sdr and rtl_tcp source code on github.)

The list of the 1-byte rtl_tcp command types starts after around line 300 in the rtl_tcp.c source code.

The 5 byte parameterized-commands consist of a 1 byte of command type followed by 4 bytes of a 32-bit integer parameter in big-endian format. For instance, the 5 bytes: 0x02, 0x00, 0x03, 0xa9, 0x80 sets the RTL-SDR sample rate to 240000.

Post Reply