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

You can resolve network connectivity issues by inspecting and editing the IP configuration of the Raspberry Pi™ Ethernet port.

You may need to reconfigure the IP settings if your board:

Has unknown IP settings

Is unreachable using a network connection

Is being moved to a network or direct Ethernet connection that uses static IP settings

Is being moved from a network that used static IP settings to one that uses DHCP services

There are several conditions under which networks use DHCP or static IP settings:

Use DHCP services — If your board is connected to a network with DHCP services, such as an office LAN or a home network connected to the Internet. DHCP is a network service that automatically configures the IP settings of Ethernet devices connected to a network.

Use static IP settings — If your board is directly connected to an Ethernet port on your computer or connected to an isolated network without DHCP services.

To configure the board to use DHCP or static IP settings:

You can use a terminal window after accessing the Linux desktop.

Display the contents of the /etc/network/interfaces file.
Enter:

cat /etc/network/interfaces

If the board is configured to use DHCP services (the default configuration), dhcp appears at the end of the following line:

iface eth0 inet dhcp

If the board is configured to use static IP settings, static appears at the end of the following line: