First Posted 3/5/2021, updated 7/18/2021

Welcome to the fourth installation of the Linux for Hams series of posts! Earlier this year, I wrote quite a bit about how I’m a big fan of the Anytone 578 radio, but I’m not as pleased with the Windows-only Customer Programming Software (CPS) provided by low-cost DMR radio manufacturers such as Anytone. I got really excited when I heard about qdmr as an Anytone radio programming alternative on Linux this spring, but at the time it didn’t support my Anytone 578 model. Thanks to a brilliant idea from qdmr’s creator Hannes Matuschek DM3MAT, he was able to add support for the Anytone 578 this summer, along with a few other models too. Definitely check his website for the latest compatibility list, there’s a good chance your low-cost DMR radio will work with qdmr!

I’m very happy to be one of the first testers of qdmr’s Anytone 578 support: this radio programming tool is much better written than the CPS application included from Anytone in my opinion, and I’m not just saying that because I prefer open source 🙂 I love being able to edit my DMR codeplugs via Raspberry Pi instead of a Windows computer, and I’m sure you will too! If you’re using AntiX Linux 19 (or similar Debian-based Linux) on an old machine instead of a Raspberry Pi, the highlighted text within this article will show you a few minor differences.

Make sure you have working internet on your Linux machine by firing up a web browser and surfing some websites before proceeding; if you’re struggling to get internet definitely check out the techsupport subreddit for troubleshooting ideas.

Step 1: Update your Anytone radio to a recent firmware (I used v1.13 on my 578)

Before we get to the main event of installing qdmr, it’s important to have your radio running a somewhat recent firmware to match the versions that have been tested with qdmr. In the case of my Anytone 578, this is firmware version 1.13. You’ll have to get the firmware update from whoever you purchased the radio from (Here’s the link to Bridgecom Systems) or directly from Anytone. Keep in mind it’s impossible for the qdmr contributors to test every combination of firmware and radio in existence, so your mileage may vary using an Anytone 578 firmware that’s either newer or older than v1.13.

As of this writing, the only way to do the firmware update is via the Anytone CPS app. It is possible to use a Virtual Machine to pull this off, so check out my previous Anytone 578 post if that’s something you would like to try. If you or someone you know has successfully done a firmware upgrade straight from Linux, please let me know and I’d love to share how it’s done here.

Step 2: Install qdmr

We’ll be following the steps from the qdmr readme file to install from scratch, I’ll break it down step by step here for those less familiar with Linux. If you’re well versed in Linux, check out DM3MAT’s install guide as you might be able to install a bit faster using his personal package archive. On your Linux machine, open up a terminal window by clicking the Terminal button in the upper left of the screen:

(AntiX users: Click on Favorite Applications icon in bottom left corner, Terminal should be at the very top of the menu)

Start off by typing the command “sudo -s” without the quotes, then press enter. Although this isn’t the best security practice, it will allow us to ensure we have proper rights to install qdmr. You may be prompted for your password depending on your security settings. This will result in seeing “root@(your computer’s name)” in the terminal window:

If you haven’t done so already, run the commands “apt-get update” and “apt-get upgrade” to ensure you have the latest updates to software repositories. Next, type in “apt-get install build-essential git cmake” without the quotes into the terminal window, press enter. This will install install the first batch of dependencies for qdmr. You’ll be asked if you want to continue installation, type y and press enter once more:

Once that first batch of dependencies, get the second batch of dependencies going with “apt-get install libusb-1.0-0-dev qtbase5-dev qttools5-dev qttools5-dev-tools qtpositioning5-dev libqt5serialport5-dev”, press enter, press Y when prompted, and wait until you get the command prompt again. Next run “git clone https://github.com/hmatuschek/qdmr.git” and press enter to download the file containing all the qdmr code:

Type “cd qdmr” and enter so we can get into the newly created directory, then “mkdir build” and enter to create a build directory. Next, type “cd build”, press enter, and run “cmake .. -DCMAKE_INSTALL_PREFIX=/usr/”

Press enter, type “make”, press enter again. You might get a few warnings in the output from make, this is ok. Next, type “make install”, press enter. Some of these make commands will take a good 5-15 min while the code compiles (I know the output of this looks like cryptic, but it’s taking the source code and making it a super fast executable file specifically for your computer’s processor). Once make completes, you should have a working copy of qdmr installed on your machine! But we’re not quite done yet, fire up “nano /usr/share/applications/qdmr.desktop” plus enter to edit the shortcut. The Categories= line needs to have Application; in front of it in order to show up in the Raspberry Pi applications menu. Make that change so it looks like the following:

Hold down Ctrl + X to exit nano, press y to save. Reboot the Pi so that the desktop manager refreshes, then you should see qdmr in the application menu!

(AntiX users: You’ll need to make a desktop application shortcut like the one in the CHIRP guide, using the text from the above qdmr screenshot in the file.)

Open up qdmr, plug in your radio via USB, and click download from the devices menu. If everything went well, you should see the codeplug currently present on the radio appear for editing in qdmr’s general settings:

Now that the codeplug is loaded into qdmr, you can edit all the radio’s settings to your desire per Haanes’ manual explaining all of qdmr’s functionality. I won’t be deep-diving into creating or editing a codeplug as his manual is very well written. I will however share a quick screenshot of me playing with the codeplug I use to get on the Chicagoland Control Center’s WD9BBE repeater for Illinois Link Talk Group 31171:

If you’ve spent any amount of time in that Windows-only CPS application included from the low-cost DMR radio vendors, I think you will quickly agree with me that the user experience Hannes created in qdmr is much better looking and more sensible than what’s included with the radio. If you’ve never worked with a DMR codeplug before, I would suggest watching quite a few YouTube videos or reading other blogs before getting too frustrated by all the DMR terminology. Setting up a DMR codeplug, an MMDVM hotspot, and all of the other “nerd knobs” that go with it can be overwhelming at first, but with enough persistence, you’ll be getting QSOs around the world via the DMR network of your choosing in no time!

Gigantic thanks to DM3MAT for commenting on this post back in Spring 2021 and spending the time to support more radios. If it wasn’t for his efforts, qdmr would not exist, and it certainly wouldn’t work on my Anytone 578. Thanks for reading, and happy DMRing!


You’ve reached the end of the post! Click here to go back to the list of all Ham Radio posts.

You should also know I may earn commissions on qualifying Amazon purchases made via kd9cpb.com links to defray the cost of otherwise ad-free web hosting.

qdmr (DMR code-plug utility) on Raspberry Pi OS & AntiX Linux

Post navigation


5 thoughts on “qdmr (DMR code-plug utility) on Raspberry Pi OS & AntiX Linux

  1. Dear Tom,

    tanks for featuring my little software project in your blog. Yes, the Anytone 578 is not yet supported. In fact it will be hard to support it unless I can get one in my hands to test any implementation. However, even the support for 878UV is still not really ready yet. There is a development branch for the 878UV called “d878uv” with the most recent version of the 878 support.

    The binary code-plug format within the device is pretty hard to reverse engineer: The elements are spread over several MB, and some related elements are not stored together. E.g., zone lists and zone names are located in two totally different memory locations. If you have fun crawling down this rabbit hole, have a look at the current state of my reverse engineering (https://dm3mat.darc.de/qdmr/libdmrconf/class_d878_u_v_codeplug.html).

    Again, thanks for featuring qdmr.

    P.S.: I’ll have a look at the .desktop file issue. It may very well be a mistake on my side.

    P.P.S.: I don’t know AntiX Linux but it appears to be based around Debian. Hence you may be able to use the Ubuntu binary packages at my PPA (https://launchpad.net/~hmatuschek/+archive/ubuntu/ppa).

    1. Thanks so much for the kind words DM3MAT! I feel honored to have open source amateur radio coding royalty such as yourself commenting on this site! Keep doing all that awesome stuff you’re doing on Github, hopefully I’ll be more helpful in that part of the ham radio community someday. Will definitely give your PPA another look soon. 73, Tom KD9CPB

      1. I have a dangerous idea concerning the AnyTone 578: I frequently read that this device is “just” a 878 with a PA and that the codeplugs are compatible (does not necessarily imply that the memory representation within the device is identical). However, in my D878UV development branch (https://github.com/hmatuschek/qdmr/tree/d878uv) I added a command-line option to the CLI tool (dmrconf) to force radio detection.

        That is, the communication interfaces of the 578 and 878 are identical (otherwise I would not be able to detect that it is a 578). This option only overrides the type-check and handles any AnyTone device as a 878.

        In a first step I would suggest that you try to download and decode the codeplug from the 578. This is harmless as we do not write to the device. In worst case we receive garbage.

        So, first get the development version from the d878uv branch and compile it. Then call

        $ dmrconf read –radio=d878uv codeplug-578.dfu

        this will read the codeplug in binary format as it is stored in the device. You may then try to decode it with

        $ dmrconf decode –radio=d878uv codeplug-578.dfu codeplug-decoded.conf

        If this works fine, triple check whether the decoded codeplug matches the config written to the device. If it matches, the likelihood of identical memory representations for both radios is very high and I might be able to get it running without owning one.

        Feel free to contact me via mail.

        Best,
        Hannes, DM3MAT

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.