Bad Serial Data From SoftwareSerial

i am getting Erroneous data from my software serial Connection , any help would be greatly Appreciated. I'm supposed to be getting 2,3

My Code

#include <AccelStepper.h>
#include <SoftwareSerial.h>

 #define STEP_PIN 9
 #define DIR_PIN 8
 
// DeFine Virtual Serial Port on NANO
SoftwareSerial mySerial(7, 6); // RX, TX

// ********************* STEPPER MOTOR CONTROL ****************
// Define stepper motors using DRIVER interface, pins 7 and 8 for step and direction
// AccelStepper stepper(AccelStepper::DRIVER, STEP_PIN, DIR_PIN);
char mystr;

void setup() {
  Serial.begin(19200);
  mySerial.begin(19200);
 // ********************* STEPPER MOTOR ****************
// Define stepper motors using DRIVER interface, pins 7 and 8 for step and direction
 // stepper.setMaxSpeed(2600);
 // stepper.setAcceleration(1000);
 //  stepper.moveTo(140); // Move to position 200
}

void loop() {
  
    mystr = mySerial.read();
    Serial.print(mystr);
    Serial.print("Value 1: ");
    Serial.println(mystr);
 
}
 

Serial Terminal:

That is not how you read serial data. You need to make sure that data are actually available before reading. Something like this will work IF the selected serial baud rate is correct:

void loop() {

if (mySerial.available()) {
Serial.print(mySerial.read());
}
...

Have a look at the Arduino Serial Input Basics tutorial.

SoftwareSerial can sometimes become unreliable at baud rates above 9600. It’s also a good practice to set your serial output baud rate faster than your serial input. This helps prevent data backup, reduces the need for large buffers, and minimizes the chance of dropped or delayed output due to print congestion.