0 Wenet RX Instructions (Linux using Docker)
Mark Jessop edytuje tę stronę 2023-01-26 21:53:14 +10:30

Last Updated: 2022-03-12

The current simplest way of setting up a Wenet receiver station is to use the Docker image. This avoids the need to build dependencies, and lets you get into receiving quickly. Wenet Docker images are available for the majority of Linux platforms. Unfortunately we cannot support Windows or OSX at this time.

A huge thanks to Steven Honson for setting up the Docker containers and making this all possible!

1. Hardware Required

1.1. Receiver - RTLSDR

Wenet requires a RTLSDR to receive the transmitted signal, and of course some sort of antenna suited to the operating band (usually the 70cm amateur radio band). We highly recommend the 'v3' rtl-sdr.com dongles.

Other SDRs with open-source APIs may be supported in the future...

1.2. Antenna

Wenet transmissions are usually found on the upper half of the amateur 70cm band, with the nominal frequency used in South Australia being 443.5 MHz, and 441.2 MHz in Victoria. Depending on your distance from the Wenet transmitter, you will need some antenna gain for reliable reception. For best reception, a 5-element yagi works well. These are available commercially from places like Arrow Antennas, or you could build one yourself out of tape measure and PVC pipe.

1.3. Preamplifier

To achieve best receive performance, a preamplifier should be used between the RTLSDR and the antenna, ideally as close to the antenna feed-point as possible. Examples of suitable amplifiers include:

The Wenet receiver software can be configured to enable the Bias-Tee on the RTLSDR to power some preamplifiers via the coax. (Note that the MiniKits preamps required 12v and cannot be powered this way).

1.4. Computer

Wenet reception has been successful using the following platforms:

  • Raspberry Pi 3B+
  • Raspberry Pi 4
  • Various Intel i3 Laptop computers running Ubuntu Linux (18.04 or newer)

Any reasonably modern single-board computer (Pi 3B+ performance or better) should be able to handle Wenet reception, and most modern laptops (when running a Linux OS) should also work.

As the Wenet receiver interface is now browser-based, your Linux installation will also need a modern-ish web browser, such as Firefox or Chromium.

2. Software Dependencies

2.1. Installing Docker

It is highly recommended that you use the latest version of Docker, rather than the one available from your systems default package repositories. If you already have Docker installed, then hopefully you already know what you're doing here!

A quick way to install the latest version of Docker is by using the convenience script:

curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh

If you see errors along the lines of "InRelease' changed its 'Suite' value from 'stable' to 'oldstable'", then you are likely running an out-of-date version of Raspbian. You can temporarily get around this error by running the command:

sudo apt update --allow-releaseinfo-change

To be able to run docker commands as your non-root user (recommended), run:

sudo usermod -aG docker $(whoami)

You will need to logout and log back in afterwards to pick up the changes to group membership.

2.2. Testing the Docker Install

After logging out and back in, test that docker is available by running:

docker version

This should return something along the lines of:

Client: Docker Engine - Community
 Version:           20.10.14
 API version:       1.41
 ... more lines here ...
Server: Docker Engine - Community
 Engine:
  Version:          20.10.14
  API version:      1.41 (minimum version 1.12)
  ... more lines here ...

If you don't see the server section then you likely haven't give your user the correct permissions (see above).

2.3. RTL-SDR Kernel Blacklisting

The RTL DVB kernel modules must first be blacklisted on the Docker host. RTL-SDR itself is not required on the Docker host. This can be accomplished using the following commands:

echo 'blacklist dvb_usb_rtl28xxu' | sudo tee /etc/modprobe.d/blacklist-dvb_usb_rtl28xxu.conf
sudo modprobe -r dvb_usb_rtl28xxu

If the modprobe -r command errors, a reboot may be required to unload the module.

3. Configuring and Starting up the Docker Image

3.1. Configuring

We will make a directory to store a startup script, and to save received images to:

mkdir -p ~/wenet/rx_images
cd ~/wenet/
curl -o start_docker.sh https://raw.githubusercontent.com/projecthorus/wenet/master/start_docker.sh
chmod +x start_docker.sh

Modify the start_docker.script and update the fields within as appropriate. At the very least ensure you update your callsign!

You may also need to adjust the receive frequency depending on the launch you are receiving.

3.2. Startup

From within the wenet directory, run the image by running:

$ ./start_docker.sh 

The first time this is run, it will download the required docker images, this may take a few minutes.

You can check the status of the container by checking the logs:

docker logs --tail 50 --follow wenet

This will usually show a lot of debug information, which may be a bit hard to interpret!

3.3. Viewing the Web Interface

Open a web browser and navigate to: http://localhost:5003/

If all is working, this should show the Wenet web interface. The SNR value in the top-right corner should update even if only noise is being received (values of 3-4 dB are normal when receiving nothing). SNR values of >10dB are required for reliable reception of packets. Abnormally high values (e.g. >25 dB) may indicate you have a strong local interferer which the receiver is latching onto.

The main image display in the centre of the page will update as image packets are received. At the bottom of the page is further information on the image being received, and the status of packet uploads to ssdv.habhub.org. Also visible at the bottom of the page is the 'debug log' from the payload, showing the status of image capture and processing.

3.4. Accessing Received Images

To see live image data received by all the receivers of a flight, visit https://ssdv.habhub.org/

Images received just by your station are available in the wenet/rx_images directory.

3.5. Stopping / Restarting

The container can be stopped by running:

$ docker stop wenet

To restart the container (for example, if you changed a setting in start_docker.sh, just re-run ./start_docker.sh.

3.6. Updating

Updating the docker image can be accomplished by running:

$ docker pull ghcr.io/projecthorus/wenet:latest

You must then start the container again using the start_docker.sh script.

3.7. Starting Automatically on Boot

To make Wenet start automatically on boot, add the line --restart="always" \ to the start_docker.sh script, e.g.:

echo "Starting new Wenet instance..."
docker run -d \
	--name wenet \
	-e MYCALL=$MYCALL \
	-e RXFREQ=$RXFREQ \
	-e GAIN=$GAIN \
	-e BIAS=$BIAS \
	-e BAUD_RATE=$BAUD_RATE \
	-e OVERSAMPLING=$OVERSAMPLING \
	-v ~/wenet/rx_images/:/opt/wenet/rx_images/ \
	--device /dev/bus/usb \
	-p 5003:5003 \
        --restart="always" \
	ghcr.io/projecthorus/wenet:latest

After you re-run start_docker.sh again, this will result in the wenet decoder starting on system boot.