Below are my notes from setting up some tools for my HF station. The goal is to setup a Remote HF station, with WSJT-X, FLDIGI. Be able to upload those logs automatcally-ish to LoTW, and then use CLoudLog to download the LoTW logs and view my stats.
- Raspberry Pi (3b)
- SD Card (It’s a 7.1GB image, do your math. I started with a 16GB), Power Cord, Power Supply (Good One)
- USB CAT Interface for your radio
- HF Radio, Antenna, Tuner, Wire, etc… (Not Covered Here)
Raspberry Pi Initial Setup
This is a pretty standard Raspberry Pi Setup. If you already have a Raspberry Pi, and are updated to the latest version, the below should work.
- Insert your SD Card.
- Download the latest Raspbian image from https://www.raspberrypi.org/downloads/raspbian/ and install an appropriate disk imager. Unzip the image. This was tested with 2020-02-13 Raspbian Buster Full.
- Install Win32 Disk Imager, an alternative imager for your OS, or try the new raspberry pi one that didnt recognize my SD card.
- Write It! Put the SD Card in the Pi, Boot it up!
- Go through the setup, set your Country, Language and Timezone. Set a password. Setup the screen, connect to WiFi, do the updates. Reboot.
- (Optional, while your waiting) Right Click on your taskbar, Choose ‘Add/Remove Panel Items’, Click Add, Choose CPU Temp Monitor. Add, Choose Resource Monitor, Preferences, Check both
VNC allows us to access the Raspberry Pi remotely. Source
- Launch a terminal window, and type this:
- Select interface, vnc, yes to enable, ok
- Right click the VNC icon in the upper left taskbar and select ‘Options’. Change Encryption to Prefer on, and Authentication to VNC Password.
- Click Apply, set a password.
- Click OK.
- Hover your mouse over the Wifi icon, and remember your IP.
- On your local computer, use a VNC client, and connect to that IP.
- Download the latest WSJT-X fromhttps://physics.princeton.edu/pulsar/k1jt/wsjtx.html using Chromium, save it into your Downloads folder. Look for the Raspbian version.
- Launch a terminal window, and enter the following commands. They might need updated if you have a mor recent version of WSJT-X
cd /home/pi/Downloads sudo apt install libqt5multimedia5-plugins libqt5serialport5 libqt5sql5-sqlite libfftw3-single3 sudo dpkg -i wsjtx_2.1.2_armhf.deb
If you have dependency problems, or forgot to run the dependencies like I usually do, just run this, and then rerun the wsjt install:
sudo apt --fix-broken install sudo dpkg -i wsjtx_2.1.2_armhf.deb
In the Raspberry pi menu, under Sound & Video, you should have wsjt-x.
You should read this, the WSJT-X User Guide and learn how to use the program and all of its settings, I will cover a few basics here, when setting up with a Griffin iMic USB Audio Card, and a Yaesu FT-817ND with USB Cat Control.
On the General tab, you must enter at least your Call and Grid. Some of the Behavior checkboxes below are important to how you use WSJT-X.
On the Radio Tab you will need to select your Radio from the Rig drop down list, and select the approprate settings for your CAT Control.
On the Audio Tab select the input and output for the iMic
Click OK at the bottom to save the settings. Check the Save menu at the top and make sure its set to None.
We will use TQSL to sign and upload our logs from WSJT-X to LoTW
- Download the latest TQSL for Linux From http://www.arrl.org/tqsl-download using Chromium, save it into your Downloads folder.
- Execute the following commands in a terminal window:
cd /home/pi/Downloads tar -zxvf tqsl-2.5.3.tar.gz cd tqsl-2.5.3 sudo apt -y install build-essential libcurl4-openssl-dev libdb-dev libexpat1-dev liblmdb-dev libssl-dev libwxgtk3.0-dev zlib1g-dev cmake . make -j$(nproc) sudo make install
Type tqsl at the prompt to execute it, or to add a shortcut to TQSL, Click the Raspberry Pi Icon in the upper left, Select Accessories, Menu Editor. Sound and Video, new item. Give it a name, and put ‘tqsl’ in the command.
If you want to add a shortcut to tqsl, go to your Menu Editor, select a folder and choose ‘New Item’. Give it a name and the command ‘tqsl’. like below
Launch TQSL, accept all the warnings. Under callsign Certificate, choose ‘Request New Callsign Certificate’. Go through the prompts, updload your request. You should recieve a confirmation e-mail. In a few days, you should get your certificate via e-mail. When you have that, download the .tq6 file and select ‘Load a Callsign Certificate’
Add a station location, name it ‘Home’
CloudLog is a fantastic browser based logging application. We will use it to connect to LoTW and show statistics of of worked Grids, States and DXCC. Source
- Install apache, php, mysql and restart the apache service:
sudo apt install apache2 -y sudo apt install php -y sudo service apache2 restart sudo apt install mariadb-server php-mysql -y sudo service apache2 restart ??? sudo apt-get install php-xml sudo apt-get install php-mbstring
Navigate to the www root, and install cloudlog, change some permissions
cd /var/www/html sudo git clone https://github.com/magicbug/Cloudlog.git cd Cloudlog sudo chmod 777 application/config/ sudo chmod 777 backup/ sudo chmod 777 updates/ sudo chmod 777 uploads/
Create a MySQL Database, User, and give them some rights
sudo mysql -u root -praspberry CREATE DATABASE cloudlog; CREATE USER pi; SET PASSWORD FOR pi= PASSWORD('Cloud!!'); GRANT ALL PRIVILEGES ON cloudlog.* TO 'pi'@'localhost' IDENTIFIED BY 'Cloud!!'; FLUSH TABLES; exit
In chromium, go to http://localhost/Cloudlog/install the website and complete the install. Populate the Website URL with your IP that you saved from earlier, your Gridsquare, hostname is localhost, username is pi, password is Cloud!! , database name is cloudlog. Click Install.
If you get an Installation Successful, remove the installation direction by typing the following in a terminal window:
cd /var/www/html/Cloudlog sudo rm -r install
- In chromium, navigate to http://localhost/Cloudlog .
- Login as m0abc/demo.
- Go to Admin, Accounts, Add user
- Add yourself with the user role administrator.
- Delete the M0ABC account, you will be logged out…
- Login with your account
- Go to Admin, Station Profile, Create a Station Profile
- Set your station profile active
- Go to Admin, Accounts, edit your account.
- Add your LoTW username and password.
- Go to Admin, Update country files, select update dxcc button
- Go check your station
- Go to Admin, LoTW Import, select ‘Pull LoTW data for me’, click Import.
- Now we can go back to our station profile and pick the DXCC
- Maybe click that recheck all because we are doing things backwards
- Import your WSJT-X Log to CloudLog
Automatically Backing up WSJT-X and CloudLog to a Windows Share Daily
Below we are going to create a shell script to copy our WSJT-X logs, along with performing a SQL export of our CloudLog database, and copying to a windows shared folder.
First, lets create a folder on the desktop for the backups. Launch a terminal session and type this:
- cd /home/pi/Desktop/
- mkdir Backups
Lets create a shell script on the desktop using the command below, and put the script below in it.
The first section of the script deleted all previous backups. I should improve this with a log rotation
The second script performs a mysqldump of the CloudLog database and compresses it with the current time.
The third section copies the WSJT-X log files to the desktop backup folder, and again compresses them with a time date stamp.
The last 2 sections mount a windows share and copy the backup files to it. You will need to customize this to your windows pc name, share name, username, password and appropriate paths. It probably does not need to mount the drive every time it runs, but if it errors, the script seems to continue….
Use your editor, or type this at the terminal window:
cd /home/pi/Desktop/Backups/ rm *.* -f mysqldump -u pi -h localhost -pCloud!! --all-databases --quick | gzip > /home/pi/Desktop/Backups/cloudlog_mysql$(date +%Y%m%d%H%M%S).sql.gz tar -cf /home/pi/Desktop/Backups/wsjt-x$(date +%Y%m%d%H%M%S).tar /home/pi/.local/share/WSJT-X sudo mount.cifs //IP_OF_YOUR_WINDOWS_PC/SHARE_NAME /home/pi/Desktop/NAME_OF_WINDOWS_PC -o user=WINDOWS_USERNAME,password=WINDOWS_PASSWORD sudo cp *.* /home/pi/Desktop/NAME_OF_WINDOWS_PC/PATH/
Lets add this to cron, so its runs once a day. TYpe the command below, and add this line into the cron. Control X, Yes, Enter to Save
Uploading WSJT-X Contacts Manually to LoTW using TQSL
After you have made a few QSO’s on WSJT-X, Lets manually upload them to LoTW. From the main TQSL screen, choose ‘Sign a log and upload it automatically to LoTW’. Find your wsjt_log.adi (ADiF) file in /home/pi/.local/share/WSJT-X, choose Open.
Follow the prompts, accepting the station location, click OK on the date filter and it should upload all of your contacts. You should have a prompt that looks like this when complete:
Automatically uploading WSJT-X contacts with TQSL using a shell script
Using your editor, create a file on the desktop titled ‘autotqsl.sh’. Put this code in it, customize it based on your station location name:
tqsl -d -u -a compliant -x -l "Home" "/home/pi/.local/share/WSJT-X/wsjtx_log.adi" $SHELL
Test the script by running ‘sh autotqsl.sh’ in the terminal window from your desktop. IT should supress suplicate QSO’s and only upload new ones.
Create a shortcut in the menu so that you can run this with a click, the full command should be:
Importing WSJT-X into CloudLog
From the Couldlog Admin menu, choose Admin->ADIF Import. Choose your WSJT-X adi file from /pi/.local/share/WSJT-X/
CloudLog Importing LoTW
After LoTW has processed your QSO’s, you can download/import the results into CloudLog. Select ‘LoTW Import/Export’ from the Admin menu after you have logged into CloudLog.
Select the ‘Pull LoTW data for me’ radio button. As the note says, you should probably have a QSO in your list first…
The script below will update CloudLog to the latest available. You can add this as a cron job as recommended, or not, and run it manually.
cd /var/www/html/Cloudlog && git pull
sudo git clone https://github.com/mbridak/CloudLogPyCAT.git
In Cloudlog, go to Admin, API. Click ‘Generate KEy with Read and Write Access’
rigctld -m 120 -r /dev/ttyUSB0 –set-conf=serial_speed=38400 -v -v &
WSJT-X Closing & Removing Pulseaudio
I had some problems with WSJT-X crashing on the Raspberry Pi 3B. It would just close randomly. To troubleshoot, instead of launching WSJT-X from the shortcut, launch a command prompt and type ‘wsjtx’. There is normally some output in the terminal, after that garbage, i hit enter a few times to leve a break point. If it crashes, any errors will be displayed in the console.
"Stream error: Entity killed" Assestion 'o' failed at pulse/operation.c:133, function pa_operation_get_state(). Aborting. Aborted
sudo apt-get autoremove pulseaudio sudo apt-get --purge remove pulseaudio
cd Downloads wget https://www.dropbox.com/s/9kw978829u2rstr/GridTracker-Linux-Arm-1.20.0416.tar.gz?dl=1 mv 'GridTracker-Linux-Arm-1.20.0416.tar.gz?dl=1' GridTracker-Linux-Arm-1.20.0416.tar.gz tar -zxf GridTracker-Linux-Arm-1.20.0416.tar.gz cd GridTracker cp Pi3-GridTracker.desktop /home/pi/Desktop sudo apt-get install libgconf-2-4:armhf
Create a shortcut using the menu editor