How to release/reset serial port FTDI devices - Mac OSX

38,600

Solution 1

I had the same issue, albeit on Sierra, talking to an Arduino Nano clone (which also uses a FTDI FT232RL bridge).

What seems to have worked for me is actually removing the FTDI driver (/Library/Extensions/FTDIUSBSerialDriver.kext), after finding that Apple ships an FTDI driver with the OS itself (/System/Library/Extensions/AppleUSBFTDI.kext).

I think having both drivers active at the same time causes a conflict, which ties up the USB port.

Solution 2

MacOS High Sierra 10.13.3 FTDI Driver Fix - January 31, 2018

By: Garrett Johnson Tired of your dev. boards not being recognized on your shiny new macbook? Are you blaming those damn C-ports?

PROBLEM: FTDI devices not usable in MacOS High Sierra. In my own case, I was having trouble connecting FT232R chip devices to my 2016 Macbook Pro with C-Ports. The devices appeared in my USB device tree (System Information -> Hardware -> USB), but did not show up as a serial device using Arduino, or Coolterm. - NOTE: they did not appear either when in Terminal with the command (ls /dev/cu*) or (ls /dev/tty*)

SOLUTION:

3) Download the 2.4.2 drivers from FTDI's website http://www.ftdichip.com/Drivers/VCP.htm and install. The install will succeed, BUT due to Apples built-in FTDI drivers they will not work.

2) Reboot computer and enter recovery mode Via powering down and holding down CMD + R on reboot.

3) In recovery mode open terminal from utilities at the top of the screen and type the following to tempraily disable System Integrity Protection:

csrutil disable

The computer will prompt you to reboot to make changes take effect.

4) On reboot we now need to disable the Apple FTDI drivers (NOTE: this can be reversed at any time so do not worry). - open Terminal and type the following.

cd /system/library/extensions

sudo mv AppleUSBFTDI.kext AppleUSBFTDI.disabled

sudo touch /System/Library/Extensions

chgrp -R wheel FTDIUSBSerialDriver.kext

sudo mv D2zzHelper.kext D2xxHelper.disabled

Now you will have successfuly have disabled Apple's built-in FTDI drivers and replaced them with FTDI v2.4.

5) Restart your computer in recovery mode. Shutdown, hold Command + R and open terminal in the Utilities tab. Enter the following to reenable Apple's System Integrity Protection

csrutil enable

AT LAST! One final restart and then your USB serial devices should all be loading properly!

**NOTE: I have tested this on a 2016 Macbook Pro with MacOS 10.13.3 on the following devices/apps: 1) Screen from within terminal, CoolTerm, Bus Pirate V3.6, JTAGulator, Arduino Uno, Adafruit Mega AT, Arduino Mega clone.

Solution 3

I'd like to provide an additional answer that solves one more piece of the puzzle that I had. Even following Garrett Johnson's excellent answer above, my FTDI driver was still not working. It turned out that - and I know this sounds insane - that my System Preferences "Security & Privacy" tab was not accepting my trackpad's click on the "Allow" button that would allow the driver to load. I got down this path after seeing this message in install log:

2018-09-15 16:21:04-04 host installd[1160]: kextcache: Kext rejected due to system policy: <OSKext 0x7f869ab80530 [0x7fff87e7aaf0]> { URL = "file:///Library/StagedExtensions/Library/Extensions/FTDIUSBSerialDriver.kext/", ID = "com.FTDI.driver.FTDIUSBSerialDriver" }

Of course, I clicked "Allow" in there, but nothing seemed to happen. The button registered the click, but I didn't have any window pop up or anything else for some form of confirmation. Searching around the Internets, I discovered this lengthy thread on Karabiner's github page discussing several solutions for forcing System Preferences to permit the mouse click:

https://github.com/tekezo/Karabiner-Elements/issues/1017

Apparently I had some software running that was intercepting the trackpad activity. It wasn't chrome in my case, unlike several people on that list. I have no clue what it was, which is a little concerning. The solution that worked for me was to enable Mouse Keys, then push "I" to click the mouse over the "Allow" button. At that point, a window popped up, and I was able to permit the FTDI driver to load.

I'm still shaking my head!

Share:
38,600

Related videos on Youtube

thkemp
Author by

thkemp

Updated on September 18, 2022

Comments

  • thkemp
    thkemp over 1 year

    I am trying to work with a custom PCB that uses an FTDI FT232RL to talk to my computer (MacBookPro running OSX 10.11 El Capitan) for a hardware project. I am using Matlab to send serial commands, running into some problems there with ClearToSend (CTS) pin apparently 'high' (off), but that's another story.

    However my problem right now is that my Mac won't "release" (not sure what else to call this) the device after I unplug it. I can unplug the device and put it on another USB bus, but I can really only do this once, because the same thing happens again if I unplug -- this makes my development difficult, because the only way I've found to fix this is to restart the whole computer. How can I release/reset/clear these devices?

    If I open System Information>Hardware>USB, I can essentially see the same device listed twice on the device tree.

    enter image description here

    This makes it so that when I try ls /dev/tty.* (in either Matlab or Terminal) the device is not listed, it's essentially blocked, even though it's plugged in and shows up twice on the device tree. What should I do?

    I have installed the version 2.3 FTDI driver, and it seems to work otherwise. Please let me know what other information I can provide to get to the bottom of this. Thanks

  • thkemp
    thkemp over 7 years
    Thanks @robertklep, that worked for me! I guess it was just a conflict between those two drivers. Although interesting that renaming the file (e.g. FTDIUSBSerialDriver.kext.bak or ~FTDIUSBSerialDriver.kext) didn't work, I had to actually remove the file from the /Library/Extensions/ directory.
  • Pwdr
    Pwdr over 7 years
    Same problem for me, but I don’t have FTDIUSBSerialDriver installed, so this did not fix it…
  • robertklep
    robertklep over 7 years
    @Pwdr try this from Terminal: kextstat | grep -v apple. That should return any non-Apple kernel extensions that are active. Perhaps there's another one causing issues.
  • lukecyca
    lukecyca over 7 years
    I found it in /System/Library/Extensions/FTDIUSBSerialDriver.kext
  • Max Abrahamsson
    Max Abrahamsson almost 7 years
    After making suggested change, driver did not work anymore. I had to install it again.
  • qxotk
    qxotk over 6 years
    This solution worked very well for me, and I used it in combination with a macos version of coolterm - which gives nice UI for configuring communication with USB serial. Overall though, the apple driver seems to not kill the /dev/c* bits every time I unplug a USB cable (requiring me to reboot the machine - either due to my lack of skills or due to that is the only way to get them back).
  • Alain O'Dea
    Alain O'Dea over 6 years
    Cool fix. It works on an iMac for Jewelbots as well. Minor issues: 1. Apple's KEXTs are in /System/Library/Extensions/ (HFS+ and APFS are case-preserving and Terminal is picky). 2. chgrp isn't needed. Group is already wheel after install. 3. FTDIUSBSerialDriver.kext is in /Libray/Extensions/ and /Library/StagedExtensions/Library/Extensions/ not in /System/Library/Extensions/. 4. D2zzHelper.kext doesn't exist
  • Supernovah
    Supernovah about 5 years
    I am running MagicPrefs and the Wacom Intuos driver and I decided to check out if clicking allow was supposed to do something after reading this post. It turns out after you press allow (and it actually propagates) - the system prompts with a new window with a list of the concerning drivers/libraries it had clocked previously!