FTDI Community

Please login or register.

Login with username, password and session length.
Advanced Search  

News:

Welcome to the FTDI Community!

Please read our Welcome Note

Technical Support enquires
please contact the team
@ FTDI Support


New Bridgetek Community is now open

Please note that we have created the Bridgetek Community to discuss all Bridgetek products e.g. EVE, MCU.

Please follow this link and create a new user account to get started.

Bridgetek Community

Author Topic: D3XX: FT_Create() fails with FT_DEVICE_NOT_FOUND in Debian Buster but not Ubuntu  (Read 116 times)

tba109

  • Newbie
  • *
  • Posts: 1
    • View Profile

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);
  if(!FT_FAILED(ftStatus))
    {
      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);
      if(!ftStatus)
printf("FT_Create Success!\n");
      else
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!

Device[0]
Flags: 0x4 [USB 3]| Type: 600 | ID: 0x0403601E | ftHandle=0x0
SerialNumber=
Description=
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?

Thanks,

Tyler
« Last Edit: October 06, 2020, 05:46:41 PM by tba109 »
Logged

FTDI Community

  • Administrator
  • Sr. Member
  • *****
  • Posts: 484
    • View Profile

Hello,

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
Logged