Serial communication, problem

Hi, I have serial communication, master: slave.
What is on this code wrong? Because I have checksum Checksum error!, and when I remove checksum functionality, I have different data on slave as I send from master.

// master
#include <SoftwareSerial.h>
#define rxPin 2
#define txPin 3
SoftwareSerial Serial1 =  SoftwareSerial(rxPin, txPin);

const byte START_BYTE = 254;
const byte ID = 22;
const byte ASK_CONNECT_BYTE = 100;
const byte END_BYTE = 255;

byte mb[5];
byte checksum = 0;

void setup() {
	pinMode(rxPin, INPUT);
  	pinMode(txPin, OUTPUT);
	Serial.begin(9600);
	Serial1.begin(9600);
  	delay(1000); 
}

void loop() {
	mb[0] = (uint8_t)START_BYTE;
  	mb[1] = (uint8_t)ID;
 	mb[2] = (uint8_t)ASK_CONNECT_BYTE;
  	mb[3] = (uint8_t)END_BYTE;
   	checksum = mb[0] + mb[1] + mb[2] + mb[3];
    mb[4] = checksum;
  
  	Serial.println("-------------");
  	Serial.println(mb[0]);
  	Serial.println(mb[1]);
  	Serial.println(mb[2]);
  	Serial.println(mb[3]);
  	Serial.println(mb[4]);
  	Serial.println("-------------");
  
  	Serial1.write(mb, sizeof(mb));
  	Serial1.flush();
  
	delay(2000);
}
//slave
#include <SoftwareSerial.h>

#define rxPin 2
#define txPin 3
SoftwareSerial Serial1 =  SoftwareSerial(rxPin, txPin);

void setup() {
    pinMode(rxPin, INPUT);
  	pinMode(txPin, OUTPUT);
	Serial.begin(9600);
   	Serial1.begin(9600);
}

void loop() {
	if (Serial1.available()>=5) {
      byte received[5];
      Serial1.readBytes(received, 5);
      byte received_checksum = received[4];
      byte calculated_checksum = received[0] + received[1] + received[2] + received[3];
      
		if(received_checksum == calculated_checksum) {
          Serial.println("-------------");
          Serial.println(received[0]);
          Serial.println(received[1]);
          Serial.println(received[2]);
          Serial.println(received[3]);
          Serial.println(received[4]);
          Serial.println("-------------");
        } else {
          Serial.println("Checksum error!");
        }
  	}
}

what arduinos are you using?
can you upload serial monitor outputs (as text not images) showing bytes transmitted and received?
using a couple of UNOs if I run your transmitter the serial monitor displays

-------------
254
22
100
255
119
-------------
-------------
254
22
100
255
119
-------------

and the receiver displays

-------------
254
22
100
255
119
-------------
-------------
254
22
100
255
119
-------------

the only modification I made to your code was changing Serial baudrate from 9600 to 115200, e.g.

	Serial.begin(115200);

readBytes expects ASCII, doesn't it?

Edit: ignore me.
Brain fart

Bingo, I use tinkercad for now. I can not use two serial in same baudrate, when I change one, Its work.
I don`t know why.
Thnx.

Another question,
How can I send data, to one arduino, like this, and wait to response?

you need a communications protocol - start simple
master

loop
    prompt slave for data
    wait for data
    read data
endloop

slave

loop
   wait for prompt
   send data
endloop

the above assumes no loss of byes during communication
protocol can then be extended, e.g. master

  1. if prompt is lost or nothing received - timeout and ressends prompt
  2. if duplicate data is received - what to do?
  3. etc etc

Thx