Merge pull request #86 from amontefusco/iw0hdv

Perseus HF Receiver integration
This commit is contained in:
Jakob Ketterl 2020-03-21 15:40:54 +01:00 committed by GitHub
commit 752cd42ad7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 68 additions and 1 deletions

View File

@ -99,7 +99,7 @@ Note: if you experience audio underruns while CPU usage is 100%, you can:
################################################################################################# #################################################################################################
# Currently supported types of sdr receivers: # Currently supported types of sdr receivers:
# "rtl_sdr", "sdrplay", "hackrf", "airspy", "airspyhf", "fifi_sdr" # "rtl_sdr", "sdrplay", "hackrf", "airspy", "airspyhf", "fifi_sdr", "perseussdr"
# #
# In order to use rtl_sdr, you will need to install librtlsdr-dev and the connector. # In order to use rtl_sdr, you will need to install librtlsdr-dev and the connector.
# In order to use sdrplay, airspy or airspyhf, you will need to install soapysdr, the corresponding driver, and the # In order to use sdrplay, airspy or airspyhf, you will need to install soapysdr, the corresponding driver, and the
@ -107,6 +107,13 @@ Note: if you experience audio underruns while CPU usage is 100%, you can:
# #
# https://github.com/jketterl/owrx_connector # https://github.com/jketterl/owrx_connector
# #
# In order to use Perseus HF you need to install the libperseus-sdr
#
# https://github.com/Microtelecom/libperseus-sdr
#
# and do the proper changes to the sdrs object below
# (see also Wiki in https://github.com/jketterl/openwebrx/wiki/Sample-configuration-for-Perseus-HF-receiver).
#
# NOTE: The connector sources have replaced the old piped nmux style of reading input. If you still have any sdrs # NOTE: The connector sources have replaced the old piped nmux style of reading input. If you still have any sdrs
# configured that have type endin in "_connector", simply remove that suffix. # configured that have type endin in "_connector", simply remove that suffix.

View File

@ -25,6 +25,7 @@ class FeatureDetector(object):
"rtl_sdr_soapy": ["soapy_connector", "soapy_rtl_sdr"], "rtl_sdr_soapy": ["soapy_connector", "soapy_rtl_sdr"],
"sdrplay": ["soapy_connector", "soapy_sdrplay"], "sdrplay": ["soapy_connector", "soapy_sdrplay"],
"hackrf": ["hackrf_transfer"], "hackrf": ["hackrf_transfer"],
"perseussdr": ["perseustest"],
"airspy": ["soapy_connector", "soapy_airspy"], "airspy": ["soapy_connector", "soapy_airspy"],
"airspyhf": ["soapy_connector", "soapy_airspyhf"], "airspyhf": ["soapy_connector", "soapy_airspyhf"],
"lime_sdr": ["soapy_connector", "soapy_lime_sdr"], "lime_sdr": ["soapy_connector", "soapy_lime_sdr"],
@ -150,6 +151,26 @@ class FeatureDetector(object):
# TODO also check if it has the stdout feature # TODO also check if it has the stdout feature
return self.command_is_runnable("hackrf_transfer --help") return self.command_is_runnable("hackrf_transfer --help")
def has_perseustest(self):
"""
To use a Microtelecom Perseus HF receiver, compile and
install the libperseus-sdr:
```
sudo apt install libusb-1.0-0-dev
cd /tmp
wget https://github.com/Microtelecom/libperseus-sdr/releases/download/v0.8.2/libperseus_sdr-0.8.2.tar.gz
tar -zxvf libperseus_sdr-0.8.2.tar.gz
cd libperseus_sdr-0.8.2/
./configure
make
sudo make install
sudo ldconfig
perseustest
```
"""
return self.command_is_runnable("perseustest -h")
def has_digiham(self): def has_digiham(self):
""" """
To use digital voice modes, the digiham package is required. You can find the package and installation To use digital voice modes, the digiham package is required. You can find the package and installation

39
owrx/source/perseussdr.py Normal file
View File

@ -0,0 +1,39 @@
from .direct import DirectSource
from owrx.command import Flag, Option
#
# In order to interface Perseus hardware, we resolve to use the
# perseustest utility that comes with libperseus-sdr support package.
# Below the base options used are shown:
#
# -p output I/Q samples as 32 bits floating point
# -d -1 suppress debug messages
# -a don't test attenuators on startup
# -t 0 runs indefinitely
# -o - output samples on stdout
#
# As we are already returning I/Q samples as pairs of 32 bits
# floating points (option -p),no need for further conversions,
# so the method getFormatConversion(self) is not implemented at all.
class PerseussdrSource(DirectSource):
def getCommandMapper(self):
return super().getCommandMapper().setBase("perseustest -p -d -1 -a -t 0 -o - ").setMappings(
{
"samp_rate": Option("-s"),
"tuner_freq": Option("-f"),
"attenuator": Option("-u"),
"adc_preamp": Option("-m"),
"adc_dither": Option("-x"),
"wideband": Option("-w"),
}
)
def getEventNames(self):
return super().getEventNames() + [
"attenuator",
"adc_preamp",
"adc_dither",
"wideband",
]