Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trouble using nrfProg with BusBlaster on OS X #18

Open
natevw opened this issue May 28, 2015 · 2 comments
Open

Trouble using nrfProg with BusBlaster on OS X #18

natevw opened this issue May 28, 2015 · 2 comments
Labels

Comments

@natevw
Copy link

natevw commented May 28, 2015

When trying to use the BusBlaster to flash an nRF module, I would get this error:

unable to open ftdi device: -3 (device not found)

…because the product ID is different than the script expects. This was resolved via:

diff --git a/nrfProg/nrfSpi.c b/nrfProg/nrfSpi.c
index 686219d..e284553 100644
--- a/nrfProg/nrfSpi.c
+++ b/nrfProg/nrfSpi.c
@@ -85,7 +85,8 @@ int spiInit()

   ftdi_init(&ftdic);

-  if((ret = ftdi_usb_open(&ftdic, 0x0403, 0xcff8)) < 0)
+  //if((ret = ftdi_usb_open(&ftdic, 0x0403, 0xcff8)) < 0)
+  if((ret = ftdi_usb_open(&ftdic, 0x0403, 0x6010)) < 0)  // BusBlaster v4 enumeration
   {
     fprintf(stderr, "unable to open ftdi device: %d (%s)\n", ret, 
             ftdi_get_error_string(&ftdic));

Fixing that leads to this error:

unable to open ftdi device: -5 (unable to claim usb device. Make sure the default FTDI driver is not in use)

This can be resolved by running sudo kextunload -bundle com.apple.driver.AppleUSBFTDI before using nrfProg. See https://alvarop.com/2014/01/using-busblaster-openocd-on-osx-mavericks for more details on that.

@knmcguire
Copy link
Member

Hi! Sorry for the extremely late reply! And thanks for mentioning this issue. Since this repo is stil being used, I'll keep this issue open for anybody that uses the bus blaster

@knmcguire knmcguire added the bug label Mar 9, 2022
@natevw
Copy link
Author

natevw commented Mar 15, 2022

Thanks! I haven't retested on any newer macOS so while the PID tip may still be helpful (and something you might update the code for?), anyone hitting this should note that the AppleUSBFTDI workaround doesn't apply. At least Apple has renamed that extension, and I found at e.g. https://github.com/eblot/pyftdi/blob/master/pyftdi/doc/troubleshooting.rst#error-access-denied-insufficient-permissions a note:

From macOS 10.14 "Mojave", the Apple kernel extension peacefully co-exists with libusb and PyFtdi, so you no longer need - and should not attempt - to unload the kernel extension. If you still experience this error, please verify you have not installed another driver from FTDI, such as FTDI's D2XX.

(That's from an unrelated Python project but I'm assuming would also apply to the C libftdi usage in this project.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants