-
Notifications
You must be signed in to change notification settings - Fork 331
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 to ESP32 #147
Comments
Do you have the drivers installed and confirm it is COM3 (you can check in device manager)? Also, do you have another computer you could try to see if the serial port is detected (Linux/OSX)? |
same problem, both windows and linux. Port is correct and the watchy is detected on the port EDIT: something happens because I was constantly scrolling the menu and it stopped responding to button presses as soon as the connection attempt was initiated. Still failed though. |
@sqfmi - yes, I updated to the latest drivers and do see the device in Device Manager and I also see the device listed in Fedora Linux when running [jeff@localhost ~]$ lsusb | grep Silicon
Bus 001 Device 040: ID 10c4:ea60 Silicon Labs CP210x UART Bridge I believe the last firmware I was able to install was v1.3.2 and the hardware revision I have is the one that was affected by issue 106. |
I also have the same problem, I think after I tried to use the beta feature via BlueTooth? Or it could have been there all along. EDIT: I tried to use the update method in the WiFiManager captive portal, and that worked. However, for some reason, the recommended version of the code for PlatformIO somehow disabled the WiFiManager firmware update routes, and now I think it's well and properly locked out. Not bricked, exactly. I will see if Mouser will take it as a return. I'm ordering another one, though, because the device has so much potential. @sqfmi Y'all need to fix your instructions, and also the website "Try It! (beta)" feature does not work in Chrome, Edge, and Firefox doesn't even do a single thing. Possibly worth putting up some instructions. Also, it would be pretty awesome if you could map RST+GND to a button combination so that the watch can actually be put into write mode. |
likely been there all along, I've never used the bluetooth feature. |
Same issue here. However, for some reason it worked correctly on my laptop despite it using pretty much exactly the same software and configuration as my PC |
I am also having this issue. I was able to do a WiFi update of the watch face to put Basic on it, but now I'm having the issue in #128 which unfortunately means I can't update to another watch face because I can't get the menu to come up. 😞 I have tried doing the update using Arduino IDE, @tbjers I had issues with Bluetooth until I found out that Chrome doesn't turn on the BLE functionality by default on Linux. it needs to be turned on in |
@jeffsanicola Just do, what IrishJourno wrote in #23 : Erase the esp32 flash with the help of a Raspberry Pi and then upload the new code from your Arduino IDE. Sounds weird, but it works. And he wrote that more than 1 year ago and the problem still persists! On my Desktop PC (Linux Debian Buster, Kernel 4.19.0-20-amd64) I type: "python3 -m esptool erase_flash" and I get: But when I connect the Watchy to my Raspberry Pi and type the same command, I get: After that you plug the Watchy back into your PC and the Arduino IDE works fine and uploads your code to the device. @sqfmi Could you please update the chapter "Arduino Setup" on https://watchy.sqfmi.com/docs/getting-started ? |
@walex53 Using an rpi to clear the flash works. I was then able to upload a watch face via my Linux machine afterward. However, I have to erase the flash each time I want to upload a new watch face. Really is a bummer. |
UDATE On my notebook the Arduino IDE runs flawlessly! It compiles, erases the flash memory and uploads the new code. Even on the command line the esptool.py v2.5.1, which I installed via the apt packet manager, runs without problems. I still have no clue, why it does not run on my Desktop PC. |
I have another connection error: Mar 29 22:08:20 horsetower kernel: [ 3853.029007] usb 2-2: device descriptor read/64, error -71 |
@orlo11 >watch becomes hot near the micro-usb connector |
My problem was the same, regardless of linux/windows. Edit: my DOIT ESP32 DEVKIT V1 board flashes just fine with the desktop pc. |
@walex53: Thanks for your suggestion. It is the CP2104 that gets very hot, whenever I connect the USB. so I will return the device and hope to get a new one soon. |
I have the same issue. First I tried the Arduino IDE on my Windows machine, which couldn't compile because ALARM_2 was undefined, among other problems. Then, I set up PlatformIO on Windows in Visual Studio Code which compiled (hooray) but gave me Then, I tried flashing directly with esptool, same problem. Then, I hooked it up to my Raspberry Pi. It does recognize it as an ESP-PICO-D4, but also ultimately fails with I attempted to to the OTA Bluetooth flashing, and it just says I tried all of this with both the battery attached and not attached, and it doesn't work. I tried 3 different Micro USB cables from different manufacturers and different lengths. Is there anything else I can do? |
@Fell For the "can't upload" errors: It's not for the reason of a bad USB cable. After that plug the Watchy back to the machine with the Arduino IDE. It's only the flash_erase, that won't work on the Arduino IDE. The uploads works fine. And did you try all of that from a Notebook? Maybe everything works fine. Good Luck!!! |
@walex53 Thank you so much! You just solved all my isses in one post. Downgrading DS3232RTC from 2.0 to 1.3 fixed the compile error. I then went and tried to copy the esptool.py from my Windows machine, but it turned out to be a esptool.exe. I just downloaded the latest source code which contains the esptool.py as well. Executing After doing that, I was able to flash another watchface using the ArduinoIDE. Edit: So yeah, that works only once. After that, I have to hook it up to my Raspberry to erase the flash. Very strange. I'll try my laptop, but it's a windows machine too so I don't think it will work. |
Yes, it only works once and you have to plug it over every time. It's the flash_erase, that doesn't work from a PC, but it does work from a Raspberry Pi and from a Notebook. For me, I made a workaround --> see picture. I soldered together some relays and USB jacks and glued it on to a ten year old Raspberry Pi I had laying around. A little script runs on it to automate the switching over to the Raspberry Pi and back to my Desktop PC. Yes, it's technical overkill and it's totally sick, but I like it. ;-) But, honestly, isn't there any of the Watchy developers, who can fix this ? |
erase_flash works on my framework laptop running funtoo linux. I have to do this before my desktop (MX Linux) can write the new image using arduino IDE. |
Workarounds@walex53 Wow, this is impressive. I've been using a Raspberry on my desk via SSH, which is a bit of a hassle but bearable. I'm thinking of buying a Raspberry Pi Zero and using it as an adaper. Back to the ProblemAt first I thought it's related to Windows, but it seems like the problem is related to desktop hardware. I tested my office PC with no luck. I have heard different things like: Rumour 1: There should be an extra capacitor on the GPIO_0 pin to help pulling it LOW. I don't think I could do that, it's way too tiny. Rumour 2: Desktop PCs are supplying "too much" power which prevents pulling the pin low. If this is the case, maybe a very weak resistor could help? I have no idea, I'm a software guy. Thought 3: After erasing the flash, flashing works with any PC, right? So as long as there is no code on the watch, it is flashable. Which leads me to believe that there might be a software problem with the bootloader on the watch, preventing it to go into flash mode under certain circumstances. I don't know what's really going on, but maybe these thoughts spark the right idea to someone who knows. UpdateI tested it on my Samsung Laptop (Win10 x64) with interesting results: It has two different USB ports, one 3.0, one 2.0. The 2.0 port is controlled by a So this confirms that it is an issue related to USB drivers or hardware. Because I used the same ...maybe getting a cheap USB 2.0 hub is the solution? |
That works! Neither the USB 3.0 nor the USB 2.0 Port on my desktop PC work, but if I plug my cable into the USB hub integrated into my monitor stand (which is itself plugged into another USB hub plugged into a USB 3.0 port in the back of my PC), it works flawlessly. This goes up there on the list of the weirdest issues I've ever encountered. |
I am having the same 'timing' issue with my new watchy, and could not connect on my ubuntu 20.04 be it via USB port 3.0 or 2.0. erase flash failed to communicate with ESP32. thanks for suggestions in this thread. the usb hub will be the the next step. to add to the weird issues reported before i am not sure if watchy is charging as it should. a red indicator led lights up when usb cable powered, however the battery symbol is always low/empty, not the expected charging symbol. the 'about watchy' info indicates 0.28 V voltage, is this expected ? |
Hi all, For what it's worth, I have exactly the same issue on my Mac OS X (Monterey). Flashing the board via being directly attached to the USB on my laptop (USB-C with a USB-A adapter attached that has the USB-A to Micro-USB cable plugged into the board) only works very sporadically. I'd say one out of felt 50-75 times. However, the moment I plug it into a Raspberry Pi, I can erase the flash, plug it back into my Mac and upload a new Sketch with no issues. Would be really, really nice if that could be somehow addressed via software. I wasted about 5 hours trying all sorts of settings, different versions of the libraries, etc. and was almost about to call the board broken, before I gave the Raspberry Pi approach one last chance. |
Sketch uses 262434 bytes (20%) of program storage space. Maximum is 1310720 bytes. A fatal error occurred: Failed to connect to ESP32: Timed out waiting for packet header |
Having the same issue with PopOS 22.04. dmesg output on RPi:
esptool output on RPi:
dmesg output on my PC:
Seems like the only difference is that the device gets registered by usbcore and usbserial on the RPi? Edit: Tried all USB-Ports (2, 3.2Gen1 & 3.2Gen2, front and back) as well as a hub. No success. Edit2: It appears as a CP210SN COM Port in a Windows 10 VM. Edit3: |
Solution for me was to erase the flash with esptool on the RPi as @Fell previously mentioned. After uploading a watchface on my PC I'm no longer able to upload other watchfaces unless I apply the above mentioned solution. |
Adding my report to the pile: the bad usb hub is underpowered ( it has LEDs on it that sometimes fail to turn on because of a lack of power) so i don't think this is a power issue as much as it is some sort of timing issue. |
Same issue connecting to Watchy using a Windows 11 PC .... Ended up eventually connecting and uploading a sketch from Arduino after using a USB hub that's part of a monitor that connects via a USB SS (3) cable, but only worked when the cable was plugged into a USB 2 connection on the motherboard - all other setups of ports, USB3, USB3, Front, back etc all failed and only just the combo of a "usb hub" (i.e. the monitor has one) connected via a USB 2 port in the back worked(??!) New watch, so set to V2 in the board settings, and the battery icon worked, voltage correct, local weather all working - all A-OK! To help others - it's probably NOT your watch that's broken, it's probably the connection between the PC and the ESP32 - diagnose, troubleshoot, ask for help - don't just think it's broken 👍 |
I am having the same exact problem on my M2 Macbook air, I have to boot into Asahi Linux erase the flash with Am finding this really annoying :/ |
It works on my desktop machine with the new esptool version 4.5. As a temporary workaround, since the current version of the esp32 core is bundled with 4.2.1, I just replaced (maybe make a backup before) the bundled esptool under After that I was able to build and upload with arduino-cli (without a previous erase with esptool), e.g.:
|
which version of esp32 are you running? downgrading to 2.0.17 (as suggested in the doc) did work for me without any workaround. I still get the warning, but no errors |
The esp core version was probably I've tested it again with watchy library version I can confirm this works fine for me without any workarounds. I've used the following parameters on arduino-cli: arduino-cli compile --board-options Revision=v20 -b esp32:esp32:watchy <code>
arduino-cli upload -b esp32:esp32:watchy -p /dev/ttyUSB0 <code> |
Hello!
When attempting to upload a sketch to my Watchy I'm receiving an error
A fatal error occurred: Failed to connect to ESP32: Timed out waiting for packet header
. I was able to upload sketches previously, however recently I've been unable to and getting this message consistently.Full log output is:
After the message is displayed I do see the unit restart as if the reset pin was being applied (although that's not stated in the logs anywhere).
Here are the version numbers that I could location based on the Libraries Used page
Arduino IDE v1.8.19 on Windows 10 Pro
Espressif Systems esp v2.0.2
Adruino_JSON v0.1.0
Adafruit GFX v1.10.13
DS3232RTC v1.3.0
GxEPD2 v1.4.5
Watchy v1.3.3
WiFiManager v2.0.9-beta
I've tried the simple things like a different USB cable/port, disconnect/reconnect the battery, try to push without the battery connected, and update outside of the case (I have the aluminum one) but all result in the same issue. Everything else seems to work - I'm able to sync NTP and weather details from WiFi, the vibration motor and motion sensor all seem to be working fine as well.
Does anybody know of a way to resolve this?
The text was updated successfully, but these errors were encountered: