ON7LDS driver disappears after reboot

All things relating to the Nextion Screen(s)
Post Reply
K3TOM
Posts: 13
Joined: Fri May 31, 2019 2:08 am

ON7LDS driver disappears after reboot

Post by K3TOM »

I had another similar post where I was having the issue a lot of people appear to be having where the Nextion driver gets installed into the /usr/local/bin directory and has to be copied to the /dev directory. The issue I’m having now is that every time my Pi reboots, for some reason the ttyNextionDriver file gets deleted, or disappears, from the /dev directory and I have to copy it again from the /usr/local/bin directory. This happens on every single reboot. I’ve tried re-imaging my Pi-star several times and started from scratch. I’ve also tried both RC 4.0.0 and RC 4.1.0-RC2. Is there any way to prevent this from happening?
K3TOM
Posts: 13
Joined: Fri May 31, 2019 2:08 am

Re: ON7LDS driver disappears after reboot

Post by K3TOM »

Thanks KE7FNS, I’ll give it another try today and see what happens.
User avatar
VK7HSE
Posts: 229
Joined: Sun Apr 15, 2018 6:35 pm
Contact:

Re: ON7LDS driver disappears after reboot

Post by VK7HSE »

Only downside with the install script is that it is expecting a clean install of pistar, otherwise the portion that gets added to the mmdvm file does not get added again if you re-run the installation after the original time.

Sent from my Pixel 2 XL using Tapatalk

K3TOM
Posts: 13
Joined: Fri May 31, 2019 2:08 am

Re: ON7LDS driver disappears after reboot

Post by K3TOM »

Wanted to update this post with some additional information hoping someone would be willing to read through and maybe give me some ideas what I could try next. Been having a heck of a time trying to get my Nextion screens working on my 2 HotSpots. For some background, I have two hotspots consisting of a raspberry pi 3b +, a Zumspot v 0.6 from HRO, and a Nextion enhanced 2.4” screen with one of Mich’s tft files. The hotspots have been working fine for about 3 or 4 months with the screens hooked up to the serial port on the Zumspot. In this configuration, when I first hooked them up there was no bi-directional communication with the screen. Only one way TO the screen. I also had tried using a USB to TTL adapter, which worked, but didn’t like the fact that I couldn’t hook that up inside my C4labs case so decided to go with the serial port on the Zumspot board settling with one-way communication instead. Recently, I read that with newer firmware the Zumspot is supposed to allow bi-directional communication with the Nextion screens. I tried updating the firmware on my Zumspot and have not been able to get my screen to communicate with the pi since. I even tried using the USB to TTL adapter and even taking the Zumspot off the pi and just use the USB to TTL adapter by itself with no success. The Zumspot will function as far as the radio portion goes if I set it up it’s just the screen that I can’t get working. What I am doing is loading a fresh version of pi-star, (tried everything from 3.4.17 all the way to 4.1.0-RC2), then following the instructions provided in the post in this thread, sudo su, rpi-rw, sudo pistar-expand, reboot, sudo pistar-update, sudo apt-get install bc, cd /tmp, git clone https://github.com/on7lds/NextionDriverInstaller.git, sudo NextionDriverInstaller/install.sh. At this point I can connect to the pi and in configuration change the MMDVM display type to Nextion, the Port to /dev/ttyNextionDriver, and Nextion Layout to ON7LDS L3 HS. I then go into MMDVM host section and change the NextionDriver section to show modem. When I save those changes and go back to the configuration page the choice for /ttyNextionDriver is no longer there. The only way I can get that choice back is either to start from the beginning and burn a fresh copy of pi-star or the other way I found is to ssh into pi-star and change to the /dev directory. I then have to do a dir command to list the files, after that I can go back to the configuration screen and the choice is there again, but as soon as I select it and apply the changes, leave that screen and go back, it is gone again. Also, if I go into the /dev directory but don’t issue the dir command to list the files and then go back into the configuration screen, the /ttyNextionDriver choice is not there, even though it is physically in the /dev directory. Not sure what this has to do with my screen not working but it certainly is something that’s not right. I’ve tried changing the screen from the serial port on the Zumspot to the USB to TTL adapter and in turn changing the Nextion section in the MMDVM Host to either modem when connected to the Zumspot to /dev/ttyUSB0. Another thing that might be helpful is I went into the Live Logs and the only thing that seemed out of place was the last two lines that said, “Opening the MMDVM, Unable to read the firmware version after six attempts.” Not sure what that means but sounds important to me. Hope someone has some advice. I’ve reformatted and reloaded pi-star on different micro sd cards about 100 times, each time trying a new or different setting and for some reason the only thing that seems to be common with everything is that the Nextion Driver doesn’t want to load correctly.
I also printed out the Nextion Driver services log with these results.
Nextiondriver.service – NextionDriver service
Loaded: loaded (/lib/system/system/nextiondriver.service; enabled/ vendoe preset: enabled)
Active: failed (Result: exit-code) since Sat 2019-08-10 03:07:57 BST; 39s ago
Main PID; 3146 (code=exited, status=1/FAILURE)
Aug 10 03:07:57 pi-star NextionDriver[3146]: Disk size : 29296 MB (26664 free)
Aug 10 03:07:57 pi-star NextionDriver[3146]: Started with screenLayout 4
Aug 10 03:07:57 pi-star NextionDriver[3146] Started with verbose level 2
Aug 10 03:07:57 pi-star NextionDriver[3146] Display will sleep when no data received for 600 seconds
Aug 10 03:07:57 pi-star NextionDriver[3146] opening ports
Aug 10 03:07:57 pi-star NextionDriver[3146]/dev/ttyNextionDriver (=dev/pts/2)  modem
Aug 10 03:07:57 pi-star NextionDriver[3146}Unable to start. For using a display connected to the modem, you have to enable ‘Transparent Data’ and ‘sendFrameType’!
Aug 10 03:07:57 pi-star system[1] nextiondriver.service: Main process exited, code=exited, status=1Failed with result ‘exit-code’.
K3TOM
Posts: 13
Joined: Fri May 31, 2019 2:08 am

Re: ON7LDS driver disappears after reboot

Post by K3TOM »

KE7FNS,
Thanks so much for the detailed explanation. I was able to follow your instructions without any difficulties at all. Changing the screen to 9600 Baud was no problem. I started fresh once again and everything seemed to go as planned until I got to the point where I had to check the settings in MMDVM host under the Expert tab. Under the [Transparent Data] section Enable was set to 0, so I changed it to 1, which I assume "enabled" it. RemoteAddress, RemotePort, and Localport were all okay, but the field for SendFrameType=1 was not there so I could not change it. Right after this in your instructions you have to reboot. Well, after I did that, the /dev/ttyNextionDriver was no longer a choice" in the port option on the configuration screen. I looked at the Nextion service using ssh and it said, "For using a display connected to the modem, you have to enable transparent data and send frame type." I assume this is because I was only able to change that one parameter, Enable and not SendFrameType that wasn't listed as a choice?
Question, can I just go into the MMDVMHost file and change the SendFrameTyoe to =1 and save it? If so, where is that file located? Thanks again.
K3TOM
Posts: 13
Joined: Fri May 31, 2019 2:08 am

Re: ON7LDS driver disappears after reboot

Post by K3TOM »

I can't believe you've got me this far. There's no way I would have been able to do this by myself. After making sure port=modem in expert configuration page first, I was able to install the Nextion Driver and it seems to be rock solid. I can reboot as often as I like and it’s still present and stays selected in the configuration page. I also was able to update all of the choices on the expert page including Enable=1 and SendFrameType=1 under the [Transparent Data] sections (They were already okay, I didn’t have to change them). Only thing is, my screen still is not receiving any info. I checked with two different screens, both after running the tft file to put them into baud 9600 and also with two different Pi 3b+ and Zumspot boards. They both work the same, so I must be missing something else. Not sure what but I think the Nextion Driver must be okay. I did check the Nextion Service in ssh and this is what it reported, don’t know if that will help or not.

/system.slice/nextiondriver.service
678 /usr/local/bin/NextionDriver -c /etc/mmdvmhost -i
Started with verbose level 2
Opening ports
/dev/ttyNextionDriver (=/dev/pts/1)  modem
Opening sockets…
Transparent Connection: talking socket open, fd=2
Try to bind 0.0.0.0 …
Transparent Connection: listening socket open, fd=3
Transparent data sockets active
I can not (yet) check or update modem connected displays
Starting with network interface wlan0:192.168.0.107

Forgot to add, I was using version 4.1.0-RC2 but tried on all version 4.0.0 and up
K3TOM
Posts: 13
Joined: Fri May 31, 2019 2:08 am

Re: ON7LDS driver disappears after reboot

Post by K3TOM »

PROGRESS BEING MADE! Yippe! Okay, I followed your instructions and increased the log level and found the Nextion Driver working okay. Changed the log level back to 2. I know the screen is wired correctly, already been through that before. The screen I’m using is listed as being designed and coded by PD0DIB and I downloaded it from one of the facebook groups from a post attributed to Mich EA7KD0 I believe. It uses bi-directional communication for a couple of the features. I’ll attach it if I can. It’s titled, “Mitch_5-22-19_A”. I also have used the older version of the Nextion editor you provided a link to for some of the files I have downloaded including the Mitch_5-22-19_A. The .HMI file I have for that one has some errors so I can’t compile it since I don’t know how to fix them yet so all I can do is use the tft files for it that I’ve had from months ago that I’ve previously downloaded. I actually have two versions of the file. One where I went into the first screen of the file in the Nextion editor and changed the baud rate to 9600 and one where I changed it to 115200. I could only get the 9600 one to work previously so that’s been the one I’ve been trying to get to work now. I’ve also been using the Model 8 2.4 inch Globe screen you linked from PD0DIB in my workflow as a diagnostic aid as well.
When you told me to make a call to parrot or a talkgroup and monitor the log file I found out something interesting. My Zumspot was not working! I been so tied up in the screen diagnosis I hadn’t noticed that my Zumspot quit working and my radio couldn’t transmit nor receive. I remember seeing something in one of the logs about, "unable to read firmware after six attempts," but the version number was clearly listed as the newer, 1.4.17 in the dashboard. So anyway, I reloaded the firmware in the Zumspot and guess what, the screen started working! I checked everything and most of the functions worked except the cpu temperature and the bi-directional communications weren’t working yet. The cpu temperature won’t work with this screen until you ssh and run, "sudo apt-get install bc". Tried that but the cpu temp field still would not populate. Either way, At least I’m back where I started from in the beginning when I undertook this project to try and get bi-directional communication to work on my hotspots. Thanks again for the help.

Link to screen I've been using.
https://www.facebook.com/groups/Nextion ... SEARCH_BOX
Attachments
IMG_3696.jpg
IMG_3696.jpg (113.07 KiB) Viewed 3517 times
Post Reply