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 it’s 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 Website’s 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 AG4OJ Display Driver)
The NDDC (The ON7LDS Display Driver)
Flashing The Nextion Display
The First Seven Steps Before Anything Else Is Done
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.
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.
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 manufacturer’s display Firmware on a new display will only show their display’s 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.
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 doesn’t work.
For The Raspberry Pi OS, Pi-Star, and the MMDVMHost, always do a “sudo pistar-update” in the Pi-Star’s ssh window. A “sudo pistar-upgrade” maybe in order also. Doing these will save a lot of headaches from a non-current Raspberry Pi’s 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 don’t understand how to do any of this stuff.
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 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 most of them.
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.
THIRD: Is Your Nextion Display Showing MMDVMHost Messages?
Modem Connected Nextion Display Settings.
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 isn’t working already, then there’s a GOOD possibility that it’ll 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.
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>
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, it’ll 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 ANY INSTALLED NextionDriver Executable Program is NOT already present on the Pi-Star Image. If it is then we must rename it before proceeding. When you press enter on the first step below, if it complains, then it's not there, no damage done. IF the command prompt just comes back, then it just RENAMED the ORIGINAL IMAGE NextionDriver Executable, GREAT.
!! IF !! this is to UPDATE the Nextion Display Driver Installation, THEN SKIP THE NEXT TWO STEP!
ATTENTION: We Now Save The Older Driver So It Can Be Re-Installed Later If Necessary. WE do no harm in trying to make the Pi-Star / WPSD image work better for US. This means making an easy reversal back to the original state of the respective image easy to do.
ATTENTION: We Now Have Another type of MMDVM Hotspot Image - It's Called WPSD (https://W0CHP.radio).
DO NOT DO THE NEXT THREE STEPS TO WPSD. WPSD has a WPSD version of the Nextion Driver installed and working. By trying to install the Nextion Driver again, YOU most probably WILL break the WPSD image and it will make YOU start from scratch. IN OTHER WORDS, Re-Image the SD Card from scratch, START ALL OVER AGAIN.
It's March 8th 2024. This is a WARNING before YOU proceed. I'm actively working on checking the two versions of Pi-Star (W/ OS versions Buster and Bullseye) and W0CHP (WPSD). As I do my own testing, installing the ON7LDS Nextion Driver from GitHub maybe considered destructive to BOTH versions of the MMDVM HotSpot Software. Proceed at YOUR OWN risks, meaning, be ready to start from a fresh image IF things go horribly wrong.
AT THIS POINT IN TIME, skipping the next three steps maybe in the best interests for all involved. SOME have my driver working on the latest versions of Pi-Star and WPSD. YET, as they have told me, they have to do work-a-rounds, skipped steps, and modified steps to get things working. ONCE AGAIN, proceed at YOUR OWN RISKS at this time. This is until I can complete my own testing.
root@pi-star(rw):tmp# mv /usr/local/bin/NextionDriver /usr/local/bin/NextionDriver.old <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 Settings With Driver Installed (HS - High Speed USB Connection).
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 isn’t 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 there’s 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 “userOrg.csv”, “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 Network’s 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 <ENTER> (Alternate Version Example, See NOTES Below)
root@pi-star(rw):code# ./Scripts/databases.sh none <ENTER> (Alternate Version Example, See NOTES Below)
ATTENTION: The “./Scripts/databases.sh” NOW can be suffixed with stripped/none. 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.
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.
Go To Pi-Star MENU -> Configuration -> Expert -> MMDVMHost. Scroll down to see the two Nextion Display sections below. This should now look like the image below.
... 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. It’s 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]
IF your are using a MMDVM Modem Connected Nextion Display, scrolling back towards the top of the MMDVM Host Settings File, ensure the following section is setup for Transparent Data, which is required for the MMDVM Modem connected Nextion Display to return display commands back to the ON7LDS NDDC. This is supposed to work, YET, it didn't always work right for me.
[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.
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.
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.
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 don’t 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. It’s 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.
The Enhanced Display Driver Code Executable
January 1st, 2024, Release v240101
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 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
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 AG4OJ 240101 BIN <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.
Executing the ./Scripts/getIt.sh now comes with optional switches which are mandatory for the script to run. They are defined below. Don't mix version driver stream numbers from one supply stream name with those from another driver supply stream name. The script will not run, it will just throw errors, and confuse you.
Part B2: Installing The Enhanced Display Driver Code Files
OK, If you skipped renaming the NetionDriver above due to running WPSD, this is when it will be time to do it.
root@pi-star(rw):code# ls -al /usr/local/bin/NextionDriver.old <ENTER>
If the command above says the file does not exist, then the next thing to do is the command below. Otherwise, if you get a listing, then there is no need to do the command below this paragraph.
root@pi-star(rw):code# mv /usr/local/bin/NextionDriver /usr/local/bin/NextionDriver.old <ENTER>
OK, you got the new NextionDriver ready to install. Doing this next command below now moves the new NextionDriver executable into position and provides a visual check.
root@pi-star(rw):code# ./Scripts/moveIt.sh <ENTER>
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. It’s 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 I’ve 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]
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.
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 haven’t updated the Nextion Display Code on your Nextion Display to the latest Version B;
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.
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 / userOrg.csv is for the newer lookup database version.
!!! ATTENTION: The EDDC v210818 and future versions will REQUIRE userInfo.csv / userOrg.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 would retain 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 230713 UPDATE, ATTENTION: My userInfo.csv is updated from the RADIOID.NET user.csv file as often as I can get it done. Though my scripts used to download user.csv file directly from RADIOID.NET into Pi-Star, this behavior has been stopped by special request. My scripts no longer downloads / over-writes the Pi-Star user.csv file.
This way the update / upgrade scripts in Pi-Star has the ability to maintain the RADIOID.NET DMR user.csv file in it own way without any interference from My scripts. My scripts NOW provide a user.csv COPY, NAMED userOrg.csv. This is the same date file used to update the userInfo.csv file.
There are times right now that the userOrg.csv and userInfo.csv files maybe slightly behind the current RADIOID.NET user.csv file version. Due to my ongoing sicknesses, I stay on top of this the best I can.
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 ShowIndexes - SEE EDDC Release Notes Webpage.
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.
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.
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.
In the image 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/NXDN 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/NXDN 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 ares used to show the callsigns on the Pi-Star ADMIN screen. By changing this, Pi-Star will no longer show callsigns on DMR, P25, and NXDN on the Admin webpage. It will only show the DMR/P25/NXDN 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/NXDN/P25 numbers to show on the Nextion Display.
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 AG4OJ 240101 BIN <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)
Re-Installing / Changing The NDDC Version
Installing the EDDC Executable above can be easily over-written, undone by doing the steps below.
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 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.
Re-Installing / Changing The NDDC
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/getIt.sh ON7LDS 125 BIN <ENTER>
Executing these commands above will download the ON7LDS Nextion Display Driver code files to the “/home/pi-star/code” directory. The “./Scripts/getIt.sh ON7LDS 125 BIN” Script file is one available from the list above.
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 haven’t updated the Nextion Display Code on your Nextion Display to the latest Version A;
Flashing The Nextion Screen From Within
Flashing A Nextion Display Connected By A USB To TTL Device
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 = 240101 (Current VERSION NUMBER) 230401 (Still Available)
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 (Wires Left, Wires Right)
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.
Part C2: Rebooting
root@pi-star(rw):code# reboot <ENTER>
Feedback Here Is Important, Getting HELP
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! It’s all GOOD to ME! TEAM AG4OJ! ENJOY!
Part C3: Miscellaneous Notes On Programming A Nextion Display
Important Notes: Connecting Your Nextion Display
Connecting The Wires: Connecting the Nextion Display to the modem will make the POWER and REBOOT buttons inoperable, NOT WORK. NOW, I've been told that there are ways to get this to work, YET, they have to prove to me that it is as flawless at this time and as simple as the USB to TTL device connection.
Important Notes: Programming Your Nextion Display
Your Nextion Display: Make sure that the Nextion Display version number on the back side of it matches the download link you select below. Otherwise, if you download the wrong tft file, it will not load on your Nextion Display. You might have a 3.5" display, yet, there are Basic and Enhanced versions. AND each one of those has two different landscape versions.
Using The Nextion Editor: You can use the Nextion Editor to load the tft files below onto your Nextion Display. This requires a USB to TTL device. Connect the Nextion Display to the USB to TTL device, then plug it into a computer USB port. The Nextion Display should power on.
Press "Upload" on the Nextion Editor, find where the downloaded tft file is and load it. A dialog box will open. Press "Go". The Nextion Editor will find your computer connected Nextion Display and program it with the tft file you loaded. This is a great way to test your USB to TTL device connected to the Nextion Display. This making sure that they are working properly before you connect them to your hotspot.
Errors Happen when the Nextion Display is not properly connected to the USB to TTL device OR the wrong tft file has been loaded into the Nextion Editor to program the USB to TTL connected Nextion Display. Make sure you download and load the correct tft file for your connected Nextion Display.
Using A Micro SD Card: 32GB SD card or smaller. Format the SD card FAT32. Download the tft file, place it on the SD card, making sure it is the only file on the SD card. Power OFF the Nextion Display. With the back-side of the Nextion Display facing upward and the SD card's text facing upward, slowly push the SD card into the SD card slot of the back-side of the Nextion Display. It should "LOCK" into place.
Power ON the Nextion Display. Watching the text on the screen, It should begin to program the tft file to the Nextion Display. When it's done, Power OFF the Nextion Display and remove the SD card.
Errors Happen when the SD card is the wrong size, formatted incorrectly, there is more than one file on the SD card, or the wrong tft file is on the SD card for the Nextion Display. Watch that the Apple computers can put hidden files on the SD card that can't be seen, yet, the Nextion Display will, and it will complain about it.
Setting The Baud Rate: When the Nextion Display is first powered ON, you see the text spinner at the bottom, by pressing "9600" will select 9600 baud (Shown in the upper right of the display uper the BAUD RATE), by pressing "115200" will select 115200 (Also shown in the upper right of the display under BAUD RATE).
When a serial command is recognized by the display, the Baud Rate Buttons, 9600 / 115200, will change to SET / INFO respectfully. A MMDVM modem (HAT) connected Nextion display will always be set to 9600 baud unless the MMDVM Modem's firware is custom compiled for a different Baud Rate.
A USB to TTL connected Nextion Display can be either baud rate, it depends on the "Nextion Layout:" selection on the Pi-Star Configuration -> MMDVMHost Configuration part of the page, ON7LDS L3 uses 9600 baud data connection rate, ON7LDS L3 HS uses 115200 Baud data connection rate.
The Nextion display's serial Baud connection rate is set by YOU as described in these instructions. What this all means is that the HotSpot has to be set to the right baud rate and the Nextion display has to be set to the same baud rate. IF they differ, they will not communicate with each other. Hopefully this Baud Rate setting section clears up all of the confusion.