Weird NextionDriver Behavior on 4.1.2

All things relating to the Nextion Screen(s)
Post Reply
KE7DUX
Posts: 7
Joined: Mon Feb 25, 2019 9:21 pm

Weird NextionDriver Behavior on 4.1.2

Post by KE7DUX »

Hi All,

Fresh install of 4.1.2. (Fresh flash, Configure Wifi, run sudo pistar-update).

I restart the hotspot (remove power and reapply) after all the updates, and then attempt to use NextionDriverInstaller.

Code: Select all

pi-star@pi-star(ro):tmp$ sudo NextionDriverInstaller/install.sh
+ Getting NextionDriver ...                                                 
Cloning into 'NextionDriver'...                                             
remote: Enumerating objects: 38, done.                                      
remote: Counting objects: 100% (38/38), done.                               
remote: Compressing objects: 100% (28/28), done.                            
remote: Total 346 (delta 19), reused 23 (delta 10), pack-reused 308         
Receiving objects: 100% (346/346), 7.31 MiB | 979.00 KiB/s, done.           
Resolving deltas: 100% (238/238), done.                                     
+ NextionDriver 1.17 found at /usr/local/bin/NextionDriver                  
+ We are at version 1.17                                                    
                                                                            
- No need to update.                      
So, normally I would say this is great, its already installed. However I cannot then configure it to work. /dev/ttyNextionDriver is not a port option on the configuration page, and if I manually enter it in MMDVMHost in the NEXTION section, I still am unable to add the correct port because there is not a NEXTIONDRIVER section (I need to tell it to use the screen connected via USB).

Normally I'd expect something like this to insert that info:

Code: Select all

        
Starting NextionDriver_ConvertConfig 1.04                                   
                                                                            
Processing ...                                                              
Info: Transparent Data section found.                                       
--->  Creating new ini file...                                              
Info: Serial port for Nextion was /dev/ttyUSB0                              
        changing to /dev/ttyNextionDriver                                   
Info: Inserting [NextionDriver] section                                     
                                                                            
                                                                            
Inserted section :                                                          
------------------------------                                              
[NextionDriver]                                                             
Port=/dev/ttyUSB0                                                           
DataFilesPath=/usr/local/etc/                                               
LogLevel=2                                                                  
GroupsFile=groups.txt                                                       
DMRidFile=stripped.csv                                                      
#DMRidDelimiter=,                                                           
#DMRidId=1                                                                  
#DMRidCall=2                                                                
#DMRidName=3                                                                
#DMRidX1=4                                                                  
#DMRidX2=5                                                                  
#DMRidX3=7                                                                  
ShowModeStatus=0                                                            
RemoveDim=0                                                                 
WaitForLan=1                                                                
SleepWhenInactive=0   
Any thoughts?
KE7DUX
Posts: 7
Joined: Mon Feb 25, 2019 9:21 pm

Re: Weird NextionDriver Behavior on 4.1.2

Post by KE7DUX »

I just tried installing NextionDriver BEFORE running any updates, only after configuring wifi. (4.1.2 Dash 20200520)

In this case, it seems to work, though do get errors when I do update related to nextiondriver existing:

Code: Select all

pi-star@pi-star(ro):tmp$ sudo NextionDriverInstaller/install.sh
+ Getting NextionDriver ...                                                 
Cloning into 'NextionDriver'...                                             
remote: Enumerating objects: 38, done.                                      
remote: Counting objects: 100% (38/38), done.                               
remote: Compressing objects: 100% (28/28), done.                            
remote: Total 346 (delta 19), reused 23 (delta 10), pack-reused 308         
Receiving objects: 100% (346/346), 7.31 MiB | 5.17 MiB/s, done.             
Resolving deltas: 100% (238/238), done.                                     
+ No NextionDriver found, trying to install one.                            
+ Compiling ...                                                             
Failed to stop nextiondriver.service: Unit nextiondriver.service not loaded.
Warning: Stopping mmdvmhost.service, but it can still be activated by:      
  mmdvmhost.timer                                                           
Failed to disable unit: Unit file nextiondriver.service does not exist.     
+ found PISTAR                                                              
+ Installing services                                                       
Created symlink /etc/systemd/system/multi-user.target.wants/mmdvmhost.servic
e → /lib/systemd/system/mmdvmhost.service.                                  
Created symlink /etc/systemd/system/multi-user.target.wants/nextiondriver.se
rvice → /lib/systemd/system/nextiondriver.service.                          
Created symlink /etc/systemd/system/network-online.target.wants/nextiondrive
r.service → /lib/systemd/system/nextiondriver.service.                      
Created symlink /etc/systemd/system/mmdvmhost.service.requires/nextiondriver
.service → /lib/systemd/system/nextiondriver.service.                       
+ Check version :                                                           
                                                                            
NextionDriver version 1.17                                                  
Copyright (C) 2017...2019 ON7LDS. All rights reserved.                      
                                                                            
+ Copying groups and users files                                            
--2020-06-05 03:04:25--  https://api.brandmeister.network/v1.0/groups/      
Resolving api.brandmeister.network (api.brandmeister.network)... 178.156.41.
236                                                                         
Connecting to api.brandmeister.network (api.brandmeister.network)|178.156.41
.236|:443... connected.                                                     
HTTP request sent, awaiting response... 200 OK                              
Length: unspecified [application/json]                                      
Saving to: ‘/tmp/groups.txt’                                                
                                                                            
/tmp/groups.txt        [ <=>             ]  44.24K   245KB/s    in 0.2s     
                                                                            
2020-06-05 03:04:27 (245 KB/s) - ‘/tmp/groups.txt’ saved [45305]            
                                                                            
+ NextionDriver installed                                                   
                                                                            
+ -----------------------------------------------                           
+ We will now start the configuration program ...                           
                                                                            
                                                                            
-----------------------------------------------------------                 
NOTE: I tried to make this script as foolproof as possible.                 
  There might still be situations where it does not work                    
  as expected.                                                              
  If you should discover any bugs, please let me know.                      
-----------------------------------------------------------                 
                                                                            
Starting NextionDriver_ConvertConfig 1.04                                   
                                                                            
Processing ...                                                              
Info: Transparent Data section found.                                       
--->  Creating new ini file...                                              
Info: Serial port for Nextion was /dev/ttyAMA0                              
        changing to /dev/ttyNextionDriver                                   
Info: Inserting [NextionDriver] section                                     
                                                                            
                                                                            
Inserted section :                                                          
------------------------------                                              
[NextionDriver]                                                             
Port=/dev/ttyAMA0                                                           
DataFilesPath=/usr/local/etc/                                               
LogLevel=2                                                                  
GroupsFile=groups.txt                                                       
DMRidFile=stripped.csv                                                      
#DMRidDelimiter=,                                                           
#DMRidId=1                                                                  
#DMRidCall=2                                                                
#DMRidName=3                                                                
#DMRidX1=4                                                                  
#DMRidX2=5                                                                  
#DMRidX3=7                                                                  
ShowModeStatus=0                                                            
RemoveDim=0                                                                 
WaitForLan=1                                                                
SleepWhenInactive=0   
- System reboots
- Enter MMDVMhost and set NEXTIONDRIVER port to /dev/ttyUSB0
- Power off/on reboot
- Add callsign and correct freq
- Apply
- Enter modem information and enable desired mode
- Apply
- Re-choose nextion display type in config because it says "none", and also set correct layout, however port is correct: /dev/ttyNextionDriver
- Apply
Nextion display refreshes and works. At this point, all is working as expected.
- Power off/on restart, all still works.

Run Update using dashboard update, I see errors related to the Nextion Display (do not show second time updating):

Code: Select all


Update Running
Starting update, please wait...
Stopping Services...
Done
Updating DV Binaries...
Updating /usr/local/bin...
From https://github.com/AndyTaylorTweet/Pi-Star_v4_Binaries_Bin
* branch master -> FETCH_HEAD
77b517d..8df928c master -> origin/master
error: The following untracked working tree files would be overwritten by merge:
NextionDriver
Please move or remove them before you merge.
Aborting
Updating 77b517d..8df928c
Updates were not successfull, reverting to Pi-Star original files...
Checking out files: 100% (38/38), done.
HEAD is now at 8df928c Updating MMDVMHost
Done
Updating Pi-Star Binaries...
Updating /usr/local/sbin...
From https://github.com/AndyTaylorTweet/Pi-Star_Binaries_sbin
* branch master -> FETCH_HEAD
e361dcf..ad2da0d master -> origin/master
error: The following untracked working tree files would be overwritten by merge:
nextiondriver.service
Please move or remove them before you merge.
Aborting
Updating e361dcf..ad2da0d
Updates were not successfull, reverting to Pi-Star original files...
HEAD is now at ad2da0d Update pistar-upgrade
Done
Updating Hostfiles...
Done
Updating Dashboard...
Updating /var/www/dashboard...
From https://github.com/AndyTaylorTweet/Pi-Star_DV_Dash
* branch master -> FETCH_HEAD
019a009..a3dc813 master -> origin/master
Updating 019a009..a3dc813
Fast-forward
admin/admin.php | 2 +-
admin/configure.php | 100 ++++++++++++++++++++-----
admin/expert/ssh_access.php | 6 +-
admin/expert/upgrade.php | 4 +-
admin/live_modem_log.php | 4 +-
admin/sysinfo.php | 4 +-
admin/update.php | 4 +-
config/version.php | 2 +-
dstarrepeater/link_manager.php | 2 +-
index.php | 5 +-
mmdvmhost/functions.php | 12 +--
mmdvmhost/lh.php | 15 +++-
mmdvmhost/localtx.php | 11 ++-
mmdvmhost/nxdn_manager.php | 2 +-
mmdvmhost/p25_manager.php | 2 +-
mmdvmhost/repeaterinfo.php | 2 -
mmdvmhost/tgif_links.php | 6 +-
mmdvmhost/tgif_manager.php | 163 +++++++++++++++++++++++++++++++++++++++++
mmdvmhost/ysf_manager.php | 2 +-
19 files changed, 295 insertions(+), 53 deletions(-)
create mode 100755 mmdvmhost/tgif_manager.php
Done
Updating PiStar-Firewall...
Done
Updating P25Gateway config...
Done
Starting Services...
Done
Updates complete, sleeping for a few seconds before making the disk Read-Only
mount: /: mount point is busy.
Finished
- now at Pi-Star:4.1.2 / Dashboard: 20200528
- power off/on restart
Nextion display refreshes and works. At this point, all is working as expected.
- As a test, switch to using OLED by changing dashboard, disabling nextion.
- power off/on restart
- OLED is being used, nextion does not start
- Switch back to Display Type: Nextion. NextionDriver is not an option for port.
- apply
- Manually set MMDVMHost nextion port to /dev/ttyNextionDriver
- power off/on restart
Nextion display refreshes and works. At this point, all is working as expected.

- Because I want to see if I can break it, I now run sudo pistar-update
- power off/on restart
Nextion display refreshes and works. At this point, all is working as expected.

So, it seems that if I install nextiondriver before I do a sudo pistar-update it will work.
KN2TOD
Posts: 268
Joined: Sun Nov 11, 2018 6:36 pm

Re: Weird NextionDriver Behavior on 4.1.2

Post by KN2TOD »

Did you happen to restore a previous configuration backup? You have to install Nextion before restoring any configurations.
KE7DUX
Posts: 7
Joined: Mon Feb 25, 2019 9:21 pm

Re: Weird NextionDriver Behavior on 4.1.2

Post by KE7DUX »

KE7FNS wrote: Fri Jun 05, 2020 4:26 am The simple fix would of just been to just delete /usr/local/bin/NextionDriver

Code: Select all

rpi-rw
sudo rm /usr/local/bin/NextionDriver 
And then run the Nextion Driver installer, then once that is done run a sudo pistar-update a few times to clean up the errors and pull down the Nextion Driver file from Andys github to make sure all the files match Andys.
Awesome, thank you! I will give that a try if needed. Glad to know the behavior I was seeing had a reason beyond my doing something incorrectly. Also glad to hear its all being added to Pi-Star, will definitely make life easier!
Post Reply