From bcd11336049d9928cbad478f7c776f9117ef1514 Mon Sep 17 00:00:00 2001 From: kit Date: Tue, 22 Jul 2025 22:24:43 -0400 Subject: [PATCH 1/3] Added initial support for the HydraSDR RFOne See https://github.com/hydrasdr for details about building the library and Soapy module required to support the hardware. There's an issue in the upstream library with a fix described in https://github.com/hydrasdr/rfone_host/issues/5 --- owrx/feature.py | 8 ++++++ owrx/source/hydrasdr.py | 60 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 68 insertions(+) create mode 100644 owrx/source/hydrasdr.py diff --git a/owrx/feature.py b/owrx/feature.py index e458a962..f626fb17 100644 --- a/owrx/feature.py +++ b/owrx/feature.py @@ -61,6 +61,7 @@ class FeatureDetector(object): "perseussdr": ["perseustest", "nmux"], "airspy": ["soapy_connector", "soapy_airspy"], "airspyhf": ["soapy_connector", "soapy_airspyhf"], + "hydrasdr": ["soapy_connector", "soapy_hydrasdr"], "afedri": ["soapy_connector", "soapy_afedri"], "lime_sdr": ["soapy_connector", "soapy_lime_sdr"], "fifi_sdr": ["alsa", "rockprog", "nmux"], @@ -346,6 +347,13 @@ class FeatureDetector(object): """ return self._has_soapy_driver("airspyhf") + def has_soapy_hydrasdr(self): + """ + The [SoapySDR module for RFOne](https://github.com/hydrasdr/SoapyHydraSDR) + device is required for interfacing with HydraSDR RFOne devices. + """ + return self._has_soapy_driver("hydrasdr") + def has_soapy_afedri(self): """ The [SoapyAfedri](https://github.com/alexander-sholohov/SoapyAfedri) module allows using Afedri SDR-Net devices diff --git a/owrx/source/hydrasdr.py b/owrx/source/hydrasdr.py new file mode 100644 index 00000000..b699673f --- /dev/null +++ b/owrx/source/hydrasdr.py @@ -0,0 +1,60 @@ +from owrx.source.soapy import SoapyConnectorSource, SoapyConnectorDeviceDescription +from owrx.form.input import Input, CheckboxInput +from owrx.form.input.device import BiasTeeInput +from owrx.form.input.validator import Range +from typing import List + +# case sensitive, be careful changing it +class HydrasdrSource(SoapyConnectorSource): + def getSoapySettingsMappings(self): + mappings = super().getSoapySettingsMappings() + mappings.update( + { + "bias_tee": "biastee", + "bitpack": "bitpack", + } + ) + return mappings + + def getDriver(self): + return "hydrasdr" + + +class HydraSDRDeviceDescription(SoapyConnectorDeviceDescription): + def getName(self): + return "HydraSDR RFone" + + def supportsPpm(self): + # not supported by the device API + # frequency calibration can be done with separate tools and will be persisted on the device. + # see discussion here: https://groups.io/g/openwebrx/topic/79360293 + return False + + def getInputs(self) -> List[Input]: + return super().getInputs() + [ + BiasTeeInput(), + CheckboxInput( + "bitpack", + "Enable bit-packing", + infotext="Packs two 12-bit samples into 3 bytes." + + " Lowers USB bandwidth consumption, increases CPU load", + ), + ] + + def getDeviceOptionalKeys(self): + return super().getDeviceOptionalKeys() + ["bias_tee", "bitpack"] + + def getProfileOptionalKeys(self): + return super().getProfileOptionalKeys() + ["bias_tee"] + + def getGainStages(self): + return ["LNA", "MIX", "VGA"] + + def getSampleRateRanges(self) -> List[Range]: + # Device only supports 2.5, 5, and 10 MSPS for now, mfg suggests it may + # be able to do up to 80 MSPS "with custom firmware" + return [ + Range(2500000), + Range(5000000), + Range(10000000), + ] From 04049f556fe0b0fe27f35f07d49562c0b58b7ce9 Mon Sep 17 00:00:00 2001 From: kit Date: Mon, 22 Dec 2025 14:54:40 -0500 Subject: [PATCH 2/3] Fixed class name --- owrx/source/hydrasdr.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/owrx/source/hydrasdr.py b/owrx/source/hydrasdr.py index b699673f..ecdd6e26 100644 --- a/owrx/source/hydrasdr.py +++ b/owrx/source/hydrasdr.py @@ -20,7 +20,7 @@ class HydrasdrSource(SoapyConnectorSource): return "hydrasdr" -class HydraSDRDeviceDescription(SoapyConnectorDeviceDescription): +class HydraSdrDeviceDescription(SoapyConnectorDeviceDescription): def getName(self): return "HydraSDR RFone" From a7c74ddaa5bc4ecb6f8a467c23bd7350bf5213bd Mon Sep 17 00:00:00 2001 From: kit Date: Mon, 22 Dec 2025 15:02:43 -0500 Subject: [PATCH 3/3] REALLY fixed class name --- owrx/source/hydrasdr.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/owrx/source/hydrasdr.py b/owrx/source/hydrasdr.py index ecdd6e26..98203dad 100644 --- a/owrx/source/hydrasdr.py +++ b/owrx/source/hydrasdr.py @@ -20,7 +20,7 @@ class HydrasdrSource(SoapyConnectorSource): return "hydrasdr" -class HydraSdrDeviceDescription(SoapyConnectorDeviceDescription): +class HydrasdrDeviceDescription(SoapyConnectorDeviceDescription): def getName(self): return "HydraSDR RFone"