So you're a Noob? Post your questions here until you graduate! Don't be shy.

User avatar
By ChetanAmrao
#92450 Hi!
thanks for this forum, been looking for a solution.
I plugged my ESP8266 [https://en.wikipedia.org/wiki/ESP8266]board [] I had got cheap few years back and wanted to try using UART for raspberrypi3

Connected GND of both pi and ESP to GND pins.
Connected Vcc and CH_PD pins of ESP to 3.3v pins.

I was hoping to see response using pyserial library but I get nothing.
>>> import serial
>>> ser = serial.Serial()
>>> ser.timeout = 3
>>> ser.baudrate = 9600
>>> ser.port = '/dev/ttyAMA0'
>>> ser.open()
>>> ser.write('AT\r\n')
User avatar
By prgvitor
#92498
ChetanAmrao wrote:Hi!
thanks for this forum, been looking for a solution.
I plugged my ESP8266 [https://en.wikipedia.org/wiki/ESP8266]board [] I had got cheap few years back and wanted to try using UART for raspberrypi3

Connected GND of both pi and ESP to GND pins.
Connected Vcc and CH_PD pins of ESP to 3.3v pins.

I was hoping to see response using pyserial library but I get nothing.
>>> import serial
>>> ser = serial.Serial()
>>> ser.timeout = 3
>>> ser.baudrate = 9600
>>> ser.port = '/dev/ttyAMA0'
>>> ser.open()
>>> ser.write('AT\r\n')


Hello,

Keep the "EN" and "RST" pins in 3v3.

The default baud rate is not 9600.

For ESP with 40 MHz oscillators the rate is 115200, for ESP with 26 MHz oscillators or baud rate is 74880 (these values ​​can be changed by AT commands).

Change the BaudRate to 115200 and try again with the command ("AT \ r \ n"), if there is no answer, try with 78880.

If there is still no response, you need to confirm that the data is coming out via the RaspBerry PI serial.

For this you can use an oscilloscope or logic analyzer.

If you don't have these devices, you can use a USB serial converter. With a serial terminal program you can send the commands through the USB port to the ESP8266.

Don't forget: RX (ESP) -> TX (RaspBErryPi) / TX (RaspBerryPi) -> RX (ESP);

Also check the output voltage of the RaspBerryPi signals, ESP works with 3V3 voltage level on RX and TX pins.

Thanks