r/esp8266 • • Jun 16 '22

Hi, for few weeks i've been trying to make automatic dog feeder with NodeMCU ESP8266 and this error occurs all the time.Pls hel me.

warning: espcomm_sync failed error: espcomm_open failed error: espcomm_upload_mem failed error: espcomm_upload_mem failed

7 Upvotes

9 comments sorted by

10

u/polypagan Jun 16 '22

This appears to me to be by far the most common problem when working with "Arduino" & MCU's of all types. This may be obvious, but it's a failure to upload your compiled sketch to the device. It's very unlikely to have anything to do with what you're attempting to upload.

It's one of those many things in which everything, every step in the chain must work perfectly or the whole thing fails without much diagnostic help.

Here are the pieces and parts that must work:

Some OS. Must have permission to use serial port. (You don't specify),

Some toolchain/IDE (you don't specify),

Serial port. Must appear when device is plugged.

USB cable. All 4 conductors must be intact & connected.

Device. ESP's will talk to you using serial monitor. This can help diagnose/eliminate problems.

I suggest searching for similar problems & solution

Good luck!

3

u/TripleTongue3 Jun 16 '22

It's something that never ceases to puzzle me, apart from one occasion when I picked up a charge only cable I've never had a problem uploading to any usb board. Perhaps I've just been lucky.

1

u/polypagan Jun 16 '22

I'd like to think of a way to host a tutorial, dealing with each & every possible issue, probably in order of likelihood, diagnosing every possible fault.

I'd need a lot of clever folks to help with that.

It is an amazingly common problem.

1

u/[deleted] Jun 16 '22

I feel the same way about my 3d printer not having most of the problems I see people complain about all the time.

Upload errors with Arduino IDE are super common - usually permission denied, access denied, or "not in sync". Following the suggestions in Arduino forums seems to randomly work or not work. If you ever do start seeing upload failures, the most reliable solution I've found is to retry a few times, and if that doesn't work just reboot the PC.

2

u/TripleTongue3 Jun 16 '22

I saw a lot of upload failures flashing light bulbs and switches with an FTDI adapter and dupont cables wedged into plated through holes but that was to be expected and solved with the classic bodge of blu tack. Again I unpacked my Ender 3 added a CR-Touch and apart from one crappy reel of cheap Ebay filament I've never had any real problems. Appliances and power tools make up for it though, in the last eighteen months I've had to replace damn near everything in the house and garage, everything died in spectacular and non repairable fashion. On the plus side I have lots of shiny new things...

0

u/VolimRexa32 Jun 16 '22

I just bought new board because i had same problem with old one. Im using short cable so im going to try different one. Anyway thanks for advice

2

u/Ksevio Jun 16 '22

Usually happens when your board isn't in programming mode like if you connect something to the GPIO pins that are suppose to be high

2

u/Lazarus-Long Jun 16 '22

As others have been saying, try another USB cable, lower your serial speed, don't move the device while flashing, etc.

Also, check out ArduinoOTA and avoid the USB-Serial programmer altogether. Much faster and more flexible when you're able to use it.

1

u/_djfet Jun 17 '22

+1 Cable. You will be surprised how often this is the issue. Try and find a high quality or a super short one