rtl-sdr.com

Discuss RTL-SDR and cheap software defined radio
It is currently Mon Oct 23, 2017 2:28 am

All times are UTC





Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: Command to rtl_tcp
PostPosted: Mon Oct 09, 2017 2:10 pm 
Offline

Joined: Mon Oct 09, 2017 7:44 am
Posts: 1
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
Peter


Top
 Profile  
 
 Post subject: Re: Command to rtl_tcp
PostPosted: Mon Oct 09, 2017 5:48 pm 
Offline

Joined: Sat Jan 14, 2017 11:07 pm
Posts: 28
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:

https://github.com/osmocom/rtl-sdr/blob ... /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.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC


Who is online

Users browsing this forum: Bing [Bot] and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Powered by phpBB® Forum Software © phpBB Group