How to Install CH340 Drivers

Pages
Contributors: bboyho, santaimpersonator
Favorited Favorite 11

Mac OSX

Note for Educators: You will need to obtain administrative privileges from your network or IT administrator in order to install these drivers. Make sure to test the drivers before class and set aside some time with students in the classroom when installing the drivers.

Open the Terminal program by selecting Go > Applications.

Applications Folder

Select and open the Terminal program under Applications > Utilities > Terminal.

Open the Terminal Window

Note: You can also search with Spotlight by pressing (Command) + space bar (Space Bar). Then type "Terminal" and double-click the search result.

If you are still unsure of how to access the Terminal, watch this video or read this Apple support article.

You'll need to move to the directory where the *.kext files are stored.

  • For Mac OSX v10.9+, you will need to use this command:

    language:bash
    cd /Library/Extensions
    
  • For Mac OSX v10.8 and below, you will need to use this command:

    language:bash
    cd /System/Library/Extensions
    

In this case, we will be using Mac OSX v10.13, so we will need to use the first command.

change directory to where the drivers are located

To check to see if the CH340 driver is in the correct path, use the following command to list the contents of the folder.

language:bash
ls

To look for CH340 driver files (i.e. usb.kext or usbserial.kext) in the path, you could use the following command.

language:bash
ls | grep usb

You should see something similar to the output below after using the commands.

KEXT file path

If you have found the file in the path, you will need to run each of the following commands in the CLI/Terminal to remove old CH340 drivers. In this case, there was only the usbserial.kext file but it does not hurt to run both commands. Make sure to have administrative privileges to ensure that the drivers are removed.

language:bash
sudo rm -rf /Library/Extensions/usb.kext
sudo rm -rf /Library/Extensions/usbserial.kext

Check if the old drivers were removed in the paths by using the ls command with your respective OS version. You will notice that the *.kext file is removed from the respective paths. In this case, the usbserial.kext was removed from Mac OSX High Sierra.

language:bash
ls

CH340 Drivers Removed

Download and extract the folder.

Then, open the "*.pkg" file from the unzipped folder and follow the instructions. You'll need to restart your computer for the changes to take effect.

Mac OSX Installation Screenshot

Mac OSX CH340 Driver Installation File


Driver Verification for Macs

To verify that your driver is working, you should see a difference in the following pictures after plugging the CH340 to a USB port.

Command Line

Open the Terminal by heading to Applications > Utilities > Terminal if the program is not open yet.

Open Terminal Program

Then run the following command:

language:bash
ls /dev/cu* 

A list of devices connected to your Mac's COM ports will be displayed as a result. Assuming that the CH340 is not connected to your computer, you should see something similar to the image below.

List of Devices Connected

Connect the CH340 to one of your Mac's COM ports. Check for the following changes (your board may show up under a different device name). The CH340 should show up as /dev/cu.wchusbserial*****. Depending on your computer, the COM port may show up as a different number.

List of Devices Connected with the CH340

Screenshot of Mac OSX terminal with CH340 on cu.wchusbserialfd1410. Click to enlarge.

Arduino IDE

Alternatively, if you have the Arduino IDE installed, you should also see a change in the number of available COM Ports (you may need to restart the Arduino IDE for the board to populate). Without the CH340 connected to your computer, click on Tools > Port. Take note of the Serial Ports available.

Available Serial Ports on Arduino IDE

Connect the CH340 to your computer's USB port. Click on somewhere else on the screen for the menu to refresh itself. Then head back to the menu by clicking on Tools > Port. A new COM port should pop up. By process of elimination, the CH340 should have enumerated to the new COM port! Feel free to click on the COM port to select if you are uploading code to a microcontroller. Depending on your computer, the COM port may show a different number.

Available Serial Ports  w/ CH340 on Arduino IDE

Serial Loop Back Test

You can also verify if the USB-to-serial converter is working by doing a serial loop back test or echo test. If you are using the breakout board, you can add a jumper between the Tx and Rx to try and echo a character in a terminal program. For more information, try checking out the Hardware Test for the serial basic hookup guide.

Serial Loop Back Test