CH340 on OS X

Preamble

I wrote a long winded post that did not really answer the question, Can’t connect Cura to my Anet A8 on OSX 10.11.6, but rather catalogued my search for a solution to my own problem.

With respect to this post Should I clean up my answer?, I decided to delete my answer and keep the information here, in this article.

The post

 

Please update your question with the version of OSX that you are using. You don’t state in your question, which version of OS X you are using, so **any** answer given will be purely speculative, unless solutions for **all** versions of OSX are listed. You are using OSX El Capitan. The version of OSX is particularly relevant w.r.t. the CH340 drivers. A driver that works on one OSX version, will not necessarily work with a different version of OSX – even minor version changes of OSX can be affected (as the answers to Problem with serial driver for CH340G board demonstrate.


Important Note

Before installing any new drivers, it is always worth backing up the original file, just to avoid any unpleasantness later. For example:

sudo mv /System/Library/Extensions/usb.kext /System/Library/Extensions/usb.kext.old

I seem to remember having the same issue, not with a 3D printer, but just with a cloned Arduino board. I thought that I had written a lengthy blog about it but can’t locate it at the moment (I will update this answer when I find it)1.

The CH34x ICs are infamous for their poor support on OSX. On Windows they generally fare a little better, and TBH it is probably well worth considering a WinTel option just to save yourself time, frustration and headaches…

Nevertheless, I think that I found this site to be useful, How To Use Cheap Chinese Arduinos That Come With With CH340G / CH341G Serial/USB Chip (Windows & Mac OS-X).

See also Compatibility between Arduino and Arduino clones:

The most annoying issue, and even then it is quite minor, is that a lot of Chinese clones do not use an ATMega for the USB and instead use a CH340G. These chips, while fine when connecting to a PC running Windows 7, have great difficulties with the drivers on OS X, and end up just not being recognised. It is possible to find a driver for the CH340G, but when I installed it, it immediately crashed the MacBook, upon plugging in the cloned UNO..!

This advice also proved to be invaluable, from Post #47 – Arduino in OS X 10.9 Mavericks – Serial Port Issues

For any others who haven’t been able to solve this one yet: if, like me, you decided to go with the cheaper chinese kick off arduino clone boards and had problems similar to this one, please check the following forum post, as it solved the problem for me:

http://forum.arduino.cc/index.php?topic=289518.0

And another blog site that explains the whole process really simply for noobs like me:

http://kiguino.moos.io/2014/12/31/how-to-use-arduino-nano-mini-pro-with-CH340G-on-mac-osx-yosemite.html

Actually the dude has even mirrored the relevant driver that solves the problem without having to find it on an all chinese or all russian website!


Finally, I have just had a problem with an Arduino Nano and my Mac (running Mountain Lion). Using this link, Connect Arduino Nano with Mac OSX:

  1. Download the driver from url: link
  2. Extract and install file CH34x_Install.pkg
  3. Run the command: sudo nvram boot-args="kext-dev-mode=1"
  4. Restart the Mac.
  5. Replace the text -P{serial.port} to "-P{serial.port}" in 2 files:/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/platform.txt(1 instance)/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/programmers.txt (4 instances)

However, this did not work for me, but I am running OS X 10.8.5 and the driver is meant for 10.9 (according to the ReadMe.pdf). My /System/Library/Extensions/usb.kext file remained unchanged (i.e. the date did not change), so maybe the installer will not work for 10.8.5.

I tried the second of 0scar’s suggestions, but this didn’t work for me either (on Mountain Lion):adrianmihalko/CH340G CH34G CH34X Mac OS X driver – The usb.kext file was never installed in /System/Library/Extensions/ by either the 1.3 or 1.4 versions.

The first of 0scar’s links, Signed Mac OS Driver for Winchiphead CH340 serial bridge, interestingly pointed out that, after installation (and the associated reboot), one may have to copy the usbserial.ktext file manaually to /System/Library/Extensions/`. So after locating the installed file I did the following:

sudo mv /Library/Extensions/usbserial.kext /System/Library/Extensions/usb.kext

and then rebooted once again.

Note the change of the filename – this may or may not be necessary. Either way, when I used both usbserial.kext and usb.kext, yet again, this did not help me on Mountain Lion. However, the documents do state that this particular driver is for 10.9 (Mavericks) through to 10.13 (High Sierra).

The answer to this question, Uploading to a CH340 “Nano” board using a Mac with Osx High Sierra, may help you on OSX High Sierra.

It might be worth trawling through this list of questions on the Arduino.SE site: osx nano, such as this one Rename device name (ch340 usb to serial) Mac OS.


Additional note

Another pitfall is that some drivers may be named CH341xx.xxx, but they may work for both the CH340 and the CH340… then again, they may not. The docs don’t always say whether they will or not work for both ICs.


Footnotes

1 I think it might be this Re: Arduino in OS X 10.9 Mavericks – Serial Port Issues:

Yes, I have been struggling for a month or so, and finally realised (after readinghttp://forum.arduino.cc/index.php?topic=198539.15#msg1720630) that other chips were being used, in lieu of the FTDI chip, for example the Prolific 2305. After inspecting the board with a magnifying glass, I saw that I did not have an FTDI chip in my Chinese clones of an Uno and a Mega, but a CH340G instead.

Once I realised that I found the http://wch.cn/product/CH340.html site, but the Mac driver doesn’t appear to be there. After a bit more googling I found the kiguino site. I downloaded the mirrored driver, rebooted the mac, and when I connected the Uno, my MacBook died and restarted with the grey serious error screen and refused to boot. After disconnecting the Uno, the Mac rebooted as normal, so no lasting damage done, but I am a bit wary of trying to plug the clone in again.

Anyway, note that the chip says CH340 on it, but the drivers are CH341. I assume that they are compatible.


Other possible links/drivers to try are mentioned in OSX – Nodemcu v1.0 not showing on Arduino IDE port menu:

 

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 )

Google photo

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

Twitter picture

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

Facebook photo

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

Connecting to %s