Start a new topic

how to decode message from Nextion

 Hello i have little promblem with coded message this i get from my txt file in which i 've written messages from Nextion display:

 

F4F4 F4F4 FFFF 1AFF 0D0A 8DFF FF1A FF0D
0A8D FFFF FF0D 0A1A FFFF 1AFF 0D0A FF1A
FFFF 0D0A FD1A FFFF FF0D 0A57 D3FF 1AFF
FF0D 0AF4 1AFF FFFF 0D0A 2BD3 D3D1 FFFF
1AFF 0D0A 92FA 1AFF FFFF 0D0A AEA6 A61A
FFFF FF0D 0AF4 1AFF FFFF 0D0A F81A FFFF
FF0D 0AFE FE1A FFFF FF0D 0A9A 8A1A FFFF
FF0D 0A1A FFFF 1AFF 0D0A FF1A FFFF 0D0A
62CD 3333 3231 FFFF FF0D 0A1A FFFF 1AFF
0D0A C532 33FF FFFF 0D0A 1A1A FFFF FF0D
0A1A FFFF 1AFF 0D0A D1D1 D1D1 FF1A FFFF
0D0A 8DFF 1AFF FF0D 0A1A FF1A FFFF 0D0A
461A FFFF FF0D 0AF4 1AFF FFFF 0D0A FD1A
FFFF FF0D 0A

 

 and this is my code in arduino:


 

#include <SoftwareSerial.h> 
#include <Nextion.h>
#include <SPI.h>
#include <SD.h>

SoftwareSerial nextion(3, 2);// Nextion TX to pin 3 and RX to pin 2 of Arduino

Nextion myNex(nextion, 9600);

File sd, lok, zk;
String loged;

void setup() {
  SD.begin(4);
  myNex.init();
}

void loop() {
  String heslo = myNex.listen();
  
  sd = SD.open("prih.txt");  
  loged = sd.read();
  sd.close();
 
  if(heslo != ""){ // kontrola jestly nekdo něco zmáčkl
      zk = SD.open("zk.txt", FILE_WRITE);
      zk.println(heslo);
      zk.close();
      
      if(heslo == "70 123"){
        SD.remove("prih.txt");
        if(!SD.exists("prih.txt")){
          lok = SD.open("log.txt", FILE_WRITE);
          sd = SD.open("prih.txt", FILE_WRITE);
          myNex.sendCommand("pr.txt='y'");
          myNex.sendCommand("ok.txt='y'");
          loged = '1';
          sd.print("1");
          lok.println("123");
          sd.close();
          lok.close();          
          }       
      }
  }


  //Kontrola přihlášenosti
  if(loged=="1"){
    myNex.sendCommand("pr.val=1");
  }else{
    myNex.sendCommand("pr.val=0");       
    }
  
}

 This all is for keypad on password :D.

Could someone help how can i gent normal responde not coded ?

And here is hmi file.

HMI

oh sorry, i wanted to say encrypted

 

Problems in HMI code did not compile in v37

use of complex evaluations if(j0.val<=75&& j0.val>50) not allowed.


Coded text looks like hexadecimal byte values for your character set

Char(F4) unknown

Char(33) is a "3"

Char(32) is a "2"


Char(0D) is return  -- these two usually paired at the end of a line of text

Char(0A) is newline




yeah, but im using v32 and its chinese version , couse i chinese nextion display :D
And that what you showing is on the last page so , how can it sending something , when its now load ? Oh and im so sorry , couse i  forget to say , that im working with arduino UNO.

 

Login or Signup to post a comment