Radio Notes – Mike Richards G4WNC https://photobyte.org Freelance Technical Author, Illustrator & Photographer Tue, 18 Apr 2023 10:19:51 +0000 en-GB hourly 1 https://wordpress.org/?v=6.4.2 WSJT-X vs JTDX test results and source file https://photobyte.org/wsjt-x-vs-jtdx-test-results-and-source-file/ https://photobyte.org/wsjt-x-vs-jtdx-test-results-and-source-file/#respond Thu, 05 Jan 2023 15:48:46 +0000 https://photobyte.org/?p=10566 The following links contain the audio recording and the Excel spreadsheet used for my WSJT-X vs JTDX comparison.

The following link will download the audio file (WAV format) used for the performance comparison. This was recorded in the late afternoon of 31st December 2022.

]]>
https://photobyte.org/wsjt-x-vs-jtdx-test-results-and-source-file/feed/ 0
SimSmith on the Raspberry Pi https://photobyte.org/simsmith-on-the-raspberry-pi/ https://photobyte.org/simsmith-on-the-raspberry-pi/#respond Thu, 13 May 2021 11:23:35 +0000 https://photobyte.org/?p=10185 Anyone using a VNA in the workshop will find SimSmith an excellent tool. By combining the analysis of S parameters from a VNA with a circuit simulator, SimSmith becomes a powerful tool for designing matching circuits. In this post, I’ll show you how to install SimSmith on the Raspberry Pi.

SimSmith is a Java program, so all we need is the latest version of Java and the SimSmith.jar file.

Here are the steps to complete installation.

Visit: http://www.ae6ty.com/Smith_Charts.html and follow the links to download the latest SimSmith.jar file

Install Java by opening a terminal session (Ctl-Alt-T) and enter the following commands:

sudo apt install -y default-jdk

Confirm the installation with:java --version

Move the downloaded SimSmith.jar file from Downloads to your pi folder.

mv ~/Downloads/SimSmith.jar ~

Run SimSmith with: java -jar SimSmith.jar

For a desktop link, create a new file in the Desktop folder called SimSmith.desktop and add the following content:

[Desktop Entry]
Name=SimSmith
Comment=Runs SimSmith Java app from pi folder
Icon=/usr/share/pixmaps/openbox.xpm
Exec=java -jar /home/pi/SimSmith.jar
Type=Application
Encoding=UTF-8
Terminal=false
Categories=None;

]]>
https://photobyte.org/simsmith-on-the-raspberry-pi/feed/ 0
NanoVNA Saver on the Raspberry Pi https://photobyte.org/nanovna-saver-on-the-raspberry-pi/ https://photobyte.org/nanovna-saver-on-the-raspberry-pi/#comments Thu, 13 May 2021 10:11:06 +0000 https://photobyte.org/?p=10183 UPDATED 14-April 2023: The latest version of NanoVNA Saver requires PyQt6 which is not yet available for the Pi. I will update these instructions when it’s available.

NanoVNA Saver is an excellent package that provides a host of useful features for owners of the NanoVNA V1 and V2. When looking around the Internet for Pi installation instructions, I found several conflicting and out-of-date posts, so decided to develop my own. I thought it might be helpful if I post my solution here.

NanoVNA Saver works well on the Raspberry Pi models 3, 4 and 400, but installation requires a few simple steps as shown here. These instructions assume you’re using the latest Raspberry Pi OS.

Open a terminal session (Ctl-Atl-T) and enter the following commands sequentially.

cd ~

sudo apt install -y python3-pyqt5 python3-scipy

git clone https://github.com/NanoVNA-Saver/nanovna-saver

cd nanovna-saver

sudo chmod +r ~/nanovna-saver/nanovna-saver.py

You can now run NanoVNA Saver by entering: python3 nanovna-saver.py

To create a desktop link for NanoVNA Saver, use the following steps:

Create a new file called NanoVNA-Saver.desktop, add the following content and save it in the desktop folder.

[Desktop Entry]

Name=NanoVNA-Saver

Comment=Runs NanoVNA Saver from the nanovna-saver folder

Icon=/usr/share/pixmaps/openbox.xpm

Exec=python3 /home/pi/nanovna-saver/nanovna-saver.py

Type=Application

Encoding=UTF-8

Terminal=false

Categories=None;

]]>
https://photobyte.org/nanovna-saver-on-the-raspberry-pi/feed/ 27
WSJT-X 2.3 – Transmit Audio Failure with PiOS https://photobyte.org/wsjt-x-2-3-transmit-audio-failure-with-pios/ https://photobyte.org/wsjt-x-2-3-transmit-audio-failure-with-pios/#comments Fri, 19 Mar 2021 22:53:16 +0000 https://photobyte.org/?p=10135 Thanks to a report from John, GM0WRR, I have identified a problem with WSJT-X 2.3 and the use of PulseAudio on the Raspberry Pi.

When setting the input and output soundcard you would normally set both to pulse. However, if you do that, WSJT-X will fail after the first transmission. If you close and try to restart WSJT-X you will get a file lock error that you can’t clear. This is because, in its failled state, closing the program stops the interface but a WSJTX process is left running. To restart WSJT-X you need to reboot the Pi or Open the Task Manager (Accessories – Task Manager) and find wsjtx, right-click and kill it!

The work-around to this problem is to select the soundcard device, rather than pulse as the audio input and output.

Here’s a step-by-step process:

  1. With your USB soundcard or USB rig plugged in, start WSJT-X
  2. Go to File – Settings – Audio
  3. In the Soundcard, Input drop-down, select the entry that begins with: alsa_input.usb (it will probably be near the bottom of the list)
  4. In the Output drop-down, select the entry that begins with: alsa_output.usb (near bottom of list)
  5. Click OK to close and save the settings
  6. You should now be back in business.

Regards,

Mike – G4WNC

]]>
https://photobyte.org/wsjt-x-2-3-transmit-audio-failure-with-pios/feed/ 5
Installing & upgrading CQRLOG on a Raspberry Pi https://photobyte.org/installing-upgrading-cqrlog-on-a-raspberry-pi/ https://photobyte.org/installing-upgrading-cqrlog-on-a-raspberry-pi/#comments Tue, 14 Jul 2020 22:26:28 +0000 https://photobyte.org/?p=9865 Updated 17 July 2020 to add missing wildcards from the apt install line!

CQRLOG is one of the most complete contact logging programs for Linux and the Raspberry Pi, but building the latest version from source can be problematic. In this post I’ll show you a simple trick that simplifies the upgrade.

The main source of build problems is database configuration. The simple solution is to first install the old version of CQRLOG fom the Pi repository. To do that, open a terminal session (Ctl-Alt-T) and enter the following line:

sudo apt install cqrlog

By installing from the repository, all the supporting software, including the database application will also be installed. Once the installation has completed you should run CQRLOG by typing cqrlog. Answer’yes’ when asked if you want to store logs on the local machine. This will configure the database and could take a few minutes to complete. Once complete open a log and you will probably see prompts to download various updates, you should accept these. When you’re happy that everything looks ok, close CQRLOG.

With the old version installed and working, we can start the upgrade process. There are two parts to the process. The first is to install some prerequisite packages that are required to support the build. We then download the source code and build the latest version – all with just 6 lines of commands and here they are:

sudo apt install -y lcl*2.0 lazarus*2.0 fp*3.0.4 fpc*3.0.4 libssl-dev
cd ~
git clone https://github.com/ok2cqr/cqrlog.git
cd cqrlog
make
sudo make install

You can now start CQRLOG and you will find that you have the latest version.

Installing an old package from the repository can be a quick way to overcome build problems with other software. It doesn’y always work but can be worth a try.

Mike – G4WNC

]]>
https://photobyte.org/installing-upgrading-cqrlog-on-a-raspberry-pi/feed/ 16
Raspberry Pi – Transfer WSJT-X, JS8Call and FLDIGI settings to a new image https://photobyte.org/raspberry-pi-transfer-wsjt-x-js8call-and-fldigi-settings-to-a-new-image/ https://photobyte.org/raspberry-pi-transfer-wsjt-x-js8call-and-fldigi-settings-to-a-new-image/#comments Fri, 03 May 2019 09:48:34 +0000 https://photobyte.org/?p=2151 Several customers have asked me how they can move their settings and macros from one Pi image to another. This post attempts to simplify the process. To preserve your settings, you just need to copy a few files from the original Pi image to a USB stick and then move them back onto the new image once it is running.

The files to move are:

~/.fldigi/fldigi.prefs

~/.fldigi/macros/macros.mdf. NB: If you have created any personal macro files, they will be stored here and should also be copied.

~/.config/JS8Call.ini

~/.config//WSJT-X.ini

NB: ~ is a shortcut to the Pi home directory, /home/pi

You can use the Pi File Manager to do the move using simple drag and drop.

For those of you that are new to the Pi, here is a step-by-step description of the process:

  1. You need an empty USB memory stick. Any size will do as you’re only storing a few kB of data.
  2. Give the stick a name, i.e. Pidata. This is not essential, but it can make finding it on the Pi a bit easier.
  3. Boot the original Pi image, but don’t run any data modes programs.
  4. Insert the USB stick into the Pi USB socket
  5. You will see a popup on the Pi screen asking if you want to open File Manager; say yes to this.
  6. If you miss the File Manager prompt, you will find the USB stick mounted at: /media/pi/Pidata (or whatever name you gave the stick).
  7. Open a second instance of File Manager by clicking the File Manager icon on the top menu bar.
  8. Make sure the new instance is showing the contents of /home/pi
  9. Arrange the two File Manager instances so they are side-by-side with one showing /home/pi and the other is showing your USB stick.
  10. In the /home/pi File Manager instance, go to the View menu and select Show Hidden. This will reveal a set of hidden directories whose names begin with a period ( . ).
  11. Double-click on .fldigi to see the contents of this directory.
  12. Drag and drop the fldigi.prefs file to the USB stick.
  13. Open the macros directory in .fldigi. Drag and drop all files in this directory with a .mdf suffix.
  14. Click the Up-arrow icon by the address line to return to the /home/pi directory.
  15. Double-click on .config to see the contents of this directory
  16. Drag and drop JS8Call.ini and WSJT-X.ini to the USB stick.
  17. Close both File Managers, shutdown the Pi and remove the USB stick.
  18. Replace the Pi microSD card with the new image and power-up the Pi.
  19. Repeat steps 4 to 10 so that you have the two File Manager instances open.
  20. Navigate to ~/.fldigi and copy fldigi.prefs from the USB stick to that directory.
  21. Navigate to ~/.fldigi/macros and copy all the files with a .mdf suffix to that folder.
  22. Navigate to ~/.config and copy WSJT-X.ini and JS8Call.ini to that directory.
  23. Remove the USB stick, reboot the Pi and all your settings should have been transferred!
]]>
https://photobyte.org/raspberry-pi-transfer-wsjt-x-js8call-and-fldigi-settings-to-a-new-image/feed/ 2
Raspberry Pi – Multiple Instances of RTLSDR as a Service https://photobyte.org/raspberry-pi-multiple-instances-of-rtlsdr-as-a-service/ https://photobyte.org/raspberry-pi-multiple-instances-of-rtlsdr-as-a-service/#comments Wed, 06 Mar 2019 16:57:10 +0000 https://photobyte.org/?p=2069 My Raspberry Pi RTL Dongle server cards run the server as a service under systemd. This has several benefits including a better-defined start and the facility to stop/restart a service gracefully. One of my customer recently asked if it was possible to support 2 dongles and switch between them.

From previous tests, I know that a Pi3-B can support up to 4 RTL-SDR server instances, so switching between two should be easy. To add a second instance we just need to create a second Service file that’s a duplicate of the original with just one line changed. Here’s a copy of the original, single device, service file:

[Unit]
Description=RTL-SDR Server

Wants=network-online.target
After=network-online.target

[Service]

ExecStartPre=/bin/sleep 15
ExecStart=/bin/sh -c ‘/usr/local/bin/rtl_tcp -a $(hostname -I)’
WorkingDirectory=/home/pi
StandardOutput=inherit
StandardError=inherit
Restart=always

[Install]
WantedBy=multi-user.target

The line we need to change is the ExecStart as this line actually starts the server. To add another instance it should read:

ExecStart=/bin/sh -c ‘/usr/local/bin/rtl_tcp -a $(hostname -I) -d1 -p1235’

The -d suffix is the device number which counts from 0 and the -p1235 entry forces the second server instance to use port 1235.

Here’s a step-by-step guide to adding a second instance. NB: Back-up your SD card first!

  • Open a terminal session (Ctl-Atl-t)
  • Enter: cd /etc/systemd/system
  • sudo cp rtlsdr.service rtlsdr1.service
  • sudo nano rtlsdr1.service
  • Edit the ExecStart line to add: -d1 -p1235 as in above example
  • Press Ctl-x followed by y to save and close the file
  • Make sure you have two dongles connected to the Pi
  • Enter sudo systemctl start rtlsdr1
  • Enter sudo systemctl status rtlsdr1 This checks the status so you should see your dongle reported
  • If all is well enter: sudo systemctl enable rtlsdr1 This will make the second instance automatically run at boot.

That’s it! If you want to stop either service from starting at boot use: sudo systemctl disable rtlsdr or rtlsdr1

To start or stop a service it’s sudo systemctl stop rtlsdr or rtlsdr1 to start it’s sudo systemctl start rtlsdr or rtlsdr1

Good Luck,

Mike – G4WNC

]]>
https://photobyte.org/raspberry-pi-multiple-instances-of-rtlsdr-as-a-service/feed/ 5
Airspy – Spy Server – Useful scripts https://photobyte.org/airspy-spy-server-useful-scripts/ https://photobyte.org/airspy-spy-server-useful-scripts/#respond Thu, 03 Aug 2017 08:50:55 +0000 https://photobyte.org/?p=1169 I’ve had Spy Server working very successfully with the Pi 3 for a while now and have written a few time-saving scripts that others might find useful. These can be found in the zip file below.

Here’s a quick run through their function:

Airspy.sh, AirspyHF.sh and DVB-T.sh – These scripts automatically change the Spy Server config file to suit the different receiver options. Key parameters changed are device_type, device_sample_rate, fft_fps and initial_gain. These scripts are easily edited to suit your preferences.

airspy-update.sh – This gets the latest Airspy files from github and installs them.

spyserver-update.sh – Manually download spyserver-arm32.tgz from the Airspy site and then run this script to unpack and install it.

NB: spyserver-update.sh leaves the config file set for an Airspy receiver. Run the receiver scripts above to change this or edit the script for your setup.

NB: When using these scripts, you have to restart the Spy Server as the .config file is only read during start-up.

Click below to download the zip file:

SpyserverScripts

Hope you find these useful,

 

Mike – G4WNC

 

]]>
https://photobyte.org/airspy-spy-server-useful-scripts/feed/ 0
Running SpyServer on a Raspberry Pi-3 https://photobyte.org/running-spyserver-raspberry-pi-3/ https://photobyte.org/running-spyserver-raspberry-pi-3/#comments Thu, 25 May 2017 10:59:48 +0000 https://photobyte.org/?p=1102 *UPDATED 31st October 2018: A few typos corrected and instructions updated for Stretch. Also made amendments for Airspy-Mini receiver.

NB: Spy Server is undergoing active development so it’s important to regularly update both Spy Server and SDR Sharp.

Introduction

SpyServer is available as a Linux app that will run on the popular and cheap Raspberry Pi-3. This brings a number of benefits. First of all, you can mount your Airspy close to the antenna to avoid lossy cable runs whilst accessing the receiver over a network link. Due to Spy Server’s low bandwidth requirement, you can share your receiver over the wider Internet, either for your own use or to let other ops use the radio.

Installing SpyServer on a Raspberry Pi 3

Also see my ready built scripts here:

Here’s a step-by-step guide to getting SpyServer running on a Pi 3.

  1. Start with a fresh install of the latest Raspbian Stretch.
  2. Type the following in a terminal session to install the build tools and the drivers for the AirSpy receiver: sudo apt-get install -y  cmake libusb-1.0.0-dev  
  3. Now enter the following commands to download and install the AirSpy drivers:
    • wget https://github.com/airspy/host/archive/master.zip
    • unzip master.zip
    • cd airspyone_host-master
    • mkdir build
    • cd build
    • cmake ../ -DINSTALL_UDEV_RULES=ON
    • make
    • sudo make install
    • sudo ldconfig
  4. Open a web browser and navigate to http://airspy.com/download/
  5. Select the SDR Server for 32bit ARM boards and download the file.
  6. Go to the download directory by typing: cd ~/Downloads
  7. Create a new directory for SpyServer by entering the following command: mkdir ~/spyserver
  8. Extract the downloaded tgz file using the following command: tar -xvzf spyserver-arm32.tgz -C ~/spyserver
  9. Let’s check the files are in place with this command: cd ~/spyserver && ls.
  10. If all is well, you should see the files: spyserver and spyserver.config.
  11. The next task is to make SpyServer executable by entering: sudo chmod +x spyserver

That completes the installation but you need to update the SpyServer config file for your station. Here’s an example for using an AirSpy receiver with the Pi:

  1. Open a Terminal session and type: hostname -I and make a note of the IP address.
  2. Type cd ~/spyserver to make sure we’re in the right directory.
  3. Now we can open the config file by typing: sudo nano spyserver.config
  4. Scroll down to the line: device_sample_rate
  5. Amend this line to read: device_sample_rate = 2500000 (3000000 or 6000000 for Airspy Mini).*
  6. Scroll to line: #initial_frequency= 7100000 and change it to your preferred start frequency and remove the #, i.e. initial_frequency = 145000000
  7. Scroll to line: fft_fps = 15 and change value to 10. This reduces the processor load to provide capacity for multiple connections.
  8. Scroll to line: initial_gain = 5 and change to 10
  9. Press Control x followed by y then Return to close the files and save the changes.

*NB: Device Sample Rate Notes. Airspy receivers will require 2.5MSPS as the 10MSPS setting uses more USB bandwidth than the Pi can supply. However, AirSpy Mini users must use 3MSPS or 6MSPS as these are the only rates supported by that device. Reports to date indicate that 6MSPS is fine on a Pi 3B+. If you encounter any stuttering audio, you will need to drop the sample rate.

That completes the changes and your Pi is now ready to run SpyServer. You can start the server with the following command from a terminal session: cd ~/spyserver && ./spyserver

ADDING OTHER RECEIVERS

In addition to supporting the standard Airspy and Airspy Mini, Spy Server is ideal for sharing the excellent Airspy HF+ receiver. Here is the step-by-step process to install the HF+ drivers:

  1. Open a terminal session and enter: cd /home/pi
  2. Enter: wget https://github.com/airspy/airspyhf/archive/master.zip
  3. Now unzip the archive by entering: unzip master.zip
  4. Change to the new directory: cd airspyhf-master
  5. Make a new directory for the build: mkdir build
  6. Change to the new directory: cd build
  7. Make the driver with: cmake ../ -DINSTALL_UDEV_RULES=ON
  8. Complete the make with: make
  9. Move the installed files to the correct destination: sudo make install
  10. Rebuild the search path so the driver can be found: sudo ldconfig

You can also use RTL-SDR dongles with the server but you will need to add the driver as described here.

 

Auto-Start on Boot

(Note: whilst the rc.local autostart option works ok, I now recommend running the Spy Server as a service. See https://photobyte.org/raspberry-pi-running-spy-server-as-a-service/

You can also start Spy Server on boot. To do this, we need to create a dedicated /etc/rc.local script. This automatically runs at boot but will often be called before the network is ready which will cause Spy Server to fail. To overcome this I have added an ‘until’ loop that checks for the IP every second and, once detected, carries on and runs Spy Server. This IP check also has a 30 second timeout that causes the script to abandon if the IP is not available after 30 seconds. This is very crude at the moment and needs some error handling along with a message to let the user know when IP detection fails.


#!/bin/bash

# This script is executed at the end of each multiuser runlevel.

# Make sure that the script will “exit 0” on success or any other value on error.

# This script runs during boot and waits up to 30 seconds for an IP address and, if found, runs Spy Server.

counter=1
until [[ $_IP ]]
do
_IP=$(hostname -I)
sleep 1
((counter++))
if [ $counter -gt 30 ]
then
exit 1
fi
done
cd /home/pi

./spyserver spyserver.config  &

exit 0


That’s it; you should find that the server starts automatically when the Pi boots providing you have a local network.

 

Mike

]]>
https://photobyte.org/running-spyserver-raspberry-pi-3/feed/ 58
RSGB Convention 2016 Slides https://photobyte.org/rsgb-convention-2016-slides/ https://photobyte.org/rsgb-convention-2016-slides/#respond Sat, 08 Oct 2016 22:46:02 +0000 https://photobyte.org/?p=909 As promised at my lecture this afternoon, I have posted the slides and you can view and download themvia the following link:

http://www.authorstream.com/Presentation/mikerichards1610-2936133-pi-pitaya-shack-rsgb-convention-2016/

 

]]>
https://photobyte.org/rsgb-convention-2016-slides/feed/ 0