EmbeddedRelated.com
Forums

two ft245am

Started by lucky October 16, 2004
Buongiorno, 

I am working with _TWO_ devices FT245AM based, EEProm, FTD2XX.DLL
V.1.06.06, WinMe or WinXP.
SerialNumber is made different for the two devices. 
One device at time works fine, and is correctly listed with function
FT_ListDevices().
Two devices together do not work. FT_ListDevices() count two devices,
correctly list one of them, and return FT_INVALID_HANDLE for the other
one.

The problem is only with FT245AM, with FT245BM the _TWO_ devices seem
to work together fine.

Is that a known behavior? 
What my be wrong? 
What can I do? 

Thanks. 

lucky
"lucky" <lucky.lu@jumpy.it> wrote in message
news:dcbafabf.0410160831.1894b8cc@posting.google.com...
> Buongiorno, > > I am working with _TWO_ devices FT245AM based, EEProm, FTD2XX.DLL > V.1.06.06, WinMe or WinXP. > SerialNumber is made different for the two devices. > One device at time works fine, and is correctly listed with function > FT_ListDevices(). > Two devices together do not work. FT_ListDevices() count two devices, > correctly list one of them, and return FT_INVALID_HANDLE for the other > one. > > The problem is only with FT245AM, with FT245BM the _TWO_ devices seem > to work together fine.
Why don't you ask this to the support engineer(s) at FTDI? They are always very helpful. Meindert
"lucky" <lucky.lu@jumpy.it> wrote in message
news:dcbafabf.0410160831.1894b8cc@posting.google.com

> Two devices together do not work. FT_ListDevices() count two devices, > correctly list one of them, and return FT_INVALID_HANDLE for the other > one.
Are you sure that the error is FT_INVALID_HANDLE? pinco_pallo -- Posted via Mailgate.ORG Server - http://www.Mailgate.ORG
"Meindert Sprang" <mhsprang@NOcustomSPAMware.nl> wrote in message news:<10n2uo6r82ec548@corp.supernews.com>...

> Why don't you ask this to the support engineer(s) at FTDI? They are always > very helpful.
I have posted the question to the FTDI support. But my previous experience is of no answer from the FTDI support. Thanks. lucky
lucky.lu@jumpy.it (lucky) wrote in message news:<dcbafabf.0410160831.1894b8cc@posting.google.com>...

> Two devices together do not work. FT_ListDevices() count two devices, > correctly list one of them, and return FT_INVALID_HANDLE for the other > one.
Buongiorno. Or in other way, does anybody have used _TWO_ devices FT245AM based, EEProm, FTD2XX.DLL, with success? Please a little of details. Thanks. lucky
"Pinco Pallo" <pinco_pallo@jumpy.it> wrote in message news:<7395bd8032ea8fe116366669e5462d55.38873@mygate.mailgate.org>...

> Are you sure that the error is FT_INVALID_HANDLE?
Yes. FT_ListDevices returns FT_INVALID_HANDLE for DevId=0, FT_OK for DevId=1, FT_DEVICE_NOT_FOUND for others DevId. Note that is the first device that become wrong connecting the second one. Before the connection of second device, the first one was OK. lucky
In article <dcbafabf.0410180555.6592a6af@posting.google.com>, 
lucky.lu@jumpy.it says...
> "Pinco Pallo" <pinco_pallo@jumpy.it> wrote in message news:<7395bd8032ea8fe116366669e5462d55.38873@mygate.mailgate.org>... > > > Are you sure that the error is FT_INVALID_HANDLE? > > Yes. > FT_ListDevices returns FT_INVALID_HANDLE for DevId=0, FT_OK for > DevId=1, FT_DEVICE_NOT_FOUND for others DevId. Note that is the first > device that become wrong connecting the second one. Before the > connection of second device, the first one was OK. > > lucky >
Have you programmed the EEPROMs so that the two devices have different serial numbers? I have used several FT245AMs with a hub without problems after they have been individually programmed with different serial numbers so that the hub and host can distinguish between the two. I also programmed the devices with different product IDs---but retained the FTDI manufacturer ID. (You can contact FTDI and they will issue you a range of Product IDs that you can use with your own products.) Mark Borgerson
"Mark Borgerson" <m-a-r-k@oes.to> wrote in message
news:MPG.1bdd752e3703c85f989ed1@Netnews.Comcast.net

> Have you programmed the EEPROMs so that the two devices have > different serial numbers?
Yes. And I can see the different device SerialNumber, with FT_ListDevices(), when I connect one device at time.
> I have used several FT245AMs > with a hub without problems after they have been individually > programmed with different serial numbers so that the > hub and host can distinguish between the two.
With FTD2XX.dll or as VirtualCom? I am using FTD2XX.dll.
> I also programmed the devices with different product IDs---but > retained the FTDI manufacturer ID.
PID=0403h, VID=6001h for both devices. Or you are saying that VID _MUST_ be different? Thanks. lucky -- Posted via Mailgate.ORG Server - http://www.Mailgate.ORG
In article <8fb54fe4e48c28c56c73021e2867ea87.102365
@mygate.mailgate.org>, lucky.lu@jumpy.it says...
> "Mark Borgerson" <m-a-r-k@oes.to> wrote in message > news:MPG.1bdd752e3703c85f989ed1@Netnews.Comcast.net > > > Have you programmed the EEPROMs so that the two devices have > > different serial numbers? > > Yes. And I can see the different device SerialNumber, with > FT_ListDevices(), when I connect one device at time. > > > I have used several FT245AMs > > with a hub without problems after they have been individually > > programmed with different serial numbers so that the > > hub and host can distinguish between the two. > > With FTD2XX.dll or as VirtualCom? > I am using FTD2XX.dll.
I am using the direct FTD2XXX.dll drivers.
> > > I also programmed the devices with different product IDs---but > > retained the FTDI manufacturer ID. > > PID=0403h, VID=6001h for both devices. > Or you are saying that VID _MUST_ be different? > >
Are you sure that you don't have those backwards? My unit use VID 0403, which is the FTDI vendor ID. I use PID FED9, where FTDI allocated me FED8 to FEDF (I think). Here's the code I use to enumerate the connected devices: ***************** Borland C++ Builder code ******************* void __fastcall TFormLink::BTFindClick(TObject *Sender) { char devstring[30]; DWORD numdevs, devindex = 0; FT_STATUS fts; // if we have an open device, close it before listing devices if(FTH != 0) { // FTH is a global device handle FT_Close(FTH); FTH = 0; } fts = FT_ListDevices( &numdevs, NULL, FT_LIST_NUMBER_ONLY); CBUSB->Items->Clear(); // clear the list in the GUI fts = FT_OK; if(numdevs > 0){ for(devindex = 0; devindex < numdevs; devindex++){ fts = FT_ListDevices( (PVOID)devindex, devstring, FT_LIST_BY_INDEX |FT_OPEN_BY_SERIAL_NUMBER ); //if the result is good, add device in GUI if(fts == FT_OK) CBUSB->Items->Add((const char *)devstring); } } else{ strcpy(devstring, "No USB-1 Found" ); CBUSB->Items->Strings[0] = (const char *)devstring; } CBUSB->ItemIndex = 0; } Here's the code I use to open the device----picked from a list by serial number: void __fastcall TFormLink::BTOpenClick(TObject *Sender) { // try to find and open a CF-1 interface char devstring[30]; long numdevs; long devindex = 0; if(FTH != 0) { FT_Close(FTH); FTH = 0; } fts = FT_ListDevices( &numdevs, NULL, FT_LIST_NUMBER_ONLY); if(numdevs >0) { devindex = CBUSB->ItemIndex; // get item selector from GUI // get the serial number from the GUI string if(devindex >=0)strcpy(devstring, CBUSB->Items->Strings[CBUSB-> ItemIndex].c_str()); fts = FT_OpenEx((PVOID)devstring, (DWORD)FT_OPEN_BY_SERIAL_NUMBER, &FTH); } if(fts == FT_OK){ FT_ResetDevice(FTH); FT_SetTimeouts(FTH, 300,300); } } Mark Borgerson