Automatic start of MMDVMHost

In this article, you will learn how to make MMDVMHost automatically start when your Raspberry Pi is turned on.

The automatic start of MMDVMHost

On the Raspberry Pi, there are two solutions (the ones I know) to automatically launch software when the Raspbeery Pi is turned on (or rebooted), running under Raspbian.

Simple startup

To start MMDVMHost automatically, the easiest solution is to edit this startup file and add the command line to start MMDVMHost before the statement exit 0

Starting with declaring a MMDVMHost service

Another solution, a little more elegant is to create a service.


Installation of screen

Creating the service file

In the [Service] section, the last two lines make it possible to restart MMDVMHost in the event of a crash. It should be noted that it is very rare to be confronted with unexpected stops of MMDVMHost. We will test the proper functioning of the restart further down in the article.

The MMDVMHost launch directories shown here correspond to those used during the MMDVMHost install tutorial.

Creating the launch timer file

The start of the service is delayed after 60 seconds after startup

Enforcement and service

We can restart the service manager

Now the MMDVMHost service is ready to start. At this point, we can start the service without restarting.

Verification of Service Operation

You can verify that the service launch MMDVMHost, by appearing in processes (ps) with the following statement. Must be displayed 3 rows.

For verify the operation of the service, you will have access to the MMDVMHost log with the following command

The operating status of the service is returned with this command

Let’s now test the automatic restart.

Step 1: The service is running, MMDVMHost is present in the list of processes:

Step 2: We will kill the MMDVMhost process with

Step 3: Immediately check the list of processes.

There is only one line left … But 10 seconds later, the same command again displays the 3 lines. MMDVMHost has been restarted!

Other command

To stop the service


Vous aurez compris que la seconde solution présentée et qui consiste à démarrer MMDVMHost en tant que service est plus robuste grâce à la fonction offerte par le service de redémarrer automatiquement MMDVMHost sur arrêt intempestif.

Au besoin les commentaires sont ouverts ci-dessous pour vos remarques, ou questions.

If you would be interested to participate in a possible future new grouped order (MMDVM board, SvxLink Card), leave your email below to be reported!

12 thoughts on “Automatic start of MMDVMHost

  1. Bonjour
    la solution la plus simple faire un fichier dans l’autostart avec un décalage de 30 secondes

    The simplest solution is to make a file in the autostart with a 30 second delay

    sudo su
    cd ./config
    sudo mkdir autostart ('s'il n'existe pas)
    cd autostart
    sudo nano MMDVMHost.desktop:

    [Desktop Entry]
    Exec=sh -c "sleep 30 && cd /opt/MMDVMHost; sudo ./MMDVMHost MMDVM.ini"

    CTRL+x Yes pour sortir

  2. Good Morning,

    Advice please before I do a total rebuild..

    I have followed the build sequence for MMDVM and Adriano on a PI 3
    but something is wrong with one of my settings
    as the Pi boots up it fails for DMR and just keeps running around in a loop
    Is there a way to break that loop, or login via an other virtual screen to stop it please.
    All the best and thank you from Alan


       Conseils avant de faire une reconstruction totale.

    J’ai suivi la séquence de construction pour MMDVM et Adriano sur un PI 3
    Mais quelque chose ne va pas avec l’un de mes paramètres
    Lorsque le Pi démarre, il échoue pour DMR et continue de tourner en boucle
    Existe-t-il un moyen de briser cette boucle, ou de vous connecter via un autre écran virtuel pour l’arrêter s’il vous plaît.
    Tout le meilleur et merci d’Alan

  3. Advertisements
  4. Hello,

    I think that you may use my service menu here :

    It include the stop command of the service. If you kill simply the MMDVMHost process, yes, the service will start again !

    73 Chris


    Je pense que vous pouvez utiliser mon menu de gestion ici:

    Il comprend la commande d’arrêt du service. Si vous tuez simplement le processus MMDVMHost, oui, le service le relancera !

    73 Chris

  5. Good Afternoon Chris, that does look great, BUT I need to get in first
    which I cannot do…

    All the best from Alan

    Bon après-midi Chris, ça a l’air génial, MAIS j’ai besoin d’entrer en premier
      Chose que je ne peux pas faire …


    1. I do not understand how it is possible to have so a trooble. Is it booting in circle ?
      I believe that you know connect remotely your Raspberry Pi via SSH like explained here

      That you can stop your service (sudo systemctl stop mmdvmhost.service) and also kill the process (sudo killall MMDVMHost)

      Je ne comprends comment cela est possible d’en arrivé là. Est-ce que cela reboote en cycle ?
      Je suppose que vous savez vous connecter à distance au Raspberry Pi via SSH comme expliqué ici.

      Alors, vous pourrez stopper le service (sudo systemctl stop mmdvmhost.service) et aussi tuer la tâche (sudo killall MMDVMHost)

  6. Advertisements
  7. Hi Chris I hope this will explain…

    what you see keeps repeating, i need to stop it to install your program, or goto single user mode
    and cancel the rc.local file

    All the best from Alan

    Bonjour Chris J’espère que cela sera plus clair …
    Ce que vous voyez continue de répéter, je dois l’arrêter pour installer votre programme, ou passer en mode utilisateur unique
    Et annuler le fichier rc.local

    1. Alan,

      This is no link with the way you start MMDVMHost ! It is just telling that you can not reach the DMR master server via internet.
      You have to check
      1) you have enter the good master ip or host adress, port and password in the MDMVM.ini, section [DMR Network]
      2) Your internet gateway ip address indicated in your Rasperry Pi is corresponding to your internet box, so that the ip routing come out to internet.
      you can have a look if you can ping and our master with ping command


      Cela na rien à voir avec la façon MMDVMHost démarre ! Cela indique juste que vous n’arrivez pas à atteindre le server Master DMR via internet.
      Vous devez vérifier
      1) que vous avez bien renseigner la bonne adresse ip ou nom de host, port et password dans MMDVM.ini à la section [DMR Network]
      2) que l’adresse ip du gateway internet est bien renseigné dans le Raspberry Pi, qu’il corresponde à l’adresse de votre box internet, de façon à ce que les routages ip aille sur internet.
      Vous pouvez vérifier que le ping vers google et vers votre master fonctionne avec la commande ping

  8. I am understanding what you are saying all good advice


    I CANNOT get into ROOT

    Control C or Esc will not get me out of this, I cant even remote access in via the ethernet

    I hope you understand, sorry if my English is bad..

    All the best from Alan & Thank you.

  9. Advertisements
  10. Hi Chris,

    It appears that after 15minutes, the pi allows you to connect via ssh which I did do, and stop the mmdvm
    created the menu as describe in your web pages, make life a lot easier 🙂 thank you for that..

    I disabled everything except Fusion, then set the software running again…
    and this is what I get,

    Thank you for your help & support..

    All the best from Alan

    Salut chris,

        Finalement après 15 minutes, le pi m’a autorisé à m’y connecter via ssh, chose que j’ai faite et puis arrêter mmdvm
        J’ai créé le menu comme décrit sur votre site Web, ce qui rend la vie beaucoup plus facile 🙂 merci pour ça …

        J’ai désactivé tout, sauf Fusion, puis réinitialiser le logiciel …
        Et c’est ce que je reçois,

    Merci de votre aide et de votre support..

    Salutations Alan

  11. Je crois qu’il manque la commande:
    sudo systemctl enable mmdvmhost.timer

    Sans elle le service ne démarrait pas sur mon Hotspot.

    73 Ghislain/F4HGA.

    I think the command is missing:
    sudo systemctl enable mmdvmhost.timer

    Without it, the service would not start on my Hotspot.

    73 Ghislain/F4HGA.

  12. Hello to all.
    Use MMDVM on a repeater with Raspberry PI3, Arduino and NTH radio card.
    On the raspberry I mounted a UTAH SD but I have the problem that when I restart the raspberry, the MMDVMHost does not start automatically ..
    By launching MMDVMHost instead manually, it works regularly.
    I checked all the files needed for the automatic start of MMDVMHost and they all seem correct.
    From the MMDVMHost log I see these lines, from which it seems that the system is stopped, but I do not know why

    I: 2018-05-27 22:42:19.720 Mode Hang: 20s
    M: 2018-05-27 22:42:19.720 MMDVMHost-20180327 is running
    M: 2018-05-27 22:42:19.720 Closing the MMDVM
    I: 2018-05-27 22:42:20.720 Stopped the DMR Id lookup reload thread
    M: 2018-05-27 22:42:20.720 DMR, Closing DMR Network
    I: 2018-05-27 22:42:20.720 MMDVMHost-20180327 exited on receipt of SIGTERM
    I: 2018-05-27 22:44:42.955 This software is for use on amateur radio networks only,
    I: 2018-05-27 22:44:42.956 it is to be used for educational purposes only. Its use on
    I: 2018-05-27 22:44:42.956 commercial networks is strictly prohibited.
    I: 2018-05-27 22:44:42.956 Copyright(C) 2015-2018 by Jonathan Naylor, G4KLX and others
    M: 2018-05-27 22:44:42.956 MMDVMHost-20180327 is starting
    M: 2018-05-27 22:44:42.956 Built 23:31:03 May 15 2018 (GitID #992b0f2)

    On the same SD, for better remote control, I installed VNC, VIRTUALHERE and MMDVM DASHBOARD ..
    Does anyone have any idea what the solution to the problem might be? I have already tried in various ways without success.

    Thank you
    ’73 de Adam, IK4NZD

    Bonjour à tous.
    J’utilise le MMDVM en tant que relais avec une carte radio Raspberry PI3, Arduino et NTH.
    Sur le raspberry pi, j’ai monté une SD UTAH mais j’ai le problème que lorsque je redémarre le raspberry , le MMDVMHost ne démarre pas automatiquement.
    En lançant MMDVMHost à la place manuellement, il fonctionne correctement.
    J’ai vérifié tous les fichiers nécessaires au démarrage automatique de MMDVMHost et ils semblent tous corrects.
    Depuis le journal MMDVMHost je vois ces lignes, dont il semble que le système est arrêté, mais je ne sais pas pourquoi.

    Sur la même SD, pour une meilleure télécommande, j’ai installé VNC, VIRTUALHERE et MMDVM DASHBOARD ..
    Quelqu’un a-t-il une idée de la solution au problème ? J’ai déjà essayé de diverses façons, mais sans succès.

    Je vous remercie
    73 de Adam, IK4NZD

Leave a Reply

Your email address will not be published. Required fields are marked *