0
\$\begingroup\$

I have been trying to get ESP8266 WIFI module (ESP-12E) to connect to Raspberry PI 3 serial port, but I've tried everything I could think of, but still can't get it to connect.

Connection

I have connected it directly to Raspberry Pi 3 the following way: enter image description here

I followed this datasheet: http://www.kloppenborg.net/images/blog/esp8266/esp8266-esp12e-specs.pdf

Which states:

  MODE        GPIO15     GPIO0     GPIO2

  UART        Low        Low       High
  Flash Boot  Low        High      High

So far so good, but when I apply the power, nothing happens and when I touch the module, I can feel that it's warm. If I disconnect the GPIO2 pin, the blue LED blinks once on power up, but according to the manual, it should blink twice. Manual also states that there should be a red LED, which apparently doesn't exist for this version.

Raspberry

  1. I ran raspi-config and disabled "Login shell over serial"
  2. I edited /boot/config.txt and added "enable_uart=1"
  3. I edited /boot/cmdline.txt and it currently looks like this:

    dwc_otg.lpm_enable=0 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait

  4. dmesg | grep tty returns:

    Kernel command line: 8250.nr_uarts=1 dma.dmachans=0x7f35 bcm2708_fb.fbwidth=656 bcm2708_fb.fbheight=416 bcm2709.boardrev=0xa02082 bcm2709.serial=0x99a45a3 smsc95xx.macaddr=B8:27:EB:9A:45:A3 bcm2708_fb.fbswap=1 bcm2709.uart_clock=48000000 vc_mem.mem_base=0x3dc00000 vc_mem.mem_size=0x3f000000  dwc_otg.lpm_enable=0 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait
    console [tty1] enabled
    3f215040.uart: ttyS0 at MMIO 0x3f215040 (irq = 59, base_baud = 31250000) is a 16550
    3f201000.uart: ttyAMA0 at MMIO 0x3f201000 (irq = 87, base_baud = 0) is a PL011 rev2
    systemd[1]: Starting system-getty.slice.
    systemd[1]: Created slice system-getty.slice.
    
  5. Finally I tried to connect using the following commands:

    picocom /dev/ttyAMA0 -b 9600
    picocom /dev/ttyAMA0 -b 57600
    picocom /dev/ttyAMA0 -b 76800
    picocom /dev/ttyAMA0 -b 115200
    
    picocom /dev/ttyS0 -b 9600
    picocom /dev/ttyS0 -b 57600
    picocom /dev/ttyS0 -b 76800
    picocom /dev/ttyS0 -b 115200
    

But I can't type anything and when I restart the ESP8266, I see the blue LED blinking once (if GPIO2 is disconnected), but no data. Any ideas what am I doing wrong? Thanks!

\$\endgroup\$
3
\$\begingroup\$

VCC RaspberryPi 3V3

And there's your problem.

The 3V3 connection is rated for 50mA. The ESP8266 can draw over 200mA. Get a LDO regulator and connect it to the 5V connection instead.

\$\endgroup\$
  • \$\begingroup\$ I used a separate power source as you suggested. if I disconnected GPIO0 and GPIO2 then the module would blink a blue LED and show up as an access point, success! but, when I connect GPIO0 and GPIO2, the device doesn't blink the blue LED, but it's warm, so I guess it's turned on, but still can't write/read anything from/to serial. Any more suggestions? \$\endgroup\$ – 0x29a Sep 21 '16 at 20:06
2
\$\begingroup\$

Raspberry PI 3 is slightly different that others PIs - the gpio pins has been swapped - thats why you had to disable Bluetooth. More on this topic here: https://raspberrypi.stackexchange.com/questions/45570/how-do-i-make-serial-work-on-the-raspberry-pi3

\$\endgroup\$
0
\$\begingroup\$

Strangely,after adding the following line to /boot/config.txt and rebooting, I'm actually started to receive garbage data:

dtoverlay=pi3-disable-bt
\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.