Welcome to Gqrx Client’s documentation!¶
Indices and tables¶
Autodoc¶
- class gqrx_client.GqrxClient¶
A Gqrx Client. Use an instance of this class to interface with a remote Gqrx application.
Example:
client = GqrxClient() client.open() client.frequency = 137912500 client.demodulator = (DemodulatorMode.WFM, 38000) client.dsp = True client.recording = True
- __init__()¶
Create a new Gqrx client instance.
- aos()¶
Send an ‘acquisition of signal’ event to Gqrx. The current effect of this event in Gqrx is to begin recording.
- Raises:
CommandFailedGqrxClientError: The Gqrx remote responded with a failure report.
- close()¶
Close the current connection. This method closes the underlying transport and disassociates it from this Gqrx client instance.
- property demodulator: tuple[DemodulatorMode, int]¶
Get or set the demodulator configuration. When retrieved, this property returns a tuple containing the demodulator mode and the passband width. When setting this value, you can either supply a (DemodulatorMode, Passband) tuple, or you can simply pass a DemodulatorMode by itself in which case a default corresponding passband will be set for you by Gqrx.
- Returns:
(DemodulatorMode, int): A tuple containing the current demodulator mode and passband width.
Example:
# Set the mode and use the default passband for that mode client.demodulator = DemodulatorMode.AM # Set the demodulator mode and passband client.demodulator = (DemodulatorMode.WFM, 38000) # Get and display the (mode, passband) = client.demodulator print(f"Mode = {mode}, Passband = {passband}")
- property dsp: bool¶
Get or set whether digital signal processing is active (the “play button”).
- Returns:
bool: True if Gqrx DSP is currently active, False otherwise.
- property frequency: int¶
Get or set the frequency that Gqrx is currently tuned to.
- los()¶
Send a ‘loss of signal’ event to Gqrx. The current effect of this event in Gqrx is to finish recording.
- Raises:
CommandFailedGqrxClientError: The Gqrx remote responded with a failure report.
- open(addr: tuple[str, int] = ('127.0.0.1', 7356))¶
Establish a connection to a Gqrx server instance.
- Args:
addr (tuple[str, int]): A tuple specifying the hostname and port to connect to. Defaults to (‘127.0.0.1’, 7356).
- property recording: bool¶
Get or set whether recording is active. Note that in order for recording to actually happen, digital signal processing must also be enabled. This is a Gqrx thing.
- Returns:
bool: True if Gqrx is currently recording, False otherwise.
- set_transport(transport: Transport | None)¶
Use the given transport for this Gqrx client instance.
If, for whatever reason it might be necessary, you can implement a custom transport and then use this method to associate the transport with this client.
As the transport class does not define a default open method (because it cannot possibly know what steps or parameters may or may not be required for different transport types), this method is unable to open the underlying transport, so you must do that separately (e.g., before you call this method).
- Args:
transport (Transport | None): The transport to use.
- class gqrx_client.DemodulatorMode(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)¶
The list of known and available Gqrx demodulator modes.
- AM = 'AM'¶
Amplitude Modulation, used by broadcasting stations
- AMS = 'AMS'¶
Probably: Amplitude Modulation (Sync)
- CW = 'CW'¶
Same as CWU.
- CWL = 'CWL'¶
Lower Side Band Morse code on-off modulation. Same as CWR.
- CWR = 'CWR'¶
Same as CWL.
- CWU = 'CWU'¶
Upper Side Band Morse code on-off modulation. Same as CW.
- FM = 'FM'¶
Frequency Modulation
- LSB = 'LSB'¶
Lower Side Band (single side amplitude modulation)
- OFF = 'OFF'¶
Turn off all signal processing (gqrx can still be used to view the real time spectrum)
- RAW = 'RAW'¶
Pass raw I/Q data through without any demodulation
- USB = 'USB'¶
Upper Side Band (single side amplitude modulation)
- WFM = 'WFM'¶
Wide Frequency Modulation, used by broadcasting stations
- WFM_ST = 'WFM_ST'¶
Stereo Wide Frequency Modulation, used by broadcasting stations
- WFM_ST_OIRT = 'WFM_ST_OIRT'¶
OIRT Stereo Wide Frequency Modulation, used by broadcasting stations belonging to the “Organisation Internationale de Radiodiffusion et de Télévision” (International Radio and Television Organisation)
- class gqrx_client.GqrxClientError¶
An error generated by the Gqrx Client.
- class gqrx_client.CommandFailedGqrxClientError¶
This error is raised when the Gqrx Client responds with a negative report command response (RPRT 1). This typically indicates that Gqrx does not understand or is unable to comply with the request that was issued.