Expanded Notes On Installing The Nextion Display Drivers

Expanded Notes On Installing The Nextion Display Drivers

 
By Using This Website, You Agree To This Website Linked Disclaimer 
 

Attention: READ And Follow All Procedures

 
YES, YOU have to read and follow all of the procedures below. This Website and all of its Webpages are very dynamic, meaning, changes can happen to them almost daily. DON’T ASSUME that a procedure that was done one way yesterday is the same today. Always review the information provided on all of this Websites Webpages.
 
As there are many users of this information below and as they come across a problem, may it be My mistakes or theirs, I try to implement changes to the content below to help avoid the rest from having the same or similar problems. This also means that a lot of defining of each procedure may be offered. This may become boring, mundane to the rest of the more expert users.
 
We all learn at different paces and over simplification helps everyone get things right in the end. PLEASE be understanding of this as I wish to be all-inclusive by having this information help the many Beginners to the very few Experts. I hope that this Website helps make the many that come here the greatest Digital Amateur Radio Operators of tomorrow.
 
When You Learn, What You Learn, Always Help Another In Need, ALWAYS PAY IT FOWARD, AG4OJ, ENJOY!
 

Table Of Contents - Quick Links

 
 
 
 
 
 
 
 
 

The EDDC

 
 
 
 
 
 
 
 
 
 

The NDDC

 
 
 
 
 

Flashing The Nextion Display

 
 
 
 

The First Seven Steps Before Anything Else Is Done

 
 Amateur Radio Callsign AG4OJ  Nextion Display Code Files - Version A  Nextion Display Code Files - Version B  AG4OJ's E-Mail Account
 

FIRST: Is Everything Setup And Updated Properly?

 
FIRST OF ALL, is your RADIO setup for the MODE you wish to talk on and is the HOTSPOT setup for the MODE you wish to talk on? Seriously here, IF you not talking already on your HOTSPOT, this could mean that the MMDVMHost is NOT running properly, which also means that the Nextion Display will not work. The Nextion Display is DRIVEN by a functioning MMDVMHost.
 
Make SURE that YOU have purchased a POWER SUPPLY that is REALLY putting out 5.0V and it will supply enough current to run the Raspberry Pi and the Nextion Display. IF the RED light on the Raspberry Pi SBC is flashing OR flashes erratically at different times, then it is NOT a suitable POWER SUPPLY. You will have erratic problems with a NON-SUITABLE POWER SUPPLY. Don't start chasing your tail over this simple common problem.
 
 Connecting The Nextion Display VIA USB
 
USB Connected Nextion Display - In The Image Above.
 
Make SURE that your NEXTION DISPLAY is ALREADY wired properly BEFORE powering it up. Obviously the GND should be connected to the GND and the +5V should be connected to the +5V. Next, the TX should be connected to the RX and the RX should be connected to the TX. ENSURE that the DATA WIRES are crisscrossed.
 
 3.3v to 5.0v Level Shifter For MMDVM Modem Connected Nextion Display
 
MODEM Connected Nextion Display - Typical Logic Level Shifter.
 
On a MMDVM Modem connected Nextion Display, it is very important to use a “LEVEL SHIFTER” in-between the MMDVM Modem and the Nextion Display. Connecting 5.0V logic data lines of the Nextion Display with the 3.3V logic data lines of the MMDVM Modem microcontroller is NOT advisable.
 
Other Important Things That Need To Be Checked.
 
The Nextion Display needs to be flashed with Firmware that can display at least the MMDVMHost messages. Usually, it needs to be able to display added Display Driver Messages also. The default manufacturers display Firmware on a new display will only show their displays introduction code.
 
I provide Nextion Display Firmware files on this website for all sizes and types of Nextion Displays. They will display all of the MMDVMHost sent messages as well as those extra ones from the installed display driver, if used.
 
 MMDVM Modem's Firmware Version
Check the MMDVM Modem Firmware from the Pi-Star Admin screen (See The Green Arrows In The Picture), make sure it is up to date. As of 05/22/21, the latest Firmware version for a typical MMDVM Modem Hat is v1.5.2. IF this firmware is not up to date, it can cause all kinds of problems, frustrations, headaches, etc. PLEASE ask for help if flashing the MMDVM Modem Firmware doesnt work.
 
For The Raspberry Pi OS, Pi-Star, and the MMDVMHost, always do a sudo pistar-update in the Pi-Stars ssh window. A sudo pistar-upgrade maybe in order also. Doing these will save a lot of headaches from a non-current Raspberry Pis OS and Pi-Star. I have a Guide here on this website that will help you ensure that everything is up to date.
 
Always reach out for help if you dont understand how to do any of this stuff.
 
 Amateur Radio Callsign AG4OJ  Nextion Display Code Files - Version A  Nextion Display Code Files - Version B  AG4OJ's E-Mail Account
 

SECOND: Did You Change The Nextion Display Flrmware?

 

Running Your Own Nextion Display Code OR Someone Else's

 
YES, that's RIGHT! The information provided below can help you make your own Nextion Display Code OR someone else's run more smoothly. There are two version provided here, NDCVerA and NCDVerB. YET, you don't have to use them. There are some who just don't like my Nextion Display code. EVEN SO, please don't dismiss the extensive resources provided below.
 

Nextion Display Code Version A For The ON7LDS NDDC

 
NDC Version A will only show Pi-Star/MMDVMHost and any extra ON7LDS NDDC messages by using the NDDC executable on this webpage. This Display Driver is an less likely to be updated frequently. This version of the Nextion Display Code WILL NOT respond to ANY of the AG4OJ EDDC sent messages, it will ignore them.
 
 The Nextion Display Code Version A
 The Nextion Display Code Version A Link. HELLO! Clicking this link will take you to 42 different code files for Nextion Displays. Types Nextion Basic, Discovery, Enhanced, and Intelligent, the Sizes are 2.4", 2.8", 3.2", 3.5", 4.3", 5.0", 7.0", and 10.1", with Two Landscape Orientations.
 

Nextion Display Code Version B For The AG4OJ EDDC

 
NDC Version B will only show Pi-Star/MMDVMHost and any extra AG4OJ EDDC messages by using the EDDC executable on this webpage. This Display Driver is an advanced version and is more likely to be updated more frequently by Me. This version of the Nextion Display Code WILL NOT respond to ANY of the ON7LDS NDDC sent messages, it will ignore them.
 
 The Nextion Display Code Version B
 The Nextion Display Code Version B Link. HELLO! Clicking this link will take you to 42 different code files for Nextion Displays. Types Nextion Basic, Discovery, Enhanced, and Intelligent, the Sizes are 2.4", 2.8", 3.2", 3.5", 4.3", 5.0", 7.0", and 10.1", with Two Landscape Orientations.
 
 Amateur Radio Callsign AG4OJ  Nextion Display Code Files - Version A  Nextion Display Code Files - Version B  AG4OJ's E-Mail Account
 

THIRD: Is Your Nextion Display Showing MMDVMHost Messages?

 
 Modem Connected Nextion Display
 
Modem Connected Nextion Display Settings.
 
 USB Connected Nextion Display
 
USB Connected Nextion Display Settings (HS - High Speed USB Connection).
 
DO NOT install ANY Display Driver Just YET! LOOK at the SETTINGS above!
 
LOOK! READ THIS SECTION COMPLETELY!
 
Make SURE that your NEXTION DISPLAY is ALREADY displaying values being sent by the MMDVMHost within Pi-Star!
 
Is It Already Displaying Your Callsign, The Date, And Time On The IDLE Screen?
 
Does It Switch To A Mode Screen When YOU or Someone else Is Transmitting?
 
If it is NOT, DO NOT Install ANY Display Driver just YET, this will only add to your installation headaches. Remember here, if it isnt working already, then theres a GOOD possibility that itll never work right! Go now and make sure it is working before you proceed. GET HELP to fix this situation BEFORE continuing with ANY Display Driver installation.
 
 Amateur Radio Callsign AG4OJ  Nextion Display Code Files - Version A  Nextion Display Code Files - Version B  AG4OJ's E-Mail Account
 

FOURTH: Did You Then Install The ON7LDS NDDC?

This is to say that YOU have already made sure that the Nextion Display is displaying the BASIC Pi-Star / MMDVMHost sent messages. Then, to install the ON7LDS Nextion Display Driver Code, described below, and make sure that it continues to WORK properly, as expected.
 
MAKE SURE: That after every command executed below that the command prompt remains in “(rw)” mode. IF it should change back to “(ro)” after executing a command, do another “rpi-rw” to get it back to “(rw)” mode first.
 
ALSO MAKE SURE: That the last command executes properly. IF it switched back to “(ro)” during the last command, something may be incompletely done. Watch for this, as this happens when it is least expected, causing problems that are hard to find. Do the “rpi-rw” again, get back to “(rw)”, then re-execute the last command when it doubt.
 
COMMAND COPY AND PASTE: You can copy and paste these commands into the Pi-Star SSH window. With your mouse, highlight the “BLACK COLORED TEXT With GRAY BACKGROUND” command below. Press CRTL-C. Go to your Pi-Star SSH Window. Click on the flashing cursor to make sure you are IN the SSH window.
 
With the mouse, right click in the flashing SSH cursor. When the menu pops-up, click on Paste from browser. Click inside of the ENTRY BOX and press CRTL-V to paste your copied command from this webpage into the dialog box. Press the OK button. The command should be pasted onto the SSH window command line. Press enter. DONE! Command executed!
 
<ENTER> Means press the ENTER KEY on the KEYBOARD.
 
... From The Pi-Star MENU -> Configuration -> Expert -> SSH Access ...
 
... From The Freshly Started Pi-Star SSH Access Window ...
 
pi-star login: pi-star <ENTER>
 
Password: raspberry <ENTER>
 
pi-star@pi-star(ro):~$ clear <ENTER>
 
This will clear the SSH window.
 
pi-star@pi-star(ro):~$ rpi-rw <ENTER>
 
This will make the SD Card Re-Writable.
 
pi-star@pi-star(rw):~$ sudo su <ENTER>
 
The prompt will change color. You will see “root” in the prompt. You are now what is called a “Super User DO”, Do things as the “root” user. This means every command we do from this point on will be executed without asking are we sure or not. Make sure you enter all commands correctly after this. We don't want to have to start from a fresh image install.
 
root@pi-star(rw):pi-star# df -hT /home <ENTER>
 
 Disk Free Command
 
Executing the command above should give the image above. Look at the value under the Size. If this closely matches the size of Your SD Card, all is well, continue below. IF NOT, then execute “pistar-expand” command, wait for it to finish. Then execute a “reboot” command, and start all over again.
 
SEE, this image above says “30G” for My 32 GB SD Card. Like I have said, itll be close in value. IF the SD card is NOT completely in use by the Raspberry Pi OS, then the “pistar-update” command below could FAIL to perform a complete update in some way.
 
root@pi-star(rw):pi-star# pistar-update <ENTER>
 
Executing the command above will make sure that your Raspberry Pi OS / MMDVMHost / Pi-Star installation is COMPLETELY up to date. This is very important, as everything depends on being current.
 
root@pi-star(rw):pi-star# pistar-upgrade <ENTER>
 
Executing the command above will see if your on the current version. RE-DO the last two commands until your completely updated and upgraded.
 
root@pi-star(rw):pi-star# cd /tmp <ENTER>
 
This will change the Raspberry Pi to the Temporary Directory.
 
!! IF !! this is the FIRST TIME installing the Nextion Display Driver, THEN We must make sure that the NextionDriver Executable is NOT already installed in the Pi-Star Image.
 
This one file being placed in the image will cause this FIRST TIME installation to "ACT" like it is installing, YET, it doesn't, it breaks the installation process. When you press enter, if it complains, then it's not there, no damage done. IF the command prompt just comes back, then it just removed the NextionDriver Executable, GREAT.
 
!! IF !! this is to UPDATE the Nextion Display Driver Installation, THEN SKIP THIS NEXT STEP!
 
root@pi-star(rw):tmp# rm /usr/local/bin/NextionDriver <ENTER>
 
Now, AS WE FOLLOWED THE PROCEDURES ABOVE, it should be OK to Get / Download the Nextion Display Driver.
 
root@pi-star(rw):tmp# git clone https://github.com/on7lds/NextionDriverInstaller.git <ENTER>
 
Next, AS WE FOLLOWED THE PROCEDURES ABOVE, it should be OK to Install / Update the Nextion Display Driver.
 
root@pi-star(rw):tmp# NextionDriverInstaller/install.sh <ENTER>
 
Next, At the bottom, when it's finished, we will answer “Y”. It will reboot the Pi-Star Hotspot and the added features of the Nextion Display Driver should begin to work. Congratulations, you just installed the Nextion Display Driver on your Pi-Star Hotspot. When the Pi-Star Hotspot finishes rebooting, this page should say “Connect” in the middle of it.
 
Press “Admin” in the Pi-Star “MENU” Above. Watch the Nextion Display show more items as the Display Driver “ENHANCES” what the Pi-Star / MMDVMHost is already sending to the Nextion Display.
 
 Nextion Display With Driver
 
Nextion Display Settings With Driver Installed (HS - High Speed USB Connection).
 
 Amateur Radio Callsign AG4OJ  Nextion Display Code Files - Version A  Nextion Display Code Files - Version B  AG4OJ's E-Mail Account
 

FIFTH: Did You Update The Database Files Used By The Driver?

 

Installing or Updating The Driver's Database Files

 
THE DATABASES: These following procedures help install the latest databases from RadioID.net and My Website. These databases are used by both drivers, the NDDC and the EDDC. SO, the following procedures are required for both drivers to display the up-to-date user information on the Nextion Display.
 
MAKE SURE: That after every command executed below that the command prompt remains in “(rw)” mode. IF it should change back to “(ro)” after executing a command, do another “rpi-rw” to get it back to “(rw)” mode first.
 
ALSO MAKE SURE: That the last command executes properly. IF it switched back to “(ro)” during the last command, something may be incompletely done. Watch for this, as this happens when it is least expected, causing problems that are hard to find. Do the “rpi-rw” again, get back to “(rw)”, then re-execute the last command when it doubt.
 
COMMAND COPY AND PASTE: You can copy and paste these commands into the Pi-Star SSH window. With your mouse, highlight the “BLACK COLORED TEXT With GRAY BACKGROUND” command below. Press CRTL-C. Go to your Pi-Star SSH Window. Click on the flashing cursor to make sure you are IN the SSH window.
 
With the mouse, right click in the flashing SSH cursor. When the menu pops-up, click on Paste from browser. Click inside of the ENTRY BOX and press CRTL-V to paste your copied command from this webpage into the dialog box. Press the OK button. The command should be pasted onto the SSH window command line. Press enter. DONE! Command executed!
 
<ENTER> Means press the ENTER KEY on the KEYBOARD.
 
... From The Pi-Star MENU -> Configuration -> Expert -> SSH Access ...
 
... From The Freshly Started Pi-Star SSH Access Window ...
 
pi-star login: pi-star <ENTER>
 
Password: raspberry <ENTER>
 
pi-star@pi-star(ro):~$ rpi-rw <ENTER>
 
pi-star@pi-star(rw):~$ sudo su <ENTER>
 
root@pi-star(rw):pi-star# mkdir code <ENTER>
 
IF executing the command above complains cannot create directory 'code': File exists, this is OK. It means that the directory already exists. Just continue to the next command. This isnt your first time doing this rodeo, lasso the next command, HA!
 
root@pi-star(rw):pi-star# cd code <ENTER>
 
Executing these last two commands above will initialize and place you in the DDC coding directory.
 
root@pi-star(rw):code# pwd <ENTER>
 
/home/pi-star/code
 
pwd Shows that I am in the right directory.
 
root@pi-star(rw):code# ls -al <ENTER>
 
1. Executing the “ls -al” command above will give a directory listing.
 
2. If you have done this section before, and theres a bunch of files listed, THEN
 
root@pi-star(rw):code# rm -r /home/pi-star/code/* <ENTER>
 
1. The command above will remove all of the files in the directory, including the Sub-Directories.
 
2. This way the directory /home/pi-star/code/ is now ready for a fresh Re-Start.
 
root@pi-star(rw):code# wget http://ag4oj.com/Scripts/getScripts.sh <ENTER>
 
root@pi-star(rw):code# chmod u+x getScripts.sh <ENTER>
 
root@pi-star(rw):code# mkdir Scripts <ENTER>
 
root@pi-star(rw):code# mv getScripts.sh Scripts/getScripts.sh <ENTER>
 
root@pi-star(rw):code# ./Scripts/getScripts.sh <ENTER>
 
The ./Scripts/getScripts.sh when executed will download and/or update all the required scripts for this webpage, making them executable, including refreshing the getScripts.sh file just executed.
 
root@pi-star(rw):code# ./Scripts/databases.sh <ENTER>
 
Executing the “./Scripts/databases.sh” will download the new database files, remove the old ones, and update them on the Pi-Star image. These are user.csv (From RadioID.net), userInfo.csv, BM_groups.txt, TGIF_groups.txt, FreeDMR_groups.txt, and DMR+_groups.txt files. The databases.sh script file will be left behind in the code/Scripts/ directory for future database updates at your leisure.
 
The BM_groups.txt, TGIF_groups.txt, FreeDMR_groups.txt, and DMR+_groups.txt files are for different DMR Networks. They allow for displaying the proper Talk Group Names for the intended Networks Talk Group Numbers. Setting this is done on the Pi-Star Configure -> Expert -> MMDVMHost -> NextionDriver section setting of the Groups File. Click Apply Changes and then REBOOT Pi-Star for the replacement database file to take effect.
 
root@pi-star(rw):code# ./Scripts/databases.sh stripped 1 <ENTER> (Alternate Version Example, See NOTES Below)
 
root@pi-star(rw):code# ./Scripts/databases.sh none 2 <ENTER> (Alternate Version Example, See NOTES Below)
 
ATTENTION: The “./Scripts/databases.sh” NOW can be suffixed with stripped/none and 1/2. The stripped.csv part will download the deprecated stripped.csv database file if you are still using it. Use none if your not using the stripped.csv database file.
 
The second parameter will allow pulling the RadioID.net databases from the AG4OJ.com server instead. Use 1 to get them from RadioID.net, use 2 to get them for AG4OJ.com. It appears that the RadioID.net server is getting very busy at times and it has been reported that it appears the databases.sh script seems to freeze, stop running.
 
This is far from the truth, the databases.sh script is waiting for a response from the RadioID.net server. I have seen this take up to two minutes to answer a file request. To help out the RadioID.net server, a latest version of the same databases are provided for download from the AG4OJ.com server through the use of the databases.sh script provided here.
 
 Amateur Radio Callsign AG4OJ  Nextion Display Code Files - Version A  Nextion Display Code Files - Version B  AG4OJ's E-Mail Account
 

SIXTH: Did You Update The MMDVMHost Settings File?

 

Editing The “mmdvmhost” Settings File

Once the ON7LDS Driver is installed, working, and the databases are updated, next the mmdvmhost Settings file has to be updated to make sure that the driver has all the parameters that the ON7LDS driver needs.
 
... From The Pi-Star MENU -> Configuration -> Expert -> SSH Access ...
 
... From The Freshly Started Pi-Star SSH Access Window ...
 
pi-star login: pi-star <ENTER>
 
Password: raspberry <ENTER>
 
pi-star@pi-star(ro):~$ rpi-rw <ENTER>
 
pi-star@pi-star(rw):~$ sudo su <ENTER>
 
root@pi-star(rw):~# nano /etc/mmdvmhost <ENTER>
 
This is a text edit of the mmdvmhost settings file. Its EXTREMELY IMPORTANT that you be VERY CAREFUL editing this mmdvmhost settings file. Arrow down until you find the area in the file with the areas shown below.
 
At the [NextionDriver] section, match up the variables to the ones shown below. Watch to keep the spaces between the sections. These are the current variables needed for the ON7LDS driver to function properly.
 
COMMAND COPY AND PASTE: You can copy and paste these lines into the Pi-Star SSH window. With your mouse, highlight the “WHITE COLORED TEXT With BLACK BACKGROUND” line(s) below. Press CRTL-C. Go to your Pi-Star SSH Window. Click on the flashing cursor to make sure you are IN the SSH window.
 
With the mouse, right click in the flashing SSH cursor. When the menu pops-up, click on Paste from browser. Click inside of the ENTRY BOX and press CRTL-V to paste your copied command from this webpage into the dialog box. Press the OK button. The command should be pasted onto the SSH window command line. Press enter. DONE! Command executed!
 
The SSH window may only allow one line being copied at a time. I've been told that a PUTTY session will allow multiple lines copied at a time. This area has been modified so multiple lines can be selected at a time without having to delete extra spaces and other text markers.
 
YOUR “[Nextion Driver]” section “Port=” value maybe different if your Nextion Display is connected to the MMDVM MODEM. Watch for this! IF so, change the “Port=/dev/ttyUSB0” shown below to “Port=modem”.
 
This setup below will change from using the stripped.csv database to the user.csv database. The stripped.csv file was deprecated in version 1.20 of the ON7LDS Nextion Driver.
 
[Nextion]
Port=/dev/ttyNextionDriver
Brightness=40
DisplayClock=1
UTC=0
ScreenLayout=4
IdleBrightness=10
DisplayTempInFahrenheit=1
 
[NextionDriver]
Port=/dev/ttyUSB0
DataFilesPath=/usr/local/etc/
LogLevel=2
GroupsFileSrc=https://api.brandmeister.network/v1.0/groups/
GroupsFile=groups.txt
DMRidFileSrc=https://www.radioid.net/static/user.csv
DMRidFile=user.csv
DMRidDelimiter=,
DMRidId=1
DMRidCall=2
DMRidName=3,4
DMRidX1=5
DMRidX2=6
DMRidX3=7
ShowModeStatus=0
RemoveDim=0
WaitForLan=1
SleepWhenInactive=600
SendUserDataMask=0b00000010
 
[OLED]
 
After making the proper edits to the mmdvmhost file with the nano editor;
 
1. CTRL-O will bring up a line with the file name to save, /etc/mmdvmhost.
 
2. PRESS the ENTER KEY. The line will disappear. Then saying so many lines written.
 
3. CTRL-X will close the nano text editor and return you to the command prompt.
 
root@pi-star(rw):~# reboot <ENTER>
 
OR ...
 
root@pi-star(rw):~# exit <ENTER>
 
pi-star@pi-star(rw):~$ exit <ENTER>
 
Remember here, it's always proper to logout properly out of the SSH window. By doing so, you are telling the Raspberry Pi OS that you are finished and this doesn't leave any possible processes running that you may have started. They all need to be terminated / stopped properly.
 
Doing the two “exit” commands above will close the “SSH Window” properly and leave the Raspberry Pi OS running. Doing a “reboot” will restart the Raspberry Pi OS. Here a “reboot” will be needed to make the changes made to the MMDNMHost settings file take effect.
 
 Amateur Radio Callsign AG4OJ  Nextion Display Code Files - Version A  Nextion Display Code Files - Version B  AG4OJ's E-Mail Account
 

SEVENTH: The AG4OJ EDDC Executable Requirements

The EDDC below needs an unhindered Bi-Directional Data Flow Connection. The EDDC needs the Nextion Display to be connected to the Raspberry Pi through a USB to TTL device. This type of connection is something that is NOT always possible with a MMDVM Modem Hat connected Nextion Display. Some will work, most will not.
 
USE of the EDDC below on a MMDVM Modem Connected Nextion Displays are NO LONGER recommended OR Supported by Me. Please use the Version A of the NDC and the ON7LDS NDDC for all MMDVM Modem connections.
 
 Amateur Radio Callsign AG4OJ  Nextion Display Code Files - Version A  Nextion Display Code Files - Version B  AG4OJ's E-Mail Account
 

The EDDC Executable Introduction

As I Dig Into The ON7LDS NDDC

This will take time. I wish to first not break anything that it already does. This means that as I dig into the ON7LDS NDDC, it will be slow going. Releases may have to wait so that I can thoroughly inspect My changes and make sure that it ONLY enhances what it used to do. I hope that you understand My way of thinking, and, that I dont want you using anything partially coded, half baked.
 

Installing The Enhanced Display Driver Code Below

This code is meant to compile and respond similarly to the ON7LDS NDDC. Its what has been done under the hood is what usually matters. This means that the compiled NDC flashed to your Nextion Display should know of any changes documented in the EDDC Release Notes Link. 
 

This Is Your Final WARNING Before YOU Proceed

I assume from this point on that YOU are advanced enough to understand what is going on when you take the following actions below. This is your final WARNING that you are about to make your Pi-Star -> MMDVMHost -> Nextion Display Driver Code, NDDC -> Nextion Display(Nextion Display Code) installation switch to using this Enhanced Display Driver Code, EDDC.
 
 Amateur Radio Callsign AG4OJ  Nextion Display Code Files - Version A  Nextion Display Code Files - Version B  AG4OJ's E-Mail Account
 

The Enhanced Display Driver Code Executable

September 1st, 2022, Release v220901

Hello! Welcome to the Editing and Expanding project for this Enhanced Display Driver Code. This so I can make it do more than it has ever done before. You will have to have the latest version of ON7LDS Nextion Display Driver already installed and working.
 

EDDC Executable Release Notes

 The EDDC Release Notes
 The EDDC Release Notes Link. These Release Notes are for those who are writing their own Nextion Display Code and are looking to use the extra functionality of this EDDC. This version supplied here will compile and has been tested to work as documented within these Release Notes. ENJOY!
 

Installation Procedures For The EDDC Executable

 
 Amateur Radio Callsign AG4OJ  Nextion Display Code Files - Version A  Nextion Display Code Files - Version B  AG4OJ's E-Mail Account

Part B1: Downloading And Compiling The Enhanced Display Driver Code Files

 
... From The Pi-Star MENU -> Configuration -> Expert -> SSH Access ...
 
... From The Freshly Started Pi-Star SSH Access Window ...
 
pi-star login: pi-star <ENTER>
 
Password: raspberry <ENTER>
 
pi-star@pi-star(ro):~$ rpi-rw <ENTER>
 
pi-star@pi-star(rw):~$ sudo su <ENTER>
 
root@pi-star(rw):pi-star# cd code <ENTER>
 
root@pi-star(rw):code# pwd <ENTER>
 
/home/pi-star/code
 
root@pi-star(rw):code# ./Scripts/getIt.sh <ENTER>
 
Executing these commands above will download the Enhanced Display Driver code files to the /home/pi-star/code directory. The executing of the ./Scripts/getIt.sh script in the future makes sure that you have downloaded the latest version of the code.
 
 Amateur Radio Callsign AG4OJ  Nextion Display Code Files - Version A  Nextion Display Code Files - Version B  AG4OJ's E-Mail Account

Part B2: Installing The Enhanced Display Driver Code Files

 
root@pi-star(rw):code# ./Scripts/moveIt.sh <ENTER>
 
OK, downloaded the source code and make just compiled the file, WITH NO ERRORS WERE REPORTED. Doing this next command above now moves the NextionDriver executable into position and provides a visual check.
 
 Amateur Radio Callsign AG4OJ  Nextion Display Code Files - Version A  Nextion Display Code Files - Version B  AG4OJ's E-Mail Account

Part B3: MMDVMHost - Editing The “mmdvmhost” Settings File

 
... From The Pi-Star MENU -> Configuration -> Expert -> SSH Access ...
 
... From The Freshly Started Pi-Star SSH Access Window ...
 
pi-star login: pi-star <ENTER>
 
Password: raspberry <ENTER>
 
pi-star@pi-star(ro):~$ rpi-rw <ENTER>
 
pi-star@pi-star(rw):~$ sudo su <ENTER>
 
root@pi-star(rw):~# nano /etc/mmdvmhost <ENTER>
 
This is a text edit of the mmdvmhost settings file. Its EXTREMELY IMPORTANT that you be VERY CAREFUL editing this mmdvmhost settings file. Arrow down until you find the area in the file with the areas shown below. YOUR Port= values maybe different if your Nextion Display is connected to the MMDVM MODEM.
 
At the bottom of the [NextionDriver] section, add spaces for the variables, ScreenSaver, GenerateCPU, HostMsgFlags, and NextMsgFlags for the EDDC Driver. The [NextionDriver] variables list combines what the NDDC and EDDC needs Ive included a copyable reference to everything that has to do with the Nextion Display. Watch to keep the spaces between the sections.
 
COMMAND COPY AND PASTE: You can copy and paste these lines into the Pi-Star SSH window. With your mouse, highlight the “WHITE COLORED TEXT With BLACK BACKGROUND” line(s) below. Press CRTL-C. Go to your Pi-Star SSH Window. Click on the flashing cursor to make sure you are IN the SSH window.
 
With the mouse, right click in the flashing SSH cursor. When the menu pops-up, click on Paste from browser. Click inside of the ENTRY BOX and press CRTL-V to paste your copied command from this webpage into the dialog box. Press the OK button. The command should be pasted onto the SSH window command line. Press enter. DONE! Command executed!
 
The SSH window may only allow one line being copied at a time. I've been told that a PUTTY session will allow multiple lines copied at a time. This area has been modified so multiple lines can be selected at a time without having to delete extra spaces and other text markers.
 
[Nextion]
Port=/dev/ttyNextionDriver
Brightness=40
DisplayClock=1
UTC=0
ScreenLayout=4
IdleBrightness=10
DisplayTempInFahrenheit=1
 
[NextionDriver]
Port=/dev/ttyUSB0
DataFilesPath=/usr/local/etc/
LogLevel=2
GroupsFileSrc=https://api.brandmeister.network/v1.0/groups/
GroupsFile=groups.txt
DMRidFileSrc=https://www.radioid.net/static/user.csv
DMRidFile=user.csv
DMRidDelimiter=,
DMRidId=1
DMRidCall=2
DMRidName=3,4
DMRidX1=5
DMRidX2=6
DMRidX3=7
ShowModeStatus=0
RemoveDim=0
WaitForLan=1
SleepWhenInactive=600
SendUserDataMask=0b00000010
ScreenSaver=30
GenerateCPU=10
HostMsgFlags=0037
NextMsgFlags=0023
ShowIndexes=0000
 
[OLED]
 
IF your are using a MMDVM Modem Connected Nextion Display, scrolling back towards the top, ensure the following section is setup for Transparent Data, which is required for the MMDVM Modem connected Nextion Display.
 
[Transparent Data]
Enable=1
RemoteAddress=127.0.0.1
RemotePort=40094
LocalPort=40095
SendFrameType=1
 
After making the proper edits to the mmdvmhost file with the nano editor;
 
1. CTRL-O will bring up a line with the file name to save, /etc/mmdvmhost.
 
2. PRESS the ENTER KEY. The line will disappear. Then saying so many lines written.
 
3. CTRL-X will close the nano text editor and return you to the command prompt.
 
 Amateur Radio Callsign AG4OJ  Nextion Display Code Files - Version A  Nextion Display Code Files - Version B  AG4OJ's E-Mail Account

Part B4: Changing The Nextion Display Code

 
root@pi-star(rw):code# reboot <ENTER>
 
Rebooting will allow the new database files, the mmdvmhost settings file edits, and the EDDC to take effect. You should now see what the EDDC sends to My Nextion Display Code Version B. If you havent updated the Nextion Display Code on your Nextion Display to the latest Version B;
 
 
 Amateur Radio Callsign AG4OJ  Nextion Display Code Files - Version A  Nextion Display Code Files - Version B  AG4OJ's E-Mail Account

Part B5: MMDVMHost - Explaining The Settings Page

 
The Nextion and Nextion Driver Sections
 
Pi-Star MENU -> Configuration -> Expert -> MMDVMHost. Scroll down to see the two Nextion Display sections below. This will show that you have done the proper edits to the mmdvmhost file.
 
 MMDVMHost Expert Settings Page
 
The GREEN ARROWS shows where to adjust the IDLE and MODE screen brightness.
 
These values are usually set to between 5 to 100.
 
The EDDC and NDC VerB gives you complete control over the screen brightness.
 
The NDDC and NDC VerA still has some internal influence on the screen brightness.
 
The BLUE ARROW is where you change the Talk Groups names file for each DMR Network.
 
The groups.txt is for The Brandmeister Network. (Pi-Star Provided and Updated)
 
The BM_groups.txt is for The Brandmeister Network. (UNIX ANSI)
 
The TGIF_groups.txt is for the TGIF Network. (UNIX ANSI)
 
The FreeDMR_groups.txt is for the Free DMR Network. (UNIX ANSI)
 
The DMR+_groups.txt is for the DMR+ Network. (UNIX ANSI)
 
The BROWN ARROW is where you change the user database file name.
 
The userInfo.csv / user.csv (RadioID.net) is for the newer lookup database version.
 
!!! ATTENTION: The EDDC v210818 and future versions will REQUIRE userInfo.csv / user.csv file format.
 
The stripped.csv is for the older lookup database version. (NDDC DEPRECATED In v1.20)
 
!!! ATTENTION: The “./Scripts/databases.sh stripped” command will provide a “stripped.csv” user database file. This will provide a way to continue using an up to date “stripped.csv” file format with the older versions of the NDDC ON7LDS/EA5KL driver.
 
!!! ATTENTION: My userInfo.csv file has always contained many more user contacts than the RadioID.net user.csv file. This is due to two reasons;
 
ONE, From the beginning when I started keeping my own user databases in mid 2019 ish, when RadioID.net would delete a user record, my database retained them. They were ONLY replaced when RadioID.net reassigned them to a NEW user, which is rarely done at this point.
 
TWO, and even more important, the EDDC and NDCVerB will now show user information on ALL of the mode Screens, not just the DMR screen. Users that ONLY use these other modes are being added. This means that My userInfo.csv file contains many more users than the usually downloaded RadioID.net user.csv, which is a DMR ONLY database file.
 
The VIOLET ARROWS shows the numbers used to handle each type of user database.
 
The LEFT MOST NUMBERS are for the userInfo.csv / user.csv (RadioID.net) database.
 
The RIGHT MOST NUMBERS are for the stripped database. (NDDC DEPRECATED In v1.20)
 
!!! ATTENTION: The EDDC ALWAYS ignores these number assignments.
 
!!! ATTENTION: 1-2-3,4-5-6-7 is for userInfo.csv / user.csv (RadioID.net) databases.
 
ATTENTION: The “./Scripts/databases.sh stripped” command will provide a “stripped.csv” user database file. This will provide a way to continue using an up to date “stripped.csv” file format with the older versions of the NDDC ON7LDS/EA5KL driver.
 
The RED ARROWS are the added MMDVMHost settings for the EDDC.
 
The ScreenSaver is the Screen Saver TimeOut in seconds. A ZERO turns it OFF.
 
The GenerateCPU set the frequency in seconds which the CPU parms are updated. A ZERO turns it OFF.
 
The HostMsgFlags & NextMsgFlags - SEE EDDC Release Notes Webpage.
 
 
 Amateur Radio Callsign AG4OJ  Nextion Display Code Files - Version A  Nextion Display Code Files - Version B  AG4OJ's E-Mail Account

Part B6: MMDVMHost - Making The ID Numbers Show On The Nextion Display

 
The DMR / P25 ID Lookup Section
 
Pi-Star MENU -> Configuration -> Expert -> MMDVMHost. Scroll down to see the DMR Id Lookup (And used for P25) section below. This is where it has to be changed to show the DMR ID (And used for P25) number on the Nextion Display Code.
 
 MMDVMHost DMR Id Lookup 1
 
In the image above, it shows the default settings used to point to the Database file that the MMDVMHost uses to translate the user DMR ID number (And P25) into a Callsign and short name. The time value is for how often to check for updates.
 
 MMDVMHost DMR Id Lookup 2
 
In the images above, it shows the changed name Database file. This is a created empty file by the ./Scripts/databases.sh script. It is used to give the MMDVMHost a default file to look at, that is empty of DMR / P25 IDs. The time is changed to ZERO, as there is no need to do an update. This will allow all of the user DMR / P25 IDs to pass through the MMDVMHost to the EDDC and then onto the NDC VerB code on the Nextion Display.
 
There is one problem to all of this. These translation tables are used to show the callsigns on the Pi-Star ADMIN screen. By changing this, Pi-Star will no longer show callsigns on DMR and P25 on the Admin webpage. It will only show the DMR / P25 ID numbers. They can still be clicked on the ADMIN screen and will still show user information from RadioID.net. This is how the EDDC can get the DMR / P25 numbers to show on the Nextion Display.
 
The NXDN ID Lookup Section
 
In Production Testing.
 
 Amateur Radio Callsign AG4OJ  Nextion Display Code Files - Version A  Nextion Display Code Files - Version B  AG4OJ's E-Mail Account

Part B7:  Putting All The Commands In One Place

 
The EDDC Cheat Sheet
 
So, You've done all the hard work above. Now it's time to be able to do maintenance.
 
... From The Pi-Star MENU -> Configuration -> Expert -> SSH Access ...
 
... From The Freshly Started Pi-Star SSH Access Window ...
 
pi-star login: pi-star <ENTER>
 
Password: raspberry <ENTER>
 
pi-star@pi-star(ro):~$ rpi-rw <ENTER>
 
pi-star@pi-star(rw):~$ sudo su <ENTER>
 
root@pi-star(rw):pi-star# pistar-update <ENTER> (OPTIONAL, WEEKLY?)
 
root@pi-star(rw):pi-star# pistar-upgrade <ENTER> (OPTIONAL, WEEKLY?)
 
root@pi-star(rw):pi-star# cd code <ENTER>
 
root@pi-star(rw):code# ./Scripts/getScripts.sh <ENTER> (Update The Scripts)
 
root@pi-star(rw):code# ./Scripts/databases.sh <ENTER> (user databases)
 
root@pi-star(rw):code# ./Scripts/getIt.sh <ENTER> (Get / Compile The EDDC)
 
root@pi-star(rw):code# ./Scripts/moveIt.sh <ENTER> (Move The EDDC Into Place)
 
root@pi-star(rw):code# reboot <ENTER>
 
OK, I get it! So, You've looking for a all-in-one Script? An Autopilot? Here You Go!
 
... From The Pi-Star MENU -> Configuration -> Expert -> SSH Access ...
 
... From The Freshly Started Pi-Star SSH Access Window ...
 
pi-star login: pi-star <ENTER>
 
Password: raspberry <ENTER>
 
pi-star@pi-star(ro):~$ rpi-rw <ENTER>
 
pi-star@pi-star(rw):~$ sudo su <ENTER>
 
root@pi-star(rw):pi-star# cd code <ENTER>
 
root@pi-star(rw):code# ./Scripts/doIt.sh <ENTER> (DO ALL Of The Update Scripts)
 
root@pi-star(rw):code# ./Scripts/doIt.sh stripped 1 <ENTER> (Alternate Version Example, See NOTES Below)
 
root@pi-star(rw):code# ./Scripts/doIt.sh none 2 <ENTER> (Alternate Version Example, See NOTES Below)
 
ATTENTION: The “./Scripts/doIt.sh” NOW can be suffixed with stripped/none and 1/2. The stripped.csv part will download the deprecated stripped.csv database file if you are still using it. Use none if your not using the stripped.csv database file.
 
The second parameter will allow pulling the RadioID.net databases from the AG4OJ.com server instead. Use 1 to get them from RadioID.net, use 2 to get them for AG4OJ.com. It appears that the RadioID.net server is getting very busy at times and it has been reported that it appears the databases.sh script seems to freeze, stop running.
 
This is far from the truth, the databases.sh script is waiting for a response from the RadioID.net server. I have seen this take up to two minutes to answer a file request. To help out the RadioID.net server, a latest version of the same databases are provided for download from the AG4OJ.com server through the use of the doIt.sh/databases.sh script provided here.
 
 Amateur Radio Callsign AG4OJ  Nextion Display Code Files - Version A  Nextion Display Code Files - Version B  AG4OJ's E-Mail Account

Re-Installing / Changing The NDDC Version

 
Installing the EDDC Executable above can be easily over-written, undone by doing the steps below. I now provide several different versions of the NDDC below that can be re-installed.
 
The extra older versions provided below are mostly for My developers/programmers to use. They are included here for backward compatibility, testing, and trouble shooting. I just make them available to everyone else who wishes to do their own developing/programming of the Display Drivers provided on this website.
 
 Installing The ON7LDS NDDC
 Installing The ON7LDS NDDC Link. ATTENTTION: IF YOU have never installed the ON7LDS Nextion Display Code, THEN YOU must do that now. The procedures below will not work until you do. Click on the links associated with this paragraph to go and do this before proceding below.
 
 EDDC - Part B1
 EDDC - Part B1 Link. ATTENTTION: IF YOU have never done Part B1 procedures above, THEN YOU will need to do Part B1 (ONLY) above before starting with Part A1 below. Click on the links associated with this paragraph to go and do this now, otherwise the procedures below will not work right.
 
!!! ATTENTION: These Versions Below Are Modified By Me, They Now Include The Ability To Handle 250,000 Contacts and 2,500 Groups.
 
The User Databases Provided By Me On This Website Exceed 227,000 User DMR Contacts.
 

The ON7LDS NDDC

 
root@pi-star(rw):code# ./Scripts/ON7LDS.sh 119 <ENTER>
 
210122 - The v1.19 version above is the original ON7LDS version. With the Pi-Star update on 06/07/21, it included the updated MMDVMHost which stopped transmitting the t31 LOCATION message. (Changed in the August 27th, 2020 release of the MMDVMHost) This version, when installed, will NO LONGER show the t31 LOCATION message.
 
root@pi-star(rw):code# ./Scripts/ON7LDS.sh 119A <ENTER>
 
210610 - The v1.19A version above is the version where I added in the t31 LOCATION message, added in the extra code. With the Pi-Star update on 06/07/21, it included the updated MMDVMHost which stopped transmitting the t31 LOCATION message. (Changed in the August 27th, 2020 release of the MMDVMHost)
 
root@pi-star(rw):code# ./Scripts/ON7LDS.sh 120 <ENTER>
 
210615 - The v1.20 version link above. This version includes some new extra features that are not fully tested or implemented by Me. After several GitHub changes over the course of two days after its first release, it appears that the changes to this version have stopped, stabilized for now.
 
root@pi-star(rw):code# ./Scripts/ON7LDS.sh 121 <ENTER>
 
210806 - This version includes splitting of the configuration files.
 
root@pi-star(rw):code# ./Scripts/ON7LDS.sh 122 <ENTER>
 
210904 - This is version v1.22 of the ON7LDS Driver.
 
root@pi-star(rw):code# ./Scripts/ON7LDS.sh 123 <ENTER>
 
220201 - This is version v1.23 of the ON7LDS Driver.
 
root@pi-star(rw):code# ./Scripts/ON7LDS.sh 124 <ENTER>
 
220201 - This is version v1.24 of the ON7LDS Driver.
 
root@pi-star(rw):code# ./Scripts/ON7LDS.sh 125 <ENTER>
 
220323 - The v1.25 version above is the latest ON7LDS version.
 

The EA5KL NDDC

 
root@pi-star(rw):code# ./Scripts/EA5KL.sh 1241 <ENTER>
 
190930 - The v1.241 version above is the latest EA5KL version. This is provided to allow those who wish to have the user info displayed on other MODES besides DMR.
 

Re-Installing / Changing The NDDC

 
 Amateur Radio Callsign AG4OJ  Nextion Display Code Files - Version A  Nextion Display Code Files - Version B  AG4OJ's E-Mail Account

Part A1: Downloading And Compiling The ON7LDS Nextion Display Driver Code Files

 
... From The Pi-Star MENU -> Configuration -> Expert -> SSH Access ...
 
... From The Freshly Started Pi-Star SSH Access Window ...
 
pi-star login: pi-star <ENTER>
 
Password: raspberry <ENTER>
 
pi-star@pi-star(ro):~$ rpi-rw <ENTER>
 
pi-star@pi-star(rw):~$ sudo su <ENTER>
 
root@pi-star(rw):pi-star# cd code <ENTER>
 
root@pi-star(rw):code# pwd <ENTER>
 
/home/pi-star/code
 
root@pi-star(rw):code# ./Scripts/getScripts.sh <ENTER>
 
root@pi-star(rw):code# ./Scripts/ON7LDS.sh 125 <ENTER>
 
Executing these commands above will download the ON7LDS Nextion Display Driver code files to the /home/pi-star/code directory. The ./Scripts/ON7LDS.sh 125 Script file is one available from the list above.
 
 Amateur Radio Callsign AG4OJ  Nextion Display Code Files - Version A  Nextion Display Code Files - Version B  AG4OJ's E-Mail Account

Part A2: Installing The ON7LDS Nextion Display Driver Code Files

 
root@pi-star(rw):code# ./Scritps/moveIt.sh <ENTER>
 

Part A3: Changing The Nextion Display Code

 
root@pi-star(rw):code# reboot <ENTER>
 
Rebooting will allow the ON7LDS Nextion Display Driver Code, the NDDC to take effect. If you havent updated the Nextion Display Code on your Nextion Display to the latest Version A;
 
 
 Amateur Radio Callsign AG4OJ  Nextion Display Code Files - Version A  Nextion Display Code Files - Version B  AG4OJ's E-Mail Account

Flashing The Nextion Screen From Within

 

Flashing A Nextion Display Connected By A USB To TTL Device

 
 Amateur Radio Callsign AG4OJ  Nextion Display Code Files - Version A  Nextion Display Code Files - Version B  AG4OJ's E-Mail Account

Part C1: Setting Up For A USB To TTL Flash

 
The fastest way to flash a Nextion Display is by using a SD Card and placing it into the SD Card slot on the back of the Nextion Display. The second fastest way is by flashing the Nextion Display through the Nextion Editor. The least fastest way is by using the script below. This script is provided for those who wish not to take their hotspots apart just to update the display.
 
... From The Pi-Star MENU -> Configuration -> Expert -> SSH Access ...
 
... From The Freshly Started Pi-Star SSH Access Window ...
 
pi-star login: pi-star <ENTER>
 
Password: raspberry <ENTER>
 
pi-star@pi-star(ro):~$ rpi-rw <ENTER>
 
pi-star@pi-star(rw):~$ sudo su <ENTER>
 
root@pi-star(rw):pi-star# cd code <ENTER>
 
root@pi-star(rw):code# pwd <ENTER>
 
/home/pi-star/code
 
root@pi-star(rw):code# ./Scripts/flashIt.sh PARM1 PARM2 PARM3 PARM4 PARM5 <ENTER>
 
PARM1 = 220901 (Current VERSION NUMBER, 220401 Still downloadable)
 
PARM2 = NB, ND, NE, NI (Nextion Basic, Discovery, Enhanced, Intelligent)
 
PARM3 = 02.4, 02.8, 03.2, 03.5, 04.3, 05.0, 07.0, 10.1 (Display Size)
 
PARM4 = WL, WR, EA7KDO (Wires Left, Wires Right, EA7KDO ALT FILE)
 
PARM5 = A, B (NDCVerA, NDCVerB)
 
As you can see above, the ./Scritps/flashIt.sh script is coded for every version of Nextion Display Code on this website. NE 02.4 EA7KDO A or NE 03.5 EA7KDO A will flash the latest EA7KDO Nextion Display Files.
 
!!! ATTENTION: The directions above only flashes the "TGIFSPOT" EA7KDO 2.4" or 3.5" Nextion display code. There is a few more steps required to have a complete "TGIFSPOT" of your own.
 
The complete directions to having a "TGIFSPOT" using the EA7KDO 3.5" Nextion Display Code is not presently available on this webpage. Please follow, Click this link to do that, 3.5 Inch TGIFSPOT EA7KDO Directions 
 
The complete directions to having a "TGIFSPOT" using the EA7KDO 2.4" Nextion Display Code is not presently available on this webpage. Please follow, Click this link to do that, 2.4 Inch TGIFSPOT EA7KDO Directions 
 
 Amateur Radio Callsign AG4OJ  Nextion Display Code Files - Version A  Nextion Display Code Files - Version B  AG4OJ's E-Mail Account

Part C2: Rebooting

 
root@pi-star(rw):code# reboot <ENTER>
 

Feedback Here Is Important, Getting HELP

 AG4OJ's E-Mail Account
 My Email Link Is To The Left. So, if you see, or even think you see a mistake, PLEASE send Me a short Email with all of the details so I can correct it. Help is always available by this Email address. Further contact can be done by agreed upon phone call. OR send some praises! Its all GOOD to ME! TEAM AG4OJ! ENJOY!