Home » Blog

Category Archives: Blog

UPDATE: Restoring QRZ on Pi-Star

A new update to Pi-Star has been released on 27th January 2021 to enable users to switch between RadioID.net and QRZ.com without the need to edit source code or download a script. To change to QRZ.com, follow these instructions:

Step 1

Ensure that you have updated to the latest version – 20210127 (or presumably later) – you can see your version in the top right hand corner. Then click on Configuration – you may need to log in to Pi-Star if you haven’t already done so. The default user name is pi-star and password is raspberry unless you have changed it.

Step 2

Now click Expert.

Step 3

Now click CSS Tool.

Step 4

At the bottom of the display customisation page, you should see a section called Lookup. This will default to RadioID, if you wish to have QRZ.com as your default look up, change it to QRZ.

Please note that RadioID and QRZ are case sensitive and must be entered exactly like this.

If you do not see the Lookup section, it is likely because you have customised your colours like I have – proceed to Step 5.

Step 5

If Lookup is missing on your page, click Factory Reset to restore the default colours – you might want to make a note of your custom colours before resetting

The reset should only affect the colours and not your other settings. However, I found in the dashboard that it showed my callsign as M1ABC again although my actual callsign was saved correctly on the configuration page. Changing it in the configuration page and then changing it back to my actual callsign solved this.

Step 6

Simply click Apply Changes to revert your look up to QRZ.com.

Feel free to play around with the popupWidth and popupHeight to change the size of the pop-up window when it opens.

Many thanks to Andy Taylor, MW0MWZ for effecting these changes so quickly off the back of user feedback. I remain extremely grateful to Andy for all the time and effort he has put into Pi-Star for the benefit of the amateur community and allowing so many to get on air with very cost effective hardware.

Restoring QRZ on Pi-Star

This information pertains only to the 20210125 version of Pi-Star. If you are running version 20210127 or later then please see the updated guide at https://www.m0lxq.com/update-restoring-qrz-on-pi-star/

Do NOT run the script on version 20210127 or later

On 25th January 2021 an update was released for Pi-Star that changed the default callsign look up on the last heard page from QRZ.com to RadioID.net.

Not everyone liked this change and a topic popped up on the Pi-Star users forum pretty quickly! The author of Pi-Star Andy Taylor, MW0MWZ, has suggested he may build in an option to switch between the two but this isn’t available yet.

In the meantime, I have written a simple BASH script that changes it back to QRZ.com in less than two minutes from the Pi-Star web interface. Follow these simple steps to restore QRZ.com as your default look up.

Please note that using SSH gives you full access to the Pi-Star system. Although this script will not harm your device, you must proceed at your own risk. I cannot be held responsible for any corruption of your set up. Should the worst happen, you can reflash your SD card to restore everything. Make sure you back up your settings before continuing.

This ONLY works with the 20210125 version of Pi-Star.
If you are running a later version, see the updated guide at https://www.m0lxq.com/update-restoring-qrz-on-pi-star/

Step 1

From the main Pi-Star page, click on Configuration. If not already logged in, you’ll be prompted to do so here. Unless you have changed it, the user name is pi-star and the password is raspberry.

Step 2

On the configuration page, click Expert.

Step 3

On the expert editors page, click SSH Access.

Step 4

Log in to the SSH session using the same details as you use to log into Pi-Star configuration.

Step 5

You will be presented with a screen that looks like this when logged in.

Before you run ANY of the commands below, check that you are running the 20210125 version of Pi-Star.
If you are running a later version, see the updated guide at https://www.m0lxq.com/update-restoring-qrz-on-pi-star/

You will need to type the following prompts:

rpi-rw – this set the SD card to writable.

wget m0lxq.com/pistar.sh – this downloads the script from my website.

chmod +x pistar.sh – this makes the script executable so you can run it.

./pistar.sh – this runs the script. Ensure that the full stop (or period) and the forward slash are both present here or it won’t work.

All being well, your screen should now look like this until you press return on the last command:

When you press return, the script will load:

The script will ask you confirm whether you want to proceed or not. Only do so if your dashboard takes you to radioid.net rather than QRZ.com when you click on a callsign. Press y to continue.

Once you see this, your last heard dashboard should now point to QRZ.com again. In case something failed, it automatically backs up the original dashboard page, simply type ./restore.sh to rollback to the original dashboard page. You can do this at any time, so feel free to leave the SSH session to check your dashboard and return if necessary.

Before you leave, you can also run rpi-ro to make the SD card read only again if desired – recommended, but not essential.

How it works

Andy, MW0MWZ has ‘commented out’ the original QRZ.com link and added the radioid.net link above that line. The script just deletes the lines with the radioid.net link and uncomments the QRZ lines. It also backs up the original and creates a script to revert back if the user wants.

Here is the source code of the script:

#!/bin/bash

#    QRZ Restoration Script
#    Copyright (C) 2021 Mark Mearns, M0LXQ.
#
#    This program is free software: you can redistribute it and/or modify
#    it under the terms of the GNU General Public License as published by
#    the Free Software Foundation, either version 3 of the License, or
#    (at your option) any later version.
#
#    This program is distributed in the hope that it will be useful,
#    but WITHOUT ANY WARRANTY; without even the implied warranty of
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#    GNU General Public License for more details.
#
#    You should have received a copy of the GNU General Public License
#    along with this program.  If not, see <https://www.gnu.org/licenses/>.


NOW=$(date +"%Y-%m-%d-%T")

echo "***************************************"
echo "*                                     *"
echo "*   P I - S T A R   C A L L S I G N   *"
echo "*     L O O K   U P   E D I T O R     *"
echo "*                                     *"
echo "***************************************"
echo ""
echo "        by Mark Mearns, M0LXQ"
echo "            www.m0lxq.com"
echo ""
echo "This script will swap the new radioid.net"
echo "    callsign look up back to QRZ.com."
echo ""
echo "Your existing file will be backed up as:"
echo "/var/www/dashboard/mmdvmhost/lh.$NOW.bak"
echo ""
echo "********************************************"
echo "ONLY CONTINUE IF YOU GET SENT TO RADIOID.NET"
echo "       WHEN YOU CLICK ON A CALLSIGN"
echo ""
echo "  If it is already on QRZ, doing this will"
echo "      stop your dashboard from working."
echo "********************************************"
echo ""

read -p "Continue? (Y or N)" -n 1 -r
echo ""
if [[ ! $REPLY =~ ^[Yy]$ ]]
then
    exit 1
fi

sudo cp /var/www/dashboard/mmdvmhost/lh.php /var/www/dashboard/mmdvmhost/lh.$NOW.bak
sudo sed -i '41d;44d' /var/www/dashboard/mmdvmhost/lh.php
sudo sed -i 's#//echo#echo#g' /var/www/dashboard/mmdvmhost/lh.php

sudo rm restore.sh 2> /dev/null
sudo echo "sudo rm /var/www/dashboard/mmdvmhost/lh.php"  >> restore.sh
sudo echo "sudo cp /var/www/dashboard/mmdvmhost/lh.$NOW.bak /var/www/dashboard/mmdvmhost/lh.php" >> restore.sh
sudo echo "sudo rm restore.sh" >> restore.sh
sudo chmod +x restore.sh

echo ""
echo "This should have worked. If it has broken something,"
echo "run ./restore.sh to return to the original dashboard."

Licence

QRZ.com Restoration Script
©2021 Mark Mearns, M0LXQ

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.

Out with the old…

I have always wondered about a vanity callsign for my US licence. I was automatically assigned KEØGGA when I passed my technician and general class exams and that was just fine. When I passed by extra class, I saw that KØLX was available but my licence class hadn’t been upgraded at that point so I couldn’t go for it.

Fast forward a couple of years and I was idly perusing ae7q.com (mainly due to procrastination) and found KØYC available. I applied for it – as did around five others – and to my amazement, it was granted to me on 27th August!

While KØYC might not be that personal to me, it’s nice to have a 1×2 callsign and I can still look around for the future.

Welcome to my blog!

Hello, and welcome to my blog! I’ll try to post things of interest here from time to time.

Thanks for stopping by 🙂