Installation tutorial for Nextion on MMDVM

In the following of my pedagogical articles on MMDVM, I offer you this time a tutorial explaining step by step how to add a Nextion (itead) screen on your MMDVM repeater.

Initial programming of the Nextion screen

Software prerequisites

We need to add the serial module to the python language

Configuring the serial port /dev/ttyAMA0

Disable access to the console via the serial port. (You are logged in by another means).

Configure the serial port and restart the Raspberry Pi

Connecting the Display

The screen must now be connected to the serial port (called UART) of the Raspberry Pi, in order to be able to program it in the next step.

Raspberry Pi (GPIO) wiring to program of Nextion Screen

Loading the MMDVM firmware on the Nextion screen

First select the file you will load according to your screen. Consult the reference written on the back of your screen. In the case of our example, the screen is labeled NX3224T024_011. We will identify the file name with the following commands

We find two files corresponding to this screen. The .HMI file is the native format. The .tft file is the compiled binary file that will be loaded on the screen in the next step.

We will now load the file with the supplied nextion.py python program. The first parameter is the name of the tft file to load, the second parameter is the target serial port.

 

The display lights up. The MMDVM logo appears.

Connecting and configuring MMDVM

Choice of connection

There are two ways to connect your Nextion screen:

  • To the Raspberry Pi, connected identically to what was indicated below for the programming part
  • To the MMDVM filter card (Arduino or STM32, or other …)

We will explain both ways of proceeding. You have to choose the solution you want to implement

The Nextion screen on Raspberry Pi

We must validate the operation of the screen by modifying the configuration file MMDVM.ini

At the beginning of the file, in [General] section we will specify the screen.

And we verify that the [Nextion] section specifies the serial port used

We save the modified file (Ctrl-X), and Yes

We restart the Raspberry Pi

The display lights up and indicates that MMDVM is ready (Idle). The repeater callsign and ID are displayed.

Nextion screen on the MMDVM filtering board

We are now explaining the second way to connect the screen, directly to the MMDVM filtering modem

MMDVM Firmware Configuration

Note that for details on the firmware upgrade process, please refer to MMDVM installation on a STM32F4xx board .

We modify the config.h firmware configuration file, validating the serial port for the Nextion display (SERIAL_REPEATER), at the end of the file.

Then you recompile MMDVM firmware (see “Start compilation” in MMDVM installation on a STM32F4xx board).

We reload the target (with STM32 utility for Nucleo for example, see MMDVM installation on a STM32F4xx board).

Configuring MMDVMHost

We now specify in MMDVM.ini file so that the Nextion screen is connected to the MMDVM modem.

In the [General] section, the screen is specified as Nextion.

Connecting the display to the MMDVM modem

Plug into the MMDVM Nucleo STM32 shield as shown on the picture below.

We restart the Raspberry Pi

Your display is operational.

MMDVM modem, on Nucleo STM32F4, iTead Nextion screen and Raspberry Pi

Do not hesitate to use comments to ask some needed help.


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!

5 thoughts on “Installation tutorial for Nextion on MMDVM

  1. Bonjour,
    j’utilise le langage Basic Bascom pour Arduino, (un bon vx basic compiler ultra rapide) je voudrais utiliser les écrans Nextion mais je ne trouve nul part la config du port série pour envoyer les commandes.
    Pouvez vous me donner les réglages , j’aurais besoin de qq chose comme ça:
    Config Com1 = 19200 , Synchrone = 0 , Parity = None , Stopbits = 1 , Databits = 8 , Clockpol = 0
    Merci de votre aide

    (translation)
    Hello,
    I use the Basic Bascom language for Arduino, (a good vx basic compiler ultra fast) I would like to use Nextion screens but I can not find the serial port config to send the commands anywhere.
    Can you give me the settings, I would need qq something like this:
    Config Com1 = 19200, Synchrone = 0, Parity = None, Stopbits = 1, Databits = 8, Clockpol = 0
    Thank you for your help

    1. Bonjour Jean-Pierre,

      Par défaut l’écran que j’ai utilisé répond à 9600, mais vous pouvez le pousser à 115200 bauds (instruction bauds , voir https://www.itead.cc/wiki/Nextion_Instruction_Set).
      A priori, le protocole est 8bits et 1 stop bits, pas de parité (http://support.iteadstudio.com/support/discussions/topics/11000011760).

      Bon bricolage

      (translation)
      Hello Jean-Pierre,

      By default the screen I have used works at 9600, but you can push it to 115200 baud (bauds command, see https://www.itead.cc/wiki/Nextion_Instruction_Set).
      The protocol must be 8 bits with 1 stop bit, no parity (http://support.iteadstudio.com/support/discussions/topics/11000011760).

      Good DIY

      1. Merci pour cette réponse rapide, le site Itead n’est pas très simple à naviguer, quant au forum heureusement que vous m’avez indiquez le lien , j’ai cherché plusieurs heures ce matin…
        bref j’hésite encore …
        Puis-je encore vous poser qq questions ?
        Si je comprends bien, on dessine ses écrans avec l’éditeur, on les envoie vers la carte SD.
        – comment se fait le transfert vers la carte SD ? par transfert via un PC ?
        puis on discute avec cet écran à travers une connexion rx tx, ça me plait bien car on peut alors utiliser des micro-controleurs très simples genre ATTiny. ou ATMega 328

        Visiblement le touch screen se pilote avec un stylet ? on ne peut pas le piloter avec les doigts ?

        Merci encore
        JP

        (Translation)
        Thanks for the quick reply, the Itead website is not very easy to navigate, as for the forum fortunately you indicated the link, I searched several hours this morning …
        In short I still hesitate …
        Can I still ask you questions?
        If I understand correctly, we draw its screens with the editor, we send them to the SD card.
        – how is the transfer to the SD card? By transfer via a PC?
        Then we discuss with this screen through an rx tx connection, I like it very well because you can then use very simple micro-controllers ATTiny type. Or ATMega 328

        Obviously the touch screen is pilot with a stylus? We can not control it with your fingers?

        thanks again
        JP

        1. Oui, sur Carte SD ou bien en mémoire de l’écran directement. Exactement cela, comme cela est décris ici par exemple :https://www.itead.cc/wiki/Nextion_Editor_Quick_Start_Guide

          Vous trouverez certainement d’autres exemples d’applications avec ATTiny ou d’autre système. http://fritzing.org/projects/nextion-display
          L’écran s’utilise avec les doigts, classiquement.
          Bons développements avec les écrans Nextions.

          (Translation)
          Yes, on SD card or in the screen memory directly. Exactly this way, as described here for example: https: //www.itead.cc/wiki/Nextion_Editor_Quick_Start_Guide

          You will certainly find online other examples of applications with ATTiny or other system. http://fritzing.org/projects/nextion-display
          The screen is used with the fingers, classically.
          Good developments with Nextions screens.

  2. Merci Beaucoup,
    J’ai commandé un écran, pour faire les premiers tests, et j’ai enfin compris -enfin un peu mieux- le mécanisme du site
    Itead, avec le “wiki”. je suis client chez eux pour mes propres CI de bonne qualité.
    A plus tard avec des résultats…. j’espère.
    Jean-Pierre

    (translation)
    Thank you very much,
    I ordered a display, to do the first tests, and I finally understood – finally a little better – the mechanism of the site
    Itead, with the “wiki”. I am a customer of Itead for my own PCB (good quality).
    Soon, with results …. I hope.
    Jean Pierre

Leave a Reply

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