Error connecting Nodemcu v3 with SIM900a

Hi all..
i want ask why this code can't work with nodemcu, but work with arduino

#include<SoftwareSerial.h>

SoftwareSerial mySerial(4, 5);  //D2, D1

void setup()
{
  //Begin serial communication with Arduino and Arduino IDE (Serial Monitor)
  Serial.begin(9600);
  
  //Begin serial communication with Arduino and SIM900
  mySerial.begin(9600);

  Serial.println("Initializing..."); 
  delay(1000);

  mySerial.println("AT"); //Handshaking with SIM900
  updateSerial();
  
  mySerial.println("AT+CMGF=1"); // Configuring TEXT mode
  updateSerial();
  mySerial.println("AT+CNMI=1,2,0,0,0"); // Decides how newly arrived SMS messages should be handled
  updateSerial();
}

void loop()
{
  sms();
}

void updateSerial(){
  delay(500);
  String buffer = "";
  while(mySerial.available()) 
  {
    char c = mySerial.read();
    Serial.print(c);
  }
}

void sms(){
  delay(500);
  String buffer = "";
  char c;
  char d;
  c = mySerial.read();
  if(c == 'H'){
    buffer += c;
    while(mySerial.available()){
      d = mySerial.read();
      buffer += d;
    }
    Serial.print(buffer);
  }
}

this is message from serial monitor

c⸮⸮axh⸮R⸮⸮Initializing...
⸮⸮

i connect pin

NODEMCU SIM900A
Vin -> VCC5
GND -> GND
D1 -> 5VR
D2 -> 5VT

Describe your exact hardware and wiring (and power).

Is it possibly a mismatched baud rate somewhere? I see the unusual characters when I reset an ESP8266 I think due to boot up messaging being at a different baud rate.

J-M-L:
Describe your exact hardware and wiring (and power).

this for the wiring

NODEMCU SIM900A
Vin -> VCC5
GND -> GND
D1 -> 5VR
D2 -> 5VT

the power is from NODEMCU V3

zoomkat:
Is it possibly a mismatched baud rate somewhere? I see the unusual characters when I reset an ESP8266 I think due to boot up messaging being at a different baud rate.

i had change the baudrate to from 4800 to 115200 and still no effect

"i had change the baudrate to from 4800 to 115200 and still no effect"

Set the serial monitor to 74880 baud rate, then push the reset button on the board and see if you get a readable result.

what is the available power from your power supply that gets transmitted to your SIM900A?
You need a pretty beefy (1.5 to 2Amps) source. powering through USB is not enough.