Trialing DeskHPSDR

For sometime I’ve been using PiHPSDR software to drive my Hermes Lite 2 (HL2) SDR transceiver. It’s a great piece of OpenSource software for SDR transceivers and has the best documentation that I have ever seen from an OpenSource project.

I must admit, I’ve had to make a few changes to get the software how I like it but, that’s the great thing about OpenSource software, you get the source code and can do what you like to it.

Following in this thread I recently decided to give DeskHPSDR a try.
DeskHPSDR is a fork of the original PiHPSDR but, with some changes mainly aimed at larger display computers.

After compiling DeskHPSDR on my Kubuntu Linux PC in the radio shack, I found there were a few issues, mainly the colours were hard on the eyes and band/channel markers wrong/missing on a few of bands.

DeskHPSDR default colour scheme on Kubuntu 22.04LTS (KDE-Plasma)
DeskHPSDR default colour scheme on Kubuntu 22.04LTS (KDE-Plasma)

I decided to dive in and take a look at the source code and try and sort out the colour issues as blue writing on dark buttons made them almost impossible to read under a KDE-Plasma desktop.

Delving through the appearance.c and css.c files I found that there were many changes required to get the end result I wanted. The biggest pain is that you have to recompile the source code after each change to see if the code change had worked, this results in many recompiles, a tedious task.

After spending many hours making changes I decided to email Heiko, DL1BZ who is the developer of DeskHPSDR. Over a number of emails we discussed getting the colour management code changed such that it was read in at start time from a separate css file rather than having to be compiled into the main program.

After a few emails back and forth, Heiko changed the code so that a separate CSS file could be read in at start up instead of the hard coded CSS in the C code files, this worked great and made it much easier to make colour changes without constant compilations of the code.

Next I needed to edit the bands.c file to change some of the band edge markers to show the UK band plan as, by default they are incorrect even though I have the region set to UK.

Editing the appearance.c file once more I was able to change the colour of the rather bright green panadapter signal display to a much more pleasing blue fading to red as the signal gets stronger.

One thing I really like about PiHPSDR was the channel markers on the 60m band. Anyone that uses the 60m band will know that the UK allocation is split into 11 different channels separated by spaces used by the primary user of the band. The channel markers make it just that bit easier to ensure you don’t stray out of the allocated channels however, this code had been removed from DeskHPSDR as Heiko didn’t consider it necessary.

Once again I pinged an email over to Heiko explaining how useful it is to UK HAMs and he very kindly put the code back into DeskHPSDR so that the 60m channels are once more clearly visible on the panadapter.

DeskHPSDR modified colour scheme on Kubuntu 22.04LTS (KDE-Plasma)
DeskHPSDR modified colour scheme on Kubuntu 22.04LTS (KDE-Plasma)

Feeling happy with the new colour configuration I decided to test it out on Linuxmint Cinnamon. Sadly the scheme that looked so nice under Kubuntu 22.04LTS didn’t look the same under Linuxmint and so I had to set about coming up with a version of the CSS file for this platform too.

After quite a few hours tinkering with CSS code I found it to be impossible to get the colour scheme on Linuxmint Cinnamon Edition identical to that I’d created under Kubuntu KDE-Plasma so, I settled for a look that was as close as possible.

DeskHPSDR on Linuxmint Cinnamon Edition with colour modifications.
DeskHPSDR on Linuxmint Cinnamon Edition with colour modifications.

Chatting with Steve, M0XVT we thought it would be a good idea to test it on his Kubuntu Linux and Linuxmint PCs. He is using a later version of Kubuntu than I am (24.04LTS) and so, it would be a good test to see if the colour scheme looked the same.

Sadly it turns out that for some bizarre reason the colours come out different in the later version of Kubuntu. This is a real nuisance as it means we’d need a separate colour scheme defining for each version of the O/S. Perhaps using CSS isn’t the best way to define a colour scheme in applications.

For some very strange reason the colours were also rendered differently on his Linuxmint PC even though he was using the same version of the O/S as I am.

DeskHPSDR running on Kubuntu 24.04LTS with colour scheme not rendering correctly
DeskHPSDR running on Kubuntu 24.04LTS with colour scheme not rendering correctly

Another issue was found whilst testing on Steve’s computers which seems to be caused by the fact he uses an Anan 200D SDR.

Looking at the documentation on github in theory DeskHPSDR should support the Anan range of SDR transceivers however, we found that it’s impossible to select the sample rate as the drop down selection list is completely missing from the Radio menu with the radio defaulting to its lowest sample rate of 48k resulting in not being able to see the full spectrum of frequency ranges on the bands.

DeskHPSDR Sample Rate drop down missing when using an Anan SDR
DeskHPSDR Sample Rate drop down missing when using an Anan SDR

The other thing to note is that the Remote Server functionality has also been removed from the code by Heiko as he feels it’s not necessary. This may be a deal breaker for some and so they may choose not to use DeskHPSDR and to continue using PiHPSDR instead.

I will at some point make the O/S specific CSS files and source code available for download for those that want to use DeskHPSDR with my colour scheme changes.

I’m not sure at the moment whether I will continue using DeskHPSDR or go back to PiHPSDR, time will tell.

More soon…

Loading Meshtastic Firmware onto Heltec ESP32 v3 Devices

The loading of the Meshtastic firmware on the Heltec ESP32 v3 devices is really simple if done via a Linux PC/RaspberryPi. There are of course other ways to load the firmware using a web browser that supports USB/Serial devices and this method is preferred by many however, being a Linux command line junkie I far prefer the simplicity of using the Linux command line to do the job.

So, how much experience with the Linux command line do you need?

In all honesty none at all. If you know how to use copy and paste then all you have to do is follow the simple steps I’ve detailed below. In reality it will only take a few minutes to do so, don’t be put off by the long article, I’ve just tried to cover everything and provide screen shots along the way.

To get started fire up your Linux PC/RaspberryPi and get yourself to the desktop. Next you will need to open a Linux command line terminal. This is often just called “Terminal” on most Linux desktop installations.

The first thing you need to do is check to see if you have python3 installed. This is done using the following command:

python3 --version

Running the above command you should see a result something like what is shown below.

Python3 command showing installed version
Python3 command showing installed version

Next we need to check if pip3 is installed using the following command:

pip3 --version

If pip3 is installed then you should get a result similar to that shown below.

Pip3 command showing installed version
Pip3 command showing installed version

If your computer doesn’t have Python3 or Pip3 installed they can be easily installed from the command line. To install Python3 enter the following command into your terminal:

sudo apt install python3

You will be asked to enter your login password and then the installation will begin. You should see output in your terminal similar to that shown below.

Installing python3
Installing python3

To install Pip3 enter the following command into your terminal:

sudo apt-get install python3-pip

This will detail a long list of packages that will be installed on your computer, Enter Y to answer Yes and let the packages install.

M0AWS - Installing Pip3
M0AWS – Installing Pip3

You will see many messages scroll up the terminal screen such as getting, selecting, preparing, unpacking and setting up, this is all normal.

Once Pip3 is installed you should be dropped back at the command line with a terminal screen that looks something like the one below.

M0AWS - Pip3 install complete
M0AWS – Pip3 install complete

At this point you will now have Python3 and Pip3 available on your computer.

You are now ready to install the tool we are going to use to check your Meshtastic device is connected to your PC and install the firmware to it. (Do not connect your Meshtastic device to your PC just yet!)

Run the following command in your terminal to install the ESP Tool:

pip3 install --upgrade esptool

You will see an output from the installation process similar to that shown below.

M0AWS - Installing the ESP Tool
M0AWS – Installing the ESP Tool

Now that we have the ESP tool installed plug your Meshtastic device into your USB port on your computer and then run the following command to interrogate the device to find out what kind of device it is.

esptool chip_id

You should see the information about your device that looks similar to that shown below. This information should confirm the device type (ESP32) and which USB port it is connected on (/dev/tty/USB0).

M0AWS - Expected output from the ESPTool command showing device information
M0AWS – Expected output from the ESPTool command showing device information

Once you have this information you will need to download the firmware for your device from Github using the following URL:

https://github.com/meshtastic/firmware/releases

At the time of writing this I downloaded and used the v2.2.22.404d firmware which I have found to be extremely reliable.

In your terminal you now need to change directory (cd) into the Downloads directory where your downloaded firmware should be. (If you downloaded your firmware into another directory then you will need to cd into that directory). Use the following command to change directory into the Downloads directory.

cd ~/Downloads

Now we need to find the filename of the firmware we have just downloaded, we can use the list directory contents command to find the file using the simple command below.

ls -la firm*.zip
M0AWS - List firmware file name from the Linux command line
M0AWS – List firmware file name from the Linux command line

In the screenshot above we can see that the filename is called
firmware-2.2.22.404d0dd.zip.
We now need to unzip the file using the unzip command.

unzip firmware-2.2.22.404d0dd.zip

You’ll see lots of output from the unzip command about inflating files etc, this is normal.

Once the file has been unzipped you are ready to load the firmware onto your Heltec device. First you need to find the .bin file for your Heltec device. Use the following ls command to list the files available.

ls -la firmware-heltec*

This will list out all the firmware file options for the Heltec device as shown below.

M0AWS - List of Heltec firmware files
M0AWS – List of Heltec firmware files

The file you need to use for a new firmware installation on a Heltec v3 device is
firmware-heltec-v3-2.2.22.404d0dd.bin. (If you downloaded a different version then the version number in the file will be different).

Using the filename you found above enter the following command into your terminal.

./device-install.sh -f firmware-heltec-v3-2.2.22.404d0dd.bin

This will now clear down your Heltec device and will load the Meshtastic firmware. This will take a little time especially on slower computers like the RaspberryPi so, just let it run until it finishes. Do not interrupt the process whilst it is running.

Installing the Meshtastic firmware onto my Heltec ESP32 v3 using the Python command line tool
Installing the Meshtastic firmware onto my Heltec ESP32 v3 using the Python command line tool

Once the firmware is loaded the Heltec device will reboot and you will see the Meshtastic banner on the OLED screen. Your device is now ready for configuration.

Now that you have Python3 and Pip3 installed you can load the firmware onto other devices just by downloading the firmware and then running the device-install.sh script file, you won’t need to install Python3 or Pip3 again.

If you want to update your device in the future to a newer version of the firmware then just use the update script and update binary file as shown below.

./device-update.sh -f firmware-heltec-v3-2.2.22.404d0dd-update.bin

That’s it, you are now a Linux Command line junkie!

More soon …