avrdude: ser_open(): can't set com-state for "\\.\COM5"

I googled this error and got a fair number of hits, but their solutions didn't fix my problem.

I'm brand new to Arduino. I bought a genuine Arduino Uno R3 and I was able to get that to work, simple serial prints, etc.

I also bought a Qunqi Smart Electronics ESP-12E WeMos D1 WiFi uno based ESP8266 shield for arduino Compatible which is an Arduino clone with built in WIFI.

I can't get this board to connect to my Windows 10 machine (which uses 'standard' serial drivers). In my device manager it shows up as COM5 RAMPS (which is some RepRap 3D printer device). In the IDE I have the board type as 'Arduino Uno Wifi' (is it correct to have this as the board type even though it is a compatible clone?). This board has a micro USB Female port, so I bought a micro USB male to standard USB male cable to plug into my USB hub (no special cable other than this???).

So my basic problem is connecting with the board over USB serial. Here's the full error message.

avrdude: Version 6.3, compiled on Jan 17 2017 at 12:00:53
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2014 Joerg Wunsch

System wide configuration file is "C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.10.0_x86__mdqgnx93n4wtt\hardware\tools\avr/etc/avrdude.conf"

Using Port : COM5
Using Programmer : arduino
Overriding Baud Rate : 115200
avrdude: ser_open(): can't set com-state for "\.\COM5"

I hope somebody can help get me unstuck.

Thanks in advance,
Mike

What's the link to the product?

Thanks for looking into this.

Mike

You should read the questions and answers.
https://wiki.wemos.cc/products:d1:d1

After downloading the drivers and libraries I can now connect to the board. But now it fails on the download. Any suggestions?

esptool v0.4.12 - (c) 2014 Ch. Klippel ck@atelier-klippel.de
setting board to nodemcu
setting baudrate from 115200 to 115200
setting port from to COM5
setting address from 0x00000000 to 0x00000000
espcomm_upload_file
espcomm_upload_mem
setting serial port timeouts to 1000 ms
opening bootloader
resetting board
trying to connect
flush start
setting serial port timeouts to 1 ms
setting serial port timeouts to 1000 ms
flush complete
An error occurred while uploading the sketch
espcomm_send_command: sending command header
espcomm_send_command: sending command payload
read 0, requested 1
trying to connect
flush start
setting serial port timeouts to 1 ms
setting serial port timeouts to 1000 ms
flush complete
espcomm_send_command: sending command header
espcomm_send_command: sending command payload
espcomm_send_command: receiving 2 bytes of data
espcomm_send_command: receiving 2 bytes of data
espcomm_send_command: receiving 2 bytes of data
espcomm_send_command: receiving 2 bytes of data
espcomm_send_command: receiving 2 bytes of data
espcomm_send_command: receiving 2 bytes of data
espcomm_send_command: receiving 2 bytes of data
espcomm_send_command: receiving 2 bytes of data
Uploading 251200 bytes from C:\Users\Mike\AppData\Local\Temp\arduino_build_689228/Blink.ino.bin to flash at 0x00000000
erasing flash
size: 03d540 address: 000000
first_sector_index: 0
total_sector_count: 62
head_sector_count: 16
adjusted_sector_count: 46
erase_size: 02e000
espcomm_send_command: sending command header
espcomm_send_command: sending command payload
setting serial port timeouts to 15000 ms
read 0, requested 1
setting serial port timeouts to 1000 ms
warning: espcomm_send_command: didn't receive command response
warning: espcomm_send_command(FLASH_DOWNLOAD_BEGIN) failed
closing bootloader
flush start
setting serial port timeouts to 1 ms
setting serial port timeouts to 1000 ms
flush complete
error: espcomm_upload_mem failed

esptool talks to bootloader but then the upload fails. try better usb cable