Nextion Connections

All things relating to the Nextion Screen(s)
KE7FNS
Pi-Star Team
Posts: 1805
Joined: Wed Apr 17, 2019 11:11 pm

Re: Nextion Connections

Post by KE7FNS »

Just bit of an update:

In my previous post in this thread I recommended that the user delete the NextionDriver before running the NextionDriverInstaller script, that command is no longer needed. A day or two after posting that I contacted ON7LDS and asked him to adjust the NextionDriver Installer script. He has since made changes, and the script now prompts you for a reinstall.

viewtopic.php?f=20&t=2943#p14672
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:
n6krj
Posts: 5
Joined: Mon Oct 19, 2020 6:20 am

Re: Nextion Connections

Post by n6krj »

I’ve read through this thread and still having a bit of trouble.

I’m using a MMDVM_HS_DUAL HAT on top of a Pi3b+.

I’ve got a Nextion 2.4” Enhanced display and I increased the baudrate to 115200. I can get the display working using the NextionDriver via USB if connected using a USB-to-TTL adapter on the Pi. I cannot seem to get this working when wired directly to the modem. When Attached to the board, I’ve got Nextion port set to /dev/ttyNextionDriver and the NextionDriver port set to /dev/ttyAMA0. And as mentioned this causes a conflict with the HAT. Is there a different port that I should be using?

When I run:

Code: Select all

$ sudo pistar-findmodem 
Detected MMDVM_HS (GPIO): /dev/ttyAMA0 (MMDVM_HS_Dual_Hat-v1.4.17 20190529 14.7456MHz dual ADF7021 FW by CA6JAU GitID #cc451c4)
How do I know if serial repeating is supported on this modem?

I had this working on top of the HAT running at 9600 baud, but the touchscreen, temp, cpu, storage, and ip are non-functional.

What needs to be done to get this fully working on the modem?

Thanks,

-Jim
KE7FNS
Pi-Star Team
Posts: 1805
Joined: Wed Apr 17, 2019 11:11 pm

Re: Nextion Connections

Post by KE7FNS »

n6krj wrote: Tue Oct 27, 2020 2:48 pm I cannot seem to get this working when wired directly to the modem.
You need to set the default baudrate of the Nextion to 9600 baud. 9600 baud is hardcoded into the firmware of the hat for some dumb reason. Its possible to change it but requires compiling your own firmware.
n6krj wrote: Tue Oct 27, 2020 2:48 pm When Attached to the board, I’ve got Nextion port set to /dev/ttyNextionDriver and the NextionDriver port set to /dev/ttyAMA0. And as mentioned this causes a conflict with the HAT. Is there a different port that I should be using?

When I run:

Code: Select all

$ sudo pistar-findmodem 
Detected MMDVM_HS (GPIO): /dev/ttyAMA0 (MMDVM_HS_Dual_Hat-v1.4.17 20190529 14.7456MHz dual ADF7021 FW by CA6JAU GitID #cc451c4)
You can't use /dev/ttyAMA0 when you already have the hat using it for its communications. The only valid options for a GPIO connected hat are /dev/ttyUSB0 or modem

You'd use /dev/ttyAMA0 if you had the Nextion connected to the GPIO pins and the hat connected with USB.

Code: Select all

[NextionDriver]
Port=modem
Don't do like another user recently and insert a / it needs to just be modem nothing more nothing less.
n6krj wrote: Tue Oct 27, 2020 2:48 pm How do I know if serial repeating is supported on this modem?
You don't, that is one of the major issues with running someone elses pre-compiled firmware, you've got no idea what all they have futzed with.

If you want to know for sure what configurations are enabled you need to compile the firmware yourself.

n6krj wrote: Tue Oct 27, 2020 2:48 pm I had this working on top of the HAT running at 9600 baud, but the touchscreen, temp, cpu, storage, and ip are non-functional.

What needs to be done to get this fully working on the modem?
Once you set the Nextion to 9600 the default fields will be populated correctly.

You can then chose one of the other layouts "ON7LDS L3" is the one I suggest. (HS will work but doesn't do anything on a Nextion connected directly to the hat)

In order to get the temp, cpu, storage you need to have a working Nextion Driver.

The IP should be displayed in any layout selection.

You can test all of this with my .hmi.
viewtopic.php?f=20&t=2196


In order for touch responses to work, you need transparent data enabled and your hat firmware needs to be 1.4.17 or greater.
Older MMDVM_HS firmware didn't forward the serial messages from touch responses back to the RPi it just nuked them as it got them. I wrote the code to package and send it to the RPi which was released in 1.4.17.

It sounds like you didn't have "modem" selected when you installed the Nextion Driver so the installer didn't add the transparent settings for your selection because /dev/ttyAMA0 doesn't need them to function.

So you'll need to start over with a fresh install and properly configured before attempting to run the Nextion Driver Installer.

Read this thread as I explained things in detail.
viewtopic.php?f=3&t=799#p15478
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:
n6krj
Posts: 5
Joined: Mon Oct 19, 2020 6:20 am

Re: Nextion Connections

Post by n6krj »

Thanks, this was very informative.

I was able to get the display working. I rebuilt and flashed the modem firmware. I modifed the Config.h from the MMDVM_HS_DUAL to use the higher buadrate. After doing that, and rebuilding the pi-star image, configuring, and installing the NextionDriver it seems to work (as it now displays all the fields with data.

One last question - after building and reflashing - I'm noticing that my contact/talker alias is now no longer being resolved in the pi-star on both Gateway and Local activity, where previously it resolved my callsign. After the hotspot rebuild, this seems to have stopped working. I believe the only settings that changed are the modem firmware. To be clear it does seem to resolve ID's from the NET. Would the new modem firmware cause this behavior? If yes, is there a firmware setting to restore this setting?

Thansk.
KE7FNS
Pi-Star Team
Posts: 1805
Joined: Wed Apr 17, 2019 11:11 pm

Re: Nextion Connections

Post by KE7FNS »

n6krj wrote: Sun Nov 01, 2020 8:23 am One last question - after building and reflashing - I'm noticing that my contact/talker alias is now no longer being resolved in the pi-star on both Gateway and Local activity, where previously it resolved my callsign. After the hotspot rebuild, this seems to have stopped working. I believe the only settings that changed are the modem firmware. To be clear it does seem to resolve ID's from the NET. Would the new modem firmware cause this behavior? If yes, is there a firmware setting to restore this setting?
If you mean the dashboard is showing DMR ID numbers instead of callsigns (I don't think it will ever display talker alias data) run an update or wait until tomorrow and it will update itself overnight.
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