Zero for two trying to talk to an ESP-12 with an “empty sketch” arduino uno.

A while ago, I bought and then didn’t use a few different ESP8266 boards including several ESP-12 boards. Now I finally am trying to use one in a project, so of course I need to talk to it, to prepare to flash it with some firmware or other. One ESP-12 was mounted to a 0.1” breakout board for breadboarding; the other was a bare 2mm module. In both cases, I put 3.3V on VCC, CH_PD, GPIO0, and GPIO2; GND on GND and GPIO15; Arduino GND to GND, Arduino “TX” to ESP-12 TXD, and Arduino “RX” to ESP-12 RXD through a voltage divider to avoid putting 5V on the ESP-12 RXD. I’m not even seeing garbage when I power up the ESP-12; I’m seeing absolutely nothing in the arduino serial monitor. Tried minicom etc. as well.

If the latest northeast snowpocalypse hadn’t delayed my shipment, I would have been playing with an ESP32 dev board (adafruit variety) with onboard USB this weekend, and I might possibly have been happier. I intend this project to end up using ESP32 anyway; the ESP8266 was intended to be a quick hack to prototype with in the meantime.


Kevin Otte March 19, 2017 18:33

With all this electronics knowledge, we’re gonna have to get you a ham radio license one of these days :)

Michael K Johnson March 19, 2017 18:36

I was most of the way there back when it mattered that I was never quite fast enough or accurate enough copying code… ☺

Kevin Otte March 19, 2017 18:37

No code requirement now. You could probably pass Tech in your sleep. Give it a try:

AA9PW FCC Exam Practice

Michael K Johnson March 19, 2017 18:38

Posting this reminded me that I have a bus pirate. It showed garbage at 115200, but at 9600 I’m seeing non-garbage. It’s not responding to AT commands from minicom to bus pirate, but this might be good enough to flash a standalone firmware…

Michael K Johnson March 19, 2017 18:40

When I actually want to do RF work, I can take the test… ☺

Michael K Johnson March 19, 2017 18:41

[Vendor:www.ai-thinker.com Version:0.9.2.4]

ready

John Pitney March 19, 2017 21:55

Looking good!

I’ve been soldering on a bare ESP-12E module here today. Still have some connections to make up before it’s ready to flash. With ready-made NodeMCU boards, I’ve had good luck with esptool from a Linux host.

Michael K Johnson March 20, 2017 06:54

It took way too many tries to figure out a few more details for this first foray into ESP8266…

I had found instructions that said to just take the bus pirate defaults for the port setup. I just didn’t notice that one of the defaults was open drain instead of normal, which was why it didn’t respond to AT commands; it wasn’t really sending any.

Then, although the serial console (GPIO0 pulled high) ran at 9600 bps, flashing (GPIO0 pulled low) was still at 115200 bps.

I chose espruino more or less at random (I had downloaded it already and it was getting late), successfully flashed it, pulled GPIO0 high, and rebooted to a 115200 bps console. After I attached an external antenna, wifi.connect(); eventually worked. I ran wifi.save(); and rebooted.

…and it quit responding to console entirely and never reconnected to the network. Ugh. I guess I should re-flash next?

Michael K Johnson March 20, 2017 18:19

Re-flashing brought back a working prompt. I was able to connect to Wifi again. wifi.save(); was effective across reset(); — but a hard power cycle sitll killed it; I get garbage on the console after a power cycle.

So that led me on a journey to discovering that esptool has –flash-size=detect which tells me that instead of 4MB of flash on an ESP-12 I have 512KB. That could explain a thing or two!

So wifi.save(); still doesn’t seem to persist across a power cycle but at least the unit comes back to a terminal session after a power cycle. Progress!

Michael K Johnson March 20, 2017 19:46

Flashing the latest 512K micropython image gives me:

ets_task(40100164, 3, 3fff827c, 4)

NLR jump failed

The earlier esp8266-512k-20161110-v1.8.6.bin gives me a python prompt and can configure the network, but doesn’t have a filesystem so I can’t save a boot.py to configure the network.

Michael K Johnson March 20, 2017 19:52

“If your devices has 1Mbyte or more of storage then it will be set up (upon first boot) to contain a filesystem.” ← Oh, yeah. That. That makes it less useful.

Michael K Johnson March 20, 2017 21:07

ESP32 arrived today

Downloaded Espruino build from http://forum.espruino.com/conversations/293320/?offset=50

Plug in the board, flash with esptool.py –chip esp32 –port /dev/ttyUSB0 –baud 921600 write_flash -z –flash_mode dio –flash_freq 40m 0x1000 bootloader.bin 0x10000 espruino_esp32.bin 0x8000 partitions_singleapp.bin

WiFi configures, works, saves. It’s listening on port 23. Definitely better.

Espressif ESP32 Development Board - Developer Edition


Imported from Google+ — content and formatting may not be reliable