Am I crazy? Without a doubt, but at least I focus my craziness on a good purpose. My last idea was to find out if all of the following assumptions are viable:
- demodulating pi/4-DQPSK is possible with a plain, analog FM demodulator that works wide enough
- Beken BK4819 chip can work wide enough to demodulate 25kHz channels
- the CSK6011B MCU can run the whole TETRA stack plus the vocoder on top of it
The answer is… yes to all.
Let’s analyze it step by step.
- The modulation is differential (note the D in its name, it stands for Differential), meaning that we only need to care about phase transitions. Phase transitions are nothing but frequency changes, therefore pi/4-DQPSK can be treated as 4-level FSK after frequency demodulation.
- It turned out that BK4819 can indeed work with 25kHz-wide channels, it is a matter of setting a single register. Its response is not completely flat, but can be equalized using a simple FIR filter.
- Yes, but that required dumping osmo-tetra and ETSI’s vocoder reference code completely. I had to replace both with libtetra and OpenACELP. They are based on ETSI EN 300 3xx-x TETRA standards and are optimized for 32 bit MCUs, including our beloved Cortex-M4/M33 (seen in most of OpenRTX targets).
I wrapped it all up on top of turnrye’s OpenRTX fork (this one is focused on M17 and uses the DSP firmware part setting the baseband sample rate to 48kHz). My fork is here. The build process pulls ETSI’s codebooks for their ACELP vocoder, so make sure you do not distribute the binaries (as they are embedded). TETRA is available through the quick menu key, the [5] key switches between M17, FM, and TETRA.
Below, I attach a video showing a successful TETRA decode using a TMO transmission sample from the HamTETRA group. Big shout out to Manoel ON6RF for granting me access to their samples database.
Have fun!