Conor, I think if you use the latest April installer from FTDI, it does all of those steps. A kext I think needs to be unloaded before it can be removed or replaced. For example I think their installer also removes or disables the Apple FTDI driver before installing the one from FTDI. As we know the Apple driver is awful, no changes allowed to settings.
The kext-dev-mode nvram patch must be done, then a reboot is needed for that to take effect. That nvram change I think will also be removed by any OS X updates / upgrades you do, so you may have to redo it later if your OpenBCI stops working. Upgrades may also try to reinstall the Apple version of FTDI. Sigh.
Hmmm. I don't fully understand. Just gave it another shot start to finish. No luck.
Is this ( $ sudo nvram boot-args="kext-dev-mode=1") all that's needed to do the kext-dev-mode nvram patch? And if so, when is the ideal time to do that? Immediately after removing and reinstalling the FTDI drivers?
Conor, hi. Since you have Yosemite you should only install 2.3, not 2.2.18. If you've installed 2.2.18 previously, I'm not sure what to say in terms of backing that out. One would expect that the FTDI 2.3 driver would uninstall previous versions of itself. Hopefully. Marion's instruction page suggests removing the old kext by hand before installing the new.
Yes, that sudo line you show could be done before or after the 2.3 installer is run. Then you have to reboot to have the kernel pick up the new nvram setting. At that point the FTDI driver should be loaded and ready to go.
So it sounds like you've done all this and it's still not working? Dang.
According to some users, the quotes can mess up the nvram command, see this previous post. Do an "nvram -p" to verify your change got in. What screws up the quotes is if you do a cut / paste operation from some instruction sheet. The quotes get escaped somehow when pasted into Terminal.
You can also boot with the Command-V held down (until text starts showing). This will display all your kernel startup messages.
Is the FTDI driver showing up after booting with the "kextstat | grep FTDI" ? If not look for error messages on the Console app log viewer.
Hey guys I've updated my blog post with the instructions (including the dev mode + right ftdi driver version) Conor has tried it today and it works for him. @Rceballo98 is right to say that you should remove all FTDI drivers before proceeding. Good luck!
It's official, the fix now works and has been verified for versions MAC OS X 10.9 (Mavericks) and MAC OS X 10.10 (Yosemite). Joel and I have now verified on 3 different machines, in addition to Marion's comp.
I took Marion's really great tutorial and added some verbosity/images to it for additional clarification, then turned it into an official OpenBCI Doc. You can check it out here:
Please let me know if you run into any trouble undergoing the kernal extension surgery. It's definitely a bit of a process, but the latency is significantly better after making the fix!
Since i have osx 10.10.5 i had to use the FTDI 2.3 driver, I am following all the steps that you've posted,
but when i try to load (with 'kextload') the driver, after i've been altering the Info.plist file, all i get is an error message like this:
"*/FTDIUSBSerialDriver.kext failed to load - (libkern/kext) validation failure (plist/executable); check the system/kernel logs for errors or try kextutil(8)."
But if i remove the added lines in the Info.plist file the kextload command works fine.
Now i have the fix working on my computer, but as soon as i try to get the python code to work
all i get is these error messages:
-------------BEGIN---------------
setting up starting N=256 M=8 Warning: Skipped 422 bytes before start found Warning: Warning: Unexpected END_BYTE found <167> instead of <192>, discarted packet with id <8> Warning: Warning: Unexpected END_BYTE found <174> instead of <192>, discarted packet with id <8
And I also get random data displayed as a graph, as soon as I try to abort the program, my laptop freezes and I have to restart.Is there any good fixes for this? Or did the fix in the Info.plist not work for me?
Does the Python code work ok for you on Windows or Linux or another laptop? It sounds like you might have issues with your FTDI drivers. Is OpenBCI_GUI now running ok for you on the Mac?
I just tried the guide with 2.2.18 on OS X 10.11.1 and unfortunately it's refusing to work with the plist modifications. Checking Console reveals "Untrusted kexts are not allowed invalid signature for com.FTDI.driver.FTDIUSBSerialDriver". Modifying the Info.plist file with just <key>InBufferSize</key><integer>64</integer> causes the error as well.
Hopefully the 2.3 release will get a bump to help resolve latency issues since that release seems to work okay on 10.11.
@coreygo are you saying that the nvram command to turn off signature checking -- no longer works? I'm still on Yosemite here, 10.10.5. In this area of FTDI driver compatibility and patching, it's usually not a good idea to be an early adopter. Particularly as FTDI support is lagging.
Yep, I believe so. I definitely ran sudo nvram boot-args="kext-dev-mode=1" and rebooted before proceeding. Also checked my settings to allow apps from anywhere.
I've noticed the same regarding jumping to the latest and greatest. I guess I'm somewhat used to things being in constant beta mode
From that document: "Kernel extensions (kexts) that modify the core of OS X—the part that handles input and output and launching background software and the like—will still be allowed. But they will have to be cryptographically signed by a developer with a valid certificate from Apple."
Looks like the whole idea of FTDI providing Info.plist editing capability, just got nuked. They could get around this by checking for an override Info.plist OUTSIDE of the driver itself. For example in a public directory such as /usr/local.
I'll look through my old emails for an FTDI contact person I talked with before, try to get their take.
Okay, just confirmed that on 10.11.1 if you're going to use FTDI driver v2.2.18 you'll have to boot to Recovery OS (CMD+R) bring up Terminal and run csrutil enable --without kext after rebooting installation and modification of the plist file will work.
That being said I honestly saw a questionable improvement in latency between 2.2.18 and 2.3. I was getting 15fps (50000bps average [30-70Kbps]) from the OpenBCI GUI in Processing 2 and with NeuromoreStudio I actually saw worse performance. It would hang and delay then display after a second or two. My system is a Late 2013 MBP with the 2.4Ghz Intel i5 and 8GB RAM.
So for those reasons I went back to 2.3. I'm not sure what others are seeing when it comes to data rate and frame rate goes with the OpenBCI GUI as well as Neuromore. -Corey
Comments
The kext-dev-mode nvram patch must be done, then a reboot is needed for that to take effect. That nvram change I think will also be removed by any OS X updates / upgrades you do, so you may have to redo it later if your OpenBCI stops working. Upgrades may also try to reinstall the Apple version of FTDI. Sigh.
Yes, that sudo line you show could be done before or after the 2.3 installer is run. Then you have to reboot to have the kernel pick up the new nvram setting. At that point the FTDI driver should be loaded and ready to go.
So it sounds like you've done all this and it's still not working? Dang.
According to some users, the quotes can mess up the nvram command, see this previous post. Do an "nvram -p" to verify your change got in. What screws up the quotes is if you do a cut / paste operation from some instruction sheet. The quotes get escaped somehow when pasted into Terminal.
You can also boot with the Command-V held down (until text starts showing). This will display all your kernel startup messages.
Is the FTDI driver showing up after booting with the "kextstat | grep FTDI" ? If not look for error messages on the Console app log viewer.
http://www.ftdichip.com/Support/Documents/AppNotes/AN_134_FTDI_Drivers_Installation_Guide_for_MAC_OSX.pdf
If you have previous FTDI drivers installed, I'd suggest following all the steps there. Before installing 2.3.
Marion, do you reboot your mac at any point during this process?
I took Marion's really great tutorial and added some verbosity/images to it for additional clarification, then turned it into an official OpenBCI Doc. You can check it out here:
setting up
starting
N=256 M=8
Warning: Skipped 422 bytes before start found
Warning: Warning: Unexpected END_BYTE found <167> instead of <192>, discarted packet with id <8>
Warning: Warning: Unexpected END_BYTE found <174> instead of <192>, discarted packet with id <8
And I also get random data displayed as a graph, as soon as I try to abort the program, my laptop freezes and I have to restart.Is there any good fixes for this? Or did the fix in the Info.plist not work for me?
I just tried the guide with 2.2.18 on OS X 10.11.1 and unfortunately it's refusing to work with the plist modifications. Checking Console reveals "Untrusted kexts are not allowed invalid signature for com.FTDI.driver.FTDIUSBSerialDriver". Modifying the Info.plist file with just <key>InBufferSize</key><integer>64</integer> causes the error as well.
Hopefully the 2.3 release will get a bump to help resolve latency issues since that release seems to work okay on 10.11.
I've noticed the same regarding jumping to the latest and greatest. I guess I'm somewhat used to things being in constant beta mode
the core of OS X—the part that handles input and output and launching
background software and the like—will still be allowed. But they will
have to be cryptographically signed by a developer with a valid
certificate from Apple."
Looks like the whole idea of FTDI providing Info.plist editing capability, just got nuked. They could get around this by checking for an override Info.plist OUTSIDE of the driver itself. For example in a public directory such as /usr/local.
I'll look through my old emails for an FTDI contact person I talked with before, try to get their take.
@marion I think you're onto something. Found these two resources:
http://osxdaily.com/2015/10/05/disable-rootless-system-integrity-protection-mac-os-x/
and this http://apple.stackexchange.com/a/209530 thread mentions csrutil enable --without kext
-Corey
That being said I honestly saw a questionable improvement in latency between 2.2.18 and 2.3. I was getting 15fps (50000bps average [30-70Kbps]) from the OpenBCI GUI in Processing 2 and with NeuromoreStudio I actually saw worse performance. It would hang and delay then display after a second or two. My system is a Late 2013 MBP with the 2.4Ghz Intel i5 and 8GB RAM.
So for those reasons I went back to 2.3. I'm not sure what others are seeing when it comes to data rate and frame rate goes with the OpenBCI GUI as well as Neuromore.
-Corey