Build your own homebrew MMDVM hotspot

Partie logicielle - Firmware du HotSpot

Compiling and MMDVM firmware loading

The STM32F103 board will receive the firmware. The installation must be able to be done with Windows, but some sudden complications for the installation of the drivers, I propose you to compile and load the firmware from your Raspberry Pi. Switch on the Raspberry Pi, connect it to the power supply and  to the network (initially RJ45)

The firmware to load is MMDVM HS which is dedicated to HotSpot

 

We load from the console opened remotely on the Raspberry Pi (I use Putty. exe as explained in Raspberry Pi documentation).

Log in to your Raspberry Pi.

Download MMDVM HS

First of all, let’s install some prerequisites.

  • An update of installation resources
sudo apt-get update
Get:1 http://mirrordirector.raspbian.org jessie InRelease [14.9 kB]
Get:2 http://archive.raspberrypi.org jessie InRelease [22.9 kB]
Get:3 http://mirrordirector.raspbian.org jessie/main armhf Packages [9,535 kB]
...
...
Ign http://mirrordirector.raspbian.org jessie/rpi Translation-en
Fetched 9,702 kB in 1min 24s (115 kB/s)
Reading package lists... Done
  • And module installations
sudo apt-get install gcc-arm-none-eabi gdb-arm-none-eabi libstdc++-arm-none-eabi-newlib libnewlib-arm-none-eabi

Confirm by Yes

Reading package lists... Done
Building dependency tree
Reading state information... Done
gcc-arm-none-eabi is already the newest version.
libnewlib-arm-none-eabi is already the newest version.
libnewlib-arm-none-eabi set to manually installed.
libstdc++-arm-none-eabi-newlib is already the newest version.
libstdc++-arm-none-eabi-newlib set to manually installed.
The following NEW packages will be installed:
  gdb-arm-none-eabi
0 upgraded, 1 newly installed, 0 to remove and 84 not upgraded.
Need to get 1,621 kB of archives.
After this operation, 5,075 kB of additional disk space will be used.
Do you want to continue? [Y/n]
Get:1 http://mirrordirector.raspbian.org/raspbian/ jessie/main gdb-arm-none-eabi armhf 7.7.1+dfsg-3+6 [1,621 kB]
Fetched 1,621 kB in 20s (80.7 kB/s)
Selecting previously unselected package gdb-arm-none-eabi.
(Reading database ... 34460 files and directories currently installed.)
Preparing to unpack .../gdb-arm-none-eabi_7.7.1+dfsg-3+6_armhf.deb ...
Unpacking gdb-arm-none-eabi (7.7.1+dfsg-3+6) ...
Processing triggers for man-db (2.7.0.2-5) ...
Setting up gdb-arm-none-eabi (7.7.1+dfsg-3+6) ...

 

  • And installation of git to download directly the GitHub ressources
sudo apt install git
  • In /opt directory
cd /opt
  • Downloading HS MMDVM
sudo git clone https://github.com/juribeparada/MMDVM_HS

  • Download the STM32F103 library
cd MMDVM_HS/
sudo git clone https://github.com/juribeparada/STM32F10X_Lib

Firmware compilation and loading

First of all, let’s make sure that the configuration file validates all the functions necessary for the HotSpot.

sudo nano /opt/MMDVM_HS/Config.h

The default configuration normally corresponds to our needs. Here is the expected file.

#if !defined(CONFIG_H)
#define  CONFIG_H

// Select one board (STM32F103 based boards)
// 1) ZUMspot USB and ZUMspot RPi:
// #define PI_HAT_7021_REV_03
// 2) ZUMspot Libre Kit or board with modified RF7021SE and Blue Pill STM32F103:
#define ADF7021_CARRIER_BOARD

// Enable ADF7021 support:
#define ENABLE_ADF7021

// Enable full duplex support with dual ADF7021:
// #define DUPLEX

// TCXO of the ADF7021
// For 14.7456 MHz:
#define ADF7021_14_7456
// For 12.2880 MHz:
// #define ADF7021_12_2880

// Host communication selection:
// #define STM32_USART1_HOST
#define STM32_USB_HOST

// Enable mode detection:
#define ENABLE_SCAN_MODE

// Send RSSI value:
// #define SEND_RSSI_DATA

// Enable Nextion LCD serial port repeater on USART2 (ZUMspot Libre Kit and ZUMspot RPi):
#define SERIAL_REPEATER

// Enable Nextion LCD serial port repeater on USART1 (Do not use with STM32_USART1_HOST enabled):
// #define SERIAL_REPEATER_USART1

// Enable P25 Wide modulation:
// #define ENABLE_P25_WIDE

// Disable mode LEDs blink during scan mode:
// #define QUIET_MODE_LEDS

#endif

Let’s now start compiling MMDVM HS with bootloader ( bl option)

cd /opt/MMDVM_HS

sudo make clean
sudo make bl

The compilation must end by indicating that the files outp.hex  et outp.bin  have been generated.

To load the firmware, we use an RS232 TTL USB TTL adapter. When plugged into a USB port on the Raspberry Pi, a /dev/ttyUSB0 port must appear  (ls /dev/tty* ).

To load the firmware and bootloader on the STM32F103, we need to move one of the two jumpers (the BOOT0, positioned at the top, on side of pins B11, B10, B1) to position 1 (to the right).

The BOOT0 jumper is positioned on 1

Start the loading command.

sudo make serial-bl devser=/dev/ttyUSB0

Let’s return the jumper BOOT0 to position 0 (the two jumpers are in position 0, on the left). Restart the STM32F103 with a short press of the RESET button (close to the jumpers). The red LED of the STM32 starts flashing (rapidly then slowly).

Firmware update

If you want to update the firmware at another time, you will no longer need the USB interface or to set jumper BOOT0 to 1. Indeed, since the bootloader is already in place, the update is done directly via the USB link from the STM32F103 to the Raspberry Pi, the one that we will be in use for HotSpot normal operation. This is the serial port /dev/ACM0

In this case, to make the update, here are the commands, BOOT0 to 0 and via USB connection.

cd /opt/MMDVM_HS
sudo make clean
sudo make bl
sudo make dfu devser=/dev/ttyACM0

Now the firmware is loaded. Let’s take care of the configuration of the Raspberry Pi on which we install the MMDVMHost software. Let’s look at the MMDVMHost stage now, we will soon be on the air and the network.

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!

30 thoughts on “Build your own homebrew MMDVM hotspot

  1. Bonjour,
    très beau tuto Christian, merci !

    Bruno

    (Translation)
    Hello,
    Very nice tutorial Christian, thanks !

    Bruno

  2. Advertisements
  3. Hello, I have been reading your very informative website, as I am in the process of setting up my Hotspot.
    The question I have is what UHF frequency do you set your MMDVM to?

    Is it a special simplex frequency which is also programmed into your P25 ,DMR, Fusion, D-Star radios?

    Or is it a UHF frequency of a local reflector to your QTH.

    73
    Colin
    Sydney Australia

    (Traduction)
    Bonjour, J’ai lu votre site très instructif, car je suis en train de mettre en place mon Hotspot.
    La question que j’ai est : quelle fréquence UHF définissez-vous votre MMDVM?

    Est-ce une fréquence simplex spéciale qui est également programmée dans vos radios P25, DMR, Fusion, D-Star?

    Ou est-ce une fréquence UHF d’un réflecteur local à votre QTH.

    73
    Colin
    Sydney, Australie

    1. Hello Colin,

      The frequency of the hotspot is to be programmed in your stations in simplex (RX = TX).
      For example 435000
      Regards

      (Traduction)
      Bonjour Colin,

      La fréquence du hotspot est à programmer dans vos postes en simplex (RX=TX)
      Par exemple 435000

  4. Advertisements
  5. where is the PCB info file for gerbers and or also where can the PCB be made
    (Traduction)
    où est le fichier d’information PCB pour les gerbers et ou aussi où le PCB peut-il être fait?

  6. What is the current usage of the adf and stm and it be connected to the pi by a usb connection

    (Translation)
    Quelle est la consommation actuelle de l’adf et du stm et lorsqu’il est connecté au pi par une connexion usb?

    1. Trent,

      I just measure, the electrical power consumption of this hotspot using a Raspberry Pi 3 is 0,36A under 5,25V. When disconnecting the hotspot (remains alone the pi), then the current is down to 0,34A.

      73

      (Traduction)

      Trent,
      Je viens de mesurer, la consommation électrique de ce hotspot fonctionnant avec un Raspberry Pi 3 est de 0,36A sous 5,25V. Lors de la déconnexion du hotspot (seul le pi reste) le courant est réduit à 0,34A.
      73

  7. Advertisements
  8. Il suffit de bien suivre Le tuto et ça fonctionne.
    L’ensemble “zumspot libre” ainsi programmé fonctionne très bien logiciel pi-star.
    73 à tous F5jwx.

    (translation)
    Just follow the tutorial and it works.
    The “free zumspot” set thus programmed works very well pi-star software.
    73 to all F5jwx

  9. Bonjour
    Merci pour tous vos tutos.
    J ai une question sur le module RF7021SE.
    Serait il possible de utiliser ce module en RX dans un relai mmdvm afin de remplacer un TRX Motorola ou autre. Est il suffisamment sensible ?
    Merci de votre retour
    73
    Manu f4flq

    (Translation)
    Hello
    Thank you for all your tutorials.
    I have a question about the RF7021SE module.
    Would it be possible to use this module in RX in a mmdvm repeater to replace a Motorola TRX or other. Is he sensitive enough?
    Thank you for your feedback
    73
    Manu f4flq

    1. Bonjour Manu,

      La datasheet du composant ADF7021 indique une bonne sensibilité théorique de -122 dBm, soit 0,18 µV (pour modulation 2FSK). J’ai donc l’impression que cela doit pouvoir être un bon récepteur.

      Pour en faire un relais, il vous faudra fonctionner MMDVM_HS en mode duplex, avec 2 ADF7021. Voici un exemple.
      MMDVM Full duplex
      Vu sur https://twitter.com/quini7620/status/944580784031232000

      (Translation)
      Hello Manu,

      The datasheet of component ADF7021 indicates a good theoretical sensitivity of -122 dBm, i. e. 0.18 µV (for 2FSK modulation). So I have the impression that it must be a good receiver.

      To make it a repeater, you will need to run MMDVM_HS in duplex mode, with 2 ADF7021. Here is an example.

      Viewed on https://twitter.com/quini7620/status/944580784031232000

  10. Excellent tutorial. I have made mine on a piece of strip board. The trouble is is that the ADF7021 does not seem to work. Your board looks slightly different to mine. Can you provide a closeup of the TXCO please? Maybe I have soldered the oscillator on upside down!

    Keep up the good work,

    John

    (Traduction)
    Excellent tutoriel. J’ai monté le mien sur un bout de plaque d’essai. Le problème est que l’ADF7021 ne semble pas fonctionner. Votre platine est légèrement différente de la mienne. Pouvez-vous fournir un gros plan du TXCO s’il vous plaît? J’ai peut-être soudé l’oscillateur à l’envers!

    Continuez le bon travail,

    John

    1. Hello John,

      Thanks for greatings.
      Here is a closeup; Pin 1 on the TCXO is left down (printed dot). This corner have no connected pin (according to the TCXO datasheet)

      Chris

      (Traduction)
      Je vous remercie.
      Voici le gros plan. Pin 1 est en bas à gauche sur le TCXO. A ce coin, il n’y a pas de pin connecté (voir la fiche constructeur du TCXO)

      Christian

      1. Thank you, I think I just need to recheck my soldering

        (Traduction)
        Merci, je crois que j’ai juste besoin de revérifier ma soudure.

  11. Advertisements
  12. Bonjour,

    Existe-t-il à votre avis un logiciel qui tourne sous Android pour utiliser avec ma tablette.?
    Merci de votre réponse
    73
    f6grh

    (Translation)
    Do you think there is a software that runs under Android to use with my tablet.?
    Thank you for your answer
    73
    f6grh

    1. Bonjour Marc,

      Vous pouvez accédez au tableau de bord RaspAP par un navigateur internet depuis votre tablette.
      73

      (Translation)
      Hello, Marc,

      You can access the RaspAP dashboard via a web browser from your tablet.
      73

  13. Merci pour votre réponse

    Je tourne déjà sous Ubuntu et je pensais pouvoir faire la même chose sous Android en me servant d’un fichier MMDVM.ini ou similaire sur ma tablette Pipo X9

    73 & amitiés renouvelées

    (Translation)
    Thank you for your answer

    I’m already running Ubuntu and I thought I could do the same under Android using an MMDVM.ini or similar file on my Pipo X9 tablet

    73 &

  14. Advertisements
  15. hello Christian,
    Greetings from Belgrade. I built a cheap hotspot with ADF7021 and blue pil. I put in the firmware and it’s all ok, everything works. Log in to BM and see traffic from the Internet. But the ADF7021 does not work. No RS or TS. Oscillator at 14 mhz is placed. Do you have any idea what could be the cause?
    I can send you photos of hotspot settings. I used PCB from DB4PLE.
    According to your instructions, I made a hotspot with a nucleo and Tait TM8105, everything works properly, thanks!

    Regards,
    Zoran YU3ZZ

    (Traduction)
    Bonjour Christian,
    Salutations depuis Belgrade. J’ai construit un hotspot bon marché avec ADF7021 et blue pil. J’ai mis le firmware et tout va bien, tout fonctionne. Connecté à BM et je vois le trafic de l’Internet. Mais l’ADF7021 ne fonctionne pas. Pas de signaux RS ou de TS. L’oscillateur de 14 Mhz est en place. Avez-vous une idée de ce qui pourrait en être la cause ?
    Je peux vous envoyer des photos des réglages du hotspot. J’ai utilisé le PCB de DB4PLE.
    Selon vos instructions, j’ai fait un hotspot avec un nucléo et Tait TM8105, tout fonctionne correctement, merci !

    Salutations,
    Zoran YU3ZZZ

  16. Hi, Have just completed building the STM32 stick MMDVM. Compiled and loaded MMDVM to the stm32. Code appears to be running ok.
    Configured MMDVMHost.h and complied with no errors. Configured MMDVMHost.ini and attempted to run but failed. Tried several configurations of MMDVMHost.ini but still fails with Unable to read the firmware version after six attempt.
    Help Please
    Best regards
    Dave

    (Traduction)
    Salut, Je viens de terminer la construction de la platine MMDVM pour STM32. Compilé et chargé MMDVM sur le stm32. Le code semble fonctionner correctement.
    MMDVMHost.h est configué et n’a commis aucune erreur. MMDVMHost.ini est configuré. J’ai tenté de m’exécuter mais cela échoue. Plusieurs essais avec différentes configurations de MMDVMHost.ini mais ne parvient toujours pas à lire la version du firmware après six tentatives.
    De l’aide, s’il vous plaît
    Meilleures salutations
    Dave

      1. Bravo, you had to find that! Congratulations and good digital radio experience

        (Traduction)
        Bravo, il fallait le trouver ! Félicitations et bon trafic en numérique

  17. Advertisements
  18. Yes, I have several working. I have them working with a Raspberry pi and attached to a Linux laptop.
    They work very well.

    (Traduction)
    Oui, j'en ai plusieurs qui fonctionnent. Je les ai fait tourner avec un pi Raspberry relié à un ordinateur portable Linux.
    Ils fonctionnent très bien.

  19. Hello, I am curious is it possible to connect screen to the DISP_I2C connector ?
    If yes, what will it shows ?

    (Traduction)
    Bonjour, je suis curieux de savoir s’il est possible de connecter l’écran au connecteur DISP_I2C ?
    Si oui, qu’est-ce qu’il indiquera ?

    1. I suppose you could connect (on these pins or elsewhere, to check with the assignment of MMDVM_HS) a NEXTION screen, which you would have programmed before. Here is an example of a realization
      Here I personally did not feel the need for an additional screen…

      (Traduction)
      Je suppose que vous pourriez y brancher (sur ces broches ou ailleurs, à vérifier par rapport au affectation de MMDVM_HS) un écran NEXTION, que vous auriez programmer avant. Voici un exemple de réalisation.

      Ici je n’ai personnellement pas ressenti le besoin d’un écran supplémentaire…

  20. Bonjour, merci pour toutes ces infos.
    J’ai réalisé un relai avec le MMDVM et je voudrais savoir si pour le mode D-star il y a des réglages à faire, car je ne trouve que des réglages pour le Dmr.
    Merci

    (Translation)
    Hello, thank you for all this information.
    I have done a repeater with the MMDVM and I would like to know if there are any settings to do for the D-star mode, as I can only find settings for the Dmr.
    Thanks

    1. David,

      Merci pour vos mots d’encouragements.
      Je n’ai personnellement jamais mis en oeuvre le mode Dstar avec MMDVM, mais de ce que je sais, le même réglage que celui réalisé pour le DMR devrait permettre le bon fonctionnement du DSTAR, car le plus “contraignant” par rapport aux autres modes.

      Bons réglages, Christian F5UII

      (Translation)
      David,

      Thank you for your words of encouragement.
      I personally have never implemented Dstar mode with MMDVM, but from what I know, the same setting as the one made for the DMR should allow the DSTAR to work properly, as it is the most “constraining” compared to the other modes.

      Good settings, Christian F5UII

Leave a Reply to Jean-Yves Cancel reply

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