New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"Failed to connect" #19
Comments
Same issue here. Can't get it work :-(
|
Make sure that you put your device in flash mode. |
GPIO0 is Linked to the ground |
No, theres several issues with esptools/ESP. Ive gone through the software and a logic analyser The first is that esptools always expects a perfectly formed packet, i.e. it does not throw away characters until it reaches the \0C, hence on some versions , the ESP does not auto baud perfectly and returns a junk character. This gives the an esptools error . IN other cases the ESP actually boot up in funny baud rate approx 74K. if it doesn't auto baud properly, you will get fail to connect messages, The ESP boot loader isn't well implemented |
I think everyone on the planet knows about Gpio0 at this stage ! |
Yeah, but I had the same problem and it turns out that after connecting GPIO0 to ground you must restart the ESP. I mean just unplug it from the power and plug it again. |
Thats what I do all the time, but occasionally I find the ESP does not auto baud correctly and generates framing errors on the serial line, this confuses ESPtools. I have it working reasonably reliably , I modified esptools to cut down on the sync and also to scan for header rather then just expect it. I'll tidy the code when I get a chance and maybe post it for others, but Im actually writing a native Os/x flash utility at the moment . |
Thanks that's useful
|
That is really usefull. I will try this way and check if it works
|
Nice tweak. Scanning for |
Same issue for me.
Tried with different baud settings too - all returning exception. |
Ok, found out my problem. Maybe it could solve yours too. |
@alesrebec: Good to hear that you solved it! It isn't possible*, as far as I can tell, to completely brick the ESP8266. The bootloader resides in ROM and executes before the SPI flash is even initialized. (The attentive hacker would point out that one could flash an image that specifies an invalid SPI flash clock rate and/or interface width, but looking at the routine at (* Yeah, it might be possible to trash the OTP ROM containing the MAC address, but not using esptool.) |
@alesrebec Thanks! I've been trying to get this to work for like 3 hours before I found that - connecting my ftdi chip's ground to my external power supply's ground fixed it perfectly. |
Hi, |
@jeshwanth Did you find a solution? I think I saw you on |
@themadinventor yes found solution.. Thats was the mistake in my circuit :). Forgot to update here... Thank you :) |
I solved the problem with a lower speed
|
thanks all, problem solved. all hardware wired up nicely still produced the ugly "failed to connect" error. Just cranked up the external power for arduino nano breakout board to 10V, and that was it: Connecting... Cheers all around :-) |
@alesrebec old discussion just just have to thank you for suggesting connecting the ground of the FTDI to ground of ESP! THANK YOU!! Nowhere had I seen that suggestion other than here. |
I'm on a new module (the custom ESP-12E one from electrodragon) and running into this again. It has the Ai Thinker AT command set preinstalled and that works fine; I can interact with it in esplorer and such. But, I can't flash anything new to it. This build spits out a bit of debug info at 74880 baud when it first boots up and then it switches to 115200 for the "regular" command set. I'm suspecting that this switchover is what's making esptool choke - it fails to connect regardless of what baud I set it to:
I tried both connection the DTR/RST pins, just pressing the RST/PROG buttons, doing both, etc. Nothing seems to work. Ground is connected correctly and I'm powering the module directly from my USB's 5v line (it has an onboard regulator). But, like I said, I think the issue is the sudden baud rate switch - @InnovativeIdeas touched on it, but I don't think anyone's explicitly mentioned that it starts at one baud and then switches to another within a second or so. If it helps, here's what the initial output at 74880 baud looks like:
and then it switches to 115200 and outputs something along these lines:
Update: I found a workaround: use https://github.com/nodemcu/nodemcu-flasher to flash NodeMCU onto the module (once) and then it plays nice with esptool.py after that so you can flash anything you want. The only catch is that it's windows-only for the moment. But, you can use one of the windows 30-day trial vms that MS provides for testing websites in IE. (Believe it or, not, this actually works: I'm on a mac and used a virtualbox image just now. You just have to give the VM access to your usb-uart or whatever you're using.) Update 2: I think I've just dis-proven my theory about the baud rate switching being the source of the issue. I had a different module, and esp-01 also from electrodragon, with the same build of the Ai Thinker firmware - it gives the exact same output at 74800 and then at 115200, but esptool.py can write to it just fine. So I'm out of ideas about the cause. I'll leave this here since at least the workaround is useful. |
Just few bullet points to sum up
To flash the firmware hope it helps |
@nfriedly Thanks for the workaround! Using NodeMCU Flasher inside a Windows VM worked for me as well--played nice with esptool after that. |
I had the same problem... So I'd recommend:
|
Hi! I had the same problem. But I solved it by also connecting CH_PD pin to the VCC |
Closing this issue as the README now covers most of the likely problems. Please open a new issue if you've tried the troubleshooting steps in the README and nothing works. |
I had been trying to fix this problem with my esp8266 12e for days. I tried a lot of solutions to fix it. Tried esptool, arduino ide, different baud options etc all kinds of stuff. Just now figured out that it was very stupidly simple solution for me. Just plugged it into a windows machine (I had been using a macbook) and it worked with arduino ide with no change on the default esp programming options. In case it helps, i will tell a little about my setup: I have arduino with the processor removed so I use it for its serial pins. esp's rx goes to arduino's rx (with a voltage divider of course) and tx to tx (no divider). I have the reset line of esp connected to 3.3v and a button to short it to gnd (apologies for ignorance, is this called a pullup resistor?). I guess you know the rest of the connections if you're at this stage anyways. |
Thanks for reporting your bug and providing so much detail. You didn't make a mistake, there's a known bug with esptool.py when using an Arduino as the serial converter (see #82) and I think you've hit on the same issue. There's no problem commenting on closed issues, however I think #82 is the correct issue in this case. If you don't mind, please subscribe to that issue (there's a button in the right-hand column) and you'll be notified once there's any update including a fix to test out (hopefully soon.) |
Thanks! I subscribed. I will be waiting for the solution. Good luck! |
Thanks a lot, my problem was the Ground must be the same. the solution for me. |
My blue light wont get off and random characters are showing in the serial monitor, need help ... |
@Blackhalk , please go through the troubleshooting suggestions here: https://github.com/themadinventor/esptool#troubleshooting |
@ukrsms off topic: man any doesn't mean none. This is mistaught by english teachers 99.999% of the time :D Just as a friendly reminder ;) |
Having the same issue as @nfriedly - I have an ESP-12-E and communicating with minicom is working fine, but esptools won't connect. Unfortunately I'm still waiting on my USB/TTL converter so using the NodeMCU flasher isn't an option. |
@brynnb : nfriedly's problem turned out to be the ground connection from the USB/serial converter. How are you connecting the ESP-12-E now if you don't have a USB/TTL converter on hand? The README has sections on what connections need to be made, and some steps to follow if things aren't working correctly: https://github.com/themadinventor/esptool#entering-the-bootloader |
@projectgus I have it wired directly to the GPIO pins of my Raspberry Pi. Fairly sure I have wiring correct, I will double check in the future using that guide since I didn't see it before. But at a glance it looks to be the same advice I found/followed elsewhere. |
I had the same problems, tried everything and nothing worked. |
I've been spending the last 24 hours fighting a "Failed to connect" problem - I had a new batch of ESP 12F's arrive - and when I tried to program one, I got the error. According to the AT-GBV command, it has a newer version of the boot loader than any of my older ESP chips (Dated Dec 2nd 2016!) - and of course I naturally assumed that they broke something! But after trying my best to diagnose it by hacking around in esptools.py (and my Python skills seem to have rusted rather badly - so that didn't go well) - I eventually gave up and decided to try a second board from the same batch...lo and behold, it worked perfectly...so it looks like I had a bad ESP board. Fortunately, at $2 - who gives a damn! Good news! The Dec 2nd build works OK! Moral of the story: Before assuming the worst - try another ESP board! :-) |
Flash any firmware to ESP8266 using following steps..
plug in the usb to the power source. download the official flasher from this link, unzip and open the app https://drive.google.com/file/d/0B3dUKfqzZnlwVGc1YnFyUjgxelE/view download the firmware from this link, unzip it and open it in flasher app make sure to check and select accurate com port in flasher That's it, you may open the serial monitor now and perform AT commands. if AT commands are not working then unplug usb from the power source, remove GPIO0 pin from GND and plug in the USB to power source. open serial monitor and recheck the AT commands. HOPE THIS HELPS. THANK YOU! :) |
Thanks this has worked for me, doing these steps I could put flash mode and put the firmware |
|
Have you open sourced it?! |
I can always write only once per chip. to write again in the same chip I have to unplug USB or the chip and plug it again. If I don't do that I get the infamous
|
I still have the same issue to ... and to avoid buy a usb cable, is there a way to know if a Mini USB cable is for power only or for data too ... I think maybe the problem is here ? |
I used esptools about 2 weeks ago to flash up to the latest Bin images ( from espressif github). in that I went from V0018 0.9.2 to V 020 0.9.4 all worked fine no issues
I now find I cannot communicate with the ESP unit using ESPtools
I m trying CH_PD high, ( direct to 3V3) , pulling GPIO0 low and reseting to enter boot loader mode
I wonder did the boat loader get changed and this is why I can't connect
The text was updated successfully, but these errors were encountered: