Saturday, June 9, 2018

Flash Nextion Firmware use SSH mode and USBtoTTL Adapter


Flash Nextion Firmware online(ssh),thanks Peng Hui Ping VR2VYE provide this method ,from now not need TF Card. Video demo follow my facebook status and the end of this article.
First publish in https://www.facebook.com/winters.cn/posts/1620668804697067
*Now not support board 4 PINs header output mode, Pi-Star setting Nextion (Modem)

Prepare tools
1x USBtoTTL Adapter, such as CP2102, PL2303 model
require pyserial runtime

How to do
1) login ssh mode:
http://pi-star:2222
default login
usr: pi-star
pas: raspberry

Copy the follow RED text ,then Ctrl+V, and press ENTER,
Notice that rpi-rw, sudo su , su pi-star, just support one line one time

#Change system to Read and Write
rpi-rw

Step 1, Install require runtime . VERY IMPORTANT!

sudo su; 
rpi-rw; 
cd /tmp;
git clone https://github.com/pyserial/pyserial.git;
cd pyserial;
python setup.py install;

#When install  runtime complete,change to pi-star user
su pi-star
cd /home/pi-star

#Download nextion.py
wget https://raw.githubusercontent.com/g4klx/MMDVMHost/master/Nextion_G4KLX/nextion.py

Step 2, download Nextion firmware (*.tft not *.HMI)

#Download Nextion firmware to current directory
#for 4.3 inch NX4827T043
wget https://github.com/nano-mmdvm/Duplex_hotSPOT/raw/master/nextion/NX4827T043_G4KLX_ShowIP_by_BI7JTA.tft

#for 3.2 inch NX4024T032
wget https://github.com/nano-mmdvm/Duplex_hotSPOT/raw/master/nextion/NX4024T032_G4KLX_ShowIP_by_BI7JTA.tft

Step 3, flash use command 

#5) Stop MMDVMHost serice
sudo pistar-watchdog.service stop; sudo systemctl stop mmdvmhost.timer; sudo systemctl stop mmdvmhost.service

#6)Flash to /dev/ttyUSB0
python nextion.py NX4827T043_G4KLX_ShowIP_by_BI7JTA.tft /dev/ttyUSB0

#Flash to /dev/S2 when using modem,4 PINs header
Now not support

#7) Startup MMDVMHost service
sudo pistar-watchdog.service start; sudo systemctl start mmdvmhost.timer; sudo systemctl start mmdvmhost.service





Nextion firmware repository 

BIJTA: build for bi7jta serials hotspot



G4KLX: 

PD0DIB Model7 & Model8 HMI file 
https://github.com/PD0DIB/Nextion_HAM-radio-screens

Note: HMI file you need to install Nextion Editor, general the tft bin file.

1 comment:

  1. Hi Winters, any ´chance to flash the Nextion connected to ttyAMA0 (Modem)?

    ReplyDelete

Bluetooth Adapter for Nextion User guide

Test:  AT  Set Master AT+ROLE=M Set Slave AT+ROLE=S  Set Baud ...