Hi to the previous post which i have raised in forum, i have some error,
i am trying to interface a gsm module to ESp32, while trying to send the AT commands, and read the response in serial monitor, i get random error in serial monitor like this
The ESP32 has a hardware serial interface (Serial2) on exactly the pins 16 and 17. Why do you emulate one in software? Don't expect that emulation to run at 115200 baud reliably.
Given the random characters you get (that's not an error message!) I guess you use the wrong baud rate but that's up to you to check.
yes, i have tried with hardware serial also, and even cross verified the baud rates, but seems to be no luck. Also when i try to check the response of the module via USB to TTL, in serial monitor in the same baudrate, i get a proper output. This is not happening when i send via ESP32
As stated by @pylon hardware serial is way more reliable... I doubt you will get high speeds (115200) using Software Serial.
Looks like a mismatch baud rate with the modem... do you know the default for the modem you are using? You could try sending an AT command to change the default.
Thanks guys @pylon@red_car , hardware serial helped me, in the same baud rate with bit increase in a delay. Now i am getting reasonable response which i expected.