First Posted 3/5/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 software provided by Anytone. I got really excited when I heard about qdmr as a possible Anytone radio programming alternative on my Linux machines! Unfortunately, I confirmed both qdmr and its command-line only sibling dmrconfig are only able to program the Anytone 878 series radio, no 578 support. On the bright side, if I ever get an Anytone 878, I now know I’d be able to program it with in Raspberry Pi OS Linux (Buster) on my RPi 4, or on an older machine running AntiX Linux. If you’re using AntiX Linux 19 on an old machine instead, the highlighted text within the 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. This post is a little boring because my radio wasn’t on the compatibility list, but if yours is on the list at https://github.com/hmatuschek/qdmr, you should have much more exciting results!

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. 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:

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, and wait until you get the command prompt again. Next run “wget https://github.com/hmatuschek/qdmr/archive/v0.5.3.tar.gz” and press enter to download the file containing all the qdmr code:

Type ” tar -xvf v0.5.3.tar.gz” then press enter to unzip the 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 and wait a good 5-10 min while the code compiles (I know the output of this looks like the matrix, but it’s taking the source code and making it a super fast executable file specifically for your computer’s processor. Do lots of googling on this if you find it interesting, it’s fun stuff!) Next, do “make install”, press enter, and you should have a good 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, and click download from the devices menu. If you have a radio supported by qdmr, it should work! If you plug in an unsupported radio like mine, you’ll see the following:

Sadly that’s as far as I can go for now, but it was fun seeing qdmr start on the Raspberry Pi! If you end up getting a supported radio to work, please let me know in the comments. Maybe someday I’ll get better at the programming language qdmr is written in, and can help make the code work for the Anytone 578. Maybe someone else that already has said skillset, reads this article, and writes the code. Maybe nobody steps up and the code never supports the 578. Regardless of what happens, I’m really happy to see people like DM3MAT and KK6ABQ are writing some pretty advanced code for these low-cost DMR radios, and I should really be doing more to support their awesome work. 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


4 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.