Code Monkey home page Code Monkey logo

Comments (19)

IrishJourno avatar IrishJourno commented on May 20, 2024 1

Okay, I've found a work around, albeit a little awkward!

I plugged it into my Raspberry Pi 4. Turns out the RPi Arduino IDE has some nasty collisions with the ESP dev libraries that stops the example code from compiling unless I'm willing to do a lot of hand editing, BUT esptools can be installed and will run using the python -m option. The erase_flash command DID work here, and I was able then to plug it into my iMac system and upload an example sketch from the MacOS Arduino IDE. However I wasn't able to upload a second sketch until I plugged it back into my Pi and ran erase_flash again.

from watchy.

sqfmi avatar sqfmi commented on May 20, 2024 1

Thanks @seekerdave, this is very useful information. Yes this seems to be prevalent with Windows and the C1 RC slows the rise time, which fixes the relative timing of RTS & DTR. We'll explore software solutions for this (we flashed all the Watchy's using Linux)

from watchy.

derak-kilgo avatar derak-kilgo commented on May 20, 2024 1

I just got mine and same issue. The device doesn't show up when connected which is a real bummer.
I've tried different cables, and different computers too (win10, ubuntu 18/kernal 5.04 and mint/kernal 4.20)
I don't have other esp32 boards to test against.

from watchy.

SupaaSchnitzel avatar SupaaSchnitzel commented on May 20, 2024

I have the same issue occuring with mine

from watchy.

sqfmi avatar sqfmi commented on May 20, 2024

Do you have another esp32 board by chance? Do those upload fine?

If not, could you also try just running esptool.py erase_flash in the terminal and see if that runs?

from watchy.

SupaaSchnitzel avatar SupaaSchnitzel commented on May 20, 2024

My other esp32 boards upload fine for me

from watchy.

IrishJourno avatar IrishJourno commented on May 20, 2024

When I run esptool.py erase flash, I get:

esptool.py v3.0
Found 4 serial ports
Serial port /dev/cu.usbserial-00BFDDF4
Connecting......................................_____
/dev/cu.usbserial-00BFDDF4 failed to connect: Failed to connect to Espressif device: Timed out waiting for packet header
Serial port /dev/cu.URT1
Connecting......................................_____
/dev/cu.URT1 failed to connect: Failed to connect to Espressif device: Timed out waiting for packet header
Serial port /dev/cu.SLAB_USBtoUART
/dev/cu.SLAB_USBtoUART failed to connect: [Errno 16] could not open port /dev/cu.SLAB_USBtoUART: [Errno 16] Resource busy: '/dev/cu.SLAB_USBtoUART'
Serial port /dev/cu.Bluetooth-Incoming-Port
Connecting......................................_____
/dev/cu.Bluetooth-Incoming-Port failed to connect: Failed to connect to Espressif device: Timed out waiting for packet header

A fatal error occurred: Could not connect to an Espressif device on any of the 4 available serial ports.

from watchy.

SupaaSchnitzel avatar SupaaSchnitzel commented on May 20, 2024

Here is my output:

 esptool.py erase_flash
esptool.py v3.0
Found 2 serial ports
Serial port COM15
Connecting........_____....._____....._____....._____....._____....._____....._____
COM15 failed to connect: Failed to connect to Espressif device: Timed out waiting for packet header
Serial port COM1
Connecting........_____....._____....._____....._____....._____....._____....._____
COM1 failed to connect: Failed to connect to Espressif device: Timed out waiting for packet header

A fatal error occurred: Could not connect to an Espressif device on any of the 2 available serial ports.

from watchy.

sqfmi avatar sqfmi commented on May 20, 2024

That's great, sounds like there is something weird going on with the Arduino setup / USB on the Mac.
We flash every Watchy via USB and check before shipping, so there should be no issues with the flashing. Let us know if you figure out the fix with MacOS

from watchy.

seekerdave avatar seekerdave commented on May 20, 2024

I have the same issue on a Windows 10 machine. I also tried the erase_flash command. Here's the output:

esptool.py v2.6
Serial port COM4
Connecting......................................_____
A fatal error occurred: Failed to connect to Espressif device: Timed out waiting for packet header

from watchy.

sqfmi avatar sqfmi commented on May 20, 2024

@seekerdave have you installed the CP2104 drivers? Also make sure the correct COM port is selected.

from watchy.

seekerdave avatar seekerdave commented on May 20, 2024

Yes, I downloaded the latest driver and am sure I have the right port. The following details are from Device Manager:
Silicon Labs CP210x USB to UART Bridge (COM4)
Driver Version: 10.1.10.103
Driver Date: 1/8/2021

from watchy.

Ryomoo avatar Ryomoo commented on May 20, 2024

I have the same problem. Running Windows 10 with the CP2104 driver installed.
esptool.py erase_flash gives the following Output.

esptool.py v2.6
Found 2 serial ports
Serial port COM5
Connecting........_____....._____....._____....._____....._____....._____....._____
COM5 failed to connect: Failed to connect to Espressif device: Timed out waiting for packet header
Serial port COM1
Connecting........_____....._____....._____....._____....._____....._____....._____
COM1 failed to connect: Failed to connect to Espressif device: Timed out waiting for packet header

A fatal error occurred: All of the 2 available serial ports could not connect to a Espressif device.

from watchy.

sqfmi avatar sqfmi commented on May 20, 2024

@Ryomoo @seekerdave have you tried a few more times to see if any combination works? e.g. different USB port, different USB cable, not using a USB hub, lowering upload speed, closing all other programs that might be using the serial port, restarting the PC, using a different computer, etc. FYI the drivers are found here: https://www.silabs.com/developers/usb-to-uart-bridge-vcp-drivers

Thanks!

from watchy.

Ryomoo avatar Ryomoo commented on May 20, 2024

I tried all of the above mentoined except the different computer. Will try that tomorrow. But my internet research says my board isn't starting in "flashing/uploading mode". I have no clue how to do that. Can you help me with that?

from watchy.

sqfmi avatar sqfmi commented on May 20, 2024

Watchy has built in auto reset functionality, so it uses the DTR/RTS signals from serial to toggle GPIO 0 and EN to get into flash/upload mode.

from watchy.

seekerdave avatar seekerdave commented on May 20, 2024

I replaced C1 with a much higher value (10uF) and eliminated the problem. It seems that the DTR/RTS timing is preventing the ESP32 from entering the needed mode. From a web search this problem seems especially prevalent on Windows 10 machines. It would be nice if there was a software solution (perhaps a timing parameter in the esptool?).

Note: C1 on the schematic has a value of just 100nF. I tried a 1uF (10X larger) and it worked intermittently. The 10uF provides very reliable communication.

from watchy.

cyc-x avatar cyc-x commented on May 20, 2024

Hello, I am having some connection issues too. It looks like all my settings are correct and there is some connection on the port, the Serial Monitor opens, but nothing shows up when I try to enter any command. When uploading, I get a error :
"Failed to execute script esptool
the selected serial port Failed to execute script esptool
does not exist or your board is not connected"

The Watchy will sometimes "blink" during/after trying to upload, sometimes it will freeze.
On Win10.

Any ideas? Thanks!

from watchy.

Professor-Woody avatar Professor-Woody commented on May 20, 2024

Apologies for zombifying this thread but it should be mentioned I was able to get this working on OS-X in a way (just reflashed watchy with micropython using esptool.py with my mac after running into this on windows)

from watchy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.