Serial issue .. sent data the same as received

Hello guys
I am new to arduino but not new to programming
I hate using headers and instead i am writing my own code including serial communication with nextion and I2C with DS3231 …
The project is an announcement machine for hospital to tell visitors that visit time has ended
I have two questions:
Does software serial conflict with hardware serial in arduino uno … cause i am using mp3 serial player and nextion … both of them needs serial data
The second is that i am frequently updating a value in nextion using data from arduino … lets say current time… whenever i use Serial.available() to read what nextion sends it gets the same data i sent …

Serial.read() = “txtTime.txt= balablabla(time)”
And i try to use while loop to read serial port after each data being sent … arduino stops working properly and serial data monitoring shows weird behavior

Is it normal to find the data i sent from arduino to nextion in Serial.read()??

Sorry for my english language
Thanks in advance

Some code might help. What baud is the SoftwareSerial running at?

Have a look at the code (for sure its not finished):

#include<Wire.h>
#define DS_ADDRESS 0x68
#define DS_ADD_TIME 0x00
#define DS_ADD_TEMP 0x11
#define DS_ADD_FRACTION 0x12

String sOldTime;
String sOldTemp;

void setup()
  {
  Wire.begin();
  Serial.begin(9600);
  }

void loop()
  {
  if(Serial.available())
    {
    Serial.println(Serial.read());
    }
  String sCurrentTime,sCurrentTemp;
  sCurrentTime=fGetTime();
  sCurrentTemp=fGetTemp();
  if(sCurrentTime!=sOldTime) // Minimize number of serial sending
    {
    String sTimeToSend="txtTime.txt=\"" + sCurrentTime + "\"";
    Serial.write(sTimeToSend.c_str());
    Serial.write(0xFF);
    Serial.write(0xFF);
    Serial.write(0xFF);
    sOldTime=sCurrentTime;
    }
  if(sCurrentTemp!=sOldTemp) // Minimize number of serial sending
    {
    String sTempToSend="txtTemp.txt=\"" + sCurrentTemp + " C\"";
    Serial.write(sTempToSend.c_str());
    Serial.write(0xFF);
    Serial.write(0xFF);
    Serial.write(0xFF);
    sOldTemp=sCurrentTemp;
    }
  }

String fGetTime()
  {
  Wire.beginTransmission(DS_ADDRESS);
  Wire.write(DS_ADD_TIME);
  Wire.endTransmission();
  Wire.requestFrom(DS_ADDRESS,3);
  byte iSeconds=BCDtoD(Wire.read());
  byte iMinutes=BCDtoD(Wire.read());
  byte iHours=BCDtoD(Wire.read());
  String sTime=String(iHours) + ':' + String(iMinutes) + ':' + String(iSeconds);
  return(sTime);
  }

int BCDtoD(byte BCD)
  {
  return((BCD/16*10)+(BCD%16)); 
  }

String fGetTemp()
  {
  Wire.beginTransmission(DS_ADDRESS);
  Wire.write(DS_ADD_TEMP);
  Wire.endTransmission();
  Wire.requestFrom(DS_ADDRESS,1);
  byte bTemp=Wire.read();
  
  Wire.beginTransmission(DS_ADDRESS);
  Wire.write(DS_ADD_FRACTION);
  Wire.endTransmission();
  Wire.requestFrom(DS_ADDRESS,1);
  byte bFraction=Wire.read();
  float fFraction=(bFraction >> 6) * 0.25;
  return(String(bTemp+fFraction));
  }

First, there is no SoftwareSerial here. Just a regular hardware Serial and the TWI library Wire.h

What is the expected response of the serial device? Can you post the serial monitor output that makes you suspicious?

Yes I know there is no software serial … as I mentioned its not finished yet

here is a pic of my serial monitor when receiving any data from my nextion (attached )

Ohh, I see. I interpreted your question about SoftwareSerial as a suggestion that you thought it might be causing the loopback issue. You can use them both but keep softwareserial baud rate very low for best performance.

A quick parsing of the Nextion instruction set found this:

The first byte of returned data: 0x00
Meaning: Invalid Instruction
Format:0X00+End
Return this data when receiving the invalid instruction sent by the user

I think this looks exactly like your output, so I think it is the actual reply from Nextion. I think you need to fix your command.

Thanks a lot .. SOLVED

I don't need bkcmd and by default its set to send back info