Building a QnetGateway + MMDVMHost System Copyright (C) 2018 by Thomas A. Early N7TAE I'll assume you'll be doing this on a Raspberry Pi, but any modern Debian-based system should work. It just needs a g++ compiler with version greater than 4.9. These instructions assume you have configured your system with the locale, keyboard and time zone. When choosing locale, always choose a "UTF-8" version of your locale. And make sure you do "sudo apt-get update && sudo apt-get upgrade" before your start. On a Raspberry Pi, you can do all of this with the configureation menu: "sudo raspi-config". If you are using a device that uses the GPIO header on the raspberry pi, you need to disable the serial0 console in the /boot/cmdline.txt file: Remove the reference to "console=serial0,115200" in this file. You should also disable bluetooth by adding: "dtoverlay=pi3-disable-bt" (without the quotes) to the end of the /boot/config.txt. 1) Install the only external library you need: sudo apt-get install libconfig++-dev Yeah! No wxWidgets! Now in your home directory... 2) Clone the MMDVMHost repository: git clone git://github.com/g4klx/MMDVMHost.git 3) cd into the MMDVMHost directory and compile: make If you're system has multiple processors, use: make -jx where x is the number of processors on you system. To tell how many processors you have: cat /proc/cpuinfo | grep processor | wc -l 4) Copy the ini file template: cp MMDVM.ini MMDVM.qn 5) Edit the MMDVM.qn file. Set your Callsign and Id. Turn off duplex. Enable an external display, if you have one. Set the Frequency(s). Set the Latitude and other location info if you want. Change the log levels. I use DisplayLevel=2 and FileLevel=0. Set the Port on your modem. Disable all services except for D-Star (at least for now). Very important: Set the [D-Star] Module. For UHF use B and for VHF use C. 6) Let's test it! Start it: ./MMDVMHost MMDVM.qn 7) Key your radio and see if the MMDVMHost responds with an acknowledgement. Then you'll know that everything on the MMDVM side is fine. 8) Stop the MMDVMHost with a Control-C and edit the MMDVM.qn file again. Change the [D-Star] AckReply=0 You won't/don't want this reply from MMDVMhost. You want the acknowledgement from QnetGateway, it's more informative. We'll come back to MMDVMHost later, but for now let's work on the QnetGateway. 9) cd back to the home directory and clone the QnetGateway: git clone git://github.com/n7tae/QnetGateway.git 10) Get into the build directory: cd QnetGateway 11) Then compile: make don't forget the -j option! 12) You need a configuration file called qn.cfg for QnetGateway. A good, nearly working config file is qn.mmdvm.cfg. Copy it to qn.cfg and edit it. 13) You need a gwys.txt file for all the systems to which you may wish to link. If you want to be able to link to repeaters: ./get_gwy_list.sh If you are only interested in linking to reflectors: ./reflist.sh This will download and format your gwys.txt file. If the reflector(s) or repeater(s) you use most often are not present in the gwys.txt file, you can add them manually, using the same syntax as the existing entries, at the end of the file. If you find you can no longer connect to a system, it may be because its IP address has changed. You can execute either script again, copy it to /usr/local/etc, and then: either reboot you system, or put " F" in your URField and key your radio, or: sudo systemctl restart qnlink 14) We have a gwys.txt file and a qn.cfg in the build directory, so we are ready to install and start the three QnetGateway services: sudo make install 15) Now it's time to start the MMDVMHost service. You'll do this from the QnetGateway directory you are aleady in: sudo make installmmdvm This command will fail if it can't find both MMDVMHost and MMDVM.qn in the ../MMDVMHost directory. You should be up and running now! Congratulations! 16) You can see the log of any of the 4 services that make up the QnetGateway + MMDVMHost system: sudo journalctl -u qngateway -f sudo journalctl -u qnlink -f sudo journalctl -u qnrelay -f sudo journalctl -u mmdvm -f You can do all four of these in one terminal window (that you can detach from!) by using "screen": sudo apt-get install screen If you don't know how to use screen: http://aperiodic.net/screen/quick_reference Being able to detach from a screen session is very useful, especially if you are operating "headless"! 17) DTMF is _not_ enabled by default if you want it, you need to do two things: First, create a working DTMF script. In the build directory: cp qndtmf.sh qndtmf Then, install the DTMF service: sudo make installdtmf You should be good to go, The DTMF command "00" should announce the linked status of you module. See DTMF+REMOTE.README for more information. 18) Build and start other MMDVMHost services...