Cannot upload code via computer

jeffgeudens
Posts: 3
Joined: Sat Oct 17, 2020 7:39 pm

Cannot upload code via computer

Postby jeffgeudens » Sun Oct 18, 2020 7:49 am

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
Attachments
Screenshot Arduino IDE.PNG
Screenshot Arduino IDE.PNG (105.55 KiB) Viewed 5783 times
IMG_2255.jpeg
IMG_2255.jpeg (671.18 KiB) Viewed 5783 times
IMG_2254.jpeg
IMG_2254.jpeg (596.31 KiB) Viewed 5783 times

ESP_Sprite
Posts: 8921
Joined: Thu Nov 26, 2015 4:08 am

Re: Cannot upload code via computer

Postby ESP_Sprite » Mon Oct 19, 2020 1:41 am

Can you tell what happens if you connect a terminal program to the serial port (at 115200 baud) and reset the board?

jeffgeudens
Posts: 3
Joined: Sat Oct 17, 2020 7:39 pm

Re: Cannot upload code via computer

Postby jeffgeudens » Mon Oct 19, 2020 5:28 pm

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
Attachments
PuTTy.PNG
PuTTy.PNG (20.51 KiB) Viewed 5741 times
Device manager.PNG
Device manager.PNG (203.92 KiB) Viewed 5741 times

Spile2
Posts: 23
Joined: Tue Sep 22, 2020 8:39 pm

Re: Cannot upload code via computer

Postby Spile2 » Mon Oct 19, 2020 9:56 pm

I can recommend following the instructions here...
https://randomnerdtutorials.com/install ... tructions/

Scott.Bonomi
Posts: 73
Joined: Mon Mar 09, 2020 7:36 pm

Re: Cannot upload code via computer

Postby Scott.Bonomi » Tue Oct 20, 2020 1:10 am

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?

ESP_Sprite
Posts: 8921
Joined: Thu Nov 26, 2015 4:08 am

Re: Cannot upload code via computer

Postby ESP_Sprite » Tue Oct 20, 2020 1:58 am

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.

jeffgeudens
Posts: 3
Joined: Sat Oct 17, 2020 7:39 pm

Re: Cannot upload code via computer

Postby jeffgeudens » Tue Oct 20, 2020 4:51 pm

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

ESP_Sprite
Posts: 8921
Joined: Thu Nov 26, 2015 4:08 am

Re: Cannot upload code via computer

Postby ESP_Sprite » Wed Oct 21, 2020 2:34 am

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?

Who is online

Users browsing this forum: pubsub and 42 guests