switch hackrf to soapy

This commit is contained in:
Jakob Ketterl 2020-05-30 22:58:31 +02:00
parent e0648d63ad
commit e90973bcd4
3 changed files with 15 additions and 41 deletions

View File

@ -22,7 +22,8 @@
- Improve receiver load time by concatenating javascript assets
- Docker images migrated to Debian slim images; This was necessary to allow the use of function multiversioning in
csdr and owrx_connector to allow the images to run on a wider range of CPUs
- Docker containers have been updated to include the SDRplay driver version 3
- Docker containers have been updated to include the SDRplay driver version 3
- HackRF support is now based on SoapyHackRF
**0.18.0**
- Support for SoapyRemote

View File

@ -24,7 +24,7 @@ class FeatureDetector(object):
"rtl_sdr": ["rtl_connector"],
"rtl_sdr_soapy": ["soapy_connector", "soapy_rtl_sdr"],
"sdrplay": ["soapy_connector", "soapy_sdrplay"],
"hackrf": ["hackrf_transfer"],
"hackrf": ["soapy_connector", "soapy_hackrf"],
"perseussdr": ["perseustest"],
"airspy": ["soapy_connector", "soapy_airspy"],
"airspyhf": ["soapy_connector", "soapy_airspyhf"],
@ -127,26 +127,6 @@ class FeatureDetector(object):
"""
return self.command_is_runnable("nc --help")
def has_hackrf_transfer(self):
"""
To use a HackRF, compile the HackRF host tools from its "stdout" branch:
```
git clone https://github.com/mossmann/hackrf/
cd hackrf
git fetch
git checkout origin/stdout
cd host
mkdir build
cd build
cmake .. -DINSTALL_UDEV_RULES=ON
make
sudo make install
```
"""
# TODO i don't have a hackrf, so somebody doublecheck this.
# TODO also check if it has the stdout feature
return self.command_is_runnable("hackrf_transfer --help")
def has_perseustest(self):
"""
To use a Microtelecom Perseus HF receiver, compile and
@ -333,6 +313,14 @@ class FeatureDetector(object):
"""
return self._has_soapy_driver("redpitaya")
def has_soapy_hackrf(self):
"""
The SoapyHackRF allows HackRF to be used with SoapySDR.
You can get it [here](https://github.com/pothosware/SoapyHackRF/wiki).
"""
return self._has_soapy_driver("hackrf")
def has_dsd(self):
"""
The digital voice modes NXDN and D-Star can be decoded by the dsd project. Please note that you need the version

View File

@ -1,23 +1,8 @@
from .direct import DirectSource
from .soapy import SoapyConnectorSource
from owrx.command import Option
import time
class HackrfSource(DirectSource):
def getCommandMapper(self):
return super().getCommandMapper().setBase("hackrf_transfer").setMappings(
{
"samp_rate": Option("-s"),
"tuner_freq": Option("-f"),
"rf_gain": Option("-g"),
"lna_gain": Option("-l"),
"rf_amp": Option("-a"),
"ppm": Option("-C"),
}
).setStatic("-r-")
def getFormatConversion(self):
return ["csdr convert_s8_f"]
def sleepOnRestart(self):
time.sleep(1)
class HackrfSource(SoapyConnectorSource):
def getDriver(self):
return "hackrf"