Nextion display for a hotspot: wiring and firmware
A 0.96" OLED screen shows the callsign and status — and that's already useful. But the Nextion — a smart colour TFT with a touch panel and its own processor — displays it all at once: the caller's callsign and DMR ID, the talkgroup name, BER, RSSI, the time of the last QSO, and a clock when idle. The screen runs autonomously: the host sends it short commands over UART, and the Nextion renders all the graphics itself. On a hotspot running the RadioStar image, Pi-Star or WPSD this works out of the box — you only need to wire and configure it correctly.
What a Nextion is and how it differs from an OLED
An OLED (typically 128×64, I²C) is a passive display: the host draws every pixel itself, constantly refreshing the buffer. A Nextion is a smart TFT: inside is an ARM controller with flash memory that holds the interface (images, fonts, widgets). The host (Raspberry Pi / MMDVMHost) sends short text commands like t0.txt="R3ABC" over UART, and the Nextion updates the relevant field by itself. This lowers the load on the Pi and gives smooth, flicker-free animation.
The interface is flashed into the Nextion with a .tft file (a compiled project from the Nextion Editor). That is exactly why "flashing the display" and "flashing the host" are two different operations.
Choosing a model: size and series
Three diagonal sizes are the most common for MMDVM hotspots:
- 2.4" — compact, fits most "hat" enclosures; resolution 320×240.
- 3.2" — the optimal balance of size and readability; resolution 400×240.
- 3.5" — maximum information, but needs a larger enclosure; resolution 480×320.
By series: Basic (T) — for example, NX4024T032 — is enough for a hotspot. Enhanced (K) costs more but adds an RTC, more flash and a faster UART. For an amateur node there is practically no difference.
Wiring: UART and power
The Nextion talks to the host over a serial UART interface: four wires — power (+5V and GND) and data (TX, RX). The standard colour coding of the display's cable:
- Red — +5V (screen power);
- Black — GND;
- Yellow — display TX (connects to host RX);
- Blue — display RX (connects to host TX).
Important: TX and RX cross over — the output of one device goes to the input of the other. A mistake here is the single most common cause of "the display doesn't respond".
Matching 5V and 3.3V levels
The Raspberry Pi works with 3.3V logic. Most Basic-series Nextions actually output 3.3V on the TX line, which is directly compatible with the Pi. However, the screen's power must be 5V: the 3.3V GPIO pin cannot drive the backlight, so you need a 5V pin (pin 2 or 4 on the Raspberry Pi GPIO header).
If the display connects not directly to the Pi GPIO but to an MMDVM hat (HS_Hat, Nano_Hat and similar), check the hat's documentation — some boards have a built-in Nextion connector with levels already matched and 5V power. In that case you simply plug in the supplied cable.
Connecting via a USB-UART adapter
If the Pi's hardware UART is occupied by a DVMega modem or another device, use a USB-UART adapter (CH341, CP2102). The Nextion connects to the adapter, the adapter into a Pi USB port. The system will detect it as /dev/ttyUSB0 (or ttyUSB1, ttyUSB2 — depending on the order of connection); check with:
dmesg | grep ttyUSB
Flashing the display with a .tft file
A Nextion is flashed in two ways: via a microSD card (simpler and more reliable) or over UART from the host (requires a Python script). microSD is recommended.
Method 1: microSD
- Format a blank microSD card as FAT32.
- Copy a single .tft file for your display model onto the card. Nothing else should be on the card.
- Insert the card into the Nextion slot (on the back of the board).
- Power up the display. The screen will detect the file automatically and begin flashing — a progress bar appears.
- Wait for the success message, power off, and remove the card.
Method 2: over UART from the Pi command line
If a microSD isn't available, you can upload the firmware with a script:
sudo python3 nextion.py NX4024T032.tft /dev/ttyAMA0
The nextion.py script is in the same WA6HXG repository. Before running it, make sure MMDVMHost is stopped and the port is free.
Configuring Pi-Star
Go to Pi-Star → Configuration → MMDVM Configuration → Display. Set:
- Display Type: Nextion
- Port: Modem — if the Nextion is connected directly to the MMDVM hat; or /dev/ttyUSB0 — if via a USB adapter; or /dev/ttyAMA0 — if to the Pi GPIO.
- Screen Layout: for Pi-Star versions up to 2.1 — ON7LDS 3; for 2.1 and newer — G4KLX.
After saving, Pi-Star restarts MMDVMHost. If the display comes to life and shows "Idle" or a clock, everything is working.
Configuring WPSD
WPSD has native Nextion support built in — no additional scripts are needed. Open Admin → Configuration → Display:
- Display Type: Nextion
- Port: same as Pi-Star — modem, /dev/ttyUSB0 or /dev/ttyAMA0.
- Screen Layout: pick the right option from the drop-down list (L0–L3 depending on the installed layout).
WPSD follows a rolling-release model; with each nightly update the Nextion driver is also updated automatically.
Configuring it in the RadioStar image (DMRhub)
The RadioStar image is based on the same foundation as Pi-Star. The Nextion configuration is edited in the /etc/mmdvmhost file manually over SSH or through the web interface of the panel. The relevant sections:
[General]
Display=Nextion
[Nextion]
Port=/dev/ttyUSB0
Brightness=50
DisplayClock=1
UTC=0
IdleBrightness=20
After editing, restart the service:
sudo systemctl restart mmdvmhost
The Brightness parameter is brightness as a percentage (0–100). IdleBrightness is the brightness when idle, useful for prolonging the life of the screen. DisplayClock=1 shows a clock when idle.
Build a hotspot with a Nextion today
On the "Build image" page you choose the board type, download a ready-made RadioStar image for the Raspberry Pi, and flash it in 10 minutes. The Nextion can be connected right away — the image supports it without any extra packages. And the DMRhub contact lists with the callsigns of network operators are downloaded from your account.
Sources
- The MMDVM-Nextion layouts repository with flashing and wiring instructions — github.com/WA6HXG
- Connecting a Nextion to MMDVMHost (Marrold's Blog, hands-on with USB-UART) — marrold.co.uk
- Nextion + MMDVM + Raspberry Pi tutorial (F5UII), UART parameters and config — f5uii.net
- Updating the Nextion firmware for Pi-Star (Ailunce Blog) — ailunce.com