How to release/reset serial port FTDI devices - Mac OSX
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.
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
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.
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
**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.
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!