This is a guide on how to properly configure and use the Mobilinkd TNC3 for M17 voice and data communication.
This guide assumes that you will be using the TNC3 with a suitable 9600-baud capable radio, and that you have the proper cable to connect the TNC3 to the radio. It also assumes that you will be using the M17-KISS-HT Android app for voice communications.
The guide assumes familiarity with GNU Radio for the M17 receive tests. And it assumes that you can side-load apps to your Android device.
This is very much a guide for the experienced experimenter, and not a step-by-step guide designed for beginners.
I will gladly accept pull requests for added detail for any of the sections below, or for setup hints for specific radio models.
rtl-sdr
package installed, which contains /usr/bin/rtl_fm
.Please note that both SDRs will require accurate reference clocks. 4-FSK requires reasonably accurate transmit and receive frequencies to be decoded properly. If your SDR has a 20ppm clock, you can be off by 8kHz on 70cm. It will be impossible to tune the system properly with such an error. The maximum error that will work is about 500Hz, and less than 100Hz is preferred. That's a 1ppm error, max, at 70cm.
We will be connecting to the TNC via USB-OTG rather than over BLE as it been considerably more reliable. The BLE connection has been unreliable on certain phones and Android versions.
We will be performing the following steps:
All of the detailed setup steps outlined in the sections below assume that this prep work has been completed.
Open the Mobilinkd Config app, connect to the TNC, and go to Modem Settings.
Select M17 4-FSK as the modem type.
Select Close.
Select Save Settings
Install the required libraries for m17-cxx-demod: boost-devel and codec2-devel.
These may be named differently on your Linux platform. m17-cxx-demod
requires
the codec2
library and the Boost program-options
library.
Clone the m17-cxx-demod repo and build the M17 C++ tools.
git clone https://github.com/mobilinkd/m17-cxx-demod.git
cd m17-cxx-demod
mkdir build
cd build
cmake ..
make
make test
Choose a test frequency that is unused and unlikely to interfere with other amateur radio users.
You may have an obligation to announce your callsign on the frequency that you are transmitting on. If you are conducting open-air tests using an antenna -- not via a dummy load or via direct coax connection between radios -- you should announce at the start of the test, as frequently as required by law, and when you are finished with the tests.
The Audio Output Settings of the Mobilinkd Config app was designed for configuring 1200 baud AFSK audio levels. There are tone settings for 1200Hz, 2200Hz, and Both. Those settings are mapped as follows when the TNC is in M17 mode:
BER mode implements the M17 BER testing specification.
This section assumes that you have completed the Prep Work steps above.
NOTE: The preferred way to do this is with a spectrum analyzer instead of an RTL-SDR and GQRX. Use an appropriately sized attenuator between the radio and the instrument. Set the span to 50kHz and the RBW to 300Hz. Follow the output adjustment procedure below.
Start GQRX
and tune to the desired frequency. The examples below use
144.910MHz for the test frequency.
In the Input Controls tab, set the appropriate frequency correction factor for your RTL-SDR. If you are not using an accurate TCXO, it must be set very close to the PPM offset of your RTL-SDR. You need to be within 1PPM.
In the Receiver Options tab, select Narrow FM in the Mode setting. Select the "..." to the right of the Mode selection. Set the maximum deviation to 2.5kHz and the Tau factor to 0.
In the FFT Settings tab, use the Freq Zoom slider to increase the zoom factor to 10-20x. You may need to adjust this later while testing to get the best view.
Start the receiver using Play button.
Open the Mobilinkd Config app on the Android device, connect to the TNC, then select Audio Output Settings. Select the 2200Hz for the Output Tone. When in M17 mode, this will transmit a 1000Hz tone. A 1000Hz tone will create the first Bessel null at 2405Hz deviation. This is very close to the value needed for M17.
Press the Transmit button. Observe the received spectrum in GQRX.
Adjust the output level until you see carrier (the middle peak) dip to its lowest point. It may require careful adjustment of the slider on the app as it was not really designed for such small adjustments that are required here.
After the output setting has been adjusted to the desired level, press the Transmit button to stop transmitting. Press Close to go back to the main menu, then select Save Settings.
Press the Play button in GQRX to stop the receiver. You can now exit GQRX.
This section assumes that you have completed the Prep Work steps above.
We are going to run rtl_fm and m17-cxx-demod to receive and decode M17 from the TNC and radio. The TNC will sent a BER (bit error-rate) test sequence.
Inside the m17-cxx-demod/build
directory from earlier, run the following command:
rtl_fm -F 9 -f 144.91M -s 18k | sox -t s16 -r 18k -c1 - -t raw - gain 9 rate -v -s 48k | ./apps/m17-demod -d -l > /dev/null
You may need to set a "-p"
option value for rtl_fm
to adjust for the
clock error on your RTL-SDR dongle.
Using a wide screen is best since it will output a wide diagnostics line. If the terminal window is too narrow, it will scroll endlessly and be hard to read. A width of 160 characters is about right.
Observe the results from the m17-demod
program in the terminal window. A
good result will look something like this:
If, instead, you see something like the below result showing a high BER rate (typically 80+), you likely need to change the polarity.
Stop transmitting, close the Audio Output Settings and open Modem Settings. Enable the TX Reverse Polarity option. Then repeat the BER test above.
Stop transmitting. If the results look good after changing the polarity, go back to the main menu and press Save Settings.
If the results are still bad, check the frequency settings used on the radio and
on the command-line for rtl_fm
. Verify the PPM settings on the RTL-SDR. Ensure
that your radio's VCO is properly calibrated and that it is transmitting and
receiving at the proper frequency.
You can also reach out to #public-chat on the M17 Discord for help.
In the Mobilindk Config app, press the Disconnect button to disconnect from the TNC.
This section assumes that you have completed the Prep Work steps above, including side loading of the M17 KISS HT app.
You should be presented with a dialog to open the connection with an app. Choose the M17 HT app.
The first thing you need to do in order to use the app is to set your callsign. This can include a suffix designator. Here you see that I chose "WX9O-8" to distinguish this connection.
We are going to run the m17-cxx-demod program again, this time taking the demodulated output and sending it to the computer's sound system.
rtl_fm -F 9 -f 144.91M -s 18k | sox -t s16 -r 18k -c1 - -t raw - gain 9 rate -v -s 48k | ./apps/m17-demod -d -l | play -b 16 -r 8000 -c1 -t s16 -
This is the same command used for BER testing and setting up the TX polarity, except we are now piping the output to the computer's audio output.
Press the transmit button on the M17 HT app. The Transmit button can act like a toggle button or a push button. A short press locks the transmit button. Another short press disengages the transmit button. If instead you hold the button for longer than 1/2 second, it acts as a push button and will stop transmitting as soon as you release the button.
Press the transmit button, speak, then release the transmit button. It is likely that you will hear a long delay before the received audio plays. This is because the pipeline used in the command above has high latency due to the buffers in each stage of the pipeline.
You should hear your voice and see something like this in the terminal window.
Notice that the callsign you entered into the M17 HT app was decoded.
The long audio delay can be reduced somewhat by using stdbuf
. This makes the
command-line a bit unwieldy.
stdbuf -o0 rtl_fm -F 9 -f 144.91M -s 18k | stdbuf -i0 -o0 sox --buffer 24 -t s16 -r 18k -c1 - -t raw - gain 9 rate -v -s 48k | stdbuf -i0 -o0 ./apps/m17-demod -d -l -b | stdbuf -i0 play --buffer 24 -q -b 16 -r 8000 -c1 -t s16 -
For this test you will need the m17-gnuradio
repo cloned.
NOTE: If you are using an SDR other than an ADALM Pluto, please verify that the output polarity is correct first by attempting to receive it using the method outline in Configure TX Polarity.
Set up your ADALM Pluto or other transmit-capable SDR. Install any required filters and transmit antenna. If you can, connect the SDR to the radio under test through a 30dB or 40dB attenuator. Be very careful if you do connect the SDR to the radio because it is very easy to damage the SDR if the radio transmits.
Open GNU Radio Companion (GRC) and within that, open the m17-bert.grc
file.
Adjust the output sink paramters (including the frequency) for the test. You
may need to adjust the pathnam in the File Source block so that the bert.bin
file can be found. The path is typically relative to your HOME directory.
Once done, click the Play button on GRC. It should start transmitting a BER test sequence similar to the one transmitted by the Mobilinkd Config app.
Connect the TNC to the Android device via the USB-OTG connection used earlier. Once connected, the TNC should start receiving the BER test sequence. It is likely that you will see some error if you start receiving in the middle of the test sequence.
If you do not see the app go into BER test mode, you will need to troubleshoot the issue.
RX Reverse Polarity
. Press Close
and then Save Settings. Repeat the experiment.The voice reception test is quite similar to the BER test above. It is another GNU Radio flowgraph that transmits a long-form English language voice program for amateur radio.
This assumes the ADALM Pluto, radio and TNC are configured the same as with the BER Receive Test. If it is not, follow the setup steps in that section.
Open GNU Radio Companion (GRC) and within that, open the m17-arn.grc
file.
Adjust the output sink paramters (including the frequency) for the test. You
may need to adjust the pathnam in the File Source block so that the Report2288.bin
file can be found. The path is typically relative to your HOME directory.
Connect the TNC to the Android device via the USB-OTG connection used earlier. This should start the M17 HT app.
Click the Play button on GRC. It will start transmitting a voice program, which you should hear being received on the Android device.
Add instructions and hints for configuring various radios for use with M17 below.
This section outlines set up steps and some issues with the Yeasu FT-991.
Press the Menu button and adjust the following settings to use the packet data port for M17:
75 FM OUT LEVEL
to 100
76 FM PKT PTT SELECT
to DAKY
77 FM PKT PORT SELECT
to DATA
78 FM PKT TX GAIN
to 64
79 FM PKT MODE
to 9600
Press the Menu button again to go back to the main screen.
Press the Mode button and select DATA-FM
. Press Mode again to go back to the main screen.
In Audio Input Settings, set the Input Gain
value to 3.
In Modem Settings, enable the TX Reverse Polarity
option for this radio.
The demodulated baseband signal from the DATA-FM mode is very low. It is an order of magnitude lower than in pure FM mode. There is a lot of high-frequency noise in the signal.
On my unit, the frequency stability when it first starts transmitting is rather poor.
Note the wobbly lines at the start of the transmission. This lasts for a few seconds. It can cause a burst of bit errors at the start of the transmission.