NextionDriver requires configuration apply changes after every shutdown or reboot

All things relating to the Nextion Screen(s)
WU1U
Posts: 14
Joined: Wed Nov 14, 2018 8:23 pm

NextionDriver requires configuration apply changes after every shutdown or reboot

Post by WU1U » Sat Aug 10, 2019 6:04 pm

Help, please. I am trying to figure out an issue involving my Zumspot, Nextion 3.5 screen, NextionDriver, and Pi-Star.

My problem is that whenever I start the hotspot or reboot it either from the Nextion screen or from the pi-star interface on my laptop the MMDVM screen (PD0DIB M8) appears initially until the initialization process is completed and connection to my Wi-Fi is complete and then it goes to a screen that only shows “Started” at the top, “NextionDriver” in the middle and its IP address at the bottom. The only way to get it to move on is to use the apply changes button for the MMDVMHost configuration section of the configuration menu in the Pi-Star interface on my laptop. All is then working fine, and I can communicate on DMR which is all I have it enabled for. ON7LDS seems to indicate if this happens something else is wrong with the configuration but I cannot figure out what it might be. I have reinstalled Pi-Star fresh and then re-installed NextionDriver three times all with the same result. Any suggestions on what I need to change would be greatly appreciated. Details of my setup follow.

I am running a Zumspot Pi-Hat on a Pi Zero 1.1 under Pi-Star 3.4.17. The Zumspot has the latest firmware 1.4.17. It is attached to a 3.5" basic Nextion with the PD0DIB Model 8 Simplex Globe. The Nextion is attached to the Pi Zero USB port through a functioning USB to TTL Converter. I can program the Nextion and has proper communication with the Nextion through this converter. The ON7LDS NextionDriver is installed and I used the installation program and followed the procedure on GitHub for the installation program. The installation check program says it is working and there is a new NextionDriver section in the MMDVMHost section of Pi-Star. The Nextion section of MMDVMHost shows the port /dev/ttyNextionDriver and the NextionDriver section shows the port /dev/ttyUSB0. This is as it should be per my understanding. In the MMDVMHost configuration the display type is Nextion. The port is now /dev/ttyNextionDriver and the Nextion Layout is ON7LDS L3.

KE7FNS
Posts: 943
Joined: Wed Apr 17, 2019 11:11 pm

Re: NextionDriver requires configuration apply changes after every shutdown or reboot

Post by KE7FNS » Sat Aug 10, 2019 10:26 pm

WU1U wrote:
Sat Aug 10, 2019 6:04 pm
My problem is that whenever I start the hotspot or reboot it either from the Nextion screen or from the pi-star interface on my laptop the MMDVM screen (PD0DIB M8) appears initially until the initialization process is completed and connection to my Wi-Fi is complete and then it goes to a screen that only shows “Started” at the top, “NextionDriver” in the middle and its IP address at the bottom
That screen is completely normal. It is the way the Nextion Driver is programmed, it goes to that screen and waits for the network to come online. At the bottom you should see "Waiting for network ..." and a counter that increments every 5 seconds. Once it detects an IP address, it displays it and then continues on.

For some reason your setup doesn't seem to be entering the main loop shortly after it detects the IP address.

Reboot your hotspot and when it displays that STARTED screen and the correct IP address, SSH in and type this.

Code: Select all

grep -i NextionDriver /var/log/syslog
Post the results please. If the last few lines are just repeating themselves you can leave the duplicates out to save time/space
If someones previous actions are any indication of their future actions, then I predict the deletion and removal of access will happen at any moment. 7-11-2020.

"07/13/20 This Website Has Been Taken Down" ... again :lol:

WU1U
Posts: 14
Joined: Wed Nov 14, 2018 8:23 pm

Re: NextionDriver requires configuration apply changes after every shutdown or reboot

Post by WU1U » Sun Aug 11, 2019 7:20 pm

Thanks for your response. Here is the result of the inquiry: (after this point if I 'Apply Changes' on the MMDVMHost Configuration section I will have a fully functioning hot spot with NextionDriver items such as the screen push buttons.) 73, Jerry WU1U
Jan 20 12:17:23 pi-star systemd[1]: Starting NextionDriver service...
Jan 20 12:17:23 pi-star NextionDriver: NextionDriver version 1.14
Jan 20 12:17:23 pi-star NextionDriver: Copyright (C) 2017...2019 ON7LDS. All rights reserved.
Jan 20 12:17:23 pi-star NextionDriver: Starting with verbose level 0
Jan 20 12:17:24 pi-star NextionDriver: Warning: NextionDriver with PID 843 already running !
Jan 20 12:17:24 pi-star NextionDriver: Data files directory: /usr/local/etc/
Jan 20 12:17:24 pi-star NextionDriver: Reading groups from /usr/local/etc/groups.txt
Jan 20 12:17:24 pi-star NextionDriver: Read 1292 groups.
Jan 20 12:17:24 pi-star NextionDriver: Reading users from /usr/local/etc/stripped.csv
Jan 20 12:17:26 pi-star systemd[1]: Started NextionDriver service.
Jan 20 12:17:31 pi-star NextionDriver: Read 121718 users.
Aug 11 14:10:45 pi-star NextionDriver: Sorted CALL table.
Aug 11 14:10:45 pi-star NextionDriver: Disk size : 1720 MB (308 free)
Aug 11 14:10:45 pi-star NextionDriver: Started with screenLayout 3
Aug 11 14:10:45 pi-star NextionDriver: Started with verbose level 2
Aug 11 14:10:45 pi-star NextionDriver: Display will sleep when no data received for 600 seconds
Aug 11 14:10:45 pi-star NextionDriver: Opening ports
Aug 11 14:10:45 pi-star NextionDriver: /dev/ttyNextionDriver (=/dev/pts/0) <=> /dev/ttyUSB0
Aug 11 14:10:45 pi-star NextionDriver: Found Nextion display
Aug 11 14:10:45 pi-star NextionDriver: Touch display model NX4832T035_011R
Aug 11 14:10:45 pi-star NextionDriver: FW 2049, MCU 61488
Aug 11 14:10:45 pi-star NextionDriver: Serial E467B0D7E3411131
Aug 11 14:10:45 pi-star NextionDriver: Flash size 16777216
Aug 11 14:10:46 pi-star NextionDriver: Starting with network interface wlan0:192.168.1.64

KE7FNS
Posts: 943
Joined: Wed Apr 17, 2019 11:11 pm

Re: NextionDriver requires configuration apply changes after every shutdown or reboot

Post by KE7FNS » Sun Aug 11, 2019 11:08 pm

Shrug.

Everything looks fine with that log so I'm not sure what could be causing that issue, I'll have to create a new test platform and connect up a screen using TTL adapter and see if I can recreate what you are experiencing. I have a suspicion that its a serial port parameter conflict but I really need to test it to make sure.
If someones previous actions are any indication of their future actions, then I predict the deletion and removal of access will happen at any moment. 7-11-2020.

"07/13/20 This Website Has Been Taken Down" ... again :lol:

WU1U
Posts: 14
Joined: Wed Nov 14, 2018 8:23 pm

Re: NextionDriver requires configuration apply changes after every shutdown or reboot

Post by WU1U » Mon Aug 12, 2019 2:31 am

Thank you very much for helping with this. I am totally lost on how to proceed.

KE7FNS
Posts: 943
Joined: Wed Apr 17, 2019 11:11 pm

Re: NextionDriver requires configuration apply changes after every shutdown or reboot

Post by KE7FNS » Mon Aug 12, 2019 5:00 am

Well, bad news. I am unable to recreate it with what I have on hand. I'm using the same 3.5" screen with a TTL adapter, but I don't have a RPi Zero (I've looked for one locally in Fry's electronics and for the life of me I can't seem to ever find one anywhere closeby), so I'm using a 3B+.

On your TTL adapter there should be two LEDs that light up when serial communications are happening one for TX and one for RX, what I'd like you to do is reboot it and when that black screen is drawn, take a look at the TTL board and do you see any more LED's flashing. Basically the LEDS should correlate to things being drawn on the screen, so if the LED flashes, then some text field should of just been updated etc.

What I'm trying to figure out is if your screen is ignoring the serial port messages and not displaying things, or if there just isn't any more serial messages being sent.

It might be that the RPi Zero is just slow and takes some extra time. I know its a silly question but have you just waited for like 5 minutes or so with that black screen sitting there? Also, with it sitting there doing nothing for the last 5 minutes, what happens if you touch the screen?

Also, did you create the .TFT file yourself? and if so what version of the editor did you use?
If someones previous actions are any indication of their future actions, then I predict the deletion and removal of access will happen at any moment. 7-11-2020.

"07/13/20 This Website Has Been Taken Down" ... again :lol:

WU1U
Posts: 14
Joined: Wed Nov 14, 2018 8:23 pm

Re: NextionDriver requires configuration apply changes after every shutdown or reboot

Post by WU1U » Mon Aug 12, 2019 4:31 pm

Thanks again. I had not tried waiting as patience is not in my DNA but it did not make a difference when I tried at this time. The red LED flashes when data is initially being sent and the green LED briefly flashes just as the NextionDriver starting screen appears after the wifi connection is made. No further flashing of either LED happens until I apply the apply changes button in the MMDVMHost configuration screen of the pi-star interface. Even though I cannot see them when the NextionDriver screen is present I know there are two on-screen push buttons in the MMDVM screen - one for reboot and one for shut down. This area of the screen does respond and the green LED briefly flashes as if these buttons were visible when I touch those areas but the screen does not leave the NextionDriver screen but turns to 'stopped' as expected. Touching other areas does not make any difference. Nothing further happens until I apply changes. At that point, the red LED flashes continually and I have not observed further flashing of the green LED.

I did not design the TFT. My screen was loaded from a Rob van Rheenen (PD0DIB) HMI which is his simplex Model 8 Globe Version 1.2 for the 3.5-inch basic Nextion screens. It is designed to work with the NextionDriver installed. I also tried using the very recently released Kasem Sirisuwan simplex 3.5 inch screen which I did load from a TFT file but the results were exactly the same. The screen stopped at the NextionDriver started screen until I applied the apply changes button in the interface. I used Nextion LTS to load these files. I have also tried the new v0.58 and there is no difference in results but it does mess up the Nextion screen fonts in the HMI I use.

I have an RPi 2B around someplace. I will try putting the Zumspot on it later to see if there is any difference. 73, Jerry

WU1U
Posts: 14
Joined: Wed Nov 14, 2018 8:23 pm

Re: NextionDriver requires configuration apply changes after every shutdown or reboot

Post by WU1U » Mon Aug 12, 2019 5:10 pm

Oops I forgot the 2 B does not have onboard wifi. More looking to see if I have a later RPi. Or if I can use a dongle and pi-star. Anyway learning opportunities for a true OM.

WU1U
Posts: 14
Joined: Wed Nov 14, 2018 8:23 pm

Re: NextionDriver requires configuration apply changes after every shutdown or reboot

Post by WU1U » Mon Aug 12, 2019 10:11 pm

Well I downloaded the new Pi-Star V4.1.0 RC2 and installed it on a brand new out of the box RPi 4B. It all seems to be working fine with no human intervention at the NextionDriver starting screen. So obviously my problem is with the Pi Zero or possibly the adapter connecting the Pi Zero USB port to the full size usb male on my USB/TTY converter. The last I doubt because 2 way communication works fine after I do the apply changes to get the Pi Zero to move on. Thanks for all your help and advice.

KE7FNS
Posts: 943
Joined: Wed Apr 17, 2019 11:11 pm

Re: NextionDriver requires configuration apply changes after every shutdown or reboot

Post by KE7FNS » Mon Aug 12, 2019 10:49 pm

Interesting.

I was just about to ask you to try a few more things I thought of, so if you feel like testing some more please post the results, if not no big deal I understand. I'll get a RPi Zero one of these days to tinker with.

What I'd like you to test is to remove the blue wire from the Nextion to the TTL board, and reboot.

My thoughts are that when the screen gets the call to black out the screen it responds with a message "0x01 0xFF 0xFF 0xFF" saying the command was successful. That message just parks in the serial ringbuffer waiting, and then later on when MMDVMHost comes online (30+ seconds after a boot up) and sets up the serial port theres this junk out there that it isn't expecting and it freaks out which puts everything into a blocking condition and then everything is a stalemate, until you click apply settings and restart the MMDVMHost process.

By removing that wire, you will no longer be sending the success response message and if that is what is causing the issue, it should work like normal.

If that does turn out to be the case, I'll ask ON7LDS to send a command to the Nextion early on when setting up the serial port to not report success/fail like the code in MMDVMHost does.

Another thing you could try is to load V4.1.0 RC2 on the RPi Zero and see if the problem occurs on it as it might be something in the way the serial port is handled on the old 3.4.17. Also you could move the Nextion over to the Nextion port on the Zumspot, and ditch the TTL adapter. You just need to reconfigure a few things to make that happen.

in the expert config.
[Nextion]
port=modem

[Transparent Data]
Enable=1
SendFrameType=1
RemoteAddress=127.0.0.1
RemotePort=40094
LocalPort=40095

if you are missing Enable or SendFrameType, you will need to edit the file with a text editor to add them.

Code: Select all

rpi-rw
sudo nano /etc/mmdvmhost
arrows to scroll around
then CTRL+X and yes to save, and enter to accept filename.


But thanks again for doing all the grunt work.
If someones previous actions are any indication of their future actions, then I predict the deletion and removal of access will happen at any moment. 7-11-2020.

"07/13/20 This Website Has Been Taken Down" ... again :lol:

Post Reply