FTDI Community

General Category => Discussion - Drivers => Topic started by: tba109 on October 06, 2020, 05:27:50 PM

Title: D3XX: FT_Create() fails with FT_DEVICE_NOT_FOUND in Debian Buster but not Ubuntu
Post by: tba109 on October 06, 2020, 05:27:50 PM
I am developing software for a custom PCB with an FT600, with software development happening on a desktop with Debian GNU/Linux 10 (buster). I'm having some trouble, so here are the steps I've gone through:

1.) I installed the D3XX linux x64 drivers per the instructions in the README.pdf and compiled the example code.

2.) I connect the USB device and use lsusb to verify that the device appears in the list (VID=0403, PID=601e).

3.) I added a udev rule to allow the dialout group permission to use the FT600 device and added my user to the group.

4.) I reload the udev rules. (I've also re-booted at various times, so the new rules should be in effect.) 

5.) I wrote the simple code below to

Code: [Select]
#include <stdio.h>
#include "ftd3xx.h"

int main(int argc, char *argv[])
  FT_HANDLE ftHandle = NULL;
  FT_STATUS ftStatus;
  DWORD numDevs = 0;
  ftStatus = FT_CreateDeviceInfoList(&numDevs);
  if(!FT_FAILED(ftStatus) && numDevs > 0)
      FT_HANDLE ftHandle = NULL;
      DWORD Flags = 0;
      DWORD Type = 0;
      DWORD ID = 0;
      char SerialNumber[16] = { 0 };
      char Description[32] = { 0 };
      printf("List of Connected Devices!\n\n");
      for(DWORD i = 0; i <numDevs; i++)
  ftStatus = FT_GetDeviceInfoDetail(i, &Flags, &Type, &ID, NULL, SerialNumber, Description, &ftHandle);
      printf("Device[%d]\n", i);
      printf("\tFlags: 0x%x %s| Type: %d | ID: 0x%08X | ftHandle=0x%x\n",Flags,Flags & FT_FLAGS_SUPERSPEED? "[USB 3]":Flags & FT_FLAGS_HISPEED? "[USB 2]":Flags & FT_FLAGS_OPENED? "[OPENED]": "",Type,ID,ftHandle);
      printf("\tSerialNumber=%s\n", SerialNumber);printf("\tDescription=%s\n", Description);
      ftStatus = FT_Create(0,FT_OPEN_BY_INDEX,&ftHandle);
printf("FT_Create Success!\n");
printf("FT_Create: %d, Failed\n",ftStatus);

  return 0;

The output of this code is below, and shows that FT_Create fails with code FT_DEVICE_NOT_FOUND.
Code: [Select]
List of Connected Devices!

Flags: 0x4 [USB 3]| Type: 600 | ID: 0x0403601E | ftHandle=0x0
FT_Create: 2, Failed

I tried this again on a different machine which is running Ubuntu 18.04, and instead, the FT_Create succeeds.

Could you please provide some guidance as to how to diagnose and solve the failure of FT_Create?


Title: Re: D3XX: FT_Create() fails with FT_DEVICE_NOT_FOUND in Debian Buster but not Ubuntu
Post by: FTDI Community on October 09, 2020, 04:35:25 PM

This is strange that the serial number and description is not visible from the FT_GetDeviceInfoDetail.

Are the serial number and description visible on the Ubuntu PC?

If so it could suggest that the USB Port is already open by other software.

Note that sudo (or running as root) is required to get full access to USB.

Best Regards,
FTDI Community