Skip to content

Instantly share code, notes, and snippets.

@mcoms
Created June 11, 2013 01:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mcoms/5753865 to your computer and use it in GitHub Desktop.
Save mcoms/5753865 to your computer and use it in GitHub Desktop.

RTL-SDR tips and tricks

Sample format

The output is IQ (quadrature) sampling. It's interleaved, so first byte is I, second Q and so on. The samples are unsigned bytes, so you subtract 127 from them to get their real ralue (lying between -127 and +127).

rtl_tcp control

Send a command byte followed by a 32-bit big-endian int parameter.

# https://gist.github.com/simeonmiteff/3792676
SET_FREQUENCY = 0x01
SET_SAMPLERATE = 0x02
SET_GAINMODE = 0x03
SET_GAIN = 0x04
SET_FREQENCYCORRECTION = 0x05

e.g. socket.puts [command, parameter].pack('CL>') in Ruby.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment