Can't install driver for CH340

I've got an old laptop (2nd gen i7) with a fresh install of Windows 10 Pro 21h1 that I'm using in my new workspace to get back into tinkering, which I haven't done in several years. I know I need to install the driver for the CH340 controller to work properly, but I can't seem to install it. I've downloaded several times from multiple sources. The installer will launch, but when I click the install button I get "Driver install failure!"

image

I've tried compatibility mode and disabling driver enforcement (as recommended on this forum as far back as 2017), but nothing is working. I also tried on my main PC (also newer than the last time I tinkered with an Arduino) and it's also failing here with the same nondescript error.

I suspect Microsoft's recent over-enthusiastic "protect users from themselves" Apple mentality is to blame. I've had other issues with programs being blocked with no option to unblock them in the past few months leading to large amounts of frustration.

I apologize if this has been recently covered. But, I've searched quite a bit (over the last 2 hours) and I keep winding up on the same threads from 4 years ago, nothing more recent is coming up & those solutions are not working.

1 Like

Where did you get the driver? I recommend always using the one from the CH340 manufacturer's website:
http://www.wch.cn/download/CH341SER_EXE.html
(click the cloud with a downward pointing arrow button)
I believe they also have an English language version of the website at wch-ic.com, but I haven't found the time to investigate that option, so I am still recommending the original wch.cn site as the best source for this driver.

I have never found it necessary to disable driver enforcement to install the CH340 driver.

1 Like

The first package I tried installing was from that site. Have you tried it on one of the later feature updates on Win10?

For all of mine, I have used Sparkfuns driver, and it is safe, easy, and reliable. Just Google CH340 Sparkfun and follow the steps from there

The SparkFun one was one I tried that failed. I just tried it again here and it still failed.

Just as an experiment, I grabbed an even crappier old laptop and installed Windows 10 1903 and the driver installed just fine. It seems the problem lies in newer versions of Windows 10 as I suspected.

I had not, but I just gave it a try and had the same problem as you. I actually think I have only ever used the driver installer once. I always use the .zip file and install the drivers via Windows Device Manager because some driver installers also install additional applications to manage that device and I only need the driver itself in this case.

I just tried it with the .zip and had no problems. Please try this:

  1. Open the page for the driver download on the chip manufacturer's website in your browser:
    http://www.wch.cn/download/CH341SER_ZIP.html
  2. Click the blue button with the picture of the cloud with the downwards pointing arrow.
  3. Unzip the downloaded file to a convenient folder.
  4. Open Windows Device Manager.
  5. Connect the USB cable of the Arduino board to your computer.
  6. You should see a new "USB2.0-Serial" device appear under the "Other devices" section of the Device Manager device tree. Double click on the new device.
    A "Properties" dialog will open.
  7. Click the Update driver button in the dialog.
  8. Click the Browse my computer for driver software button.
  9. Click the Browse button.
  10. Select the folder you unzipped the downloaded file to.
  11. Click the OK button.
  12. Check the box next to "☐ Include subfolders".
  13. Click the Next button.
    The driver installation wizard should now automatically install the driver.

After that, the CH340 -based board should appear in the "Ports (COM & LPT)" section of the Device Manager device tree as "USB-SERIAL CH340 (COMn)" and the board should show up under Arduino IDE's Tools > Port menu.

1 Like

Still won't install for me. "Windows could not find drivers for your device.". I am up to date with all Windows updates. Also tried on another laptop with the same results.

Hi @k9tr. You can try running the .exe file that is in the unzipped driver folder. This is an installer provided by the chip manufacturer. I haven't had any success with running that (even though the procedure I describe above works perfectly for me), but another user reported that the manual driver installation via Device Manager did not work for them, but running the installer did work. So it's worth a try.

I had already tried running the .exe, no difference noted. I do have CH341PT.DLL and CH341SER.VXD in my System 32 folder, so something is attempting to install. Unfortunately these files don't properly install and/or function.

I'm getting a different error, but I see that two files are being created in the system32 folder. So the driver install is at least copying files, even though they don't work. I'm using the same version of Windows 10, 21H1. I even tried restoring Windows to a restore point created before the most recent drivers were installed, but the restore failed when it attempted to copy the registry. So even that old trick doesn't work, for me anyway. Waiting to hear more from Arduino support.

You can try using an official Arduino board. These don't use the CH340 and so will never require you to install the CH340 driver.

You can get them from the Arduino Store:

From Arduino's Amazon store:

Or many other locations (but be careful because not every product that mentions "Arduino" in its advertising is an official product).

Yes, an official Arduino requires no driver. I have one, it works fine. Also, the clone manufacturer changed their hardware and they now require the FTDI driver instead of the CH340. They were not very good at communicating this change, hence my prior posts. My original clone board is working fine with the FTDI driver.

I'm glad to hear you found the cause of the problem. Thanks for taking the time to post an update. Enjoy!
Per

I have tried all possible methods of installing the CH340 driver, and although by some methods both the installer and windows say "installed successfully", and the device appears proper in the Device Manager "USB-SERIAL CH340 (COM4)", the Arduino IDE always refuses to communicate with it. On occasion, Windows gives a notification that "driver not installed successfully" and the reason is "driver not found". On other occasions, Windows says driver installed correctly. I get the dreaded "avrdude: stk500v2_ReceiveMessage(): timeout" from the IDE using any method. I reboot windows after every "install".

The hardware is the cheap Mega2560 clone with the CH340G chip.
using Windows 7

Could it be that an FTDI driver is needed, as per user @k9tr? Where do I get this driver?

All installation is after unzipping to a folder. Methods tried:
Install Sparkfun CH341SER manually.
Install Sparkfun using SETUP installer.
Install Sparkfun using SETUP but first uninstall.
Install wch.cn CH341SER manually.
Install wch.cn using SETUP installer.
Install wch.cn using SETUP but first uninstall.

It appears that on several occasions, the driver is installed, but there remains a communication problem.

UPDATE: I uninstalled CH341 and installed the FTDI driver from https://www.ftdichip.com/Drivers/CDM/CDM%20v2.12.36.4%20WHQL%20Certified.zip
and no dice. Same timeout problem.

Thanks for all help.

CH341 error:

Using Port: COM4 Using Programmer: wiring Overriding Baud Rate: 115200
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_getsync(): timeout communicating with programmer

FTDI error -- this is on a laptop:

         Using Port                    : COM4
         Using Programmer              : wiring
         Overriding Baud Rate          : 115200
avrdude: ser_open(): can't open device "\\.\COM4": Access is denied.
avrdude: ser_drain(): read error: The handle is invalid.
avrdude: ser_send(): write error: sorry no info avail
avrdude: stk500_send(): failed to send command to serial port
avrdude: ser_recv(): read error: The handle is invalid.
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: ser_send(): write error: sorry no info avail
avrdude: stk500_send(): failed to send command to serial port
avrdude: ser_recv(): read error: The handle is invalid.
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: ser_send(): write error: sorry no info avail
avrdude: stk500_send(): failed to send command to serial port
avrdude: ser_recv(): read error: The handle is invalid.
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: ser_send(): write error: sorry no info avail
avrdude: stk500_send(): failed to send command to serial port
avrdude: ser_recv(): read error: The handle is invalid.
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: ser_send(): write error: sorry no info avail
avrdude: stk500_send(): failed to send command to serial port
avrdude: ser_recv(): read error: The handle is invalid.
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: ser_send(): write error: sorry no info avail
avrdude: stk500_send(): failed to send command to serial port
avrdude: ser_recv(): read error: The handle is invalid.
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_getsync(): timeout communicating with programmer
avrdude done.  Thank you.
the selected serial port 
 does not exist or your board is not connected
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

VCP Drivers - FTDI (ftdichip.com) Select Setup Executable across from the Operating System: Windows area.

Then the driver installation was successful, so stop wasting time on the driver.

No. The FTDI driver is only needed for USB to serial adapter chips manufactured by FTDI. They are of no use for a board with a CH340 USB to serial adapter chip, which is manufactured by a different company.

Have you ever been able to upload successfully to this board, or is this a brand new board that has had the problem from the start?

If it helps, I initially installed the CH340/341 driver as instructed in the documentation that came with my Arduino clone. It failed to function, although did create an "unknown serial device" in Device Manager. The CH340 Windows installer has an uninstall option, which when used only replies the CH340 driver is not installed. Even though it has left two files in my system32 folder. It was suggested to try the FTDI driver. I installed it, and the Arduino clone worked. There was a change in chipset at the manufacturer site as they could not obtain the compatible CH340 chipset any longer. So I'm happy with my FTDI driven Arudino Uno clone. I also obtained a non-clone "official" Arudino Duno and it functions fine with no additional driver needed.

Thanks in0.

Correct, the Mega2560 with a CH340G is brand new. Ordered a couple of these clones from China, and now regret it. Both have the same problem.

But my genuine Arduino Mega2560 and Due boards have no issues, and I am uploading via the resident Windows driver.

The IDE is also the latest - 1.8.15.

If you have any shields, modules, wiring, etc. connected to the bad Mega, please remove it all and try uploading to just the Mega alone.

Is the "L" LED on the bad Mega blinking?

There are no shields or connections to the board. Just the bare board.

Here is a photo of the clone I found in another thread. Exactly same board.

When powered up via the USB cable connected to the laptop, red "L" is blinking fast. When I try to upload, L becomes solid, and either red Tx or Rx start blinking once a second. The red "ON" is also lit at all times. I can provide you more detailed LED behaviour if you want.