Module17 and OpenRTX Modifications (Part 1)
![]() |
Module17 Version 1.0 Unit |
This article will document my attempts to add extra digital modes to OpenRTX for the Module17 board. The Module17 board was designed mainly to run the M17 open source digital audio mode which makes use of the open source audio codec CODEC2.
NOTE: All of the modifications made to OpenRTX make use of modified source code from the MMDVM project.
The first mode I attempted to add was DSTAR, one of the first digital modes I ever used. DSTAR is an open source protocol that uses a proprietary audio codec known as AMBE developed by DVSI. Because DSTAR uses the AMBE codec I needed to use a dongle to route the encoded audio to and from the Module17 board. To do this I adapted a piece of software called AMBEServer developed by Jonathan Naylor G4KLX. This program runs on a computer which the Module17 and AMBE dongle are connected via USB. I have the mode working fairly well. Occasionally the data transfer between the computer and the Module17 board stops. I am still looking into this problem.
I first had to familiarize myself with the OpenRTX architecture which is an ongoing task. Not only did I have to figure out a way to shoehorn in code meant to run on an MMDVM modem but I also had to make multiple menu additions. A mode selection menu had to be added because the Module17 board by default has only one mode. In addition a settings menu had to be added for each additional mode.
One thing that kind of hindered my work was the softpot settings. The Module17 board can be built with either mechanical or programmable potentiometers for baseband audio adjustments, After some time I noticed the TX pot works the way I assumed it would with audio increasing as the displayed value goes up. The RX pot however works in reverse.
The next mode I tried was P25. I was able to get the receive to work for the most part but transmit just wouldn't go. I couldn't get my MMDVM based repeater to lock on the signal. I tried various level adjustments but nothing worked. Looking at the waveform on my scope showed no discernible differences from a normal P25 transmission. After several days of playing I decide to change the way the TX baseband section handled the generated samples. The baseband functions in OpenRTX use a double buffer to supply sample values to the DAC. In this case at a 24kHz sample rate. Since I only had one example of it's use, that being M17 I wasn't sure how big to set the buffer size. I had it originally set to 96 samples. This seamed to work with DSTAR. M17 was set much larger so I decided to increase mine to 1200. Once i did that my repeater locked on to the signal fairly well.
After that I still had one problem, no audio. After some digging I found that the software vocoder was taking 100ms to encode 20ms of audio and that wasn't keeping up with my P25 frame encode process. I was checking for enough bytes to encode the 360ms superframe and when there wasn't enough I filled them with silence packets. Bottom line, the Module17 processor just isn't fast enough to handle the audio encode task. My only choice to get this mode to work is to off load the vocoder to an external device the way I did it with DSTAR. The one plus side is I will not need an AMBE dongle. The software based vocoder should work just fine on a beefier processor such as a Raspberry Pi.
This however will have to wait. I decided to add FM mode instead for now. This mode was fairly easy to enable as the hardware and software requirements were minimal. Adding the right bits and pieces from the MMDVM code base was fairly easy. The longest task was adding all the required menu settings. Since there is no COS signal available from the radio interface I was able to use Noise Squelch and CTCSS for audio muting.
Well that's it for now. Stay tuned for part 2.
73's
Comments
Post a Comment