Can't connect

Some tips to resolve problems with the T-WATCH-2020
Post Reply
mulgrave
Posts: 4
Joined: Fri Jun 25, 2021 7:32 pm

Can't connect

Post by mulgrave »

Hello,

I was trying the new WebIDE V1, which seemed to be working, but it said my WiFi password was incorrect. (It wasn't.) I wasn't sure I had a V1 watch, so I tried the V2 code. This was a big mistake as now the watch is completely dead and won't connect on the allocated COM port, see below. I think the boot loader code must have been overwritten with the wrong version. Is there a way of resetting to factory defaults which doesn't require esptool to connect, please, or some other solution?

Thanks, John.

C:\Users\jsatm\Downloads\uploader_v1>esptool.exe --chip esp32 --port COM3 --baud 2000000 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq 80m --flash_size detect 0xe000 boot_app0.bin 0x1000 bootloader_dio_80m.bin 0x10000 MyWatch.ino.bin 0x8000 MyWatch.ino.partitions.bin
esptool.py v2.6
Serial port COM3
Connecting........_____....._____....._____....._____....._____....._____....._____

A fatal error occurred: Failed to connect to ESP32: Timed out waiting for packet header

C:\Users\jsatm\Downloads\uploader_v1>pause
Press any key to continue . . .

Also, with trace:

C:\Users\jsatm\Downloads\uploader_v1>esptool.exe --chip esp32 --port COM3 --baud 2000000 -t --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq 80m --flash_size detect 0xe000 boot_app0.bin 0x1000 bootloader_dio_80m.bin 0x10000 MyWatch.ino.bin 0x8000 MyWatch.ino.partitions.bin
esptool.py v2.6
Serial port COM3
Connecting...TRACE +0.000 command op=0x08 data len=36 wait_response=1 timeout=0.100 data=
0707122055555555 5555555555555555 | ... UUUUUUUUUUUU
5555555555555555 5555555555555555 | UUUUUUUUUUUUUUUU
55555555 | UUUU
TRACE +0.005 Write 46 bytes:
c000082400000000 0007071220555555 | ...$........ UUU
5555555555555555 5555555555555555 | UUUUUUUUUUUUUUUU
5555555555555555 5555555555c0 | UUUUUUUUUUUUU.
TRACE +0.118 Timed out waiting for packet header
.TRACE +0.065 command op=0x08 data len=36 wait_response=1 timeout=0.100 data=
0707122055555555 5555555555555555 | ... UUUUUUUUUUUU
5555555555555555 5555555555555555 | UUUUUUUUUUUUUUUU
55555555 | UUUU
TRACE +0.003 Write 46 bytes:
c000082400000000 0007071220555555 | ...$........ UUU
5555555555555555 5555555555555555 | UUUUUUUUUUUUUUUU
5555555555555555 5555555555c0 | UUUUUUUUUUUUU.
TRACE +0.119 Timed out waiting for packet header
.TRACE +0.063 command op=0x08 data len=36 wait_response=1 timeout=0.100 data=
0707122055555555 5555555555555555 | ... UUUUUUUUUUUU
5555555555555555 5555555555555555 | UUUUUUUUUUUUUUUU
55555555 | UUUU
mchavez
Site Admin
Posts: 84
Joined: Tue Nov 10, 2020 12:12 am

Re: Can't connect

Post by mchavez »

We are sorry to hear that. We always assume that the owner knows which version of the watch he has when he buys one.

This watch does not have a good Wi-Fi connection, so the connection problem may be due to poor signal quality (perhaps distance?) and not the password.

Our software is simply a compilation over the LilyGO T-Watch-2020 libraries and it doesn't modify the boot loader provided by Arduino.

Could you try this?
  • Is your watch turned on? Sometimes the USB connection fails when the watch is turned off. To ensure please press the button for 10 seconds to turn off and the press again for 3 seconds to turn on. Did you see any data on serial?
  • Is your cable USB a data cable? Sometime users connect an USB power cable and with this kind of cable is not possible to program.
If your watch is turned on and you are using the right USB cable and the problem remains the same, maybe you can try to program it using the LilyGO samples directly in the Arduino IDE (https://github.com/Xinyuan-LilyGO/TTGO_TWatch_Library).

Let me know what happened.
mulgrave
Posts: 4
Joined: Fri Jun 25, 2021 7:32 pm

Re: Can't connect

Post by mulgrave »

Thanks very much for the swift response, mchavez.

Yes, the watch is turned on as far as I can tell, however there is now no visible indication on the watch when you press the button for 3 seconds, 10 seconds or longer. Previously (before the V2 attempt) there had been some boot-up graphics at least.

It is a data cable. It is the cable I had used to load the V1 code previously, but I have tried another data cable just in case. This talks to my phone successfully, but nothing on the watch.

I have already tried reloading via VSCode and the Arduino IDE.

VSCode gives:

"Configuring upload protocol...
AVAILABLE: esp-prog, espota, esptool, iot-bus-jtag, jlink, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, tumpa
CURRENT: upload_protocol = esptool
Looking for upload port...
Auto-detected: COM3
Uploading .pio\build\ttgo-t-watch\firmware.bin
esptool.py v3.0
Serial port COM3
Connecting........_____....._____....._____....._____....._____....._____....._____

A fatal error occurred: Failed to connect to ESP32: Timed out waiting for packet header
*** [upload] Error 2"

The Arduino IDE gives:

"Sketch uses 681634 bytes (10%) of program storage space. Maximum is 6553600 bytes.
Global variables use 39128 bytes (0%) of dynamic memory, leaving 4482856 bytes for local variables. Maximum is 4521984 bytes.
esptool.py v2.6
Serial port COM3
Connecting........_____....._____....._____....._____....._____....._____....._____

A fatal error occurred: Failed to connect to ESP32: Timed out waiting for packet header
A fatal error occurred: Failed to connect to ESP32: Timed out waiting for packet header"

If I use the Arduino "Burn Bootloader" tool I get the error:

"java.lang.NullPointerException
at cc.arduino.packages.uploaders.SerialUploader.burnBootloader(SerialUploader.java:329)
at processing.app.Editor.lambda$handleBurnBootloader$61(Editor.java:2379)
at java.lang.Thread.run(Thread.java:748)
Error while burning bootloader."

Don't worry about it :-) I think I need to write it off.

Regards, John.
mchavez
Site Admin
Posts: 84
Joined: Tue Nov 10, 2020 12:12 am

Re: Can't connect

Post by mchavez »

In these post there are some suggestions:

https://github.com/espressif/arduino-esp32/issues/1497
https://github.com/espressif/arduino-esp32/issues/333
https://github.com/espressif/arduino-es ... -508891053

Some ideas are:
  • Update CP2102 driver
  • Change USB cable
  • Change USB port
  • Try with another PC
  • Try with another Arduino ESP32 board (like ESP32 Dev)
  • Change settings in "esp32/1.0.6/boards.txt" like "flash_size" or "flash_freq"
  • Try "esptool.py --port PORT flash_id" to print the detected flash size from the module
mulgrave
Posts: 4
Joined: Fri Jun 25, 2021 7:32 pm

Re: Can't connect

Post by mulgrave »

Thanks very much. I'll try some of those and report back if I have any successes.
mulgrave
Posts: 4
Joined: Fri Jun 25, 2021 7:32 pm

Re: Can't connect

Post by mulgrave »

It's working again! Depressing and releasing the watch button several times while running the uploader, as suggested in the first github thread above, suddenly had it burst into life.

Thanks very much for helping me out with this.

"C:\Users\jsatm\Downloads\uploader_v1>esptool.exe --chip esp32 --port COM3 --baud 2000000 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq 80m --flash_size detect 0xe000 boot_app0.bin 0x1000 bootloader_dio_80m.bin 0x10000 MyWatch.ino.bin 0x8000 MyWatch.ino.partitions.bin
esptool.py v2.6
Serial port COM3
Connecting........_____....._____....._
Chip is ESP32D0WDQ6 (revision 1)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
MAC: 10:52:1c:65:47:a8
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 2000000
Changed.
Configuring flash size...
Auto-detected Flash size: 16MB"
Post Reply