Getting generic Arduino boards with CH340G chips to work with OS X 10.11 El Capitan - Thomas Bibby

This evening my project was to get a generic Arduino Mega board that Baz ordered from China working with my MacBook Air running El Capitan. Plugging the board in and launching the Arduino IDE yielded nothing in Tools -> Port.

After a lot of searching, it seems like the problem is the USB to serial chip used on this Arduino clone is a CH340G chip, not the usual FTDI chip that ships with official Arduino boards.  This chip handles the communication between the USB connection and the serial interface to the Arduino board. Unfortunately it is not recognised by OSX.

ch340g-arduino
Note the CH340G chip on the top left

There is a driver online, provided by a Chinese manufacturer, which provides a kernel extension (ktext) to recognise the chip. Unfortunately the ktext is not signed.  Previous versions of OS X would let you disable the requirement for ktext signing by typing a sudo command in Terminal, but with El Capitan you have to boot to the recovery partition to disable the System Integrity Protection (SIP) which prevents unsigned ktexts from running.

Disabling SIP is a really bad idea! Fortunately there is a company called CodeBender which produces a plugin for Firefox and Chrome that gives you an in-browser Arduino IDE. They have released a signed ktext for the CH340G chips so you don’t have to mess around with the security settings on your Mac. It’s not possible to download the drivers directly, but if you install their add-on in Firefox or Chrome (doesn’t work in Safari), you’ll get a link to install the drivers. When you next launch the Arduino IDE, you’ll see your generic Arduino listed in the Tools > Port menu.

Here’s the link to install the add-on.