Gqrx is a Software-defined radio receiver software for Linux and Mac.

Remote control over TCP

Gqrx has a setting called Remote control that allows an external program to connect to it and issue commands.

By default, the port is 7356, and only connections from 127.0.0.1 are allowed. This is a sensible default for giving local applications control without allowing external commands.

The protocol is a human-readable, line-delimited ASCII protocol. Commands and their arguments are delimited by a space character. The responses are also sent as lines.

Read the current frequency

  • Send line f.
  • Read a line from the socket. Convert to an integer. The integer is the center frequency in Hz.

Set the frequency

  • Send line F freq where freq is the frequency in Hz.
  • Read a response line from the socket, and discard it.

Gqrx scanner

The handy “remote control” feature that allows you to connect to Gqrx over a TCP socket, and send commands to it.

Aside from changing the frequency, it also allows you to read the current signal strength on the tuned frequency.

This combination of features allows you to write a simple scanner that will scan a range of frequencies, and turn on the squelch when it detects a signal.