Using CH340 devices with OSX Sierra

I have several low-cost development boards that use the CH340/CH341 usb-to-serial chip for usb communication. Unfortunately, with OSX Sierra, the official CH340 driver cause a Kernel Panic (freeze + reboot) of the Mac when a device is connected. The reason is that the drivers are not signed correctly. I’ve found an alternative driver ($8) that was really worth the money.

NOTE: the suggested driver was a solution for Mac OS Sierra. It is only compatible with MacOS 10.15 (Catalina) and older. It does not work with newer versions.

CH340/341

The CH340/341 chip is a an inexpensive usb-to-serial solution that can be found on many Chinese Arduino-clones and ESP-devboards. I have a couple of boards with this USB chip that I could not get to work with my Mac:

CH341 devices
Clockwise: Open-Smart UNO (with 3V/5V switch), Geekworm ESP32, NodeMCU 0.9 ESP8266
ch34chipcloseup
Close-up of the CH341 chip

Removing the old drivers

If you have installed the original driver (http://www.wch.cn/) that causes a kernel panic on OSX Sierra, you can view the diagnostics log on the Mac to pin-point what driver is causing the problem.

In my log, the last loaded kext was com.wch.usbserial. To remove it I used:

sudo rm -rf /Library/Extensions/usbserial.kext

After this, my Mac would not crash anymore, but of course I could still not access the boards over USB as I had no driver installed.

Getting a working driver

While searching for a solution for my driver problem, I found several links to free downloads of signed and alternative drivers for CH340/CH341, but I finally decided to buy a driver from https://www.mac-usb-serial.com/. The driver costs $8 but I found it well worth the money as mac-usb-serial’s troubleshooting guide and support pages are very professional and useful. They also provide a free test app so that you can try to see if the driver will work with your devices before you do the actual purchase.

NOTE: this driver is only compatible with MacOS 10.15 (Catalina) and older. It does not work with newer versions.

ch340devicedetector.jpg
The test app has detected my Geekworm ESP-32 via the CH341 chip

Testing the new driver

After installing the driver on my Mac, my set of problematic dev boards works fine! Arduino IDE and Platform IO detects the boards and I can finally start using them for some experiments.

smartuno_341

4 Thoughts

  1. Thanks very much for the article and advice. I have had to update quite a number of pieces of software due to Mac Sierra compatibility issues. This software worked well, straight back on the programming horse so to speak. Keep up the good work.

    Like

  2. Be careful, the drivers on mac-usb-serial.com are not working with the newer OSX versions like Big Sur (I payed trusting it works).

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s