This small tutorial is meant to help you connect the ESP8266 wifi module to Raspberry Pi through the serial port. It will show you how to run a simple AT command and how to connect the chip to your wireless router using these commands.

Before starting the wiring, I highly recommend you to use a breadboard.

You can use the following table as a wiring guide.Ex: VCC and CH_PD from Wifi module are connected to Pin 1 from Raspberry.

ESP8266

Raspberry Pi B

VCC and CH_PD

Pin 1 (3V3)

GND

Pin 9 (Ground)

TX

Pin 10 (GPIO 15)

RX

Pin 8 (GPIO 14)

After you finish the wiring you can plug in the power into Raspberry.

Now weve reached to the phase where we want to access the ESP8266 module through serial port. For this we need a tool called minicom, but first we need to disable Serial Port Login and some Bootup info on Raspberry. You can do that by following the next short steps

Disable serial port login:
Open /etc/inittab and search for the following line:

T0:23:respawn:/sbin/getty -L ttyAMA0 115200 vt100

You need to comment this line by adding # at the beginning of the line.

#T0:23:respawn:/sbin/getty -L ttyAMA0 115200 vt100

Disable bootup info:

This part is optional. At every boot Raspberry will send all bootup information through serial port. If you want to keep that information to be sent, just skip this step.
Remove all ttyAMA0 references from /boot/cmdline.txt