Device not found error (-3) (Windows 10)

Issue #26 new
ash87
created an issue

Hi, I've installed libftdi and other necessary files in Windows 10. This is working: from pylibftdi import Driver, Device Get list of all FTDI devices

dev_list = Driver().list_devices() Print all devices

for device_ in dev_list: print device_

-- I am able to see the device listed ('XYZ', 'USB Adapter', 'ABC12345')

But the moment i try to open the device, it throws out an error dev = Device(device_id='ABC12345', mode='b', interface_select=2)

" pylibftdi._base.FtdiError : device not found (-3) "

My basic intention is to use the FT2232 to talk to an I2C sensor. I am trying to use pylibftdi to control the FTDI.

I noticed a lot of threads where the VCOM driver does not allow libftdi to get hold of the usb. can this be alleviated?

I am new to this, so please bear my ignorance.

Thanks

Comments (2)

  1. JP Norair

    I'm having the same issue on Mac. I've done a lot of troubleshooting, but to no avail. I'm wondering if libftdi and perhaps pylibftdi is primarily a linux tool.

    Update for posterity: I spent a few hours going through FTDI documentation, and ad-libbing as necessary. Mac users can install the D2XXHelper, which will block the Apple FTDI driver from too aggressively mounting FTDI parts as ttys. But it DOESN'T block the FTDI homegrown driver from doing the same thing. So you need to unload the FTDI driver.

    You can run kextstat to see what driver is loaded

    $ kextstat | grep FTDI

    Then you can unload it. Use the bundle ID that kextstat reports. The below example assumes that the FTDI homegrown driver is loaded.

    $ sudo kextunload -bundle-id com.FTDI.driver.FTDIUSBSerialDriver

    Presumably, the problem on Windows is the same. Try referring to FTDI documentation to see what they say about unloading drivers.

  2. Ben Bass repo owner

    I certainly test least on Windows, but @JP Norair is right that this is most likely related to existing drivers being installed.

    There are actually helper scripts included for macOS (ftdi_osx_driver_unload/ftdi_osx_driver_reload) which should handle the unloading / reloading of appropriate OS X drivers (which does the kextunload work as appropriate), but there's nothing equivalent for Windows at this point.

    On Linux it generally takes over from the kernel driver automatically, and (on recent versions of libftdi & pylibftdi) automatically reattaches the kernel drivers (e.g. usbserial) when finished.

    If you have VCOM / D2XX drivers installed as well as libftdi, that could be an issue, but I'm not sure if there's a good alternative on Windows to uninstalling them all...

  3. Log in to comment