Arduino, Misc

Chinese Arduinos with CH340 / CH341 Serial / USB Chip on OS X Yosemite

NOTE: There’s an updated signed driver that works all the way up to Sierra:

If you have the old driver installed, then you should uninstall it first.

Here are the instructions for uninstalling the old driver:

  1. Open up Terminal
  2. Type the following:
    1. cd /System/Library/Extensions/
    2. Press enter
  3. Type the following:
    1. cat usb.kext/Contents/Info.plist | grep wch.usb.usb
    2. Press enter
  4. You should have received a few lines of text, this confirms that the driver we need to remove is usb.kext
  5. To remove the driver, in Terminal type the following:
    1. sudo rm -rf usb.kext
    2. Press enter
    3. You will be prompted for a password, enter your password and press enter.
    4. The driver should now be uninstalled.
  6. Reboot your Mac
  7. Install the new driver from the above download
  8. Reboot one more time.

Congratulations, you should now be able to use Arduino clones that use the CH340 chip once again.

Questions / Comments, down below.

Thanks guys.

 

I’ve recently had the opportunity to purchase very cheap Arduino Uno R3 clones. I bought a few of these from china and wasn’t expecting much. To my surprise the boards came well packaged and well soldered. They even included headers to use for making shields.

Note: If you just want a quick tutorial to get your clone up and running and avoid story mode, scroll to the bottom.

So I thought great, lets hook this up and upload a sketch to test it out. Well no such luck. Plugged in the Arduino clone only to discover that it wasn’t recognized. Upon further investigation of the onboard components I discovered that the clone does not use the standard serial to usb chip but a chip marked CH340.

So the hunt begins to locate the driver. This took a good 30 min of searching. Finally found drivers for Mac, Linux and Windows, posted below for you to download.

So I downloaded the driver, installed it and rebooted my MBP. Plugged in the Arduino clone, yup you guessed it, still no port detected. By now I’m thinking that I received dead boards. So I did some more digging. Turns out that the driver isn’t signed and in Yosemite, driver files must be signed to be used. There’s a command we can issue to bypass this.

So after installing the driver, bypassing the signed driver check and restarting my MBP, I plugged the Arduino clone in and finally a port was detected, (/dev/tty.wch ch341 USB=>RS232 1410), wow that’s a mouthful for a port name. Ok, lets upload a sketch finally. Damn, still didn’t work now I get avrdude complaining that it can’t find /dev/tty.wch. Wait just a damn minute. Why is it trying to find tty.wch when the whole port name is tty.wch ch341 USB=>RS232 1410? Because there’s a damn space in the port name.. who does that? Ok so we can get around this by creating a symbolic link

sudo ln -s /dev/tty.wch\ ch341\ USB\=\>RS232\ 1410 /dev/tty.wch

And just like magic, the Arduino IDE is finally communicating with my super cheap Chinese Arduino clone. I am now motivated to purchase a larger batch.

Quick Tutorial

  1. Download Driver Files for your OS
  2. Install software but don’t restart yet.
  3. Launch Terminal
  4. sudo nvram boot-args=”kext-dev-mode=1″
  5. Restart your Mac
  6. Launch Terminal
  7. sudo ln -s /dev/tty.wch\ ch341\ USB\=\>RS232\ 1410 /dev/tty.wch

This should get you going. Any questions comments, go for it.

 

The following two tabs change content below.
I've been in the Geek category for as long as I can remember. I am into anything technology and Sci-Fi related. I like tinkering with electronics as well as writing applications for Mac & iPhone.

107 thoughts on “Chinese Arduinos with CH340 / CH341 Serial / USB Chip on OS X Yosemite

  1. Hi. I just purchased a CH340 driver for yosemetie from a netherlands company called mac-usb-serial. The driver is signed so you don’t have to turn off driver signing.

      1. When i try to install ports to my Macbook Pro (Y 10.10), and put this string to terminal “sudo ln -s /dev/tty.wch\ ch341\ USB\=\>RS232\ 1410 /dev/tty.wch” – Arduino IDE show this port, but still writing me same error.
        Problem was my Macbook detecting Uno name as “tty.wch ch341 USB=>RS232 fd120” instread 1410.
        My magic command in Terminal was:
        ln -s /dev/tty.wch\ ch341\ USB\=\>RS232\ fd120 /dev/tty.wch

        **Sorry for my English, I’m living in Ukraine.

          1. sorry, I’m referring to your post on mar 22 at 4:06 PM as follows:
            “Thanks for posting this. I forgot to mention in my post that there may be some variations in the name across slightly different chips.”
            I think that may be my problem in getting my uno clone to work and I just need some direction as to how to ID the chip.

        1. I followed all the steps but MBP just shows:
          avrdude: ser_open(): can’t open device “unknown”: No such file or directory

          any hints?

        2. I had the same problem as you! All I did was:
          $ sudo mv /dev/cu.wch\ ch341\ USB=\>RS232\ 1410 /dev/cu.wch
          And it worked!

  2. I’ve tried to install the CH341 driver so I can connect to an ESP8266, but no matter what I try, I can never get the driver to show up. I can’t see the extension in the /Library/Extensions folder and I don’t see it in /dev. I’m running 10.10.3. Thoughts/suggestions?

    1. Did you do step 3 and 4? Launch Terminal and then type sudo nvram boot-args=”kext-dev-mode=1″ after installing the driver but before restarting the computer?

  3. I’m running OS X 10.10.3 and the serial device did not show up after reboot (after step 5).

    The system report identifies my arduiono as:

    USB2.0-Serial:

    Product ID: 0x7523
    Vendor ID: 0x1a86
    Version: 2.54
    Speed: Up to 12 Mb/sec
    Location ID: 0x80110000 / 6
    Current Available (mA): 500
    Current Required (mA): Unknown (Device has not been configured)

    VendorID is the same as in the PDF coming with the CH341 driver.

  4. The question by “hank” was very pertinent indeed. I have no luck here, no port showing up, I have been following the procedure strictly, tried both with restart or shut off and on. How can I see the peripherals that are present and eventually catch them up, if they have a name that is slightly different from that you mention, could you please put a note about that? Thanx! 😉

  5. Your method works. Thanks a lot!

    However, I have one little problem: Every time I try to upload new program to the clone, sometimes it does not run the program unless I restart the clone.

    Any way to fix this problem? Oh and btw, your command:

    sudo nvram boot-args=”kext-dev-mode=1″

    only works for me if I remove the quotation marks

  6. I had a bit of trouble with this, but finally figured out what I was doing wrong. I had to start the Arduino IDE after the Nano was plugged in. Working like a champ now.
    Thanks for all the suggestions, couldn’t have done it without them.

    1. I ran this command, how do I undo this and remove it from my /dev? It reappears every time I plug it in. I don’t think it helped.

      1. You would issue the rm command. so it would look something like this:

        sudo rm /dev/try.wch

        You will be promoted for a password, once you enter the password and press enter the port will be removed

  7. Hi. I’m running OS X 10.10.3 (on Mac Pro, mid 2014) and made all this steps for my arduino uno clone like You said but the port doesn’t show up in the port-section of arduino. Any suggestions, why?

  8. Hello and thank you for posting 🙂

    I followed you instructions step by step, tried :

    – stop and start instead of reboot,
    – with and without quotes for nvram instructions,
    – changed usb port with Arduino soft shut down.

    I bought this one http://www.amazon.fr/gp/product/B00QPUEFNW?psc=1&redirect=true&ref_=oh_aui_detailpage_o04_s00 (same as your right ?)

    I’m trying to install this on a Yosemite MB Pro retina Mid 2012 and configured the arduino soft on :

    – Adruino Nano
    – ATmega 328
    – tty.wch ch341 USB=>RS232 1420

    But when I want to push the Blink exemple, I got

    avrdude: ser_open(): can’t open device “/dev/cu.wch”: No such file or directory
    ioctl(“TIOCMGET”): Inappropriate ioctl for device

    Do you have a hint ?

    Thank you in advance 🙂

    1. I found a solution maybe this will help to understand what append and could be useful for other people (maybe also to have an Arduino software update?)

      Found here : http://forum.arduino.cc/index.php?topic=292284.0

      —–

      Hi guys!

      Considering you have correctly installed the CH340G driver, the problem is in the spaces of the device name.
      To fix that you have to manually edit two (2) txt files of the arduino installation.

      Go where you have installed it. In my case the path is:

      /Users/MY_USERNAME/Downloads/Arduino.app/Contents/Java/hardware/arduino/avr

      Inside this directory you can see files platform.txt & programmers.txt.

      Inside these files replace -P{serial.port} with “-P{serial.port}”.
      So you simply have to add the quotes.

      One occurrence is in the first file & two in the second.

      Restart your IDE and it will work! Enjoy!

  9. I found a solution maybe this will help to understand what append and could be useful for other people (maybe also to have an Arduino software update?)

    Found here : http://forum.arduino.cc/index.php?topic=292284.0

    —–

    Hi guys!

    Considering you have correctly installed the CH340G driver, the problem is in the spaces of the device name.
    To fix that you have to manually edit two (2) txt files of the arduino installation.

    Go where you have installed it. In my case the path is:

    /Users/MY_USERNAME/Downloads/Arduino.app/Contents/Java/hardware/arduino/avr

    Inside this directory you can see files platform.txt & programmers.txt.

    Inside these files replace -P{serial.port} with “-P{serial.port}”.
    So you simply have to add the quotes.

    One occurrence is in the first file & two in the second.

    Restart your IDE and it will work! Enjoy!

  10. The device arduino.app is looking for was slightly different for me. I had to do:

    sudo ln -s /dev/tty.wch\ ch341\ USB\=\>RS232\ 1410 /dev/cu.wch

  11. http://forum.arduino.cc/index.php?topic=292284.msg2229300#msg2229300

    the problem is in the spaces of the device name. To fix that you have to manually edit two (2) txt files of the arduino installation.

    Go where you have installed it. In my case the path is:

    /Users/MY_USERNAME/Downloads/Arduino.app/Contents/Java/hardware/arduino/avr

    Inside this directory you can see files platform.txt & programmers.txt.

    Inside these files replace -P{serial.port} with “-P{serial.port}”. So you simply have to add the quotes.

  12. There’s a problem with the quotes from the first terminal command when copying from this site. I’m guessing the blog’s CMS autoformats quotes (maybe try posting them as a code block?)

    For those having problems, delete the quotes and then add them manually.

    Thanks

    Roo

  13. I tried steps 1..7 but tty.wch does not appear under /dev. In System Info I have the following under: USB->Ser!
    USB2.0-Ser!:

    Product ID: 0x7523
    Vendor ID: 0x1a86
    Version: 2.54
    Location ID: 0x04300000

    What is supposed to appear under /Library/Extensions? I am using OSX El Capitan.

  14. Hello!

    I have the problem, i don’t connecting the “clon” Arduino with my Macbook Pro Retina (10.11 El Capitan)

    I done the instructions. But i don’t understand the “plug-in”.
    What is that? my last step was :
    sudo ln -s /dev/tty.wch\ ch341\ USB\=\>RS232\ 1410 /dev/tty.wch

    I trying that 9 once…

    Sorry for my bad English (i come from Germany)

  15. After update my MAC into 10.11, CH341 driver cannot be use.
    Before I update my OSX, everything is fine. Can anyone solve it?

    1. I sent a mail to China and they told me that they are going to publish a signed driver soon. For now you’re in bad luck. El Capitan will not talk to El Cheapo 🙁

  16. The issue with the scrambled name has been fixed meanwhile. Someone on StackOverflow sent a mail to the manufacturer and it has been changed. Now the device is named /dev/tty.wchusbserialfd140 (or the like).

  17. Hi, I’m new to this stuff and was wondering if you have directions for installing the windows driver for my Chinese nano? Your directions are for a Mac computer. Any help will be greatly appreciated.

  18. i have a mac and follow the instructions for installing the ch341 driver and when I finish, I look at the ports available to arduino and get port:”/dev/cu.wch ch341 USB=>RS232 620″

    and if I try to run
    ln -s /dev/tty.wch\ ch341\ USB\=\>RS232\ 1410 /dev/tty.wch

    I get
    ln: /dev/tty.wch: File exists
    I can’t get it to change RS232 620 to RS232 1410
    what am I doing wrong?

    1. The file already exists. Probably you have the new driver already and don’t need the ln command but use /dev/tty.wcn directly (not sure since I can not longer test with El Capitan). Else remove the /dev/tty.wcn prior to the ln command.

  19. Hey, I tried this on elcapitan (I am new to arduino) and had the same problems as other people, as a solution I thought I may as well get a VirtualBox set up on my mac, I have succesfully got elemental OS on the virtual box and am now trying to install the driver, any suggestions/help? I am aware that this was a post about mac but would love some help.

  20. I have OS 10.11 (El Capitan). I followed your instructions step by step but unfortunately it didn’t work out for me. It doesn’t see any ports except bluetooth one. I also did burn a bootloader through using an original one as ISP but it didn’t work out either. I think I got some bad ones( I paid 3 bucks). Also, does anyone know if the terminal command code has something problematic? Is there anyway to undo the commands ? thanks

    1. How to install driver CH340 CH341 Arduino USB to RS232 TTL serial adapter on OSX El Capitan/Yosemite

      The installation driver CH340/CH340g/CH341 for the OSX El Capitan which is required to upload the sketches into Arduino/ATmega/ATtiny etc.

      To disable kext signing you will need to do this simple steps:
      – Reboot and press CMD+R immediately after reboot to enter in Recovery Mode
      – Open Terminal from Recovery mode
      – Run the command csrutil enable –without kext
      – Reboot
      – Install driver

      Watch this video
      https://www.youtube.com/watch?v=0zuRukW7o0A&index=2&list=LLQZF7UAabeuI-fbH5KP6QNA

      Works for me!

      1. Hey, cool! I gave up hope and there’s already some dust on my board. But now I can use it again. Still having the hope to see a signed driver from wch.

        1. Ever since I found that after 5 or so USB re-connections my Mac is powered down the hard way. The best was to see the grey screen reading “You need to power off…” but in other cases it was just like a lightning striking my machine. So, this driver in hack-mode is not really a good idea!

  21. The Chinese are working on a solution but for now El Capitano refuses to talk to El Cheapo. Maybe this should be pointed out in the blog itself.

    1. If you are on El Capital step 4 is slightly different. You have to reboot, hit cmd+R after chime, open a terminal and give: csrutil disable; reboot

  22. Arduino: 1.6.1 (Mac OS X), Board: “Arduino Nano, ATmega328”

    Sketch uses 4,284 bytes (13%) of program storage space. Maximum is 30,720 bytes.
    Global variables use 249 bytes (12%) of dynamic memory, leaving 1,799 bytes for local variables. Maximum is 2,048 bytes.
    avrdude: ser_open(): can’t open device “/dev/tty.wch”: No such file or directory
    ioctl(“TIOCMGET”): Inappropriate ioctl for device
    Problem uploading to board. See http://www.arduino.cc/en/Guide/Troubleshooting#upload for suggestions.

    This report would have more information with
    “Show verbose output during compilation”
    enabled in File > Preferences.

    If I try to repeat the sudo command it tells me file exists. Any thoughts??

  23. Hi 0XCF. Thanks for posting and hosting for Clone users.
    I have had some problems with this driver causing a kernel panic in my Snow Leopard 10.6.8 OS. The kernel extension doesn’t seem to want to play nice with my setup.
    If this happens to any other users, remove the extension by executing this command in terminal:

    sudo rm -R /System/Library/Extensions/usb.kext

    …and try again

    I’m not sure if it’s somethin specific to my OS, or maybe I’m missing a command. But I have seen a kernal panic reported for this driver on this website:

    http://kiguino.moos.io/downloads/

    ———————————

    Thanks again 0xCF

  24. Thanks, it was the driver signing that cause me issues (sudo nvram boot-args=”kext-dev-mode=1″). I upgraded to Yosemite over the summer (yes, I stay about a year behind Apple) and haven’t needed to connect a CH340 device since then. When I did, found this blog, followed it, and the little cheep Nano’s are showing up again as /dev/tty.wchusbserial1410.

  25. Hi Chris,

    Thanks for your instructions on making our Chinese Arduino boards work on the Mac! That was very helpful.

    I just would like to let you know that I was successfull without needing to do the last step in your instructions. Instead, I did like suggested by another user, and inserted the quotes in the two files described (platforms.txt and programmers. txt). After doing the restart, the board was recognized with the right name, and I successufully downloaded a file to it.

    Thanks again,
    Julio

  26. Hello, I didn’t buy my Uno clone deliberately. It was included as the controller of a device I purchased. I was pretty upset when the device I purchased didn’t work and I had to sacrifice my practice authentic Uno to get it working. I was about to buy a replacement for my practice uno when I decided to check online. Your article popped up at the top and I’m glad it did. I followed your suggestions and made the changes to both my Mac mini and MacBook Pro with El Capitan and they worked flawlessly. And I’m surprise that the Chinese clone actually works as smooth as silk (Chinese silk). You have provided a wonderful International community service. Thank you very much.

  27. Wonderful. I have no idea what just happened except that I’ve followed your instructions and successfully installed a driver compatible for my Mac to communicate with my Arduino Uno clone. Had problem before and now it’s fixed thanks to you. *thumbs up*

  28. I put the link you created but the short name for the port it’s still on the display. :/ I’m diying to upload a program to my chinese arduino too :/

  29. Pulling my hair out. I’ve tried so many different things now that I hope I haven’t screwed up my Macbook Pro running El Capitain 10.11.4 🙂

    Here is what my Arduino upload fail comment is
    avrdude: ser_open(): can’t open device “/dev/cu.wch”: No such file or directory
    ioctl(“TIOCMGET”): Inappropriate ioctl for device

    I believe the UNO is using CH340, so I am guessing the following is the correct command after the 1st terminal command and reboot (power on/off) I’ve done both.

    sudo ln -s /dev/tty.wch\ ch340\ USB\=\>RS232\ fd120 /dev/cu.wch

    I am guessing that I am supposed to replace \ch341 with \ch340 ??
    I have also seen fd120 or 1410 used ??
    every time I ran the command with /dev/tty.wch I did not see any port appear other then the ones that were already there and did not work. When I replaced it with /dev/cu.wch I could then see the port in the list /dev/cu.wch

    so why the message that the file does not exist when I have clearly created it??

    Someone please help

  30. i tried everything is mentioned here but i still cant get mac to recognize the port, is there anything new that i should try?

  31. Hey,

    does this work for OSX 10.7.4., too?
    I installed the driver but I still cannot upload the sketch…
    I’m afraid using the terminal and destroying something…

    Do you think it could work for 10.7.4.?

    Best, Debbie

  32. Thanks, it works on 10.11.4!
    1) restart in recovery mode (using cmd+r on launch)
    2) run terminal command: csrutil disable
    3) restart
    4) install driver
    5) restart
    6) run terminal command: sudo ln -s /dev/tty.wch\ ch341\ USB\=\>RS232\ 1410 /dev/tty.wch
    7) connect uno, run Arduino IDE and select “/dev/cu.wch …” port

  33. Gentlemen, after having installed the drivers still a no go fro me. So what I did is:
    – csrutil thing is disabled on my El Capitan
    – my chinese OSOYOO Arduino Nano has a 340G usb chip
    – i’ve tried installing the older CH341_SER and the newer CH34X_ drivers with no success
    – if from the terminal I list all devices in /dev there is no new device, nor from Arduino IDE.
    – if i try from the system report and see how my USB tree changes when I plug/unplug the USB, although my nano shows to be powered on, no unidentified USB devices show connected.
    What next?

  34. Hello. I get the driver installed but the command in the terminal gives:

    nvram: Error setting variable – ‘boot-args’: (iokit/common) general error

    I do this before restarting. Do you have any idea?

  35. i tried 20 times install driver, rebot, restart, open terminal and copy and paste given command. but nothing works. when i open terminal paste command and then password and hit enter key nothing happened
    please help

  36. not working with mac ox (version 10.7.5). i try 20 times. I install driver, open terminal, copy and paste sudo command (step 5) restart and open terminal copy and paste sudo command (step 7). But nothing happen. can’t find serial usb port in arduino software. when i enter sudo command in terminal and then ask for password. i enter password and hit enter key then nothing happened. please help me try to fix from last 10 days watch every video and read website. i have 2 arduino and arduino nano. none of work
    Thanks in advance

  37. after the sudo, I am prompted for my password, but after that the only response i get is another prompt, as if the command was totally ignored.

  38. Have use your MacOs Driver in an Arduino course, me and some of my students, with different mac models and differents OS versions, and with Arduino chinese clone. Arduino IDE allways recognize the Arduino card on its port and work with.
    Great software !!

  39. Any update for the latest version of OS X (Sierra)? how do you make sure the driver does not come with virus? do you start from source code or do you just post the Chinese driver?

  40. Hi,
    My setup is a chinese arduino nano and Mac OSX Yosemite 10.10.5 on MBPro.

    I first tried the solution proposed above. But this did not work. No driver showed up in dev/tty.* after installation of the driver files.
    Then I found this blogpost:
    http://kig.re/2014/12/31/how-to-use-arduino-nano-mini-pro-with-CH340G-on-mac-osx-yosemite.html

    This worked for me, particularly I guess, the updated driver for yosemite/capitan which seems to be signed now.

    My usbserial driver is now showing up as “cu.wchusbserial1450”

  41. Hi you bunch of geniuses! Could anyone please tell me how to “install” this driver as im new to linux? I run Ubuntu Studio 16.0 64bit with Flycut CSFY-720 printer/plotter/vinyl cutter.

  42. Hello guy,

    I’ve some problem with Arduino and my Mac OSX version (Yosemite, as told in the title).

    I tryed to install the driver for CH340G on my computer due to problem to put the program inside the board, but I’d got no result, then I tryed other ways.

    First, the error message was “can’t open “/dev/cu.wch” no such file or directory”, then I used the terminal ( ls /dev/tty.* ) in order to look at the hardware connected to the computer, but I didn’t notice any changing with and without Arduino board.

    After some research, I ran across a lot of website that didn’t work :
    http://forum.arduino.cc/index.php?topic=351999.0 <– this topic gave a some piece of information, but none worked
    http://kig.re/2014/12/31/how-to-use-arduino-nano-mini-pro-with-CH340G-on-mac-osx-yosemite.html <– didn't work
    https://github.com/adrianmihalko/ch340g-ch34g-ch34x-mac-os-x-driver <– Still giving the same kind of problem
    http://www.prolific.com.tw/US/ShowProduct.aspx?p_id=225&pcid=41
    http://www.ftdichip.com/FTDrivers.htm

    I got no changes after trying these options, in spite of following as much as possible websites instructions.

    After following the pieces of advices of the website https://arduino.stackexchange.com/questions/5119/arduino-nano-no-serial-port-for-macbook-air-2013 I got a (really really) fat message from the terminal commande, but these lines were recurrent :

    Referenced from: /Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/../libexec/gcc/avr/4.9.2/liblto_plugin.so
    Expected in: /usr/lib/libSystem.B.dylib

    The last line is the one which appear most often, but I didn't find any solution for my OSX version (Yosemite)

    If someone has an idea about the way I can solve that, I would be very grateful. If the ones who are paying attention to my message need pieces of information to understand my problem (screenshots, issues report,…), I'll give it as soon as possible,

    Thanks a lot!

  43. My mac keeps crashing after using that driver. Anyone know the name of it as it would appear so I can find it and uninstall it?

Leave a Reply