Can I change serial communication codes in nextion?

Hey There, I have a problem about serial communication. I have one card that I got from the supplier, it performs its operations by receiving data from the screen with serial communication. I can’t interfere with the software on the card in any way. But I want to change my screen with Nextion. But there is a problem about communication. I need to send the codes that I have determined from Nextion so that my card can understand the incoming data. Is there any way to do it? Can I chage Serial Communication codes on nextion? Thx a lot.

It is technically possible to override almost everything of the Nextion’s default serial communication.
bkcmd=0 will cut off almost all success/fail return data from Nextion to device.
prints and printh commands allow to send arbitrary data from Nextion to device following your custom protocol.
recmod=1 deactivates the automatic processing of incoming serial data and gives you the control over the serial buffer which your code will then have to process “manually”:
The usize variable holds the number of bytes waiting in the buffer similar to serial.available().
The u[n] array gives access to the n-th byte in the buffer.
The ucopy command allows to copy a specified number of bytes over into a numeric or a text variable.
The udelete command deletes a specified number of bytes from the buffer (preferably after having processed these).

Thx for your reply Fjodor. I’m done about this topic. But if you know, please reply again, I want to change serial communication polarity, Right now, Nextion has configuration High idle polarity for serial port. is there any way to change this?

No, this can’t be changed, afaik, it’s how all TTL UARTs work to be half-way compliant with RS232. A RS232 converter like the MAX232 series will shift voltages to be compliant with RS232 where logical 1 is negative voltage and logical 0 is positive voltage. But the polarity (0 gives higher voltage than 1) remains the same.