Author Topic: Flash Nextion Screen from Pi-Star command line  (Read 162 times)

0 Members and 0 Guests are viewing this topic.

Offline VE3RD

  • Newbie
  • *
  • Posts: 26
  • Referrals: 0
Flash Nextion Screen from Pi-Star command line
« on: February 23, 2020, 03:05:36 pm »
This directory contains a simple python script which you can use to update the Nextion displays. All you need is a compiled .tft file which is written to the display's flash memory. The precompiled .tft files with the MMDVMHost default layout are to be found in this directory as well.

To update the Nextion display you just need to know the serial port the display is connected to. It could be /dev/ttyUSBx for USB<->Serial adapters or /dev/ttyAMA0 for the UART on the Raspberry Pi for example.

This does NOT work with modem connected screens. I have a ttl to USB adapter and it worked just fine after I crashed my screen.

Link
https://github.com/g4klx/MMDVMHost/tree/master/Nextion_G4KLX
The file at the bottom of the list is what you want.   nextion.py

I put the file in /home/pi-star, along with my tft file
I used the command as follows
python nextion.py NX3224K024.tft /dev/ttyUSB0 NX3224K024

Phil VE3RD
« Last Edit: February 27, 2020, 02:57:48 pm by VE3RD »

Share on Facebook Share on Twitter


Offline VA3CKI

  • Newbie
  • *
  • Posts: 30
  • Referrals: 0
Re: Flash Nextion Screen from Pi-Star command line
« Reply #1 on: March 02, 2020, 11:06:44 pm »
I just got a 3.2" Nextion screen.  NX4024T032.  I have a USB to TTL interface that I believe is working on my WIN10 box.
My RPi B is connected to serial usb to MMDVM  DVMEGA  with Bluestack. All works ok. MMDVM is "original" firmware by the way.

Question: I don't need the bluestack. I would like to eliminate the USB and put the MMDVM on the RPI B directly and connect this touch screen.
I have the nextion editor installed if I need it but I am operationally challenged with it at the moment, may not need it.
pin out for the screen seems is go to go when ready.

What is the next step?

Reason for this is not being cheap but with the 35 to 40% CDN to USD exchange rate is out of the question for now and I will put Robert's mini hotspot in my office and move my RPi set up to the truck as it will be easier to read the display while driving instead of the micro screen.
« Last Edit: March 02, 2020, 11:24:52 pm by VA3CKI »

Offline VA3CKI

  • Newbie
  • *
  • Posts: 30
  • Referrals: 0
Re: Flash Nextion Screen from Pi-Star command line
« Reply #2 on: March 02, 2020, 11:24:03 pm »
Not MMDVM but  DVMEGA board ! Sorry

Offline VE3RD

  • Newbie
  • *
  • Posts: 26
  • Referrals: 0
Re: Flash Nextion Screen from Pi-Star command line
« Reply #3 on: March 03, 2020, 07:17:51 am »
Make sure you have python and pyserual on that platform

Offline VA3CKI

  • Newbie
  • *
  • Posts: 30
  • Referrals: 0
Re: Flash Nextion Screen from Pi-Star command line
« Reply #4 on: March 13, 2020, 10:58:23 pm »
I have the 3.2" screen working on the tgif pistar now. A lot of research and head scratching on my own.
Using  the ON7LDS_L3 HMI file. Wasn't easy to see which file would work and the nextion editor is suspicious as it sometimes shows this is a program not legitimate and may corrupt.. etc but worked.
So why is the nextion editor free when you get that message?
Also finally upgraded the firmware on the DVMEGA.... not easy, instructions very not clear, bricked one ATMEGA chip due to intrusctions not clear that a usb driver is required fot the Arduino Uno programmer...  but got it done,,,,,  Web sites for how to do and very vague and not on topic on searches.... you are on your own mostly.

Offline VA3CKI

  • Newbie
  • *
  • Posts: 30
  • Referrals: 0
Re: Flash Nextion Screen from Pi-Star command line
« Reply #5 on: April 10, 2020, 07:37:09 pm »
Hi Phil
I now have the proper 3.5 screen and some little problems with it so far. I like the lay outs!

Step 2 seems to KILL the HOME screen. Step 1 is good.
copy from other posts:

I am running PiStar 4.1.0-RC7 on a RPI 3B and have added the 3.5 K series screen connected  by USB/TTL adapter via USB port on RPi, with Mitch's latest nextion TFT file. All seems to be good on the screen except CPU temps.
Using the instructions from Mitch's UPDATING PI-STAR WITH NEXTION SCREEN: STEP 1, the github loads fine and the Update works fine, all is well except no CPU temps (which is normal so far)

STEP 2 is executed with the ./IND.sh option 3 then select #2, all loads fine then this is where the problems start:
The HOME screen now is always waiting for data... and is always inactive except the only box works is the LINKS button.
So... once again, format SD card and start over, done this 3 times with 2 different SD cards..... same results.
Any help would be appreciated !
Step2 kills it.
Should I go to the full new Pi-Star_RPi_V4.1.0_26-Mar-2020.zip??

Offline VA3CKI

  • Newbie
  • *
  • Posts: 30
  • Referrals: 0
Re: Flash Nextion Screen from Pi-Star command line
« Reply #6 on: April 11, 2020, 02:22:59 pm »
I moved the sd card to RPi 4 board. Booted ok
Only change was wlan address. what failed before still fails even after another PI-Star update STEP 1. Not trying step 2.
I must be missing something. No BER, RSSI even on DMR page.

Offline VA3CKI

  • Newbie
  • *
  • Posts: 30
  • Referrals: 0
Re: Flash Nextion Screen from Pi-Star command line
« Reply #7 on: April 11, 2020, 08:07:01 pm »
Since no changes observed I have put PiStar back on RPi 3B with no changes also.

Offline VA3CKI

  • Newbie
  • *
  • Posts: 30
  • Referrals: 0
Re: Flash Nextion Screen from Pi-Star command line
« Reply #8 on: April 11, 2020, 10:44:14 pm »
Runs cooler also

Offline VA3CKI

  • Newbie
  • *
  • Posts: 30
  • Referrals: 0
Re: Flash Nextion Screen from Pi-Star command line
« Reply #9 on: April 13, 2020, 09:59:43 am »
UPDATE:
I have the 3.5 screen working now but question is there any instructions or user manual or explaination what each screen does?
eg. wifi screen,   how does it interact with the Expert>Wifi settings ?

 

Related Topics

  Subject / Started by Replies Last post
0 Replies
78 Views
Last post February 19, 2019, 03:01:44 pm
by Robert K4WZV
1 Replies
104 Views
Last post May 12, 2019, 01:09:57 pm
by N1KK
0 Replies
46 Views
Last post May 12, 2019, 11:39:24 am
by ke5cdk
1 Replies
106 Views
Last post May 14, 2019, 03:29:00 pm
by rnfuller
0 Replies
98 Views
Last post July 22, 2019, 07:26:29 pm
by K7RLH