Page 1 of 1

Cannot upload code via computer

Posted: Sun Oct 18, 2020 7:49 am
by jeffgeudens
Hey guys,

I recently bought an ESP-WROOM-32 module that sits on a developer board that can also hold a battery (see pictures and this https://www.aliexpress.com/item/3304624 ... 4c4dIUX6jB)

I've downloaded and installed Arduino IDE in order to upload code to the device.
I use the following settings:
  • Board: Wemos WiFi&Bluetooth Battery
  • Upload speed: 921600
  • Port: COM3
After clicking on 'Upload', the following error message shows up after a while: 'A fatal error occurred: Failed to connect to ESP32: Timed out waiting for packet header'

Troubleshooting so far
  • I've checked in device manager and there it shows: 'Unknown USB Device (Device Descriptor Request Failed)' I tried to delete the device from the list, restart the computer, make it install again but with no success.
  • Restarted the computer with the device in the USB, restarted the computer without the device in the computer... no success
  • Tried 3 different USB ports
  • Tried 2 different cables
  • Tried two different development boards (same model)
Do you guys have any suggestions what might be the issues here? Did I choose the wrong type in the Arduino IDE? Do I need to install another driver to make my computer recognize the device? Is there something I'm doing wrong or is there something wrong with these devices?

Thanks a lot

Re: Cannot upload code via computer

Posted: Mon Oct 19, 2020 1:41 am
by ESP_Sprite
Can you tell what happens if you connect a terminal program to the serial port (at 115200 baud) and reset the board?

Re: Cannot upload code via computer

Posted: Mon Oct 19, 2020 5:28 pm
by jeffgeudens
Hi,

I'm uploading a picture of the settings and what I see in my device manager (in Dutch). I tried to install the driver first from this website : https://www.silabs.com/products/develop ... cp-drivers
I downloaded putty and tried to connect to COM3 at the proposed baud rate but nothing happens when I click on 'Open'. Screenshot of PuTTy attached.

Any other suggestions?

Jeff

Re: Cannot upload code via computer

Posted: Mon Oct 19, 2020 9:56 pm
by Spile2
I can recommend following the instructions here...
https://randomnerdtutorials.com/install ... tructions/

Re: Cannot upload code via computer

Posted: Tue Oct 20, 2020 1:10 am
by Scott.Bonomi
I might think that the bad rate should be 115,200 rather than 112,500. I believe that difference would would take it out of the 3% timing error RS232 use to allow on slow data lines before the advent of good timing chips. Does a scope show activity on the chip TX pin even if your PC does not?

Re: Cannot upload code via computer

Posted: Tue Oct 20, 2020 1:58 am
by ESP_Sprite
Maar goed dat ik ook Nederlands ben :P You seem to have at least one USB device that Windows can't recognize ('onbekend apparaat'). Does that go away if you unplug the devboard? If so, something between the USB-to-serial converter on your devboard and your PC is broken.

Re: Cannot upload code via computer

Posted: Tue Oct 20, 2020 4:51 pm
by jeffgeudens
Hey guys,

Thanks for the suggestions. I followed the tutorial that @Spile2 suggested but I fail at step 6 at 'Testing the connection'.

@ESP_Sprite, Altijd handig als je Nederlands spreekt ;) I've continued troubleshooting and found the following things:
- Unknown device goes away if I unplug it.
- Unknown device shows up even if I used another USB cable
- Unknown device shows up even if I use another USB port
- Unknown device shows up even if I use another ESP development board
- Unknown device shows up even if I use another computer

Also tried a third USB cable but then nothing at all shows up. Maybe that cable does not have a data wire?

Is there anything else I can do to find out where the connection fails? What could be the problem?

I don't have a scope at my disposal here.

Jeff

Re: Cannot upload code via computer

Posted: Wed Oct 21, 2020 2:34 am
by ESP_Sprite
That is strange... If any, the 'unknown device' is because communications between the USB port and the CP2102 is not OK, and it's something very basic (like e.g. the USB D- pin not making a connection or the CP2102 not receiving power or something).

A thought: it's hard to say without the schematics, but maybe these boards *require* a battery to be installed to power the CP2102?