Nextion Touchscreen Buttons not working on Pi-Star

All things relating to the Nextion Screen(s)
Post Reply
VK7ZPD
Posts: 5
Joined: Sat Jul 03, 2021 12:27 am

Nextion Touchscreen Buttons not working on Pi-Star

Post by VK7ZPD »

Hi guys, I have been battling with a Nextion screen trying to get touchscreen buttons working.
The Pi-star version is 4.1.5
Nextion is basic Touch resistive.
USB to TTL converter (6 pin) connected to /dev/tty/USB0
Screen is working as expected for all Pi-star update messages.
I have 2 buttons on the main MMDVM screen one for rebbot, the other shutdown.
When I connect the screen and USB-TTL converter to the PC I can see the event code received on a putty terminal screen.
When connected to the pi-star the status led flashes on the TTL converter (spare pins DTR AND +3.3v not connected) for the data transmitted from the screen but the pi-star doesn't respond to the commands.
I have ON7LDS layouts listed as ON7LDS L2 ON7LSD L3 and ON7LDSL3 HS, I currently have ONLDS L3 selected.

The events I have setup are as follows the code was copied from another screen layout.
reboot
printh 2A
printh F1
print "reboot"
printh FF
printh FF
printh FF

Shutdown
printh 2A
printh F1
print "shutdown"
printh FF
printh FF
printh FF

Any clues as to where I have gone wrong.
Last edited by VK7ZPD on Sun Sep 19, 2021 2:23 am, edited 2 times in total.
VK7ZPD
Posts: 5
Joined: Sat Jul 03, 2021 12:27 am

Re: Nextion Touchscreen Buttons not working on Pi-Star

Post by VK7ZPD »

Jason, Thanks for your reply.

Some additional info.
Hat is duplex MMDVM CPU is pi ZeroW

I found a post regarding logs, your suggestion was to "Go to the Expert configuration and under the [NextionDriver] section set the LogLevel=6 apply changes."
I can't find any setting in the pi-star expert config Nextion section that mentions LogLevel, has that changed in later versions?

What I did find by using grep -i NextionDriver /var/log/syslog was that for some reason the service appears to not have started or has attempted to start multiple times.

Sep 20 10:20:23 pi-star-duplex systemd[1]: Starting NextionDriver service...
Sep 20 10:20:23 pi-star-duplex NextionDriver: NextionDriver version 1.22
Sep 20 10:20:23 pi-star-duplex NextionDriver: Copyright (C) 2017...2021 ON7LDS. All r
ights reserved.
Sep 20 10:20:23 pi-star-duplex NextionDriver: Starting with verbose level 2
Sep 20 10:20:23 pi-star-duplex NextionDriver: Warning: NextionDriver with PID 911 alr
eady running !
Sep 20 10:20:23 pi-star-duplex NextionDriver: Reading configuration file /etc/mmdvmho
st
Sep 20 10:20:23 pi-star-duplex NextionDriver: Found RX Frequency 434175000
Sep 20 10:20:23 pi-star-duplex NextionDriver: Found TX Frequency 439175000
Sep 20 10:20:23 pi-star-duplex NextionDriver: Found Location [Legana, QE38MO]
Sep 20 10:20:23 pi-star-duplex NextionDriver: Use Transparent Connection: NO
Sep 20 10:20:23 pi-star-duplex NextionDriver: Local port: 40094
Sep 20 10:20:23 pi-star-duplex NextionDriver: Remote port: 40095
Sep 20 10:20:23 pi-star-duplex NextionDriver: Found Virtual Port [/dev/ttyUSB0]
Sep 20 10:20:23 pi-star-duplex NextionDriver: Configuration file(s) not correct/compl
ete (is there a NextionDriver section ?).
Sep 20 10:20:29 pi-star-duplex systemd[1]: nextiondriver.service: Succeeded.
Sep 20 10:20:29 pi-star-duplex systemd[1]: Started NextionDriver service.
Sep 20 10:26:22 pi-star-duplex NextionDriver: NextionDriver version 1.22
Sep 20 10:26:22 pi-star-duplex NextionDriver: Copyright (C) 2017...2021 ON7LDS. All r
ights reserved.
Sep 20 10:26:22 pi-star-duplex NextionDriver: Starting with verbose level 2
Sep 20 10:26:22 pi-star-duplex systemd[1]: Starting NextionDriver service...
Sep 20 10:26:22 pi-star-duplex NextionDriver: Warning: NextionDriver with PID 2263 al
ready running !
Sep 20 10:26:22 pi-star-duplex NextionDriver: Reading configuration file /etc/mmdvmho
st
Sep 20 10:26:22 pi-star-duplex NextionDriver: Found RX Frequency 434175000
Sep 20 10:26:22 pi-star-duplex NextionDriver: Found TX Frequency 439175000
Sep 20 10:26:22 pi-star-duplex NextionDriver: Found Location [Legana, QE38MO]
Sep 20 10:26:22 pi-star-duplex NextionDriver: Use Transparent Connection: NO
Sep 20 10:26:22 pi-star-duplex NextionDriver: Local port: 40094
Sep 20 10:26:22 pi-star-duplex NextionDriver: Remote port: 40095
Sep 20 10:26:22 pi-star-duplex NextionDriver: Found Virtual Port [/dev/ttyUSB0]
Sep 20 10:26:22 pi-star-duplex NextionDriver: Configuration file(s) not correct/compl
ete (is there a NextionDriver section ?).
Sep 20 10:26:24 pi-star-duplex killall[2297]: NextionDriver: no process found
Sep 20 10:26:24 pi-star-duplex systemd[1]: nextiondriver.service: Control process exi
ted, code=exited, status=1/FAILURE
Sep 20 10:26:24 pi-star-duplex systemd[1]: nextiondriver.service: Failed with result
'exit-code'.
Sep 20 10:26:24 pi-star-duplex systemd[1]: Failed to start NextionDriver service.
Last edited by VK7ZPD on Mon Sep 20, 2021 8:51 am, edited 1 time in total.
VK7ZPD
Posts: 5
Joined: Sat Jul 03, 2021 12:27 am

Re: Nextion Touchscreen Buttons not working on Pi-Star

Post by VK7ZPD »

Thanks again, I had already started a rebuild, I intend installing the driver with the USB connected and without the Nextion, once the driver is installed I’ll connect the Nextion. I doubt it’s a card issue the card is a high endurance Sandisk 32gb.
One of the problems is that there there is a lot of information on various problems and as software versions have evolved some of those solutions may no longer be relevant.

One question is may I ask. In one of your posts you mentioned using ON7LDS 3HS which obviously needs the USB port set to 115200. Is that able to be set from Pi-star or is it necessary to set from an SSH shell. I’m ok with changing the Nextion speed, I already have a toggle button to do that but would like the Nextion to run as fast as possible.
VK7ZPD
Posts: 5
Joined: Sat Jul 03, 2021 12:27 am

Re: Nextion Touchscreen Buttons not working on Pi-Star

Post by VK7ZPD »

Ok got it running with a bit of a struggle, apologies if my recollection of the exact sequence is inaccurate.

I rebuilt the SD card, installed and ran the Rpi setup with the USB-TTL connected but no screen.
Setup the basic d-star setup and MMDVM selection. I then shutdown and connected the Nextion Screen and ran the ON7LDS install which failed. I then rebooted and selected the Nextion Screen with /dev/tty/USB0. I then ran a pi-star software update (despite having the latest build) and again ran the ON7LDS driver install. After that the screen is working and so are the reboot and shutdown buttons.

All I need know now is how to change the USB driver speed to 115200... :D
VK7ZPD
Posts: 5
Joined: Sat Jul 03, 2021 12:27 am

Re: Nextion Touchscreen Buttons not working on Pi-Star

Post by VK7ZPD »

The reason I started with just the USB-TTL is that on a previous attempt the driver failed to load when the Nextion and TTL was connected. The end result was successful, I have 115200 speed working now as well.
I'll be repeating with another simplex hotspot and smaller screen so I'll do some more testing.
You mention your documentation, I have only seen some of your posts on users problems and other documentation by searching, do you have a link to your documentation ?
Post Reply