Arduino with Software Serial and At Commands

I need some help with my code, I already use the Hterm program to test my gsm module - Sim800l and it works correctly with this At commands, but when I try run the code with the At commands on my Arduino Uno something goes wrong and it doesn’t work.

Here’s the code:

#include <SoftwareSerial.h>

SoftwareSerial mySerial(10, 11); // RX, TX


void setup() {
 // Open serial communications and wait for port to open:
  Serial.begin(9600);
  while (!Serial) {
    ; // wait for serial port to connect. Needed for native USB port only
  }

  // set the data rate for the SoftwareSerial port
  mySerial.begin(9600);
  mySerial.write("AT \n"); 
  delay(100); 
  Serial.write(mySerial.read());
  mySerial.write("AT+CREG? \n");
   delay(50); 
  if (mySerial.available()) {
    Serial.write(mySerial.read());
  }
  
  mySerial.write("AT+CIPSHUT \n"); 
  delay(50); 
  if (mySerial.available()) {
    Serial.write(mySerial.read()+"\n");
  }
  
 mySerial.write("AT+CGATT=1 \n"); 
  delay(50); 
  if (mySerial.available()) {
    Serial.write(mySerial.read());
  }
  
  mySerial.write("AT+SAPBR=3,1,\"CONTYPE\",\"GPRS\" \n");
  delay(50); 
  if (mySerial.available()) {
    Serial.write(mySerial.read());
  }
  
  mySerial.write("AT+SAPBR=3,1,\"APN\",\"myconnection\" \n");
  delay(50); 
  if (mySerial.available()) {
    Serial.write(mySerial.read());
  }
   
  mySerial.write("AT+SAPBR=1,1 \n"); 
  delay(50); 
  if (mySerial.available()) {
    Serial.write(mySerial.read());
  }
  mySerial.write("AT+HTTPINIT \n"); 
  delay(50); 
  if (mySerial.available()) {
    Serial.write(mySerial.read());
  }
  mySerial.write("AT+HTTPPARA=\"CID\",1 \n"); 
  delay(50); 
  if (mySerial.available()) {
    Serial.write(mySerial.read());
  }
  mySerial.write("AT+HTTPPARA=\"URL\",\"http://*****/api/v1/***/*****\" \n"); 
  delay(50); 
  if (mySerial.available()) {
    Serial.write(mySerial.read());
  }
  mySerial.write("AT+HTTPDATA=100,10000\n"); 
  delay(50); 
  if (mySerial.available()) {
    Serial.write(mySerial.read());
  }
    mySerial.write("username=*****&password=******&"); 
  delay(50); 
  if (mySerial.available()) {
    Serial.write(mySerial.read());
  }
 
  mySerial.write("AT+HTTPACTION=1 \n"); 
  delay(50); 
  if (mySerial.available()) {
    Serial.write(mySerial.read());
  }
    mySerial.write("AT+HTTPTERM \n"); 
  delay(50); 
  if (mySerial.available()) {
    Serial.write(mySerial.read());
  }
}


void loop() {
if (mySerial.available()) {
    Serial.write(mySerial.read());
  }
  if (Serial.available()) {
    mySerial.write(Serial.read());
  }
}

here’s what happens:

AT
OK
AT+CREG? 
+CREG: 0,1

OK
AT+CIPSHUT 
SHUT OK
AT+CGAAAA
OK

Please Help
Thanks

Serial.read() returns only a single byte. What happens if you call it in a loop, i.e. while (Serial.available())?

Thanks apparently it works :)