Nextion Screen no longer working

Help with NXDN issues
M0TJK
Posts: 12
Joined: Sun Jun 07, 2020 3:15 pm

Re: Nextion Screen no longer working

Post by M0TJK » Tue Oct 13, 2020 9:09 pm

Screen was working well. Touching screen produced message at the bottom, saying touch driver needed. Decided to install touch driver.

Used NextionDriverInstaller. Nothing on screen. Touched screen and part of text appeared. Touched again, more appeared. Screen responded to brightness slider. Message "Waiting for modem" etc. Waited but nothing changed No IP address etc. Keyed up rig, but nothing changed on screen.

Re-uploaded original screen driver to screen in case screen corrupted in some way. Screen still says "waiting"

Tried connecting to two other modems, known to work, but screen unchanged. Baud rate should not have been changed up to this point.

Tried uploading two other screen layouts to see if I could prompt a "refresh" of some sort. No change. Tried to find out how to do a factory reset to screen. No joy.

On the face of it, screen is now "defunct" for some reason. No means of testing, but could put my scope on the data lines which might indicate if the screen was responding in some way to data in.

Roger

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

Re: Nextion Screen no longer working

Post by KE7FNS » Tue Oct 13, 2020 10:58 pm

M0TJK wrote:
Tue Oct 13, 2020 9:09 pm
Screen was working well. Touching screen produced message at the bottom, saying touch driver needed. Decided to install touch driver.
What .hmi/tft did you load that produced this "message" when you touched the screen? I'm not aware of any that do that or even how they would detect such a "touch driver" in the first place.
M0TJK wrote:
Tue Oct 13, 2020 9:09 pm
Baud rate should not have been changed up to this point.
That is where you are mistaken.

The second the screen quit responding to serial messages, ie "waiting" the baudrate had already been changed. It is commonly set by programmers as one of the very first things when the .hmi/tft executes its code. Thats why knowing what screen you loaded is important.
M0TJK wrote:
Tue Oct 13, 2020 9:09 pm
Tried to find out how to do a factory reset to screen.
There is no such thing as a factory reset for a Nextion, you just load a proper .hmi/tft
M0TJK wrote:
Tue Oct 13, 2020 9:09 pm
On the face of it, screen is now "defunct" for some reason. No means of testing, but could put my scope on the data lines which might indicate if the screen was responding in some way to data in.
You are mistaken again. It is not defunct, if it was defunct you wouldn't even be able to load a new .tft. Like I said a Nextion is a stand alone device.

If you hooked up your scope the only thing you are going to see is a few signals immediately after it boots (FF FF FF 88 FF FF FF) or when you touch a button on the screen you'll see it spew out some hex associated with that button. That seems like a waste of time to be honest, the Nextion doesn't send much data and unless you have a really powerful/expensive scope you can't send the proper serial data.

All you need to do to test it is hook the Nextion to a USB TTL adapter, plug it into a windows computer and open the Nextion Editor. Select debug, and set the device to a Nextion instead of the internal simulator. Then in the debugger you can autosearch the COM ports and it will even try different speeds attempting a connection. What you are going to notice at the very bottom of the debugger screen is that it is going to try different com ports and speeds and eventually it will connect and display all the details of that connection. (which is going to say 115200 baud)

Then you could send the command in the simulator directly to the Nextion (hit enter after typing that in the input area of the simulator)

Code: Select all

get bauds
and if its programmed for 115200 it'll respond over on the far right (MCU return) with

Code: Select all

71 00 C2 01 00 FF FF FF 
1 c200 hex = 115200 dec

and if its set on 9600

Code: Select all

71 80 25 00 00 FF FF FF  
2580 hex = 9600 dec

Then you can set the default baudrate

Code: Select all

bauds=9600
And again, if you load a .hmi/tft that during any of its programming changes that bauds setting then you are back where you started with a device that doesn't have the serial port set to the speed of the STM32 UART2 port that is set in the MMDVM_HS firmware at 9600.

Once you set the Nextion to bauds=9600, then immediately download my screentest.hmi file and configure it for your device, compile and upload it to the Nextion. (you can even use the editor connected to the Nextion over the USB ttl adapter to upload it, but it is slower than using a sd card)
viewtopic.php?f=20&t=2196

Hook the Nextion up to your Hotspot and it should display the fields correctly.

That will prove that the original .hmi file you loaded is the culprit, and not any configuration settings.
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:

M0TJK
Posts: 12
Joined: Sun Jun 07, 2020 3:15 pm

Re: Nextion Screen no longer working

Post by M0TJK » Wed Oct 14, 2020 6:52 am

Thank you. I’ll give it a try as you suggest.

Roger

M0TJK
Posts: 12
Joined: Sun Jun 07, 2020 3:15 pm

Re: Nextion Screen no longer working

Post by M0TJK » Wed Oct 14, 2020 8:43 am

Done all that, and the screen was set on 115 200(!) and is now reading the test file correctly. Thank you.

I have a couple of questions please:
1. Could I have changed the Nextion <layout> in the Pi configuration to ON7LDS L3 HS, to send the higher baud rate and would that have worked?

2. Running the NextionDriverInstaller must have changed the baud rate. I don't understand why re loading my MMDVM-Nextion-3.5inch-K-Enhanced-v.2.0.8.tft file didn't re-set the baud rate to 9600. Is the baud rate setting not in the HMI/TFT file?

I'm not really bothered with a touch screen as trying to get that working has landed me in a bunch of trouble. Please could you point me in the direction of an HMI file which will give me a fairly colourful display on my 3.5" screen for DMR (at 9600 baud!!), which has the basic info on the home screen including IP address and last contact etc, with TS1 and 2 on the DMR screen?

Roger

PA3FAT
Posts: 23
Joined: Tue Sep 01, 2020 6:40 pm

Re: Nextion Screen no longer working

Post by PA3FAT » Wed Oct 14, 2020 9:13 am


M0TJK
Posts: 12
Joined: Sun Jun 07, 2020 3:15 pm

Re: Nextion Screen no longer working

Post by M0TJK » Wed Oct 14, 2020 10:14 am

That looks good. And thank you for your assistance.

Roger

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

Re: Nextion Screen no longer working

Post by KE7FNS » Wed Oct 14, 2020 6:43 pm

M0TJK wrote:
Wed Oct 14, 2020 8:43 am
1. Could I have changed the Nextion <layout> in the Pi configuration to ON7LDS L3 HS, to send the higher baud rate and would that have worked?
No, and No. That selection is only valid for Nextions that are plugged into USB TTL adapters.

Since your Nextion is connected to the MMDVM hat, you must configure the Nextion to match the baudrate hard coded into the firmware when it was compiled, the default is 9600. (the MMDVM hat is another stand alone system)
M0TJK wrote:
Wed Oct 14, 2020 8:43 am
2. Running the NextionDriverInstaller must have changed the baud rate.
No, that is impossible. I told you how it got changed, you loaded a .hmi/tft that ran bauds=115200 when it very first started up, it is as simple as that.
M0TJK wrote:
Wed Oct 14, 2020 8:43 am
I don't understand why re loading my MMDVM-Nextion-3.5inch-K-Enhanced-v.2.0.8.tft file didn't re-set the baud rate to 9600.
Since it didn't set it to 9600, the only way that can be true is if there is no command to set it to 9600 in the first place.
M0TJK wrote:
Wed Oct 14, 2020 8:43 am
Is the baud rate setting not in the HMI/TFT file?
That depends on if the programmer who created the .hmi/tft file put that command in there. Thats why I asked you which ones you were messing with if the programmer released the .hmi anyone can load it and see the commands issued.
M0TJK wrote:
Wed Oct 14, 2020 8:43 am
I'm not really bothered with a touch screen as trying to get that working has landed me in a bunch of trouble.
For the touch commands to function correctly you only need two things:
The Nextion Driver must be installed and working correctly.
And the MMDVM_hs firmware version must be 1.4.17 or greater.

To see if the Nextion Driver is functioning correctly, my screen test would help identify if its working correctly by populating the fields under the Nextion Driver Only section.
M0TJK wrote:
Wed Oct 14, 2020 8:43 am
Please could you point me in the direction of an HMI file which will give me a fairly colourful display on my 3.5" screen for DMR (at 9600 baud!!), which has the basic info on the home screen including IP address and last contact etc, with TS1 and 2 on the DMR screen?
There are way to many to constantly keep up to date with.

I used to recommend PD0DIB's screens, but now that I see he's got a startup disclaimer screen that no one can see what code he is running on that screen I don't trust it.
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:

M0TJK
Posts: 12
Joined: Sun Jun 07, 2020 3:15 pm

Re: Nextion Screen no longer working

Post by M0TJK » Wed Oct 14, 2020 7:14 pm

I'm running the model 8 layout which works well, but I am going to try the model 10 tomorrow.

From what you have said, I believe the culprit for the change in baud rate, was that I first tried the screen on a RPi 4B with an MMDVM Dual Hat running thru the USB onto which I first tried adding the touch screen driver. When I couldn't get that to work, I then tried adding the touch driver to my spare Zero with single MMDVM Hat. But by then the screen was already (presumably) set on 115,200, so even with re-installing my original RPi OS on the Zero/MMDVM, it was never going to work.

I did see the Driver section wasn't populated in your screen test - but trying touch again will be for another day.

Once again, thank you for your assistance.

Roger, M0TJK

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

Re: Nextion Screen no longer working

Post by KE7FNS » Wed Oct 14, 2020 8:14 pm

M0TJK wrote:
Wed Oct 14, 2020 7:14 pm
From what you have said, I believe the culprit for the change in baud rate, was that I first tried the screen on a RPi 4B with an MMDVM Dual Hat running thru the USB onto which I first tried adding the touch screen driver. When I couldn't get that to work, I then tried adding the touch driver to my spare Zero with single MMDVM Hat. But by then the screen was already (presumably) set on 115,200, so even with re-installing my original RPi OS on the Zero/MMDVM, it was never going to work.
No, that can't be the culprit. There are not any commands in MMDVMHost or the Nextion Driver that set the default baudrate of the Nextion (the current baud rate of the USB port is set when it is created and opened, but the bauds command is never sent to the Nextion). That had to be done by something and the easiest and most common way I can think of would be inside a .hmi/tft file right in the beginning of the programming. Like I said when you can tell me which .hmi/tft you loaded, I can tell you that it changes the default baudrate or not.

When you plugged in the USB TTL adapter and the Nextion was defaulted on 9600, the only layout settings that would of worked were:

Code: Select all

G4KLX
ON7LDS L2
ON7LDS L3
because those 3 open the USB port at 9600 baud and would of matched the Nextion.

When you plugged in the USB TTL adapter and the Nextion was defaulted on 115200, the only setting that would of worked was:

Code: Select all

ON7LDS L3 HS
That opens the USB port at 115200 baud.

When you plug in the Nextion to the MMDVM hat, all of those settings work because you can't change the port speed of the STM32 UART2 remotely, it is hardcoded in the firmware at 9600, so the Nextion has to be defaulted to 9600.

M0TJK wrote:
Wed Oct 14, 2020 7:14 pm
I did see the Driver section wasn't populated in your screen test - but trying touch again will be for another day.
That most likely is because you didn't have the Nextion layout set on "ON7LDS L3"

Run the commands to check the Nextion Driver installation.
https://github.com/on7lds/NextionDriver ... on-pi-star

The only other thing that is important for the operation of touch responses is the [Transparent Data] section in the /etc/mmdvmhost configuration file. And that should of been added by the Nextion Driver Installer when it is run on a clean mmdvmhost configuration, if the configuration already had been modified you would of received a warning/error.

Code: Select all

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

You shouldn't be scared to mess around, its your hotspot so do with it as you wish. You now know how to get your Nextion back to working correctly, and if you can't you can always ask me what to do next. You have understood and followed along with what I've said better than most of the people I've interacted with on the forums, so have at it. :ugeek:
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