EDDC - Enhanced Display Driver Code

The Enhanced Display Driver Code

 
By Using This Website, You agree to the following Website Linked Disclaimer 
 

Attention: READ And Follow All Procedures

 

FIRST: The EDDC Requirements

The EDDC below needs an unhindered Bi-Directional Serial DATA Flow. 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 Us. Please use the Version A of the NDC and the ON7LDS NDDC for all MMDVM Modem connections.
 
...OK, You have a properly USB to TTL connected Nextion Display...
 
...IF Your Nextion Display Is Connected To The MMDVM Modem, YOU May Continue With These HELPFUL Steps.
 
 Amateur Radio Callsign AG4OJ  AG4OJ's E-Mail Account  Nextion Display Code Files - Version B  Nextion Display Code Files - Version B Release Notes
 

SECOND: Is Everything Setup Properly For The Nextion Display?

 
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.
 
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. This is another reason why We recommend the use of a USB to TTL device.
 
The Nextion Display needs to be flashed with Firmware that can display the MMDVMHost messages. The default manufacturer's display Firmware on a new display will only show their display's introduction code.
 
On a NEW Pi-Star Image, always do a "pistar-update" in the Pi-Star's ssh window. A "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. We have a Guide here on this website that will help you ensure that everything is up to date.
 
...OK, You Have Ensured That Everything For The Nextion Display is SETUP properly...
 
 Amateur Radio Callsign AG4OJ  AG4OJ's E-Mail Account  Nextion Display Code Files - Version B  Nextion Display Code Files - Version B Release Notes
 

THIRD: Is Your Nextion Display Showing MMDVMHost Messages?

 
DO NOT install ANY Display Driver Just YET!
 
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.
 
...OK, You have ensured that the Nextion Display is DISPLAYING MMDVMHost Messages...
 
...As Described Above WITHOUT ANY Display Driver being installed...
 
 Amateur Radio Callsign AG4OJ  AG4OJ's E-Mail Account  Nextion Display Code Files - Version B  Nextion Display Code Files - Version B Release Notes
 

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 Pi-Star / MMDVMHost sent messages. Then, install the ON7LDS Nextion Display Driver Code and make sure that it continues to WORK properly, as expected. This as the procedures below do not install all the other ON7LDS Nextion Display Driver support files at this time.
 
...The Link Below, After Installing The Display Driver, Will Have a Link To Return Here...
 

 CLICK HERE To Install ON7LDS NDD NEXT!

 
...OK, You have ensured that the ON7LDS NDDC installation is Showing ADDED Driver Messages...
 
 Amateur Radio Callsign AG4OJ  AG4OJ's E-Mail Account  Nextion Display Code Files - Version B  Nextion Display Code Files - Version B Release Notes
 

The EDDC Introduction

As We Dig Into The ON7LDS NDDC

This will take time. We wish to first not break anything that it already does. This means that as We dig into the ON7LDS NDDC, it will be slow going. Releases may have to wait so that We can thoroughly inspect our changes and make sure that it ONLY enhances what it used to do. We hope that you understand Our way of thinking, and, that We don't want you using anything partially coded, half baked.
 
...Presently The EDDC Should Be Considered As BETA Code, With Stepped Releases...
 

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. 
 
We are presently NOT using GitHub for this project to keep it under Special Control / Scrutiny as it is documented, rewritten, and expanded. Even so, progress releases will still be freely given away here. We do have a GitHub account for a mature code release in the future and then that will allow for better automated integration into other installers.
 

This Is Your Final WARNING Before YOU Proceed

WE 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.
 
...Presently The EDDC Should Be Considered As BETA Code, With Stepped Releases...
 
 Amateur Radio Callsign AG4OJ  AG4OJ's E-Mail Account  Nextion Display Code Files - Version B  Nextion Display Code Files - Version B Release Notes
 

This Enhanced Display Driver Code

Hello! Welcome to the Documenting, Editing, and Expanding project for this Enhanced Display Driver Code. This so We 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. This is a FULL RELEASE of this code, version 210415 BETA as documented within all of the file headers.
 

EDDC 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

 

Part 1: Installing And Updating The Database Files

 
This section will help you install the supporting database files.
 
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.
 
COMMAND COPY AND PASTE: You can copy and paste these commands into the Pi-Star SSH window. With your mouse, highlight the "BOLD BLACK COLORED" 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!
 
... Pi-Star -> Configuration -> Expert -> SSH Access ...
 
... From The Freshly Started Pi-Star SSH Access Window ...
 
pi-star login: pi-star <ENTER KEY>
 
Password: raspberry <ENTER KEY>
 
pi-star@pi-star(ro):~$ rpi-rw <ENTER KEY>
 
pi-star@pi-star(rw):~$ sudo su <ENTER KEY>
 
root@pi-star(rw):pi-star$ mkdir code <ENTER KEY>
 
root@pi-star(rw):pi-star$ cd code <ENTER KEY>
 
Executing these commands above will initialize the DDC coding directory. They only have to be performed once.
 
root@pi-star(rw):code$ pwd <ENTER KEY>
 
/home/pi-star/code
 
"pwd" Shows that We are in the right directory.
 
root@pi-star(rw):code$ ls -al <ENTER KEY>
 
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 KEY>
 
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 https://drses.com/AG4OJ/DDC/Code/Scripts/getScripts.sh <ENTER KEY>
 
root@pi-star(rw):code$ chmod u+x getScripts.sh <ENTER KEY>
 
root@pi-star(rw):code$ mkdir Scripts <ENTER KEY>
 
root@pi-star(rw):code$ mv getScripts.sh Scripts/getScripts.sh <ENTER KEY>
 
root@pi-star(rw):code$ ./Scripts/getScripts.sh <ENTER KEY>
 
The "./Scripts/getScripts.sh" when executed will download/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 KEY>
 
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 "stripped.csv", "BM_groups.txt", "TGIF_groups.txt", and "DMR+_groups.txt" files. The "databases.sh" script file will be left behind in the "code" directory for future database updates at your leisure.
 
The "BM_groups.txt", "TGIF_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. Setting this is done on the Pi-Star Configure -> Expert -> MMDVMHost -> NextionDriver section setting of the GroupsFile. Click "Apply Changes" and then REBOOT Pi-Star for the replacement database file to take effect.
 
...OK, If all You Wanted Was Installing/Updating The Databases, STOP HERE...
 
ATTENTION: IF Your Nextion Display Is Connected To The MMDVM Modem, YOU WILL Have to STOP HERE.
 
WE Do Not Support MMDVM Modem Connections, Some May Still Work, Many WILL NOT Work With The EDDC.
 

Part 2: Downloading The Enhanced Display Driver Code Files

 
This section will help you download the Enhanced Display Driver Code files in preparation to compile it.
 
... Pi-Star -> Configuration -> Expert -> SSH Access ...
 
... From The Freshly Started Pi-Star SSH Access Window ...
 
pi-star login: pi-star <ENTER KEY>
 
Password: raspberry <ENTER KEY>
 
pi-star@pi-star(ro):~$ rpi-rw <ENTER KEY>
 
pi-star@pi-star(rw):~$ cd code <ENTER KEY>
 
pi-star@pi-star(rw):code$ sudo su <ENTER KEY>
 
root@pi-star(rw):code$ pwd <ENTER KEY>
 
/home/pi-star/code
 
root@pi-star(rw):code$ ./Scripts/getIt.sh <ENTER KEY>
 
Executing these commands above will download the Enhanced Display Driver code files to the "/home/pi-star/code" directory. The "./Scripts/getIt.sh" Script file and the EDDC files will remain in the "code" directory afterwards. The executing the "./Scripts/getIt.sh" script in the future makes sure that you have downloaded the latest version of the code.
 

Part 3: Compiling The Enhanced Display Driver Code Files

 
This section will help you Compile the Enhanced Display Driver Code.
 
root@pi-star(rw):code$ make <ENTER KEY>
 
After running the "make" command, you should NOT see any errors. If you do, something went wrong, STOP right HERE! Retrace your steps. when all else fails, contact Us, DO NOTHING FURTHER!
 

Part 4: Installing The Enhanced Display Driver Code Files

 
This section will help you install the Enhanced Display Driver Code.
 
root@pi-star(rw):code$ ls -al NextionDriver <ENTER KEY>
 
-rwxw-xr-x 1 root root 53684 Feb 7 17:25 NextionDriver
 
OK, make just compiled the file, NO ERRORS WERE REPORTED. Doing this next command above makes sure that We have a compiled executable. IF this command above gives you a file listing for the NextionDriver, as shown, continue to the next commands below.
 
root@pi-star(rw):code$ rm /usr/local/bin/NextionDriver <ENTER KEY>
 
This next command above removes the active NextionDriver executable from the Pi-Star image.
 
root@pi-star(rw):code$ cp NextionDriver /usr/local/bin/NextionDriver <ENTER KEY>
 
This next command above moves a copy of the newly compiled NextionDriver into place.
 
root@pi-star(rw):code$ ls -al /usr/local/bin/NextionDriver <ENTER KEY>
 
-rwxw-xr-x 1 root bin 53684 Feb 7 17:25 /usr/local/bin/NextionDriver
 
This last command above gives a directory listing of the properly placed newly compiled NextionDriver version.
 
The first output of file listing above and this last one should match file sizes and dates of compile. Remember here, the file sizes should match, yet, depending on the build version, they both could be a different size then shown. The date will obviously be the date when you compiled the EDDC. This is just an example of what you'll see.
 
The "./Scripts/moveIt.sh" script was also downloaded by the "./Scripts/getScripts.sh" and does all 4 of the above commands. If you feel comfortable with the procedures above, the "./Scripts/moveIt.sh" will save some time. The "./Scripts/moveIt.sh" script still shows the file sizes and dates, this so there can still be a visual comparison of the files on the screen.
 

Part 5: MMDVMHost - Editing The "mmdvmhost" Settings File

 
root@pi-star(rw):code$ nano /etc/mmdvmhost <ENTER KEY>
 
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 list with the GREEN ARROWS below. The variables with the RED ARROWS belong to the NDDC ONLY. We've included both sections as a reference to everything that has to do with the Nextion Display. Watch to keep the space between the "NextMsgFlags" and "[OLED]" section as you make the edits.
 
 MMDVMHost - mmdvmhost Settings Edit
 
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 6: Changing The Nextion Display Code

 
root@pi-star(rw):code$ reboot <ENTER KEY>
 
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 Our Nextion Display Code Version B. If you haven't updated the Nextion Display Code on your Nextion Display to the latest Version B;
 
PROPERLY Shut down Pi-Star and Click Here To Update It Now. 
 

Part 7: MMDVMHost - Explaining The Settings Page

 
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
 
Your MMDVMHost settings page should show the added RED ARROW variables above.
 
 ScreenSaver is the Screen Saver TimeOut. A ZERO turns it OFF.
 
 GenerateCPU set the frequency in which the CPU parms are updated. A ZERO turns it OFF.
 
 HostMsgFlags & NextMsgFlags - SEE Below For Bitwise Explanations.
 
The two GREEN ARROWS shows where you NOW have complete control over the MODE screen brightness and IDLE screen brightness. These values are usually set to between 5 to 100. They are NO LONGER fixed values in this EDDC and the NDC Version B provided here. Remember here that the ON7LDS NDDC and VerA NDC here still have some influence in the screen brightness.
 
The BLUE ARROW is where you change the Talk Groups names file for each DMR Network.
 
  BM_groups.txt is for The Brandmeister Network. (UNIX ANSI)
 
  TGIF_groups.txt is for the TGIF Network. (UNIX ANSI)
 
  DMR+_groups.txt is for the DMR+ Network. (UNIX ANSI)
 

Re-Installing The ON7LDS NDDC

This installation of this newly EDDC Executable can be easily over-written by doing the steps below.
 

Re-Installing ON7LDS NDDC

 

Part 1: Downloading The ON7LDS Nextion Display Driver Code Files

 
This section will help you download the ON7LDS Nextion Display Driver Code files in preparation to compile it, over-writing the EDDC source files in the code directory.
 
... Pi-Star -> Configuration -> Expert -> SSH Access ...
 
... From The Freshly Started Pi-Star SSH Access Window ...
 
pi-star login: pi-star <ENTER KEY>
 
Password: raspberry <ENTER KEY>
 
pi-star@pi-star(ro):~$ rpi-rw <ENTER KEY>
 
pi-star@pi-star(rw):~$ sudo su <ENTER KEY>
 
root@pi-star(rw):pi-star$ cd code <ENTER KEY>
 
root@pi-star(rw):code$ pwd <ENTER KEY>
 
/home/pi-star/code
 
root@pi-star(rw):code$ ./Scripts/getScripts.sh <ENTER KEY>
 
root@pi-star(rw):code$ ./Scripts/nddc119.sh <ENTER KEY>
 
Executing these commands above will download the ON7LDS Nextion Display Driver code files to the "/home/pi-star/code" directory. The "./Scripts/nddc119.sh" Script file and the ON7LDS NDDC files will remain in the "code" directory afterwards. This over-writes the EDDC files.
 

Part 2: Compiling The ON7LDS Nextion Display Driver Code Files

 
This section will help you Compile the Nextion Display Driver Code.
 
root@pi-star(rw):code$ make <ENTER KEY>
 
After running the "make" command, you should NOT see any errors. If you do, something went wrong, STOP right HERE! Retrace your steps. when all else fails, contact me, DO NOTHING FURTHER!
 

Part 3: Installing The ON7LDS Nextion Display Driver Code Files

 
This section will help you install the Nextion Display Driver Code.
 
root@pi-star(rw):code$ ls -al NextionDriver <ENTER KEY>
 
-rwxw-xr-x 1 root root 53684 Feb 7 17:25 NextionDriver
 
OK, make just compiled the file, NO ERRORS WERE REPORTED. Doing this next command above makes sure that We have a compiled executable. IF this command above gives you a file listing for the NextionDriver, as shown, continue to the next commands below.
 
root@pi-star(rw):code$ rm /usr/local/bin/NextionDriver <ENTER KEY>
 
root@pi-star(rw):code$ cp NextionDriver /usr/local/bin/NextionDriver <ENTER KEY>
 
root@pi-star(rw):code$ ls -al /usr/local/bin/NextionDriver <ENTER KEY>
 
-rwxw-xr-x 1 root bin 53684 Feb 7 17:25 /usr/local/bin/NextionDriver
 
The next command above removes the active NextionDriver executable from the Pi-Star image. The next command after that moves a copy of the newly compiled NextionDriver into place. Then the last command above give a directory listing of the properly placed newly compiled NextionDriver version.
 
The output of file listing above and this last one should match file sizes and dates of compile. Remember here, the file sizes should match, yet, depending on the build version, they both could be a different size then shown. The date will obviously be the date when you compiled the Nextion Driver Code. This is just an example of what you'll see.
 
The "moveIt.sh" script was also downloaded by the "./Scripts/getScripts.sh" and does all 4 of the above commands. If you feel comfortable with the procedures above, the "./Scripts/moveIt.sh" will save some time. The "./Scripts/moveIt.sh" script still shows the file sizes and dates so there can still be a visual comparison of the files on the screen.
 
The above procedures restores the ON7LDS Nextion Display Driver Code, erasing the installed EDDC.
 

Part 4: Changing The Nextion Display Code

 
root@pi-star(rw):code$ reboot <ENTER KEY>
 
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;
 
PROPERLY Shut down Pi-Star and Click Here To Update It Now. 
 

Getting HELP

An Email address is provided below for getting help. Further contact can be done by agreed upon phone call. Don't hesitate to send a problem report via the Email address below. OR send some praises! It's all GOOD to US!