Use this forum to chat about hardware specific topics for the ESP8266 (peripherals, memory, clocks, JTAG, programming)

User avatar
By gregac
#79492 I have what was described as an 'ESP-01S' bought from eBay. I have hooked it up to the USB Serial TX/RX on an Arduino Mega board to communicate with it. I'm using a voltage divider to translate the 5v TX down to 3.3v and GND is wired to RESET on the Arduino to keep it from interfering.

With that setup I can successfully communicate with the ESP-01S using AT commands. It will connect to WiFi and send / receive data happily.

However I cannot seem to get it respond to anything in serial programming mode. I have GPIO0 wired to GND and GPIO2 wired to 3.3 V VCC (via a 10k resistor). I'm using esptool.py (https://github.com/espressif/esptool) to try communicating with it, using these commands to test the connection:

esptool.py --port [path_to_port] --baud 74880 --trace read_mac
esptool.py --port [path_to_port] --baud 74880 --trace chip_id

The trace shows esptool sending stuff but nothing is coming back.

If I use the serial monitor in the arduino sofware and open the port at 74880 baud with GPIO0 == 0, GPIO2 == 1 immediately out of reset (I reset by manually connecting a wire from RST to GND then removing it) this appears:

ets Jan 8 2013,rst cause:2, boot mode:(1,7)

So it seems to be communicating ok, just not responding to any commands. Trying AT commands in this mode has no effect.

When I bring it up to boot from flash instead (GPIO0 == 1, GPIO2 == 1) I get the following on the serial monitor (again at 74880 baud):

ets Jan 8 2013,rst cause:2, boot mode:(3,7)
load 0x40100000, len 2408, room 16
tail 8
chksum 0xe5
load 0x3ffe8000, len 776, room 0
tail 8
chksum 0x84
load 0x3ffe8310, len 632, room 0
tail 8
chksum 0xd8
csum 0xd8
2nd boot version : 1.6
SPI Speed : 40MHz
SPI Mode : QIO
SPI Flash Size & Map: 8Mbit(512KB+512KB)
jump to run user1 @ 1000
rf cal sector: 249
rf[112] : 00
rf[113] : 00
rf[114] : 01
SDK ver: 2.0.0(5a875ba) compiled @ Aug 9 2016 15:12:27
phy ver: 1055, pp ver: 10.2

From that point you need to switch to 115200 and it will happily communicate using AT commands (including connecting to WiFi and sending/receiving data as mentioned).

'AT+GMR' gives the following response:

AT version:1.3.0.0(Jul 14 2016 18:54:01)
SDK version:2.0.0(5a875ba)
Farylink Technology Co., Ltd. v1.0.0.2
May 11 2017 22:23:58
OK

So it seems the basic setup, connections and the board itself is ok. I can communciate with it via serial and everything works fine with AT commands. Simply the serial programming mode doesn't want to do anything. The board is booting up in a different mode so altering the GPIO is having an effect, I'm just not getting the serial programming mode I'd expect.

Any ideas?