I have a little problem with programming with arduino uno and esp8266. I have connected the arduino uno with esp8266 module.
I get correct results when I run a empty program to test esp8266 with its command.
Manually entered commands with results:

When I give manually in serial monitor command AT it gives OK and correct results for all commands.
But when I try to automate with program I don,t get the output as it gives when I type manually at serial monitor could you please check my codes.
void setup() {
Serial.begin(115200);
}
void loop() {
delay(5000);
Serial.println("AT+RST");
while(Serial.available())
{
String s=Serial.readString();
Serial.println(s);
}
}
My next program
#include<SoftwareSerial.h>
SoftwareSerial esp8266(2,3);
void setup() {
Serial.begin(115200);
esp8266.begin(115200);
delay(1000);
}
void loop() {
delay(2000);
String command="AT+RST";
esp8266.println(command);
if(esp8266.available())
{
while(esp8266.available())
{
char c=esp8266.read();
Serial.write(c);
}
}
}
My result for this program is nothing on serial monitor.
I want to get the command in the program as string so that i could perform string operations like find or others when acting as a web server.
Someone please help me.
