Compare commits
25 Commits
image-2020
...
0.18.0
Author | SHA1 | Date | |
---|---|---|---|
5f388fd38d | |||
9bc161c140 | |||
dbb7c0cde3 | |||
52e517dfc3 | |||
37ffb2a02c | |||
91b3713dad | |||
c53ac1aa4f | |||
c4166997be | |||
f0f9455c6e | |||
7bc78425cd | |||
d1dc14d9e5 | |||
521755b9f2 | |||
ad565c5a2b | |||
ebba6e1ada | |||
0b7b5d985f | |||
b948e06a4f | |||
eaa98b0d64 | |||
16b3c11678 | |||
c92929a32d | |||
46c3e5077d | |||
dc12c54ae6 | |||
bdc43455a5 | |||
42eeb00a0f | |||
5951d2a874 | |||
9a5aba7313 |
@ -4,3 +4,4 @@
|
||||
**/*.pyc
|
||||
**/*.swp
|
||||
black-env
|
||||
debian
|
@ -1,3 +1,6 @@
|
||||
**unreleased**
|
||||
- Support for SoapyRemote
|
||||
|
||||
**2020-02-08**
|
||||
- Compression, resampling and filtering in the frontend have been rewritten in javascript, sdr.js has been removed
|
||||
- Decoding of Pocsag modulation is now possible
|
||||
|
9
build.sh
9
build.sh
@ -1,10 +1,6 @@
|
||||
#!/bin/bash
|
||||
set -euxo pipefail
|
||||
|
||||
ARCH=$(uname -m)
|
||||
|
||||
TAG="latest"
|
||||
ARCHTAG="$TAG-$ARCH"
|
||||
. docker/env
|
||||
|
||||
docker build --pull -t openwebrx-base:$ARCHTAG -f docker/Dockerfiles/Dockerfile-base .
|
||||
docker build --build-arg ARCHTAG=$ARCHTAG -t jketterl/openwebrx-rtlsdr:$ARCHTAG -f docker/Dockerfiles/Dockerfile-rtlsdr .
|
||||
@ -13,4 +9,7 @@ docker build --build-arg ARCHTAG=$ARCHTAG -t jketterl/openwebrx-sdrplay:$ARCHTAG
|
||||
docker build --build-arg ARCHTAG=$ARCHTAG -t jketterl/openwebrx-hackrf:$ARCHTAG -f docker/Dockerfiles/Dockerfile-hackrf .
|
||||
docker build --build-arg ARCHTAG=$ARCHTAG -t jketterl/openwebrx-airspy:$ARCHTAG -f docker/Dockerfiles/Dockerfile-airspy .
|
||||
docker build --build-arg ARCHTAG=$ARCHTAG -t jketterl/openwebrx-rtlsdr-soapy:$ARCHTAG -f docker/Dockerfiles/Dockerfile-rtlsdr-soapy .
|
||||
docker build --build-arg ARCHTAG=$ARCHTAG -t jketterl/openwebrx-plutosdr:$ARCHTAG -f docker/Dockerfiles/Dockerfile-plutosdr .
|
||||
docker build --build-arg ARCHTAG=$ARCHTAG -t jketterl/openwebrx-limesdr:$ARCHTAG -f docker/Dockerfiles/Dockerfile-limesdr .
|
||||
docker build --build-arg ARCHTAG=$ARCHTAG -t jketterl/openwebrx-soapyremote:$ARCHTAG -f docker/Dockerfiles/Dockerfile-soapyremote .
|
||||
docker build --build-arg ARCHTAG=$ARCHTAG -t jketterl/openwebrx-full:$ARCHTAG -t jketterl/openwebrx:$ARCHTAG -f docker/Dockerfiles/Dockerfile-full .
|
||||
|
@ -243,7 +243,7 @@ class dsp(object):
|
||||
chain += ["csdr fmdemod_quadri_cf"]
|
||||
if self.last_decimation != 1.0:
|
||||
chain += ["csdr fractional_decimator_ff {last_decimation}"]
|
||||
return chain + ["csdr convert_f_s16", "direwolf -c {direwolf_config} -r {audio_rate} -t 0 -q d -q h - 1>&2"]
|
||||
return chain + ["csdr convert_f_s16", "direwolf -c {direwolf_config} -r {audio_rate} -t 0 -q d -q h 1>&2"]
|
||||
elif which == "pocsag":
|
||||
chain += ["csdr fmdemod_quadri_cf"]
|
||||
if self.last_decimation != 1.0:
|
||||
|
98
debian/changelog
vendored
98
debian/changelog
vendored
@ -1,5 +1,97 @@
|
||||
openwebrx (0.18) UNRELEASED; urgency=low
|
||||
openwebrx (0.18.0) buster; urgency=low
|
||||
|
||||
* Initial release.
|
||||
* Compression, resampling and filtering in the frontend have been rewritten
|
||||
in javascript, sdr.js has been removed
|
||||
* Decoding of Pocsag modulation is now possible
|
||||
* Removed the 3D waterfall since it had no real application and required ~1MB
|
||||
of javascript code to be downloaded
|
||||
* Improved the frontend handling of the "too many users" scenario
|
||||
* PSK63 digimode is now available (same decoding pipeline as PSK31, but with
|
||||
adopted parameters)
|
||||
* The frequency can now be manipulated with the mousewheel, which should
|
||||
allow the user to tune more precise. The tuning step size is determined by
|
||||
the digit the mouse cursor is hovering over.
|
||||
* Clicking on the frequency now opens an input for direct frequency selection
|
||||
* URL hashes have been fixed and improved: They are now updated
|
||||
automatically, so a shared URL will include frequency and demodulator,
|
||||
which allows for improved sharing and linking.
|
||||
* New daylight scheduler for background decoding, allows profiles to be
|
||||
selected by local sunrise / sunset times
|
||||
* The owrx_connector is now the default way of communicating with sdr
|
||||
devices. The old sdr types have been replaced, all `_connector` suffixes on
|
||||
the type must be removed!
|
||||
* The sources have been refactored, making it a lot easier to add support for
|
||||
other devices
|
||||
* SDR device failure handling has been improved, including user feedback
|
||||
* New devices supported:
|
||||
* wsjt-x updated to 2.1.2
|
||||
* The rtl_tcp compatibility mode of the owrx_connector is now configurable
|
||||
using the `rtltcp_compat` flag
|
||||
* explicit device filter for soapy devices for multi-device setups
|
||||
* compatibility fixes for safari browsers (ios and mac)
|
||||
* Offset tuning using the `lfo_offset` has been reworked in a way that
|
||||
`center_freq` has to be set to the frequency you actually want to listen
|
||||
to. If you're using an `lfo_offset` already, you will probably need to
|
||||
change its sign.
|
||||
* `initial_squelch_level` can now be set on each profile.
|
||||
* Part of the frontend code has been reworked
|
||||
- Audio buffer minimums have been completely stripped. As a result, you
|
||||
should get better latency. Unfortunately, this also means there will be
|
||||
some skipping when audio starts.
|
||||
- Now also supports AudioWorklets (for those browser that have it).
|
||||
- Mousewheel controls for the receiver sliders
|
||||
* Error handling for failed SDR devices
|
||||
* One of the most-requested features is finally coming to OpenWebRX:
|
||||
Bookmarks (sometimes also referred to as labels).
|
||||
There's two kinds of bookmarks available:
|
||||
- Serverside bookmarks that are set up by the receiver administrator.
|
||||
Check the file `bookmarks.json` for examples!
|
||||
- Clientside bookmarks which every user can store for themselves. They are
|
||||
stored in the browser's localStorage.
|
||||
* Automatic reporting of spots to [pskreporter](https://pskreporter.info/) is
|
||||
now possible. Please have a look at the configuration on how to set it up.
|
||||
* Websocket communication has been overhauled in large parts. It should now
|
||||
be more reliable, and failing connections should now have no impact on
|
||||
other users.
|
||||
* Profile scheduling allows to set up band-hopping if you are running
|
||||
background services.
|
||||
* APRS now has the ability to show symbols on the map, if a corresponding
|
||||
symbol set has been installed. Check the config!
|
||||
* Debug logging has been disabled in a handful of modules, expect vastly
|
||||
reduced output on the shell.
|
||||
* New set of APRS-related features
|
||||
- Decode Packet transmissions using direwolf (1k2 only for now)
|
||||
- APRS packets are mostly decoded and shown both in a new panel and on the
|
||||
map
|
||||
- APRS is also available as a background service
|
||||
- direwolfs I-gate functionality can be enabled, which allows your receiver
|
||||
to work as a receive-only I-gate for the APRS network in the background
|
||||
* Demodulation for background services has been optimized to use less total
|
||||
bandwidth, saving CPU
|
||||
* More metrics have been added; they can be used together with collectd and
|
||||
its curl_json plugin for now, with some limitations.
|
||||
* New bandplan feature, the first thing visible is the "dial" indicator that
|
||||
brings you right to the dial frequency for digital modes
|
||||
* fixed some bugs in the websocket communication which broke the map
|
||||
* WSJT-X integration (FT8, FT4, WSPR, JT65, JT9 using wsjt-x demodulators)
|
||||
* New Map Feature that shows both decoded grid squares from FT8 and Locations
|
||||
decoded from YSF digital voice
|
||||
* New Feature report that will show what functionality is available
|
||||
* major rework on the openwebrx core
|
||||
* Support of multiple SDR devices simultaneously
|
||||
* Support for multiple profiles per SDR that allow the user to listen to
|
||||
different frequencies
|
||||
* Support for digital voice decoding
|
||||
* Feature detection that will disable functionality when dependencies are not
|
||||
available (if you're missing the digital
|
||||
buttons, this is probably why)
|
||||
* Support added for the following SDR sources:
|
||||
- LimeSDR (`"type": "lime_sdr"`)
|
||||
- PlutoSDR (`"type": "pluto_sdr"`)
|
||||
- RTL_SDR via Soapy (`"type": "rtl_sdr_soapy"`) on special request to allow
|
||||
use of the direct sampling mode
|
||||
- SoapyRemote (`"type": "soapy_remote"`)
|
||||
- FiFiSDR (`"type": "fifi_sdr"`)
|
||||
- airspyhf devices (Airspy HF+ / Discovery) (`"type": "airspyhf"`)
|
||||
|
||||
-- Jakob Ketterl <jakob.ketterl@gmx.de> Sun, 08 Dec 2019 12:35:48 +0000
|
||||
-- Jakob Ketterl <jakob.ketterl@gmx.de> Tue, 18 Feb 2020 20:09:00 +0000
|
||||
|
6
debian/control
vendored
6
debian/control
vendored
@ -3,11 +3,11 @@ Maintainer: Jakob Ketterl <jakob.ketterl@gmx.de>
|
||||
Section: hamradio
|
||||
Priority: optional
|
||||
Standards-Version: 4.2.0
|
||||
Build-Depends: debhelper (>= 10), dh-python, python3 (>= 3.5), dh-systemd (>= 1.5)
|
||||
Build-Depends: debhelper (>= 10), dh-python, python3 (>= 3.5)
|
||||
|
||||
Package: openwebrx
|
||||
Architecture: all
|
||||
Depends: python3 (>= 3.5), python3-pkg-resources, csdr (>= 0.14), netcat, owrx-connector (>= 0.1), ${python3:Depends}
|
||||
Recommends: digiham (>= 0.3), dsd (>= 1.7), sox, direwolf (>= 1.4), wsjtx
|
||||
Depends: adduser, python3 (>= 3.5), python3-pkg-resources, csdr (>= 0.14), netcat, owrx-connector (>= 0.1), ${python3:Depends}, ${misc:Depends}
|
||||
Recommends: digiham (>= 0.3), dsd (>= 1.7), sox, direwolf (>= 1.4), wsjtx, soapysdr-tools
|
||||
Description: multi-user web sdr
|
||||
Open source, multi-user SDR receiver with a web interface
|
7
debian/postinst
vendored
Executable file
7
debian/postinst
vendored
Executable file
@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
set -euxo pipefail
|
||||
|
||||
adduser --system --group --no-create-home --home /nonexistant openwebrx
|
||||
usermod -aG plugdev openwebrx
|
||||
|
||||
#DEBHELPER#
|
@ -10,6 +10,9 @@ RUN /install-dependencies-soapysdr.sh
|
||||
RUN /install-dependencies-sdrplay.sh
|
||||
RUN /install-dependencies-airspy.sh
|
||||
RUN /install-dependencies-rtlsdr-soapy.sh
|
||||
RUN /install-dependencies-plutosdr.sh
|
||||
RUN /install-dependencies-limesdr.sh
|
||||
RUN /install-dependencies-soapyremote.sh
|
||||
RUN rm /install-dependencies-*.sh
|
||||
|
||||
ADD docker/scripts/install-connectors.sh /
|
||||
|
10
docker/Dockerfiles/Dockerfile-limesdr
Normal file
10
docker/Dockerfiles/Dockerfile-limesdr
Normal file
@ -0,0 +1,10 @@
|
||||
ARG ARCHTAG
|
||||
FROM openwebrx-soapysdr-base:$ARCHTAG
|
||||
|
||||
ADD docker/scripts/install-dependencies-limesdr.sh /
|
||||
RUN /install-dependencies-limesdr.sh
|
||||
RUN rm /install-dependencies-limesdr.sh
|
||||
|
||||
ADD docker/scripts/install-connectors.sh /
|
||||
RUN /install-connectors.sh
|
||||
RUN rm /install-connectors.sh
|
10
docker/Dockerfiles/Dockerfile-plutosdr
Normal file
10
docker/Dockerfiles/Dockerfile-plutosdr
Normal file
@ -0,0 +1,10 @@
|
||||
ARG ARCHTAG
|
||||
FROM openwebrx-soapysdr-base:$ARCHTAG
|
||||
|
||||
ADD docker/scripts/install-dependencies-plutosdr.sh /
|
||||
RUN /install-dependencies-plutosdr.sh
|
||||
RUN rm /install-dependencies-plutosdr.sh
|
||||
|
||||
ADD docker/scripts/install-connectors.sh /
|
||||
RUN /install-connectors.sh
|
||||
RUN rm /install-connectors.sh
|
@ -5,6 +5,7 @@ ADD docker/scripts/install-dependencies-sdrplay.sh /
|
||||
ADD docker/scripts/install-lib.*.patch /
|
||||
RUN /install-dependencies-sdrplay.sh
|
||||
RUN rm /install-dependencies-sdrplay.sh
|
||||
RUN rm /install-lib.*.patch
|
||||
|
||||
ADD docker/scripts/install-connectors.sh /
|
||||
RUN /install-connectors.sh
|
||||
|
10
docker/Dockerfiles/Dockerfile-soapyremote
Normal file
10
docker/Dockerfiles/Dockerfile-soapyremote
Normal file
@ -0,0 +1,10 @@
|
||||
ARG ARCHTAG
|
||||
FROM openwebrx-soapysdr-base:$ARCHTAG
|
||||
|
||||
ADD docker/scripts/install-dependencies-soapyremote.sh /
|
||||
RUN /install-dependencies-soapyremote.sh
|
||||
RUN rm /install-dependencies-soapyremote.sh
|
||||
|
||||
ADD docker/scripts/install-connectors.sh /
|
||||
RUN /install-connectors.sh
|
||||
RUN rm /install-connectors.sh
|
5
docker/env
Normal file
5
docker/env
Normal file
@ -0,0 +1,5 @@
|
||||
ARCH=$(uname -m)
|
||||
IMAGES="openwebrx-rtlsdr openwebrx-sdrplay openwebrx-hackrf openwebrx-airspy openwebrx-rtlsdr-soapy openwebrx-plutosdr openwebrx-limesdr openwebrx-soapyremote openwebrx-full openwebrx"
|
||||
ALL_ARCHS="x86_64 armv7l aarch64"
|
||||
TAG=${TAG:-"latest"}
|
||||
ARCHTAG="$TAG-$ARCH"
|
@ -1,5 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euxo pipefail
|
||||
export MAKEFLAGS="-j4"
|
||||
|
||||
function cmakebuild() {
|
||||
cd $1
|
||||
@ -23,6 +24,6 @@ apk add --no-cache --virtual .build-deps $BUILD_PACKAGES
|
||||
|
||||
|
||||
git clone https://github.com/jketterl/owrx_connector.git
|
||||
cmakebuild owrx_connector df35e33e42c2e4527853ca18bf04981848860317
|
||||
cmakebuild owrx_connector 22a34fe649a0121a79262f54e99e9aa864b1536f
|
||||
|
||||
apk del .build-deps
|
||||
|
@ -1,5 +1,6 @@
|
||||
#!/bin/bash
|
||||
set -euxo pipefail
|
||||
export MAKEFLAGS="-j4"
|
||||
|
||||
function cmakebuild() {
|
||||
cd $1
|
||||
|
@ -1,5 +1,6 @@
|
||||
#!/bin/bash
|
||||
set -euxo pipefail
|
||||
export MAKEFLAGS="-j4"
|
||||
|
||||
function cmakebuild() {
|
||||
cd $1
|
||||
|
24
docker/scripts/install-dependencies-limesdr.sh
Executable file
24
docker/scripts/install-dependencies-limesdr.sh
Executable file
@ -0,0 +1,24 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
export MAKEFLAGS="-j4"
|
||||
|
||||
cd /tmp
|
||||
|
||||
STATIC_PACKAGES="libusb"
|
||||
BUILD_PACKAGES="git libusb-dev cmake make gcc musl-dev g++ linux-headers"
|
||||
|
||||
apk add --no-cache $STATIC_PACKAGES
|
||||
apk add --no-cache --virtual .build-deps $BUILD_PACKAGES
|
||||
|
||||
git clone https://github.com/myriadrf/LimeSuite.git
|
||||
cd LimeSuite
|
||||
git checkout 1c1c202f9a6ae4bb34068b6f3f576f7f8e74c7f1
|
||||
mkdir builddir
|
||||
cd builddir
|
||||
cmake .. -DENABLE_EXAMPLES=OFF -DENABLE_DESKTOP=OFF -DENABLE_LIME_UTIL=OFF -DENABLE_QUICKTEST=OFF -DENABLE_OCTAVE=OFF -DENABLE_GUI=OFF -DCMAKE_CXX_STANDARD_LIBRARIES="-latomic"
|
||||
make
|
||||
make install
|
||||
cd ../..
|
||||
rm -rf LimeSuite
|
||||
|
||||
apk del .build-deps
|
36
docker/scripts/install-dependencies-plutosdr.sh
Executable file
36
docker/scripts/install-dependencies-plutosdr.sh
Executable file
@ -0,0 +1,36 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
export MAKEFLAGS="-j4"
|
||||
|
||||
function cmakebuild() {
|
||||
cd $1
|
||||
if [[ ! -z "${2:-}" ]]; then
|
||||
git checkout $2
|
||||
fi
|
||||
mkdir build
|
||||
cd build
|
||||
cmake .. ${3:-}
|
||||
make
|
||||
make install
|
||||
cd ../..
|
||||
rm -rf $1
|
||||
}
|
||||
|
||||
cd /tmp
|
||||
|
||||
STATIC_PACKAGES="libusb libxml2"
|
||||
BUILD_PACKAGES="git libusb-dev cmake make gcc musl-dev g++ linux-headers libxml2-dev flex bison"
|
||||
|
||||
apk add --no-cache $STATIC_PACKAGES
|
||||
apk add --no-cache --virtual .build-deps $BUILD_PACKAGES
|
||||
|
||||
git clone https://github.com/analogdevicesinc/libiio.git
|
||||
cmakebuild libiio 4e22517c60f3c5e691320871956edede15459ae3 -DCMAKE_INSTALL_PREFIX=/usr/local
|
||||
|
||||
git clone https://github.com/analogdevicesinc/libad9361-iio.git
|
||||
cmakebuild libad9361-iio 8ac95f3325c18c2e34cd9cfd49c7b63d69a0a9d2
|
||||
|
||||
git clone https://github.com/pothosware/SoapyPlutoSDR.git
|
||||
cmakebuild SoapyPlutoSDR e28e4f5c68c16a38c0b50b9606035f3267a135c8
|
||||
|
||||
apk del .build-deps
|
@ -1,5 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
export MAKEFLAGS="-j4"
|
||||
|
||||
function cmakebuild() {
|
||||
cd $1
|
||||
|
@ -1,5 +1,6 @@
|
||||
#!/bin/bash
|
||||
set -euxo pipefail
|
||||
export MAKEFLAGS="-j4"
|
||||
|
||||
function cmakebuild() {
|
||||
cd $1
|
||||
|
@ -1,5 +1,6 @@
|
||||
#!/bin/bash
|
||||
set -euxo pipefail
|
||||
export MAKEFLAGS="-j4"
|
||||
|
||||
function cmakebuild() {
|
||||
cd $1
|
||||
|
30
docker/scripts/install-dependencies-soapyremote.sh
Executable file
30
docker/scripts/install-dependencies-soapyremote.sh
Executable file
@ -0,0 +1,30 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
export MAKEFLAGS="-j4"
|
||||
|
||||
function cmakebuild() {
|
||||
cd $1
|
||||
if [[ ! -z "${2:-}" ]]; then
|
||||
git checkout $2
|
||||
fi
|
||||
mkdir build
|
||||
cd build
|
||||
cmake ..
|
||||
make
|
||||
make install
|
||||
cd ../..
|
||||
rm -rf $1
|
||||
}
|
||||
|
||||
cd /tmp
|
||||
|
||||
STATIC_PACKAGES="avahi"
|
||||
BUILD_PACKAGES="git cmake make gcc musl-dev g++ linux-headers avahi-dev"
|
||||
|
||||
apk add --no-cache $STATIC_PACKAGES
|
||||
apk add --no-cache --virtual .build-deps $BUILD_PACKAGES
|
||||
|
||||
git clone https://github.com/pothosware/SoapyRemote.git
|
||||
cmakebuild SoapyRemote 6d9bd820da470cfe7b27b2e6946af93cfece448f
|
||||
|
||||
apk del .build-deps
|
@ -1,5 +1,6 @@
|
||||
#!/bin/bash
|
||||
set -euxo pipefail
|
||||
export MAKEFLAGS="-j4"
|
||||
|
||||
function cmakebuild() {
|
||||
cd $1
|
||||
|
@ -1,5 +1,6 @@
|
||||
#!/bin/bash
|
||||
set -euxo pipefail
|
||||
export MAKEFLAGS="-j4"
|
||||
|
||||
function cmakebuild() {
|
||||
cd $1
|
||||
@ -28,7 +29,7 @@ cmakebuild itpp bb5c7e95f40e8fdb5c3f3d01a84bcbaf76f3676d
|
||||
|
||||
git clone https://github.com/jketterl/csdr.git
|
||||
cd csdr
|
||||
git checkout 43c36df5dcd92d3bdb322f9d53f99ca0c7c816a4
|
||||
git checkout fe0b042d9cdc2605a817ca7fdd3a23c48bf07563
|
||||
make
|
||||
make install
|
||||
cd ..
|
||||
@ -38,7 +39,7 @@ git clone https://github.com/szechyjs/mbelib.git
|
||||
cmakebuild mbelib 9a04ed5c78176a9965f3d43f7aa1b1f5330e771f
|
||||
|
||||
git clone https://github.com/jketterl/digiham.git
|
||||
cmakebuild digiham e5e11ce9611e3d8f5f9dce7dee97f86a31af107c
|
||||
cmakebuild digiham 95206501be89b38d0267bf6c29a6898e7c65656f
|
||||
|
||||
git clone https://github.com/f4exb/dsd.git
|
||||
cmakebuild dsd f6939f9edbbc6f66261833616391a4e59cb2b3d7
|
||||
|
@ -52,10 +52,6 @@
|
||||
</div>
|
||||
<div id="openwebrx-panels-container">
|
||||
<div id="openwebrx-panels-container-left">
|
||||
<div class="openwebrx-panel" data-panel-name="client-under-devel" style="width: 245px; background-color: Red;">
|
||||
<span style="font-size: 15pt; font-weight: bold;">Under construction</span>
|
||||
<br />We're working on the code right now, so the application might fail.
|
||||
</div>
|
||||
<div class="openwebrx-panel" id="openwebrx-panel-digimodes" style="display: none; width: 619px;" data-panel-name="digimodes">
|
||||
<div id="openwebrx-digimode-canvas-container">
|
||||
<div id="openwebrx-digimode-select-channel"></div>
|
||||
|
15
manifest.sh
Executable file
15
manifest.sh
Executable file
@ -0,0 +1,15 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euxo pipefail
|
||||
. docker/env
|
||||
|
||||
for image in ${IMAGES}; do
|
||||
# there's no docker manifest rm command, and the create --amend does not work, so we have to clean up manually
|
||||
rm -rf "${HOME}/.docker/manifests/docker.io_jketterl_${image}-${TAG}"
|
||||
IMAGE_LIST=""
|
||||
for a in $ALL_ARCHS; do
|
||||
IMAGE_LIST="$IMAGE_LIST jketterl/$image:$TAG-$a"
|
||||
done
|
||||
docker manifest create jketterl/$image:$TAG $IMAGE_LIST
|
||||
docker manifest push --purge jketterl/$image:$TAG
|
||||
docker pull jketterl/$image:$TAG
|
||||
done
|
@ -247,10 +247,14 @@ class OpenWebRxReceiverClient(Client):
|
||||
self.sdr.removeSpectrumClient(self)
|
||||
|
||||
def setParams(self, params):
|
||||
# allow direct configuration only if enabled in the config
|
||||
keys = PropertyManager.getSharedInstance()["configurable_keys"]
|
||||
if not keys:
|
||||
return
|
||||
# only the keys in the protected property manager can be overridden from the web
|
||||
protected = (
|
||||
self.sdr.getProps()
|
||||
.collect("samp_rate", "center_freq", "rf_gain", "type")
|
||||
.collect(*keys)
|
||||
.defaults(PropertyManager.getSharedInstance())
|
||||
)
|
||||
for key, value in params.items():
|
||||
|
@ -11,13 +11,15 @@ from owrx.connection import WebSocketMessageHandler
|
||||
from owrx.version import openwebrx_version
|
||||
from owrx.feature import FeatureDetector
|
||||
from owrx.metrics import Metrics
|
||||
from owrx.sdr import SdrService
|
||||
from abc import ABC, abstractmethod
|
||||
|
||||
import logging
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class Controller(object):
|
||||
class Controller(ABC):
|
||||
def __init__(self, handler, request):
|
||||
self.handler = handler
|
||||
self.request = request
|
||||
@ -35,6 +37,10 @@ class Controller(object):
|
||||
content = content.encode()
|
||||
self.handler.wfile.write(content)
|
||||
|
||||
@abstractmethod
|
||||
def handle_request(self):
|
||||
pass
|
||||
|
||||
|
||||
class StatusController(Controller):
|
||||
def handle_request(self):
|
||||
@ -55,6 +61,42 @@ class StatusController(Controller):
|
||||
self.send_response("\n".join(["{key}={value}".format(key=key, value=value) for key, value in vars.items()]))
|
||||
|
||||
|
||||
class StatusJsonController(Controller):
|
||||
def getProfileStats(self, profile):
|
||||
return {
|
||||
"name": profile["name"],
|
||||
"center_freq": profile["center_freq"],
|
||||
"sample_rate": profile["samp_rate"],
|
||||
}
|
||||
|
||||
def getReceiverStats(self, receiver):
|
||||
stats = {
|
||||
"name": receiver.getName(),
|
||||
# TODO would be better to have types from the config here
|
||||
"type": type(receiver).__name__,
|
||||
"profiles": [self.getProfileStats(p) for p in receiver.getProfiles().values()]
|
||||
}
|
||||
return stats
|
||||
|
||||
def handle_request(self):
|
||||
pm = PropertyManager.getSharedInstance()
|
||||
|
||||
gps = pm["receiver_gps"]
|
||||
status = {
|
||||
"receiver": {
|
||||
"name": pm["receiver_name"],
|
||||
"admin": pm["receiver_admin"],
|
||||
"gps": {"lat": gps[0], "lon": gps[1]},
|
||||
"asl": pm["receiver_asl"],
|
||||
"location": pm["receiver_location"],
|
||||
},
|
||||
"max_clients": pm["max_clients"],
|
||||
"version": openwebrx_version,
|
||||
"sdrs": [self.getReceiverStats(r) for r in SdrService.getSources().values()]
|
||||
}
|
||||
self.send_response(json.dumps(status), content_type="application/json")
|
||||
|
||||
|
||||
class AssetsController(Controller):
|
||||
def getModified(self, file):
|
||||
return None
|
||||
|
@ -30,6 +30,7 @@ class FeatureDetector(object):
|
||||
"lime_sdr": ["soapy_connector", "soapy_lime_sdr"],
|
||||
"fifi_sdr": ["alsa"],
|
||||
"pluto_sdr": ["soapy_connector", "soapy_pluto_sdr"],
|
||||
"soapy_remote": ["soapy_connector", "soapy_remote"],
|
||||
# optional features and their requirements
|
||||
"digital_voice_digiham": ["digiham", "sox"],
|
||||
"digital_voice_dsd": ["dsd", "sox", "digiham"],
|
||||
@ -290,6 +291,14 @@ class FeatureDetector(object):
|
||||
"""
|
||||
return self._has_soapy_driver("PlutoSDR")
|
||||
|
||||
def has_soapy_remote(self):
|
||||
"""
|
||||
The SoapyRemote allows the usage of remote SDR devices using the SoapySDRServer.
|
||||
|
||||
You can get the code and find additional information [here](https://github.com/pothosware/SoapyRemote/wiki).
|
||||
"""
|
||||
return self._has_soapy_driver("remote")
|
||||
|
||||
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
|
||||
|
@ -1,5 +1,6 @@
|
||||
from owrx.controllers import (
|
||||
StatusController,
|
||||
StatusJsonController,
|
||||
IndexController,
|
||||
OwrxAssetsController,
|
||||
WebSocketController,
|
||||
@ -41,6 +42,7 @@ class Router(object):
|
||||
mappings = [
|
||||
{"route": "/", "controller": IndexController},
|
||||
{"route": "/status", "controller": StatusController},
|
||||
{"route": "/status.json", "controller": StatusJsonController},
|
||||
{"regex": "/static/(.+)", "controller": OwrxAssetsController},
|
||||
{"regex": "/aprs-symbols/(.+)", "controller": AprsSymbolsController},
|
||||
{"route": "/ws/", "controller": WebSocketController},
|
||||
|
@ -18,6 +18,7 @@ class DirewolfConfig(object):
|
||||
|
||||
config = """
|
||||
ACHANNELS 1
|
||||
ADEVICE stdin null
|
||||
|
||||
CHANNEL 0
|
||||
MYCALL {callsign}
|
||||
|
@ -5,7 +5,6 @@ from datetime import datetime, timedelta
|
||||
import logging
|
||||
import threading
|
||||
from owrx.map import Map, LatLngLocation
|
||||
from owrx.bands import Bandplan
|
||||
from owrx.parser import Parser
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
@ -44,7 +44,7 @@ class SdrService(object):
|
||||
name: loadIntoPropertyManager(value) for (name, value) in pm["sdrs"].items() if sdrTypeAvailable(value)
|
||||
}
|
||||
logger.info(
|
||||
"SDR sources loaded. Availables SDRs: {0}".format(
|
||||
"SDR sources loaded. Available SDRs: {0}".format(
|
||||
", ".join(map(lambda x: x["name"], SdrService.sdrProps.values()))
|
||||
)
|
||||
)
|
||||
|
@ -1,7 +1,7 @@
|
||||
import threading
|
||||
import subprocess
|
||||
import time
|
||||
from owrx.config import PropertyManager
|
||||
from urllib import request, parse
|
||||
|
||||
import logging
|
||||
|
||||
@ -14,24 +14,28 @@ class SdrHuUpdater(threading.Thread):
|
||||
super().__init__(daemon=True)
|
||||
|
||||
def update(self):
|
||||
pm = PropertyManager.getSharedInstance()
|
||||
cmd = 'wget --timeout=15 -4qO- https://sdr.hu/update --post-data "url=http://{server_hostname}:{web_port}&apikey={sdrhu_key}" 2>&1'.format(
|
||||
**pm.__dict__()
|
||||
)
|
||||
logger.debug(cmd)
|
||||
returned = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE).communicate()
|
||||
returned = returned[0].decode("utf-8")
|
||||
if "UPDATE:" in returned:
|
||||
retrytime_mins = 20
|
||||
value = returned.split("UPDATE:")[1].split("\n", 1)[0]
|
||||
if value.startswith("SUCCESS"):
|
||||
logger.info("Update succeeded!")
|
||||
else:
|
||||
logger.warning("Update failed, your receiver cannot be listed on sdr.hu! Reason: %s", value)
|
||||
pm = PropertyManager.getSharedInstance().collect("server_hostname", "web_port", "sdrhu_key")
|
||||
data = parse.urlencode({
|
||||
"url": "http://{server_hostname}:{web_port}".format(**pm.__dict__()),
|
||||
"apikey": pm["sdrhu_key"]
|
||||
}).encode()
|
||||
|
||||
res = request.urlopen("https://sdr.hu/update", data=data)
|
||||
if res.getcode() < 200 or res.getcode() >= 300:
|
||||
logger.warning('sdr.hu update failed with error code %i', res.getcode())
|
||||
return 2
|
||||
|
||||
returned = res.read().decode("utf-8")
|
||||
if "UPDATE:" not in returned:
|
||||
logger.warning("Update failed, your receiver cannot be listed on sdr.hu!")
|
||||
return 2
|
||||
|
||||
value = returned.split("UPDATE:")[1].split("\n", 1)[0]
|
||||
if value.startswith("SUCCESS"):
|
||||
logger.info("Update succeeded!")
|
||||
else:
|
||||
retrytime_mins = 2
|
||||
logger.warning("wget failed while updating, your receiver cannot be listed on sdr.hu!")
|
||||
return retrytime_mins
|
||||
logger.warning("Update failed, your receiver cannot be listed on sdr.hu! Reason: %s", value)
|
||||
return 20
|
||||
|
||||
def run(self):
|
||||
while self.doRun:
|
||||
|
@ -41,18 +41,21 @@ class SoapyConnectorSource(ConnectorSource, metaclass=ABCMeta):
|
||||
|
||||
return ",".join([encodeComponent(c) for c in dobj])
|
||||
|
||||
"""
|
||||
this method always attempts to inject a driver= part into the soapysdr query, depending on what connector was used.
|
||||
this prevents the soapy_connector from using the wrong device in scenarios where there's no same-type sdrs.
|
||||
"""
|
||||
def buildSoapyDeviceParameters(self, parsed, values):
|
||||
"""
|
||||
this method always attempts to inject a driver= part into the soapysdr query, depending on what connector was used.
|
||||
this prevents the soapy_connector from using the wrong device in scenarios where there's no same-type sdrs.
|
||||
"""
|
||||
parsed = [v for v in parsed if "driver" not in v]
|
||||
parsed += [{"driver": self.getDriver()}]
|
||||
return parsed
|
||||
|
||||
def getCommandValues(self):
|
||||
values = super().getCommandValues()
|
||||
if "device" in values and values["device"] is not None:
|
||||
parsed = self.parseDeviceString(values["device"])
|
||||
parsed = [v for v in parsed if "driver" not in v]
|
||||
parsed += [{"driver": self.getDriver()}]
|
||||
values["device"] = self.encodeDeviceString(parsed)
|
||||
else:
|
||||
values["device"] = "driver={0}".format(self.getDriver())
|
||||
parsed = []
|
||||
modified = self.buildSoapyDeviceParameters(parsed, values)
|
||||
values["device"] = self.encodeDeviceString(modified)
|
||||
return values
|
||||
|
17
owrx/source/soapy_remote.py
Normal file
17
owrx/source/soapy_remote.py
Normal file
@ -0,0 +1,17 @@
|
||||
from .soapy import SoapyConnectorSource
|
||||
|
||||
|
||||
class SoapyRemoteSource(SoapyConnectorSource):
|
||||
def getEventNames(self):
|
||||
return super().getEventNames() + ["remote", "remote_driver"]
|
||||
|
||||
def getDriver(self):
|
||||
return "remote"
|
||||
|
||||
def buildSoapyDeviceParameters(self, parsed, values):
|
||||
params = super().buildSoapyDeviceParameters(parsed, values)
|
||||
params = [v for v in params if not "remote" in params]
|
||||
params += [{"remote": values["remote"]}]
|
||||
if "remote_driver" in values and values["remote_driver"] is not None:
|
||||
params += [{"remote:driver": values["remote_driver"]}]
|
||||
return params
|
21
push.sh
21
push.sh
@ -1,26 +1,7 @@
|
||||
#!/bin/bash
|
||||
set -euxo pipefail
|
||||
|
||||
ARCH=$(uname -m)
|
||||
|
||||
ALL_ARCHS="x86_64 armv7l aarch64"
|
||||
TAG="latest"
|
||||
ARCHTAG="$TAG-$ARCH"
|
||||
|
||||
IMAGES="openwebrx-rtlsdr openwebrx-sdrplay openwebrx-hackrf openwebrx-airspy openwebrx-rtlsdr-soapy openwebrx-full openwebrx"
|
||||
. docker/env
|
||||
|
||||
for image in ${IMAGES}; do
|
||||
docker push jketterl/$image:$ARCHTAG
|
||||
done
|
||||
|
||||
for image in ${IMAGES}; do
|
||||
# there's no docker manifest rm command, and the create --amend does not work, so we have to clean up manually
|
||||
rm -rf "${HOME}/.docker/manifests/docker.io_jketterl_${image}-${TAG}"
|
||||
IMAGE_LIST=""
|
||||
for a in $ALL_ARCHS; do
|
||||
IMAGE_LIST="$IMAGE_LIST jketterl/$image:$TAG-$a"
|
||||
done
|
||||
docker manifest create jketterl/$image:$TAG $IMAGE_LIST
|
||||
docker manifest push --purge jketterl/$image:$TAG
|
||||
docker pull jketterl/$image:$TAG
|
||||
done
|
||||
|
14
sdrhu.py
14
sdrhu.py
@ -1,10 +1,10 @@
|
||||
#!/usr/bin/python2
|
||||
#!/usr/bin/python3
|
||||
"""
|
||||
|
||||
This file is part of OpenWebRX,
|
||||
an open-source SDR receiver software with a web UI.
|
||||
Copyright (c) 2013-2015 by Andras Retzler <randras@sdr.hu>
|
||||
Copyright (c) 2019 by Jakob Ketterl <dd5jfk@darc.de>
|
||||
Copyright (c) 2019-2020 by Jakob Ketterl <dd5jfk@darc.de>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as
|
||||
@ -24,9 +24,17 @@
|
||||
from owrx.sdrhu import SdrHuUpdater
|
||||
from owrx.config import PropertyManager
|
||||
|
||||
import logging
|
||||
logging.basicConfig(level=logging.DEBUG, format="%(asctime)s - %(name)s - %(levelname)s - %(message)s")
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
if __name__ == "__main__":
|
||||
pm = PropertyManager.getSharedInstance().loadConfig()
|
||||
|
||||
if not "sdrhu_key" in pm:
|
||||
if "sdrhu_public_listing" not in pm or not pm["sdrhu_public_listing"]:
|
||||
logger.error('Public listing on sdr.hu is not activated. Please check "sdrhu_public_listing" in your config.')
|
||||
exit(1)
|
||||
if "sdrhu_key" not in pm or pm["sdrhu_key"] is None or pm["sdrhu_key"] == "":
|
||||
logger.error('Missing "sdrhu_key" in your config. Aborting')
|
||||
exit(1)
|
||||
SdrHuUpdater().update()
|
||||
|
@ -4,10 +4,10 @@ After=multi-user.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=root
|
||||
Group=root
|
||||
User=openwebrx
|
||||
Group=openwebrx
|
||||
ExecStart=/usr/bin/openwebrx
|
||||
Restart=on-failure
|
||||
Restart=always
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
Reference in New Issue
Block a user