Esp8266 not working

Do I need to flash the esp8266 for the first time or comes pre loaded with a firmware, because since a week i am trying to get it work but it does not respond to my AT commands.When I restart the esp by reconnecting wires it give be random characters and and mostly question marks and when I type AT in the serial monitor it shows question marks and most of time it does not respond at all.I do not know what's the problem I have connected the circuit using an arduino uno. And when I connect the reset pin to ground and reconnect my esp I get no random characters ,totally blank.So I did not connect my reset pin anywhere Here is my circuit detail:

VCC - 3.3v ( using AMS11117)
GND - GND
CH_PD - 3.3v
GPIO0 - VCC
TX - PIN 2
RX - PIN 3

Here is my code:

#include<SoftwareSerial.h>

SoftwareSerial esp8266(2,3); // make RX Arduino line is pin 2, make TX Arduino line is pin 3.
// This means that you need to connect the TX line from the esp to the Arduino's pin 2
// and the RX line from the esp to the Arduino's pin 3
void setup()
{
Serial.begin(115200);
esp8266.begin(115200
); // your esp's baud rate might be different
}

void loop()
{
if(esp8266.available()) // check if the ESP is sending a message
{
while(esp8266.available())
{
char c = esp8266.read(); // read the next character.

Serial.write(c); // writes data to the serial monitor
}
}
if(Serial.available())
{
String command="";
uint8_t c=0;
while(c!=10) // read the command character by character
{
if (Serial.available()) {
c=Serial.read();
command+=(char)c;
}
}
Serial.print("Sending: ");
Serial.println(command);
esp8266.print(command); // send the read character to the esp8266
}
}

One more thing I did not use any capacitor ,is this causing problem or there is no firmware present or my wiring is wrong?.

I am totally new to this ,so please help me.

Thank you.

Did you set the menu at the bottom right corner of Serial Monitor to 115200?

SoftwareSerial doesn't work reliably at 115200. You need to change the baud rate of the ESP8266 to 9600 baud to reliably use it with software serial. The catch is you need to do that by sending an AT command. So hopefully you can get it working well enough at 115200 just long enough to change the baud rate.

pert:
Did you set the menu at the bottom right corner of Serial Monitor to 115200?

SoftwareSerial doesn't work reliably at 115200. You need to change the baud rate of the ESP8266 to 9600 baud to reliably use it with software serial. The catch is you need to do that by sending an AT command. So hopefully you can get it working well enough at 115200 just long enough to change the baud rate.

Okay that means that esp cannot respond by default at 9600 and softwareserial cannot take response above 9600.But can you please tell me how to change the baud rate of esp

Answer my question:

pert:
Did you set the menu at the bottom right corner of Serial Monitor to 115200?

pert:
Answer my question:

Yes

Develop12:
But can you please tell me how to change the baud rate of esp

You send it the AT command:

AT+UART_CUR=9600,8,1,0,3

That will only temporarily change the baud rate and it will reset to the default ever time the power is cycled. If you want to permanently change the baud rate you need to use this command:

AT+UART_DEF=9600,8,1,0,3

Make sure to select "Both NL & CR" from the menu next to the baud rate menu at the bottom right corner of the Serial Monitor window before sending the AT commands. Since the AT firmware defaults to 115200 baud you need to have Serial Monitor set to 115200 when you send the command and then after you have changed it to 9600 change the Serial Monitor menu to 9600, then type this command to verify it's working:

AT+GMR

That will print out the information on the AT firmware version you're using.

This information is contained in the "AT Instruction Set" documentation, which you can download from this page:

Note that documentation applies to the latest versions of the official Espressif AT firmware. You may have another type of firmware installed or an old version that uses a different AT command set.

pert:
You send it the AT command:

AT+UART_CUR=9600,8,1,0,3

That will only temporarily change the baud rate and it will reset to the default ever time the power is cycled. If you want to permanently change the baud rate you need to use this command:

AT+UART_DEF=9600,8,1,0,3

Make sure to select "Both NL & CR" from the menu next to the baud rate menu at the bottom right corner of the Serial Monitor window before sending the AT commands. Since the AT firmware defaults to 115200 baud you need to have Serial Monitor set to 115200 when you send the command and then after you have changed it to 9600 change the Serial Monitor menu to 9600, then type this command to verify it's working:

AT+GMR

That will print out the information on the AT firmware version you're using.

This information is contained in the "AT Instruction Set" documentation, which you can download from this page:
https://www.espressif.com/en/support/download/documents
Note that documentation applies to the latest versions of the official Espressif AT firmware. You may have another type of firmware installed or an old version that uses a different AT command set.

I still get no response from the esp.Is there any chance that the AT firmware is not present in the esp?

This got me up and running:

I used "esptool.py" to get my AT commands back.

Hey Develop12,

I assume you already have an uno, and think you would have to now order a USB to TTL converter to use the webpage Kayel suggested.

You can use Arduino Uno as a converter, How to use an Arduino as a USB to TTL converter || Arduino tutorial - YouTube

Obviously you need to use the power settings for ESP!

but the serial connections are the same as in the video.

Thank you everyone for your suggestions, I will try these methods and check if it works or not