Using FTDI D2XX drivers with Python from Raspberry Pi on raspbian soft-float
I wasn't sure where the problem lay: Was it PyUSB, an issue with FTDI's libftd2xx.so or some issue with the Debian distribution?
With the FTDI package there's a test, under release/examples/EEPROM/read
. You must build it, but that's simply a matter of typing make. Running it (via sudo), it failed to open the USB device, so clearly it wasn't PyUSB. After poking around, I found a reference to a driver, ftdi_sio, and that it could conflict with other D2XX drivers. So, using lsmod, I saw ftdi_sio was already installed by default, so I ran rmmod ftdi_sio
. After that, everything worked. The read command should show something like this:
Library version = 0x10112
Opening port 0
FT_Open succeeded. Handle is 0xf7d240
FT_GetDeviceInfo succeeded. Device is type 4.
FT_EE_Read succeeded.
Signature1 = 0
Signature2 = -1
Version = 1
VendorId = 0x0407
ProductId = 0x6009
Manufacturer = MagicIncorporated
ManufacturerId = wo
Description = MyCompany Test Board
SerialNumber = testit_028
MaxPower = 44
PnP = 1
SelfPowered = 0
RemoteWakeup = 1
2232RC:
-------
Rev5 = 0x1
IsoInA = 0x0
IsoInB = 0x0
IsoOutA = 0x0
IsoOutB = 0x0
PullDownEnable5 = 0x0
SerNumEnable5 = 0x0
USBVersionEnable5 = 0x0
USBVersion5 = 0x110
AIsHighCurrent = 0x0
BIsHighCurrent = 0x0
IFAIsFifo = 0x0
IFAIsFifoTar = 0x0
IFAIsFastSer = 0x0
AIsVCP = 0x0
IFBIsFifo = 0x0
IFBIsFifoTar = 0x0
IFBIsFastSer = 0x0
BIsVCP = 0x0
Returning 0
I also switched from PyUSB to ftd2xx, because it's pure python, but it wasn't strictly necessary.