无法编程 ESP8266 [英] Cannot program ESP8266

查看:52
本文介绍了无法编程 ESP8266的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

模块通电后蓝色指示灯闪烁,红色指示灯常亮,我什至可以通过 wifi 连接到它.但我无法编程.我尝试了 Arduino IDE、不同的固件闪烁器(如 NodeMCU、XTCOM).我正在使用 Arduino Mega.

Blue led is blinking after powering up the module, the red one stays on, I can even connect to it via wifi. But I cannot program it. I tried Arduino IDE, different firmware flashers (Like NodeMCU, XTCOM). I'm using Arduino Mega.

这是我的初始设置:

VCC - 3.3 V on Arduino
RST - nothing
CH_PD - 3.3 V on Arduino
TX - RX on Arduino (TX is transmitting data to RX, so I don't need a voltage divider, right?)
RX - voltage divider (R1 = 10K, R2 = 20K) - TX on Arduino
GPIO0 - GND on Arduino
GPIO2 - nothing
GND - GND on Arduino

然后我尝试从 Arduino IDE 上传草图并收到以下错误:

Then I tried uploading a sketch from the Arduino IDE and got the following error:

warning: espcomm_sync failed 
error: espcomm_open failed

在尝试了不同的 IDE、编程器、串口之后,我尝试了固件闪存器,至少看看我是否可以与它通信.例如 NodeMCU显示等待 MAC",GPIO0 接地和不接地.

After trying different IDEs, programmers, serial port I tried firmware flashers to at least see if I can communicate with it. NodeMCU for example just showed "Waiting MAC" with GPIO0 to ground and without.

我也尝试将 TX 连接到 TX,将 RX 连接到 RX,但得到了相同的结果.也尝试通过分压器连接 RX.

I also tried connecting TX to TX and RX to RX but got the same results. Tried connecting RX through a voltage divider as well.

通过这种设置,蓝色 LED 一直亮着.我记得在某处读到过,由于电源不足,可能会发生这种情况,所以我也尝试在没有分压器的情况下连接两个引脚(上电后蓝色 LED 仍在闪烁,所以希望我没有烧毁它们).我还尝试将 GPIO0 连接到 3.3V 并且根本不将其连接到任何东西,将 RST 连接到 3.3V,将 GPIO2 也连接到地.在 Mega 上有 4 组 TX 和 RX 引脚,所以我都尝试了 TX/RX0、1、2 和 3.

With this setup the blue led was constantly on. I remembered reading somewhere that that could happen due to insufficient power supply, so I also tried connecting both pins without the voltage dividers (the blue led is still blinking after the power up so hopefully I didn't burn them). I also tried connecting GPIO0 to 3.3V and not connecting it to anything at all, connecting RST to 3.3V, connecting GPIO2 to ground as well. On Mega there are 4 sets of TX and RX pins, so I tried them all out TX/RX0,1,2 and 3.

仍然不知道发生了什么:(

Still no idea what's going on :(

推荐答案

原因可能是以下两种情况之一:

The cause can be one of two things:

  1. 电量不足.尝试使用外部 3.3V 电源(例如实验室电源)为 ESP8266 供电.两节充满电的 AA 电池也应该可以解决问题.确保您的串行适配器的 GND 引脚也连接到 ESP 的 GND 引脚以提供公共接地.

  1. Insufficient power. Try to power the ESP8266 from an external 3.3V power supply such as a lab supply. Two fully charged AA batteries should do the trick too. Make sure your serial adapter's GND pin is also connected to the ESP's GND pin in order to provide a common ground.

ESP8266 未处于编程模式.确保 GPIO0 连接到 GND,然后关闭并再次打开 ESP.然后它将启动到编程模式.编程后,您可以将其从 GND 上取下.

ESP8266 is not in programming mode. Make sure GPIO0 is attached to GND and turn the ESP off and on again. It will then boot into programming mode. Once programmed, you can take it off GND.

自从这篇文章以来,我实际上遇到了第三个更臭名昭著的原因.一些 ESP8266 模块(尤其是 ESP-12 封装)实际上带有替代的非核心固件.在这种情况下,您必须更新 ESP 上的固件.这里关于如何做到这一点的很棒的教程.我强烈建议您使用 ESP Flash 下载工具,不幸的是,它仅适用于 Windows,但与在串行终端中相比,它更不容易出错.但在您踏上这段旅程之前,请确保原因不是 #1 或 #2.

Since this post, I've actually encountered a third, more notorious reason. Some ESP8266 modules (especially the ESP-12 packages) actually come with alternative non-core firmware on them. In this case, you have to update the firmware on the ESP. Here is a great tutorial on how to do this. I highly recommend you use the ESP Flash Download tool which is Windows-only unfortunately, but is less error prone than doing it in a serial terminal. But before you embark on this journey, make sure the cause isn't #1 or #2.

这篇关于无法编程 ESP8266的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆